PageSourceSearch

https://www.onebank.eg/resources/js/page.js?v=178640513379

js onebank.eg collected 2026-10-09 21:37:22 UTC 1,460,515 bytes, 33,193 lines download raw bytes

vendor: 5,916 bytes, lines 1-178
1/******/
2(function (modules) { // webpackBootstrap
3    /******/ 	// The module cache
4    /******/
5    var installedModules = {};
6    /******/
7    /******/ 	// The require function
8    /******/
9    function __webpack_require__(moduleId) { // @js-ok
10        /******/
11        /******/ 		// Check if module is in cache
12        /******/
13        if (installedModules[moduleId]) {
14            /******/
15            return installedModules[moduleId].exports;
16            /******/
17        }
18        /******/ 		// Create a new module (and put it into the cache)
19        /******/
20        var module = installedModules[moduleId] = {
21            /******/            i: moduleId,
22            /******/            l: false,
23            /******/            exports: {}
24            /******/
25        };
26        /******/
27        /******/ 		// Execute the module function
28        /******/
29        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
30        /******/
31        /******/ 		// Flag the module as loaded
32        /******/
33        module.l = true;
34        /******/
35        /******/ 		// Return the exports of the module
36        /******/
37        return module.exports;
38        /******/
39    }
40
41    /******/
42    /******/
43    /******/ 	// expose the modules object (__webpack_modules__)
44    /******/
45    __webpack_require__.m = modules;
46    /******/
47    /******/ 	// expose the module cache
48    /******/
49    __webpack_require__.c = installedModules;
50    /******/
51    /******/ 	// define getter function for harmony exports
52    /******/
53    __webpack_require__.d = function (exports, name, getter) {
54        /******/
55        if (!__webpack_require__.o(exports, name)) {
56            /******/
57            Object.defineProperty(exports, name, {enumerable: true, get: getter});
58            /******/
59        }
60        /******/
61    };
62    /******/
63    /******/ 	// define __esModule on exports
64    /******/
65    __webpack_require__.r = function (exports) {
66        /******/
67        if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
68            /******/
69            Object.defineProperty(exports, Symbol.toStringTag, {value: 'Module'});
70            /******/
71        }
72        /******/
73        Object.defineProperty(exports, '__esModule', {value: true});
74        /******/
75    };
76    /******/
77    /******/ 	// create a fake namespace object
78    /******/ 	// mode & 1: value is a module id, require it
79    /******/ 	// mode & 2: merge all properties of value into the ns
80    /******/ 	// mode & 4: return value when already ns object
81    /******/ 	// mode & 8|1: behave like require
82    /******/
83    __webpack_require__.t = function (value, mode) {
84        /******/
85        if (mode & 1) value = __webpack_require__(value);
86        /******/
87        if (mode & 8) return value;
88        /******/
89        if ((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
90        /******/
91        var ns = Object.create(null);
92        /******/
93        __webpack_require__.r(ns);
94        /******/
95        Object.defineProperty(ns, 'default', {enumerable: true, value: value});
96        /******/
97        if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) {
98            return value[key];
99        }.bind(null, key));
100        /******/
101        return ns;
102        /******/
103    };
104    /******/
105    /******/ 	// getDefaultExport function for compatibility with non-harmony modules
106    /******/
107    __webpack_require__.n = function (module) {
108        /******/
109        var getter = module && module.__esModule ?
110            /******/            function getDefault() {
111                return module['default'];
112            } :
113            /******/            function getModuleExports() {
114                return module;
115            };
116        /******/
117        __webpack_require__.d(getter, 'a', getter);
118        /******/
119        return getter;
120        /******/
121    };
122    /******/
123    /******/ 	// Object.prototype.hasOwnProperty.call
124    /******/
125    __webpack_require__.o = function (object, property) {
126        return Object.prototype.hasOwnProperty.call(object, property);
127    };
128    /******/
129    /******/ 	// __webpack_public_path__
130    /******/
131    __webpack_require__.p = "";
132    /******/
133    /******/
134    /******/ 	// Load entry module and return exports
135    /******/
136    return __webpack_require__(__webpack_require__.s = 0);
137    /******/
138})
139    /************************************************************************/
140    /******/ ([
141    /* 0 */
142    /***/ (function (module, exports, __webpack_require__) {
143
144
145        /*
146|--------------------------------------------------------------------------
147| Core
148|--------------------------------------------------------------------------
149|
150| The start point of the project. Include jQuery, Bootstrap and required
151| plugins and define page object. This file is required.
152|
153*/
154        __webpack_require__(1);
155
156        /*
157|--------------------------------------------------------------------------
158| Vendors
159|--------------------------------------------------------------------------
160|
161| Load some plugins and define initializer methods. If you don't need any
162| of the following plugins, simply comment the line.
163|
164| The minified size of each module has stated for your reference. So you'd
165| know how much KB you can save by removing a vendor.
166|
167*/
168        __webpack_require__(12);            // 14 kb
169        __webpack_require__(14);  // 03 kb
170        __webpack_require__(15);      // 05 kb
171        __webpack_require__(17);        // 13 kb
172        __webpack_require__(20);         // 15 kb
173        __webpack_require__(49);       // 23 kb
174        __webpack_require__(52);           // 07 kb
175        __webpack_require__(54);     // 45 kb
176        __webpack_require__(56);        // 25 kb
177        __webpack_require__(59);          // 43 kb
178        __webpack_require__(61);          // 11 kb
179
180
181        /*
182|--------------------------------------------------------------------------
183| Partials
184|--------------------------------------------------------------------------
185|
186| Split the application code to several files. This file is required.
187|
188*/
189        __webpack_require__(63);
190
191
192        /***/
193    }),
194    /* 1 */
195    /***/ (function (module, exports, __webpack_require__) {
196
197
198        /*
199|--------------------------------------------------------------------------
200| Main
201|--------------------------------------------------------------------------
202|
203| The start point of the project. Include jQuery, Bootstrap and required
204| plugins and define page object. These files are mandatory.
205|
206*/
207        __webpack_require__(2);
208
209        __webpack_require__(10);
210        __webpack_require__(11);
211
212
213        /***/
214    }),
215    /* 2 */
216    /***/ (function (module, exports, __webpack_require__) {
217
218
219        /**
220         * Load required plugins.
221         */
222        window.$ = window.jQuery = __webpack_require__(3);
223        window.Popper = __webpack_require__(4);
224        __webpack_require__(6);
225        window.SmoothScroll = __webpack_require__(8);
226        __webpack_require__(9);
227
228
229        /**
230         * Create window.page and init the application.
231         */
232
233        +function ($, window) {
234
235            var page = {
236                name: 'onebank',
237                version: '1.0.0',
238                vendors: [],
239
240                // Cache popular elements
241                body: $('body'),
242                navbar: $('.navbar'),
243                header: $('.header'),
244                footer: $('.footer'),
245            }
246
247            page.defaults = {
248                googleApiKey: null,
249                googleAnalyticsKey: null,
250                reCaptchaSiteKey: null,
251                reCaptchaLanguage: null,
252                disableAOSonMobile: true,
253                smoothScroll: true,
254            }
255
256            /**
257             * Call all the required initializers.
258             */
259            page.init = function () {
260
261                // Vendors
262                //
263                page.initVendors();
264
265                // Partials
266                //
267                page.initBind();
268                page.initDrawer();
269                page.initFont();
270                page.initForm();
271                page.initMailer();
272                page.initModal();
273                page.initNavbar();
274                page.initOffcanvas();
275                page.initPopup();
276                page.initScroll();
277                page.initSection();
278                page.initSidebar();
279                page.initVideo();
280
281
282                // Anchor for headings
283                //
284                $('[data-provide="anchor"]').each(function () {
285                    var heading = $(this);
286                    heading.append('<a class="anchor" href="#' + heading.attr('id') + '"></a>');
287                });
288
289
290            }
291
292
293            /**
294             * Initialize all of the loaded vendors.
295             */
296            page.initVendors = function () {
297                page.vendors.forEach(function (vendor) {
298                    var fn = window.page["init" + vendor];
299                    if (typeof fn === 'function') {
300                        fn();
301                    }
302                });
303            }
304
305            /**
306             * Register loaded vendor to be initialized after DOM load.
307             * It's case sensitive, since it calls "initVendorName" method.
308             */
309            page.registerVendor = function ($name) {
310                page.vendors.push($name);
311            }
312
313            window.page = page;
314        }(jQuery, window);
315
316
317        /**
318         * Once the DOM is loaded, start the magic.
319         */
320        $(function () {
321            //page.init();
322        });
323
324
325        /***/
326    }),
327    /* 3 */
328    /***/ (function (module, exports, __webpack_require__) {
329
330        var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
331 * Includes Sizzle.js
332 * https://sizzlejs.com/
333 *
334 * Copyright JS Foundation and other contributors
335 * Released under the MIT license
336 * https://jquery.org/license
337 *
338 */
339        (function (global, factory) {
340
341            "use strict";
342
343            if (typeof module === "object" && typeof module.exports === "object") {
344
345                // For CommonJS and CommonJS-like environments where a proper `window`
346                // is present, execute the factory and get jQuery.
347                // For environments that do not have a `window` with a `document`
348                // (such as Node.js), expose a factory as module.exports.
349                // This accentuates the need for the creation of a real `window`.
350                // e.g. var jQuery = require("jquery")(window);
351                // See ticket #--14549 for more info.
352                module.exports = global.document ?
353                    factory(global, true) :
354                    function (w) {
355                        if (!w.document) {
356                            throw new Error("jQuery requires a window with a document");
357                        }
358                        return factory(w);
359                    };
360            } else {
361                factory(global);
362            }
363
364// Pass this if window is not defined yet
365        })(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
366
367// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
368// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
369// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
370// enough that all such attempts are guarded in a try block.
371            "use strict";
372
373            var arr = [];
374
375            var document = window.document;
376
377            var getProto = Object.getPrototypeOf;
378
379            var slice = arr.slice;
380
381            var concat = arr.concat;
382
383            var push = arr.push;
384
385            var indexOf = arr.indexOf;
386
387            var class2type = {};
388
389            var toString = class2type.toString;
390
391            var hasOwn = class2type.hasOwnProperty;
392
393            var fnToString = hasOwn.toString;
394
395            var ObjectFunctionString = fnToString.call(Object);
396
397            var support = {};
398
399            var isFunction = function isFunction(obj) {
400
401                // Support: Chrome <=57, Firefox <=52
402                // In some browsers, typeof returns "function" for HTML <object> elements
403                // (i.e., `typeof document.createElement( "object" ) === "function"`).
404                // We don't want to classify *any* DOM node as a function.
405                return typeof obj === "function" && typeof obj.nodeType !== "number";
406            };
407
408
409            var isWindow = function isWindow(obj) {
410                return obj != null && obj === obj.window;
411            };
412
413
414            var preservedScriptAttributes = {
415                type: true,
416                src: true,
417                noModule: true
418            };
419
420            function DOMEval(code, doc, node) {
421                doc = doc || document;
422
423                var i,
424                    script = doc.createElement("script");
425
426                script.text = code;
427                if (node) {
428                    for (i in preservedScriptAttributes) {
429                        if (node[i]) {
430                            script[i] = node[i];
431                        }
432                    }
433                }
434                doc.head.appendChild(script).parentNode.removeChild(script);
435            }
436
437
438            function toType(obj) {
439                if (obj == null) {
440                    return obj + "";
441                }
442
vendor: 14,203 bytes, lines 443-841
443                // Support: Android <=2.3 only (functionish RegExp)
444                return typeof obj === "object" || typeof obj === "function" ?
445                    class2type[toString.call(obj)] || "object" :
446                    typeof obj;
447            }
448
449            /* global Symbol */
450// Defining this global in .eslintrc.json would create a danger of using the global
451// unguarded in another place, it seems safer to define global only for this module
452
453
454            var
455                version = "3.6.0",
456
457                // Define a local copy of jQuery
458                jQuery = function (selector, context) {
459
460                    // The jQuery object is actually just the init constructor 'enhanced'
461                    // Need init if jQuery is called (just allow error to be thrown if not included)
462                    return new jQuery.fn.init(selector, context);
463                },
464
465                // Support: Android <=4.0 only
466                // Make sure we trim BOM and NBSP
467                rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
468
469            jQuery.fn = jQuery.prototype = {
470
471                // The current version of jQuery being used
472                jquery: version,
473
474                constructor: jQuery,
475
476                // The default length of a jQuery object is 0
477                length: 0,
478
479                toArray: function () {
480                    return slice.call(this);
481                },
482
483                // Get the Nth element in the matched element set OR
484                // Get the whole matched element set as a clean array
485                get: function (num) {
486
487                    // Return all the elements in a clean array
488                    if (num == null) {
489                        return slice.call(this);
490                    }
491
492                    // Return just the one element from the set
493                    return num < 0 ? this[num + this.length] : this[num];
494                },
495
496                // Take an array of elements and push it onto the stack
497                // (returning the new matched element set)
498                pushStack: function (elems) {
499
500                    // Build a new jQuery matched element set
501                    var ret = jQuery.merge(this.constructor(), elems);
502
503                    // Add the old object onto the stack (as a reference)
504                    ret.prevObject = this;
505
506                    // Return the newly-formed element set
507                    return ret;
508                },
509
510                // Execute a callback for every element in the matched set.
511                each: function (callback) {
512                    return jQuery.each(this, callback);
513                },
514
515                map: function (callback) {
516                    return this.pushStack(jQuery.map(this, function (elem, i) {
517                        return callback.call(elem, i, elem);
518                    }));
519                },
520
521                slice: function () {
522                    return this.pushStack(slice.apply(this, arguments));
523                },
524
525                first: function () {
526                    return this.eq(0);
527                },
528
529                last: function () {
530                    return this.eq(-1);
531                },
532
533                eq: function (i) {
534                    var len = this.length,
535                        j = +i + (i < 0 ? len : 0);
536                    return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
537                },
538
539                end: function () {
540                    return this.prevObject || this.constructor();
541                },
542
543                // For internal use only.
544                // Behaves like an Array's method, not like a jQuery method.
545                push: push,
546                sort: arr.sort,
547                splice: arr.splice
548            };
549
550            jQuery.extend = jQuery.fn.extend = function () {
551                var options, name, src, copy, copyIsArray, clone,
552                    target = arguments[0] || {},
553                    i = 1,
554                    length = arguments.length,
555                    deep = false;
556
557                // Handle a deep copy situation
558                if (typeof target === "boolean") {
559                    deep = target;
560
561                    // Skip the boolean and the target
562                    target = arguments[i] || {};
563                    i++;
564                }
565
566                // Handle case when target is a string or something (possible in deep copy)
567                if (typeof target !== "object" && !isFunction(target)) {
568                    target = {};
569                }
570
571                // Extend jQuery itself if only one argument is passed
572                if (i === length) {
573                    target = this;
574                    i--;
575                }
576
577                for (; i < length; i++) {
578
579                    // Only deal with non-null/undefined values
580                    if ((options = arguments[i]) != null) {
581
582                        // Extend the base object
583                        for (name in options) {
584                            src = target[name];
585                            copy = options[name];
586
587                            // Prevent never-ending loop
588                            if (target === copy) {
589                                continue;
590                            }
591
592                            // Recurse if we're merging plain objects or arrays
593                            if (deep && copy && (jQuery.isPlainObject(copy) ||
594                                (copyIsArray = Array.isArray(copy)))) {
595
596                                if (copyIsArray) {
597                                    copyIsArray = false;
598                                    clone = src && Array.isArray(src) ? src : [];
599
600                                } else {
601                                    clone = src && jQuery.isPlainObject(src) ? src : {};
602                                }
603
604                                // Never move original objects, clone them
605                                target[name] = jQuery.extend(deep, clone, copy);
606
607                                // Don't bring in undefined values
608                            } else if (copy !== undefined) {
609                                target[name] = copy;
610                            }
611                        }
612                    }
613                }
614
615                // Return the modified object
616                return target;
617            };
618
619            jQuery.extend({
620
621                // Unique for each copy of jQuery on the page
622                expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
623
624                // Assume jQuery is ready without the ready module
625                isReady: true,
626
627                error: function (msg) {
628                    throw new Error(msg);
629                },
630
631                noop: function () {
632                },
633
634                isPlainObject: function (obj) {
635                    var proto, Ctor;
636
637                    // Detect obvious negatives
638                    // Use toString instead of jQuery.type to catch host objects
639                    if (!obj || toString.call(obj) !== "[object Object]") {
640                        return false;
641                    }
642
643                    proto = getProto(obj);
644
645                    // Objects with no prototype (e.g., `Object.create( null )`) are plain
646                    if (!proto) {
647                        return true;
648                    }
649
650                    // Objects with prototype are plain iff they were constructed by a global Object function
651                    Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
652                    return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
653                },
654
655                isEmptyObject: function (obj) {
656
657                    /* eslint-disable no-unused-vars */
658                    // See https://github.com/eslint/eslint/issues/6125
659                    var name;
660
661                    for (name in obj) {
662                        return false;
663                    }
664                    return true;
665                },
666
667                // Evaluates a script in a global context
668                globalEval: function (code) {
669                    DOMEval(code);
670                },
671
672                each: function (obj, callback) {
673                    var length, i = 0;
674
675                    if (isArrayLike(obj)) {
676                        length = obj.length;
677                        for (; i < length; i++) {
678                            if (callback.call(obj[i], i, obj[i]) === false) {
679                                break;
680                            }
681                        }
682                    } else {
683                        for (i in obj) {
684                            if (callback.call(obj[i], i, obj[i]) === false) {
685                                break;
686                            }
687                        }
688                    }
689
690                    return obj;
691                },
692
693                // Support: Android <=4.0 only
694                trim: function (text) {
695                    return text == null ?
696                        "" :
697                        (text + "").replace(rtrim, "");
698                },
699
700                // results is for internal usage only
701                makeArray: function (arr, results) {
702                    var ret = results || [];
703
704                    if (arr != null) {
705                        if (isArrayLike(Object(arr))) {
706                            jQuery.merge(ret,
707                                typeof arr === "string" ?
708                                    [arr] : arr
709                            );
710                        } else {
711                            push.call(ret, arr);
712                        }
713                    }
714
715                    return ret;
716                },
717
718                inArray: function (elem, arr, i) {
719                    return arr == null ? -1 : indexOf.call(arr, elem, i);
720                },
721
722                // Support: Android <=4.0 only, PhantomJS 1 only
723                // push.apply(_, arraylike) throws on ancient WebKit
724                merge: function (first, second) {
725                    var len = +second.length,
726                        j = 0,
727                        i = first.length;
728
729                    for (; j < len; j++) {
730                        first[i++] = second[j];
731                    }
732
733                    first.length = i;
734
735                    return first;
736                },
737
738                grep: function (elems, callback, invert) {
739                    var callbackInverse,
740                        matches = [],
741                        i = 0,
742                        length = elems.length,
743                        callbackExpect = !invert;
744
745                    // Go through the array, only saving the items
746                    // that pass the validator function
747                    for (; i < length; i++) {
748                        callbackInverse = !callback(elems[i], i);
749                        if (callbackInverse !== callbackExpect) {
750                            matches.push(elems[i]);
751                        }
752                    }
753
754                    return matches;
755                },
756
757                // arg is for internal usage only
758                map: function (elems, callback, arg) {
759                    var length, value,
760                        i = 0,
761                        ret = [];
762
763                    // Go through the array, translating each of the items to their new values
764                    if (isArrayLike(elems)) {
765                        length = elems.length;
766                        for (; i < length; i++) {
767                            value = callback(elems[i], i, arg);
768
769                            if (value != null) {
770                                ret.push(value);
771                            }
772                        }
773
774                        // Go through every key on the object,
775                    } else {
776                        for (i in elems) {
777                            value = callback(elems[i], i, arg);
778
779                            if (value != null) {
780                                ret.push(value);
781                            }
782                        }
783                    }
784
785                    // Flatten any nested arrays
786                    return concat.apply([], ret);
787                },
788
789                // A global GUID counter for objects
790                guid: 1,
791
792                // jQuery.support is not used in Core but other projects attach their
793                // properties to it so it needs to exist.
794                support: support
795            });
796
797            if (typeof Symbol === "function") {
798                jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
799            }
800
801// Populate the class2type map
802            jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
803                function (i, name) {
804                    class2type["[object " + name + "]"] = name.toLowerCase();
805                });
806
807            function isArrayLike(obj) {
808
809                // Support: real iOS 8.2 only (not reproducible in simulator)
810                // `in` check used to prevent JIT error (gh-2145)
811                // hasOwn isn't used here due to false negatives
812                // regarding Nodelist length in IE
813                var length = !!obj && "length" in obj && obj.length,
814                    type = toType(obj);
815
816                if (isFunction(obj) || isWindow(obj)) {
817                    return false;
818                }
819
820                return type === "array" || length === 0 ||
821                    typeof length === "number" && length > 0 && (length - 1) in obj;
822            }
823
824            var Sizzle =
825                /*!
826 * Sizzle CSS Selector Engine v2.3.3
827 * https://sizzlejs.com/
828 *
829 * Copyright jQuery Foundation and other contributors
830 * Released under the MIT license
831 * http://jquery.org/license
832 *
833 * Date: 2016-08-08
834 */
835                (function (window) {
836
837                    var i,
838                        support,
839                        Expr,
840                        getText,
841                        isXML,
vendor: 6,579 bytes, lines 842-965
842                        tokenize,
843                        compile,
844                        select,
845                        outermostContext,
846                        sortInput,
847                        hasDuplicate,
848
849                        // Local document vars
850                        setDocument,
851                        document,
852                        docElem,
853                        documentIsHTML,
854                        rbuggyQSA,
855                        rbuggyMatches,
856                        matches,
857                        contains,
858
859                        // Instance-specific data
860                        expando = "sizzle" + 1 * new Date(),
861                        preferredDoc = window.document,
862                        dirruns = 0,
863                        done = 0,
864                        classCache = createCache(),
865                        tokenCache = createCache(),
866                        compilerCache = createCache(),
867                        sortOrder = function (a, b) {
868                            if (a === b) {
869                                hasDuplicate = true;
870                            }
871                            return 0;
872                        },
873
874                        // Instance methods
875                        hasOwn = ({}).hasOwnProperty,
876                        arr = [],
877                        pop = arr.pop,
878                        push_native = arr.push,
879                        push = arr.push,
880                        slice = arr.slice,
881                        // Use a stripped-down indexOf as it's faster than native
882                        // https://jsperf.com/thor-indexof-vs-for/5
883                        indexOf = function (list, elem) {
884                            var i = 0,
885                                len = list.length;
886                            for (; i < len; i++) {
887                                if (list[i] === elem) {
888                                    return i;
889                                }
890                            }
891                            return -1;
892                        },
893
894                        booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
895
896                        // Regular expressions
897
898                        // http://www.w3.org/TR/css3-selectors/#whitespace
899                        whitespace = "[\\x20\\t\\r\\n\\f]",
900
901                        // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
902                        identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
903
904                        // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
905                        attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
906                            // Operator (capture 2)
907                            "*([*^$|!~]?=)" + whitespace +
908                            // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
909                            "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
910                            "*\\]",
911
912                        pseudos = ":(" + identifier + ")(?:\\((" +
913                            // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
914                            // 1. quoted (capture 3; capture 4 or capture 5)
915                            "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
916                            // 2. simple (capture 6)
917                            "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
918                            // 3. anything else (capture 2)
919                            ".*" +
920                            ")\\)|)",
921
922                        // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
923                        rwhitespace = new RegExp(whitespace + "+", "g"),
924                        rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
925
926                        rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
927                        rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
928
929                        rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"),
930
931                        rpseudo = new RegExp(pseudos),
932                        ridentifier = new RegExp("^" + identifier + "$"),
933
934                        matchExpr = {
935                            "ID": new RegExp("^#(" + identifier + ")"),
936                            "CLASS": new RegExp("^\\.(" + identifier + ")"),
937                            "TAG": new RegExp("^(" + identifier + "|[*])"),
938                            "ATTR": new RegExp("^" + attributes),
939                            "PSEUDO": new RegExp("^" + pseudos),
940                            "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
941                                "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
942                                "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
943                            "bool": new RegExp("^(?:" + booleans + ")$", "i"),
944                            // For use in libraries implementing .is()
945                            // We use this for POS matching in `select`
946                            "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
947                                whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
948                        },
949
950                        rinputs = /^(?:input|select|textarea|button)$/i,
951                        rheader = /^h\d$/i,
952
953                        rnative = /^[^{]+\{\s*\[native \w/,
954
955                        // Easily-parseable/retrievable ID or TAG or CLASS selectors
956                        rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
957
958                        rsibling = /[+~]/,
959
960                        // CSS escapes
961                        // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
962                        runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
963                        funescape = function (_, escaped, escapedWhitespace) {
964                            var high = "0x" + escaped - 0x10000;
965                            // NaN means non-codepoint
vendor: 4,124 bytes, lines 966-1050
966                            // Support: Firefox<24
967                            // Workaround erroneous numeric interpretation of +"0x"
968                            return high !== high || escapedWhitespace ?
969                                escaped :
970                                high < 0 ?
971                                    // BMP codepoint
972                                    String.fromCharCode(high + 0x10000) :
973                                    // Supplemental Plane codepoint (surrogate pair)
974                                    String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
975                        },
976
977                        // CSS string/identifier serialization
978                        // https://drafts.csswg.org/cssom/#common-serializing-idioms
979                        rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
980                        fcssescape = function (ch, asCodePoint) {
981                            if (asCodePoint) {
982
983                                // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
984                                if (ch === "\0") {
985                                    return "\uFFFD";
986                                }
987
988                                // Control characters and (dependent upon position) numbers get escaped as code points
989                                return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
990                            }
991
992                            // Other potentially-special ASCII characters get backslash-escaped
993                            return "\\" + ch;
994                        },
995
996                        // Used for iframes
997                        // See setDocument()
998                        // Removing the function wrapper causes a "Permission Denied"
999                        // error in IE
1000                        unloadHandler = function () {
1001                            setDocument();
1002                        },
1003
1004                        disabledAncestor = addCombinator(
1005                            function (elem) {
1006                                return elem.disabled === true && ("form" in elem || "label" in elem);
1007                            },
1008                            {dir: "parentNode", next: "legend"}
1009                        );
1010
1011// Optimize for push.apply( _, NodeList )
1012                    try {
1013                        push.apply(
1014                            (arr = slice.call(preferredDoc.childNodes)),
1015                            preferredDoc.childNodes
1016                        );
1017                        // Support: Android<4.0
1018                        // Detect silently failing push.apply
1019                        arr[preferredDoc.childNodes.length].nodeType;
1020                    } catch (e) {
1021                        push = {
1022                            apply: arr.length ?
1023
1024                                // Leverage slice if possible
1025                                function (target, els) {
1026                                    push_native.apply(target, slice.call(els));
1027                                } :
1028
1029                                // Support: IE<9
1030                                // Otherwise append directly
1031                                function (target, els) {
1032                                    var j = target.length,
1033                                        i = 0;
1034                                    // Can't trust NodeList.length
1035                                    while ((target[j++] = els[i++])) {
1036                                    }
1037                                    target.length = j - 1;
1038                                }
1039                        };
1040                    }
1041
1042                    function Sizzle(selector, context, results, seed) {
1043                        var m, i, elem, nid, match, groups, newSelector,
1044                            newContext = context && context.ownerDocument,
1045
1046                            // nodeType defaults to 9, since context defaults to document
1047                            nodeType = context ? context.nodeType : 9;
1048
1049                        results = results || [];
1050
vendor: 8,533 bytes, lines 1051-1215
1051                        // Return early from calls with invalid selector or context
1052                        if (typeof selector !== "string" || !selector ||
1053                            nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
1054
1055                            return results;
1056                        }
1057
1058                        // Try to shortcut find operations (as opposed to filters) in HTML documents
1059                        if (!seed) {
1060
1061                            if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
1062                                setDocument(context);
1063                            }
1064                            context = context || document;
1065
1066                            if (documentIsHTML) {
1067
1068                                // If the selector is sufficiently simple, try using a "get*By*" DOM method
1069                                // (excepting DocumentFragment context, where the methods don't exist)
1070                                if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
1071
1072                                    // ID selector
1073                                    if ((m = match[1])) {
1074
1075                                        // Document context
1076                                        if (nodeType === 9) {
1077                                            if ((elem = context.getElementById(m))) {
1078
1079                                                // Support: IE, Opera, Webkit
1080                                                // TODO: identify versions
1081                                                // getElementById can match elements by name instead of ID
1082                                                if (elem.id === m) {
1083                                                    results.push(elem);
1084                                                    return results;
1085                                                }
1086                                            } else {
1087                                                return results;
1088                                            }
1089
1090                                            // Element context
1091                                        } else {
1092
1093                                            // Support: IE, Opera, Webkit
1094                                            // TODO: identify versions
1095                                            // getElementById can match elements by name instead of ID
1096                                            if (newContext && (elem = newContext.getElementById(m)) &&
1097                                                contains(context, elem) &&
1098                                                elem.id === m) {
1099
1100                                                results.push(elem);
1101                                                return results;
1102                                            }
1103                                        }
1104
1105                                        // Type selector
1106                                    } else if (match[2]) {
1107                                        push.apply(results, context.getElementsByTagName(selector));
1108                                        return results;
1109
1110                                        // Class selector
1111                                    } else if ((m = match[3]) && support.getElementsByClassName &&
1112                                        context.getElementsByClassName) {
1113
1114                                        push.apply(results, context.getElementsByClassName(m));
1115                                        return results;
1116                                    }
1117                                }
1118
1119                                // Take advantage of querySelectorAll
1120                                if (support.qsa &&
1121                                    !compilerCache[selector + " "] &&
1122                                    (!rbuggyQSA || !rbuggyQSA.test(selector))) {
1123
1124                                    if (nodeType !== 1) {
1125                                        newContext = context;
1126                                        newSelector = selector;
1127
1128                                        // qSA looks outside Element context, which is not what we want
1129                                        // Thanks to Andrew Dupont for this workaround technique
1130                                        // Support: IE <=8
1131                                        // Exclude object elements
1132                                    } else if (context.nodeName.toLowerCase() !== "object") {
1133
1134                                        // Capture the context ID, setting it first if necessary
1135                                        if ((nid = context.getAttribute("id"))) {
1136                                            nid = nid.replace(rcssescape, fcssescape);
1137                                        } else {
1138                                            context.setAttribute("id", (nid = expando));
1139                                        }
1140
1141                                        // Prefix every selector in the list
1142                                        groups = tokenize(selector);
1143                                        i = groups.length;
1144                                        while (i--) {
1145                                            groups[i] = "#" + nid + " " + toSelector(groups[i]);
1146                                        }
1147                                        newSelector = groups.join(",");
1148
1149                                        // Expand context for sibling selectors
1150                                        newContext = rsibling.test(selector) && testContext(context.parentNode) ||
1151                                            context;
1152                                    }
1153
1154                                    if (newSelector) {
1155                                        try {
1156                                            push.apply(results,
1157                                                newContext.querySelectorAll(newSelector)
1158                                            );
1159                                            return results;
1160                                        } catch (qsaError) {
1161                                        } finally {
1162                                            if (nid === expando) {
1163                                                context.removeAttribute("id");
1164                                            }
1165                                        }
1166                                    }
1167                                }
1168                            }
1169                        }
1170
1171                        // All others
1172                        return select(selector.replace(rtrim, "$1"), context, results, seed);
1173                    }
1174
1175                    /**
1176                     * Create key-value caches of limited size
1177                     * @returns {function(string, object)} Returns the Object data after storing it on itself with
1178                     *    property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1179                     *    deleting the oldest entry
1180                     */
1181                    function createCache() {
1182                        var keys = [];
1183
1184                        function cache(key, value) {
1185                            // Use (key + " ") to avoid collision with native prototype properties (see Issue #--157)
1186                            if (keys.push(key + " ") > Expr.cacheLength) {
1187                                // Only keep the most recent entries
1188                                delete cache[keys.shift()];
1189                            }
1190                            return (cache[key + " "] = value);
1191                        }
1192
1193                        return cache;
1194                    }
1195
1196                    /**
1197                     * Mark a function for special use by Sizzle
1198                     * @param {Function} fn The function to mark
1199                     */
1200                    function markFunction(fn) {
1201                        fn[expando] = true;
1202                        return fn;
1203                    }
1204
1205                    /**
1206                     * Support testing using an element
1207                     * @param {Function} fn Passed the created element and returns a boolean result
1208                     */
1209                    function assert(fn) {
1210                        var el = document.createElement("fieldset");
1211
1212                        try {
1213                            return !!fn(el);
1214                        } catch (e) {
1215                            return false;
vendor: 18,694 bytes, lines 1216-1579
1216                        } finally {
1217                            // Remove from its parent by default
1218                            if (el.parentNode) {
1219                                el.parentNode.removeChild(el);
1220                            }
1221                            // release memory in IE
1222                            el = null;
1223                        }
1224                    }
1225
1226                    /**
1227                     * Adds the same handler for all of the specified attrs
1228                     * @param {String} attrs Pipe-separated list of attributes
1229                     * @param {Function} handler The method that will be applied
1230                     */
1231                    function addHandle(attrs, handler) {
1232                        var arr = attrs.split("|"),
1233                            i = arr.length;
1234
1235                        while (i--) {
1236                            Expr.attrHandle[arr[i]] = handler;
1237                        }
1238                    }
1239
1240                    /**
1241                     * Checks document order of two siblings
1242                     * @param {Element} a
1243                     * @param {Element} b
1244                     * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1245                     */
1246                    function siblingCheck(a, b) {
1247                        var cur = b && a,
1248                            diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1249                                a.sourceIndex - b.sourceIndex;
1250
1251                        // Use IE sourceIndex if available on both nodes
1252                        if (diff) {
1253                            return diff;
1254                        }
1255
1256                        // Check if b follows a
1257                        if (cur) {
1258                            while ((cur = cur.nextSibling)) {
1259                                if (cur === b) {
1260                                    return -1;
1261                                }
1262                            }
1263                        }
1264
1265                        return a ? 1 : -1;
1266                    }
1267
1268                    /**
1269                     * Returns a function to use in pseudos for input types
1270                     * @param {String} type
1271                     */
1272                    function createInputPseudo(type) {
1273                        return function (elem) {
1274                            var name = elem.nodeName.toLowerCase();
1275                            return name === "input" && elem.type === type;
1276                        };
1277                    }
1278
1279                    /**
1280                     * Returns a function to use in pseudos for buttons
1281                     * @param {String} type
1282                     */
1283                    function createButtonPseudo(type) {
1284                        return function (elem) {
1285                            var name = elem.nodeName.toLowerCase();
1286                            return (name === "input" || name === "button") && elem.type === type;
1287                        };
1288                    }
1289
1290                    /**
1291                     * Returns a function to use in pseudos for :enabled/:disabled
1292                     * @param {Boolean} disabled true for :disabled; false for :enabled
1293                     */
1294                    function createDisabledPseudo(disabled) {
1295
1296                        // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
1297                        return function (elem) {
1298
1299                            // Only certain elements can match :enabled or :disabled
1300                            // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
1301                            // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
1302                            if ("form" in elem) {
1303
1304                                // Check for inherited disabledness on relevant non-disabled elements:
1305                                // * listed form-associated elements in a disabled fieldset
1306                                //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
1307                                //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
1308                                // * option elements in a disabled optgroup
1309                                //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
1310                                // All such elements have a "form" property.
1311                                if (elem.parentNode && elem.disabled === false) {
1312
1313                                    // Option elements defer to a parent optgroup if present
1314                                    if ("label" in elem) {
1315                                        if ("label" in elem.parentNode) {
1316                                            return elem.parentNode.disabled === disabled;
1317                                        } else {
1318                                            return elem.disabled === disabled;
1319                                        }
1320                                    }
1321
1322                                    // Support: IE 6 - 11
1323                                    // Use the isDisabled shortcut property to check for disabled fieldset ancestors
1324                                    return elem.isDisabled === disabled ||
1325
1326                                        // Where there is no isDisabled, check manually
1327                                        /* jshint -W018 */
1328                                        elem.isDisabled !== !disabled &&
1329                                        disabledAncestor(elem) === disabled;
1330                                }
1331
1332                                return elem.disabled === disabled;
1333
1334                                // Try to winnow out elements that can't be disabled before trusting the disabled property.
1335                                // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
1336                                // even exist on them, let alone have a boolean value.
1337                            } else if ("label" in elem) {
1338                                return elem.disabled === disabled;
1339                            }
1340
1341                            // Remaining elements are neither :enabled nor :disabled
1342                            return false;
1343                        };
1344                    }
1345
1346                    /**
1347                     * Returns a function to use in pseudos for positionals
1348                     * @param {Function} fn
1349                     */
1350                    function createPositionalPseudo(fn) {
1351                        return markFunction(function (argument) {
1352                            argument = +argument;
1353                            return markFunction(function (seed, matches) {
1354                                var j,
1355                                    matchIndexes = fn([], seed.length, argument),
1356                                    i = matchIndexes.length;
1357
1358                                // Match elements found at the specified indexes
1359                                while (i--) {
1360                                    if (seed[(j = matchIndexes[i])]) {
1361                                        seed[j] = !(matches[j] = seed[j]);
1362                                    }
1363                                }
1364                            });
1365                        });
1366                    }
1367
1368                    /**
1369                     * Checks a node for validity as a Sizzle context
1370                     * @param {Element|Object=} context
1371                     * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
1372                     */
1373                    function testContext(context) {
1374                        return context && typeof context.getElementsByTagName !== "undefined" && context;
1375                    }
1376
1377                    // Expose support vars for convenience
1378                    support = Sizzle.support = {};
1379
1380                    /**
1381                     * Detects XML nodes
1382                     * @param {Element|Object} elem An element or a document
1383                     * @returns {Boolean} True iff elem is a non-HTML XML node
1384                     */
1385                    isXML = Sizzle.isXML = function (elem) {
1386                        // documentElement is verified for cases where it doesn't yet exist
1387                        // (such as loading iframes in IE - #4833)
1388                        var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1389                        return documentElement ? documentElement.nodeName !== "HTML" : false;
1390                    };
1391
1392                    /**
1393                     * Sets document-related variables once based on the current document
1394                     * @param {Element|Object} [doc] An element or document object to use to set the document
1395                     * @returns {Object} Returns the current document
1396                     */
1397                    setDocument = Sizzle.setDocument = function (node) {
1398                        var hasCompare, subWindow,
1399                            doc = node ? node.ownerDocument || node : preferredDoc;
1400
1401                        // Return early if doc is invalid or already selected
1402                        if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
1403                            return document;
1404                        }
1405
1406                        // Update global variables
1407                        document = doc;
1408                        docElem = document.documentElement;
1409                        documentIsHTML = !isXML(document);
1410
1411                        // Support: IE 9-11, Edge
1412                        // Accessing iframe documents after unload throws "permission denied" errors (jQuery #--13936)
1413                        if (preferredDoc !== document &&
1414                            (subWindow = document.defaultView) && subWindow.top !== subWindow) {
1415
1416                            // Support: IE 11, Edge
1417                            if (subWindow.addEventListener) {
1418                                subWindow.addEventListener("unload", unloadHandler, false);
1419
1420                                // Support: IE 9 - 10 only
1421                            } else if (subWindow.attachEvent) {
1422                                subWindow.attachEvent("onunload", unloadHandler);
1423                            }
1424                        }
1425
1426                        /* Attributes
1427	---------------------------------------------------------------------- */
1428
1429                        // Support: IE<8
1430                        // Verify that getAttribute really returns attributes and not properties
1431                        // (excepting IE8 booleans)
1432                        support.attributes = assert(function (el) {
1433                            el.className = "i";
1434                            return !el.getAttribute("className");
1435                        });
1436
1437                        /* getElement(s)By*
1438	---------------------------------------------------------------------- */
1439
1440                        // Check if getElementsByTagName("*") returns only elements
1441                        support.getElementsByTagName = assert(function (el) {
1442                            el.appendChild(document.createComment(""));
1443                            return !el.getElementsByTagName("*").length;
1444                        });
1445
1446                        // Support: IE<9
1447                        support.getElementsByClassName = rnative.test(document.getElementsByClassName);
1448
1449                        // Support: IE<10
1450                        // Check if getElementById returns elements by name
1451                        // The broken getElementById methods don't pick up programmatically-set names,
1452                        // so use a roundabout getElementsByName test
1453                        support.getById = assert(function (el) {
1454                            docElem.appendChild(el).id = expando;
1455                            return !document.getElementsByName || !document.getElementsByName(expando).length;
1456                        });
1457
1458                        // ID filter and find
1459                        if (support.getById) {
1460                            Expr.filter["ID"] = function (id) {
1461                                var attrId = id.replace(runescape, funescape);
1462                                return function (elem) {
1463                                    return elem.getAttribute("id") === attrId;
1464                                };
1465                            };
1466                            Expr.find["ID"] = function (id, context) {
1467                                if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1468                                    var elem = context.getElementById(id);
1469                                    return elem ? [elem] : [];
1470                                }
1471                            };
1472                        } else {
1473                            Expr.filter["ID"] = function (id) {
1474                                var attrId = id.replace(runescape, funescape);
1475                                return function (elem) {
1476                                    var node = typeof elem.getAttributeNode !== "undefined" &&
1477                                        elem.getAttributeNode("id");
1478                                    return node && node.value === attrId;
1479                                };
1480                            };
1481
1482                            // Support: IE 6 - 7 only
1483                            // getElementById is not reliable as a find shortcut
1484                            Expr.find["ID"] = function (id, context) {
1485                                if (typeof context.getElementById !== "undefined" && documentIsHTML) {
1486                                    var node, i, elems,
1487                                        elem = context.getElementById(id);
1488
1489                                    if (elem) {
1490
1491                                        // Verify the id attribute
1492                                        node = elem.getAttributeNode("id");
1493                                        if (node && node.value === id) {
1494                                            return [elem];
1495                                        }
1496
1497                                        // Fall back on getElementsByName
1498                                        elems = context.getElementsByName(id);
1499                                        i = 0;
1500                                        while ((elem = elems[i++])) {
1501                                            node = elem.getAttributeNode("id");
1502                                            if (node && node.value === id) {
1503                                                return [elem];
1504                                            }
1505                                        }
1506                                    }
1507
1508                                    return [];
1509                                }
1510                            };
1511                        }
1512
1513                        // Tag
1514                        Expr.find["TAG"] = support.getElementsByTagName ?
1515                            function (tag, context) {
1516                                if (typeof context.getElementsByTagName !== "undefined") {
1517                                    return context.getElementsByTagName(tag);
1518
1519                                    // DocumentFragment nodes don't have gEBTN
1520                                } else if (support.qsa) {
1521                                    return context.querySelectorAll(tag);
1522                                }
1523                            } :
1524
1525                            function (tag, context) {
1526                                var elem,
1527                                    tmp = [],
1528                                    i = 0,
1529                                    // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
1530                                    results = context.getElementsByTagName(tag);
1531
1532                                // Filter out possible comments
1533                                if (tag === "*") {
1534                                    while ((elem = results[i++])) {
1535                                        if (elem.nodeType === 1) {
1536                                            tmp.push(elem);
1537                                        }
1538                                    }
1539
1540                                    return tmp;
1541                                }
1542                                return results;
1543                            };
1544
1545                        // Class
1546                        Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
1547                            if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
1548                                return context.getElementsByClassName(className);
1549                            }
1550                        };
1551
1552                        /* QSA/matchesSelector
1553	---------------------------------------------------------------------- */
1554
1555                        // QSA and matchesSelector support
1556
1557                        // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1558                        rbuggyMatches = [];
1559
1560                        // qSa(:focus) reports false when true (Chrome 21)
1561                        // We allow this because of a bug in IE8/9 that throws an error
1562                        // whenever `document.activeElement` is accessed on an iframe
1563                        // So, we allow :focus to pass through QSA all the time to avoid the IE error
1564                        // See https://bugs.jquery.com/ticket/13378
1565                        rbuggyQSA = [];
1566
1567                        if ((support.qsa = rnative.test(document.querySelectorAll))) {
1568                            // Build QSA regex
1569                            // Regex strategy adopted from Diego Perini
1570                            assert(function (el) {
1571                                // Select is set to empty string on purpose
1572                                // This is to test IE's treatment of not explicitly
1573                                // setting a boolean content attribute,
1574                                // since its presence should be enough
1575                                // https://bugs.jquery.com/ticket/12359
1576                                docElem.appendChild(el).innerHTML = "<a id='" + expando + "'></a>" +
1577                                    "<select id='" + expando + "-\r\\' msallowcapture=''>" +
1578                                    "<option selected=''></option></select>";
1579
vendor: 47,217 bytes, lines 1580-2466
1580                                // Support: IE8, Opera 11-12.16
1581                                // Nothing should be selected when empty strings follow ^= or $= or *=
1582                                // The test attribute must be unknown in Opera but "safe" for WinRT
1583                                // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
1584                                if (el.querySelectorAll("[msallowcapture^='']").length) {
1585                                    rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
1586                                }
1587
1588                                // Support: IE8
1589                                // Boolean attributes and "value" are not treated correctly
1590                                if (!el.querySelectorAll("[selected]").length) {
1591                                    rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
1592                                }
1593
1594                                // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
1595                                if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
1596                                    rbuggyQSA.push("~=");
1597                                }
1598
1599                                // Webkit/Opera - :checked should return selected option elements
1600                                // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1601                                // IE8 throws error here and will not see later tests
1602                                if (!el.querySelectorAll(":checked").length) {
1603                                    rbuggyQSA.push(":checked");
1604                                }
1605
1606                                // Support: Safari 8+, iOS 8+
1607                                // https://bugs.webkit.org/show_bug.cgi?id=136851
1608                                // In-page `selector#id sibling-combinator selector` fails
1609                                if (!el.querySelectorAll("a#" + expando + "+*").length) {
1610                                    rbuggyQSA.push(".#.+[+~]");
1611                                }
1612                            });
1613
1614                            assert(function (el) {
1615                                el.innerHTML = "<a href='' disabled='disabled'></a>" +
1616                                    "<select disabled='disabled'><option/></select>";
1617
1618                                // Support: Windows 8 Native Apps
1619                                // The type and name attributes are restricted during .innerHTML assignment
1620                                var input = document.createElement("input");
1621                                input.setAttribute("type", "hidden");
1622                                el.appendChild(input).setAttribute("name", "D");
1623
1624                                // Support: IE8
1625                                // Enforce case-sensitivity of name attribute
1626                                if (el.querySelectorAll("[name=d]").length) {
1627                                    rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
1628                                }
1629
1630                                // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1631                                // IE8 throws error here and will not see later tests
1632                                if (el.querySelectorAll(":enabled").length !== 2) {
1633                                    rbuggyQSA.push(":enabled", ":disabled");
1634                                }
1635
1636                                // Support: IE9-11+
1637                                // IE's :disabled selector does not pick up the children of disabled fieldsets
1638                                docElem.appendChild(el).disabled = true;
1639                                if (el.querySelectorAll(":disabled").length !== 2) {
1640                                    rbuggyQSA.push(":enabled", ":disabled");
1641                                }
1642
1643                                // Opera 10-11 does not throw on post-comma invalid pseudos
1644                                el.querySelectorAll("*,:x");
1645                                rbuggyQSA.push(",.*:");
1646                            });
1647                        }
1648
1649                        if ((support.matchesSelector = rnative.test((matches = docElem.matches ||
1650                            docElem.webkitMatchesSelector ||
1651                            docElem.mozMatchesSelector ||
1652                            docElem.oMatchesSelector ||
1653                            docElem.msMatchesSelector)))) {
1654
1655                            assert(function (el) {
1656                                // Check to see if it's possible to do matchesSelector
1657                                // on a disconnected node (IE 9)
1658                                support.disconnectedMatch = matches.call(el, "*");
1659
1660                                // This should fail with an exception
1661                                // Gecko does not error, returns false instead
1662                                matches.call(el, "[s!='']:x");
1663                                rbuggyMatches.push("!=", pseudos);
1664                            });
1665                        }
1666
1667                        rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
1668                        rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
1669
1670                        /* Contains
1671	---------------------------------------------------------------------- */
1672                        hasCompare = rnative.test(docElem.compareDocumentPosition);
1673
1674                        // Element contains another
1675                        // Purposefully self-exclusive
1676                        // As in, an element does not contain itself
1677                        contains = hasCompare || rnative.test(docElem.contains) ?
1678                            function (a, b) {
1679                                var adown = a.nodeType === 9 ? a.documentElement : a,
1680                                    bup = b && b.parentNode;
1681                                return a === bup || !!(bup && bup.nodeType === 1 && (
1682                                    adown.contains ?
1683                                        adown.contains(bup) :
1684                                        a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16
1685                                ));
1686                            } :
1687                            function (a, b) {
1688                                if (b) {
1689                                    while ((b = b.parentNode)) {
1690                                        if (b === a) {
1691                                            return true;
1692                                        }
1693                                    }
1694                                }
1695                                return false;
1696                            };
1697
1698                        /* Sorting
1699	---------------------------------------------------------------------- */
1700
1701                        // Document order sorting
1702                        sortOrder = hasCompare ?
1703                            function (a, b) {
1704
1705                                // Flag for duplicate removal
1706                                if (a === b) {
1707                                    hasDuplicate = true;
1708                                    return 0;
1709                                }
1710
1711                                // Sort on method existence if only one input has compareDocumentPosition
1712                                var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
1713                                if (compare) {
1714                                    return compare;
1715                                }
1716
1717                                // Calculate position if both inputs belong to the same document
1718                                compare = (a.ownerDocument || a) === (b.ownerDocument || b) ?
1719                                    a.compareDocumentPosition(b) :
1720
1721                                    // Otherwise we know they are disconnected
1722                                    1;
1723
1724                                // Disconnected nodes
1725                                if (compare & 1 ||
1726                                    (!support.sortDetached && b.compareDocumentPosition(a) === compare)) {
1727
1728                                    // Choose the first element that is related to our preferred document
1729                                    if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
1730                                        return -1;
1731                                    }
1732                                    if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
1733                                        return 1;
1734                                    }
1735
1736                                    // Maintain original order
1737                                    return sortInput ?
1738                                        (indexOf(sortInput, a) - indexOf(sortInput, b)) :
1739                                        0;
1740                                }
1741
1742                                return compare & 4 ? -1 : 1;
1743                            } :
1744                            function (a, b) {
1745                                // Exit early if the nodes are identical
1746                                if (a === b) {
1747                                    hasDuplicate = true;
1748                                    return 0;
1749                                }
1750
1751                                var cur,
1752                                    i = 0,
1753                                    aup = a.parentNode,
1754                                    bup = b.parentNode,
1755                                    ap = [a],
1756                                    bp = [b];
1757
1758                                // Parentless nodes are either documents or disconnected
1759                                if (!aup || !bup) {
1760                                    return a === document ? -1 :
1761                                        b === document ? 1 :
1762                                            aup ? -1 :
1763                                                bup ? 1 :
1764                                                    sortInput ?
1765                                                        (indexOf(sortInput, a) - indexOf(sortInput, b)) :
1766                                                        0;
1767
1768                                    // If the nodes are siblings, we can do a quick check
1769                                } else if (aup === bup) {
1770                                    return siblingCheck(a, b);
1771                                }
1772
1773                                // Otherwise we need full lists of their ancestors for comparison
1774                                cur = a;
1775                                while ((cur = cur.parentNode)) {
1776                                    ap.unshift(cur);
1777                                }
1778                                cur = b;
1779                                while ((cur = cur.parentNode)) {
1780                                    bp.unshift(cur);
1781                                }
1782
1783                                // Walk down the tree looking for a discrepancy
1784                                while (ap[i] === bp[i]) {
1785                                    i++;
1786                                }
1787
1788                                return i ?
1789                                    // Do a sibling check if the nodes have a common ancestor
1790                                    siblingCheck(ap[i], bp[i]) :
1791
1792                                    // Otherwise nodes in our document sort first
1793                                    ap[i] === preferredDoc ? -1 :
1794                                        bp[i] === preferredDoc ? 1 :
1795                                            0;
1796                            };
1797
1798                        return document;
1799                    };
1800
1801                    Sizzle.matches = function (expr, elements) {
1802                        return Sizzle(expr, null, null, elements);
1803                    };
1804
1805                    Sizzle.matchesSelector = function (elem, expr) {
1806                        // Set document vars if needed
1807                        if ((elem.ownerDocument || elem) !== document) {
1808                            setDocument(elem);
1809                        }
1810
1811                        // Make sure that attribute selectors are quoted
1812                        expr = expr.replace(rattributeQuotes, "='$1']");
1813
1814                        if (support.matchesSelector && documentIsHTML &&
1815                            !compilerCache[expr + " "] &&
1816                            (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
1817                            (!rbuggyQSA || !rbuggyQSA.test(expr))) {
1818
1819                            try {
1820                                var ret = matches.call(elem, expr);
1821
1822                                // IE 9's matchesSelector returns false on disconnected nodes
1823                                if (ret || support.disconnectedMatch ||
1824                                    // As well, disconnected nodes are said to be in a document
1825                                    // fragment in IE 9
1826                                    elem.document && elem.document.nodeType !== 11) {
1827                                    return ret;
1828                                }
1829                            } catch (e) {
1830                            }
1831                        }
1832
1833                        return Sizzle(expr, document, null, [elem]).length > 0;
1834                    };
1835
1836                    Sizzle.contains = function (context, elem) {
1837                        // Set document vars if needed
1838                        if ((context.ownerDocument || context) !== document) {
1839                            setDocument(context);
1840                        }
1841                        return contains(context, elem);
1842                    };
1843
1844                    Sizzle.attr = function (elem, name) {
1845                        // Set document vars if needed
1846                        if ((elem.ownerDocument || elem) !== document) {
1847                            setDocument(elem);
1848                        }
1849
1850                        var fn = Expr.attrHandle[name.toLowerCase()],
1851                            // Don't get fooled by Object.prototype properties (jQuery #--13807)
1852                            val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ?
1853                                fn(elem, name, !documentIsHTML) :
1854                                undefined;
1855
1856                        return val !== undefined ?
1857                            val :
1858                            support.attributes || !documentIsHTML ?
1859                                elem.getAttribute(name) :
1860                                (val = elem.getAttributeNode(name)) && val.specified ?
1861                                    val.value :
1862                                    null;
1863                    };
1864
1865                    Sizzle.escape = function (sel) {
1866                        return (sel + "").replace(rcssescape, fcssescape);
1867                    };
1868
1869                    Sizzle.error = function (msg) {
1870                        throw new Error("Syntax error, unrecognized expression: " + msg);
1871                    };
1872
1873                    /**
1874                     * Document sorting and removing duplicates
1875                     * @param {ArrayLike} results
1876                     */
1877                    Sizzle.uniqueSort = function (results) {
1878                        var elem,
1879                            duplicates = [],
1880                            j = 0,
1881                            i = 0;
1882
1883                        // Unless we *know* we can detect duplicates, assume their presence
1884                        hasDuplicate = !support.detectDuplicates;
1885                        sortInput = !support.sortStable && results.slice(0);
1886                        results.sort(sortOrder);
1887
1888                        if (hasDuplicate) {
1889                            while ((elem = results[i++])) {
1890                                if (elem === results[i]) {
1891                                    j = duplicates.push(i);
1892                                }
1893                            }
1894                            while (j--) {
1895                                results.splice(duplicates[j], 1);
1896                            }
1897                        }
1898
1899                        // Clear input after sorting to release objects
1900                        // See https://github.com/jquery/sizzle/pull/225
1901                        sortInput = null;
1902
1903                        return results;
1904                    };
1905
1906                    /**
1907                     * Utility function for retrieving the text value of an array of DOM nodes
1908                     * @param {Array|Element} elem
1909                     */
1910                    getText = Sizzle.getText = function (elem) {
1911                        var node,
1912                            ret = "",
1913                            i = 0,
1914                            nodeType = elem.nodeType;
1915
1916                        if (!nodeType) {
1917                            // If no nodeType, this is expected to be an array
1918                            while ((node = elem[i++])) {
1919                                // Do not traverse comment nodes
1920                                ret += getText(node);
1921                            }
1922                        } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
1923                            // Use textContent for elements
1924                            // innerText usage removed for consistency of new lines (jQuery #11153)
1925                            if (typeof elem.textContent === "string") {
1926                                return elem.textContent;
1927                            } else {
1928                                // Traverse its children
1929                                for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
1930                                    ret += getText(elem);
1931                                }
1932                            }
1933                        } else if (nodeType === 3 || nodeType === 4) {
1934                            return elem.nodeValue;
1935                        }
1936                        // Do not include comment or processing instruction nodes
1937
1938                        return ret;
1939                    };
1940
1941                    Expr = Sizzle.selectors = {
1942
1943                        // Can be adjusted by the user
1944                        cacheLength: 50,
1945
1946                        createPseudo: markFunction,
1947
1948                        match: matchExpr,
1949
1950                        attrHandle: {},
1951
1952                        find: {},
1953
1954                        relative: {
1955                            ">": {dir: "parentNode", first: true},
1956                            " ": {dir: "parentNode"},
1957                            "+": {dir: "previousSibling", first: true},
1958                            "~": {dir: "previousSibling"}
1959                        },
1960
1961                        preFilter: {
1962                            "ATTR": function (match) {
1963                                match[1] = match[1].replace(runescape, funescape);
1964
1965                                // Move the given value to match[3] whether quoted or unquoted
1966                                match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
1967
1968                                if (match[2] === "~=") {
1969                                    match[3] = " " + match[3] + " ";
1970                                }
1971
1972                                return match.slice(0, 4);
1973                            },
1974
1975                            "CHILD": function (match) {
1976                                /* matches from matchExpr["CHILD"]
1977				1 type (only|nth|...)
1978				2 what (child|of-type)
1979				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1980				4 xn-component of xn+y argument ([+-]?\d*n|)
1981				5 sign of xn-component
1982				6 x of xn-component
1983				7 sign of y-component
1984				8 y of y-component
1985			*/
1986                                match[1] = match[1].toLowerCase();
1987
1988                                if (match[1].slice(0, 3) === "nth") {
1989                                    // nth-* requires argument
1990                                    if (!match[3]) {
1991                                        Sizzle.error(match[0]);
1992                                    }
1993
1994                                    // numeric x and y parameters for Expr.filter.CHILD
1995                                    // remember that false/true cast respectively to 0/1
1996                                    match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
1997                                    match[5] = +((match[7] + match[8]) || match[3] === "odd");
1998
1999                                    // other types prohibit arguments
2000                                } else if (match[3]) {
2001                                    Sizzle.error(match[0]);
2002                                }
2003
2004                                return match;
2005                            },
2006
2007                            "PSEUDO": function (match) {
2008                                var excess,
2009                                    unquoted = !match[6] && match[2];
2010
2011                                if (matchExpr["CHILD"].test(match[0])) {
2012                                    return null;
2013                                }
2014
2015                                // Accept quoted arguments as-is
2016                                if (match[3]) {
2017                                    match[2] = match[4] || match[5] || "";
2018
2019                                    // Strip excess characters from unquoted arguments
2020                                } else if (unquoted && rpseudo.test(unquoted) &&
2021                                    // Get excess from tokenize (recursively)
2022                                    (excess = tokenize(unquoted, true)) &&
2023                                    // advance to the next closing parenthesis
2024                                    (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
2025
2026                                    // excess is a negative index
2027                                    match[0] = match[0].slice(0, excess);
2028                                    match[2] = unquoted.slice(0, excess);
2029                                }
2030
2031                                // Return only captures needed by the pseudo filter method (type and argument)
2032                                return match.slice(0, 3);
2033                            }
2034                        },
2035
2036                        filter: {
2037
2038                            "TAG": function (nodeNameSelector) {
2039                                var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
2040                                return nodeNameSelector === "*" ?
2041                                    function () {
2042                                        return true;
2043                                    } :
2044                                    function (elem) {
2045                                        return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
2046                                    };
2047                            },
2048
2049                            "CLASS": function (className) {
2050                                var pattern = classCache[className + " "];
2051
2052                                return pattern ||
2053                                    (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) &&
2054                                    classCache(className, function (elem) {
2055                                        return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
2056                                    });
2057                            },
2058
2059                            "ATTR": function (name, operator, check) {
2060                                return function (elem) {
2061                                    var result = Sizzle.attr(elem, name);
2062
2063                                    if (result == null) {
2064                                        return operator === "!=";
2065                                    }
2066                                    if (!operator) {
2067                                        return true;
2068                                    }
2069
2070                                    result += "";
2071
2072                                    return operator === "=" ? result === check :
2073                                        operator === "!=" ? result !== check :
2074                                            operator === "^=" ? check && result.indexOf(check) === 0 :
2075                                                operator === "*=" ? check && result.indexOf(check) > -1 :
2076                                                    operator === "$=" ? check && result.slice(-check.length) === check :
2077                                                        operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 :
2078                                                            operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" :
2079                                                                false;
2080                                };
2081                            },
2082
2083                            "CHILD": function (type, what, argument, first, last) {
2084                                var simple = type.slice(0, 3) !== "nth",
2085                                    forward = type.slice(-4) !== "last",
2086                                    ofType = what === "of-type";
2087
2088                                return first === 1 && last === 0 ?
2089
2090                                    // Shortcut for :nth-*(n)
2091                                    function (elem) {
2092                                        return !!elem.parentNode;
2093                                    } :
2094
2095                                    function (elem, context, xml) {
2096                                        var cache, uniqueCache, outerCache, node, nodeIndex, start,
2097                                            dir = simple !== forward ? "nextSibling" : "previousSibling",
2098                                            parent = elem.parentNode,
2099                                            name = ofType && elem.nodeName.toLowerCase(),
2100                                            useCache = !xml && !ofType,
2101                                            diff = false;
2102
2103                                        if (parent) {
2104
2105                                            // :(first|last|only)-(child|of-type)
2106                                            if (simple) {
2107                                                while (dir) {
2108                                                    node = elem;
2109                                                    while ((node = node[dir])) {
2110                                                        if (ofType ?
2111                                                            node.nodeName.toLowerCase() === name :
2112                                                            node.nodeType === 1) {
2113
2114                                                            return false;
2115                                                        }
2116                                                    }
2117                                                    // Reverse direction for :only-* (if we haven't yet done so)
2118                                                    start = dir = type === "only" && !start && "nextSibling";
2119                                                }
2120                                                return true;
2121                                            }
2122
2123                                            start = [forward ? parent.firstChild : parent.lastChild];
2124
2125                                            // non-xml :nth-child(...) stores cache data on `parent`
2126                                            if (forward && useCache) {
2127
2128                                                // Seek `elem` from a previously-cached index
2129
2130                                                // ...in a gzip-friendly way
2131                                                node = parent;
2132                                                outerCache = node[expando] || (node[expando] = {});
2133
2134                                                // Support: IE <9 only
2135                                                // Defend against cloned attroperties (jQuery gh-1709)
2136                                                uniqueCache = outerCache[node.uniqueID] ||
2137                                                    (outerCache[node.uniqueID] = {});
2138
2139                                                cache = uniqueCache[type] || [];
2140                                                nodeIndex = cache[0] === dirruns && cache[1];
2141                                                diff = nodeIndex && cache[2];
2142                                                node = nodeIndex && parent.childNodes[nodeIndex];
2143
2144                                                while ((node = ++nodeIndex && node && node[dir] ||
2145
2146                                                    // Fallback to seeking `elem` from the start
2147                                                    (diff = nodeIndex = 0) || start.pop())) {
2148
2149                                                    // When found, cache indexes on `parent` and break
2150                                                    if (node.nodeType === 1 && ++diff && node === elem) {
2151                                                        uniqueCache[type] = [dirruns, nodeIndex, diff];
2152                                                        break;
2153                                                    }
2154                                                }
2155
2156                                            } else {
2157                                                // Use previously-cached element index if available
2158                                                if (useCache) {
2159                                                    // ...in a gzip-friendly way
2160                                                    node = elem;
2161                                                    outerCache = node[expando] || (node[expando] = {});
2162
2163                                                    // Support: IE <9 only
2164                                                    // Defend against cloned attroperties (jQuery gh-1709)
2165                                                    uniqueCache = outerCache[node.uniqueID] ||
2166                                                        (outerCache[node.uniqueID] = {});
2167
2168                                                    cache = uniqueCache[type] || [];
2169                                                    nodeIndex = cache[0] === dirruns && cache[1];
2170                                                    diff = nodeIndex;
2171                                                }
2172
2173                                                // xml :nth-child(...)
2174                                                // or :nth-last-child(...) or :nth(-last)?-of-type(...)
2175                                                if (diff === false) {
2176                                                    // Use the same loop as above to seek `elem` from the start
2177                                                    while ((node = ++nodeIndex && node && node[dir] ||
2178                                                        (diff = nodeIndex = 0) || start.pop())) {
2179
2180                                                        if ((ofType ?
2181                                                                node.nodeName.toLowerCase() === name :
2182                                                                node.nodeType === 1) &&
2183                                                            ++diff) {
2184
2185                                                            // Cache the index of each encountered element
2186                                                            if (useCache) {
2187                                                                outerCache = node[expando] || (node[expando] = {});
2188
2189                                                                // Support: IE <9 only
2190                                                                // Defend against cloned attroperties (jQuery gh-1709)
2191                                                                uniqueCache = outerCache[node.uniqueID] ||
2192                                                                    (outerCache[node.uniqueID] = {});
2193
2194                                                                uniqueCache[type] = [dirruns, diff];
2195                                                            }
2196
2197                                                            if (node === elem) {
2198                                                                break;
2199                                                            }
2200                                                        }
2201                                                    }
2202                                                }
2203                                            }
2204
2205                                            // Incorporate the offset, then check against cycle size
2206                                            diff -= last;
2207                                            return diff === first || (diff % first === 0 && diff / first >= 0);
2208                                        }
2209                                    };
2210                            },
2211
2212                            "PSEUDO": function (pseudo, argument) {
2213                                // pseudo-class names are case-insensitive
2214                                // http://www.w3.org/TR/selectors/#pseudo-classes
2215                                // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2216                                // Remember that setFilters inherits from pseudos
2217                                var args,
2218                                    fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] ||
2219                                        Sizzle.error("unsupported pseudo: " + pseudo);
2220
2221                                // The user may use createPseudo to indicate that
2222                                // arguments are needed to create the filter function
2223                                // just as Sizzle does
2224                                if (fn[expando]) {
2225                                    return fn(argument);
2226                                }
2227
2228                                // But maintain support for old signatures
2229                                if (fn.length > 1) {
2230                                    args = [pseudo, pseudo, "", argument];
2231                                    return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ?
2232                                        markFunction(function (seed, matches) {
2233                                            var idx,
2234                                                matched = fn(seed, argument),
2235                                                i = matched.length;
2236                                            while (i--) {
2237                                                idx = indexOf(seed, matched[i]);
2238                                                seed[idx] = !(matches[idx] = matched[i]);
2239                                            }
2240                                        }) :
2241                                        function (elem) {
2242                                            return fn(elem, 0, args);
2243                                        };
2244                                }
2245
2246                                return fn;
2247                            }
2248                        },
2249
2250                        pseudos: {
2251                            // Potentially complex pseudos
2252                            "not": markFunction(function (selector) {
2253                                // Trim the selector passed to compile
2254                                // to avoid treating leading and trailing
2255                                // spaces as combinators
2256                                var input = [],
2257                                    results = [],
2258                                    matcher = compile(selector.replace(rtrim, "$1"));
2259
2260                                return matcher[expando] ?
2261                                    markFunction(function (seed, matches, context, xml) {
2262                                        var elem,
2263                                            unmatched = matcher(seed, null, xml, []),
2264                                            i = seed.length;
2265
2266                                        // Match elements unmatched by `matcher`
2267                                        while (i--) {
2268                                            if ((elem = unmatched[i])) {
2269                                                seed[i] = !(matches[i] = elem);
2270                                            }
2271                                        }
2272                                    }) :
2273                                    function (elem, context, xml) {
2274                                        input[0] = elem;
2275                                        matcher(input, null, xml, results);
2276                                        // Don't keep the element (issue #--299)
2277                                        input[0] = null;
2278                                        return !results.pop();
2279                                    };
2280                            }),
2281
2282                            "has": markFunction(function (selector) {
2283                                return function (elem) {
2284                                    return Sizzle(selector, elem).length > 0;
2285                                };
2286                            }),
2287
2288                            "contains": markFunction(function (text) {
2289                                text = text.replace(runescape, funescape);
2290                                return function (elem) {
2291                                    return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
2292                                };
2293                            }),
2294
2295                            // "Whether an element is represented by a :lang() selector
2296                            // is based solely on the element's language value
2297                            // being equal to the identifier C,
2298                            // or beginning with the identifier C immediately followed by "-".
2299                            // The matching of C against the element's language value is performed case-insensitively.
2300                            // The identifier C does not have to be a valid language name."
2301                            // http://www.w3.org/TR/selectors/#lang-pseudo
2302                            "lang": markFunction(function (lang) {
2303                                // lang value must be a valid identifier
2304                                if (!ridentifier.test(lang || "")) {
2305                                    Sizzle.error("unsupported lang: " + lang);
2306                                }
2307                                lang = lang.replace(runescape, funescape).toLowerCase();
2308                                return function (elem) {
2309                                    var elemLang;
2310                                    do {
2311                                        if ((elemLang = documentIsHTML ?
2312                                            elem.lang :
2313                                            elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) {
2314
2315                                            elemLang = elemLang.toLowerCase();
2316                                            return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
2317                                        }
2318                                    } while ((elem = elem.parentNode) && elem.nodeType === 1);
2319                                    return false;
2320                                };
2321                            }),
2322
2323                            // Miscellaneous
2324                            "target": function (elem) {
2325                                var hash = window.location && window.location.hash;
2326                                return hash && hash.slice(1) === elem.id;
2327                            },
2328
2329                            "root": function (elem) {
2330                                return elem === docElem;
2331                            },
2332
2333                            "focus": function (elem) {
2334                                return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2335                            },
2336
2337                            // Boolean properties
2338                            "enabled": createDisabledPseudo(false),
2339                            "disabled": createDisabledPseudo(true),
2340
2341                            "checked": function (elem) {
2342                                // In CSS3, :checked should return both checked and selected elements
2343                                // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2344                                var nodeName = elem.nodeName.toLowerCase();
2345                                return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
2346                            },
2347
2348                            "selected": function (elem) {
2349                                // Accessing this property makes selected-by-default
2350                                // options in Safari work properly
2351                                if (elem.parentNode) {
2352                                    elem.parentNode.selectedIndex;
2353                                }
2354
2355                                return elem.selected === true;
2356                            },
2357
2358                            // Contents
2359                            "empty": function (elem) {
2360                                // http://www.w3.org/TR/selectors/#empty-pseudo
2361                                // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
2362                                //   but not by others (comment: 8; processing instruction: 7; etc.)
2363                                // nodeType < 6 works because attributes (2) do not appear as children
2364                                for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
2365                                    if (elem.nodeType < 6) {
2366                                        return false;
2367                                    }
2368                                }
2369                                return true;
2370                            },
2371
2372                            "parent": function (elem) {
2373                                return !Expr.pseudos["empty"](elem);
2374                            },
2375
2376                            // Element/input types
2377                            "header": function (elem) {
2378                                return rheader.test(elem.nodeName);
2379                            },
2380
2381                            "input": function (elem) {
2382                                return rinputs.test(elem.nodeName);
2383                            },
2384
2385                            "button": function (elem) {
2386                                var name = elem.nodeName.toLowerCase();
2387                                return name === "input" && elem.type === "button" || name === "button";
2388                            },
2389
2390                            "text": function (elem) {
2391                                var attr;
2392                                return elem.nodeName.toLowerCase() === "input" &&
2393                                    elem.type === "text" &&
2394
2395                                    // Support: IE<8
2396                                    // HTML5 attribute values (e.g., "search") appear with elem.type === "text"
2397                                    ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
2398                            },
2399
2400                            // Position-in-collection
2401                            "first": createPositionalPseudo(function () {
2402                                return [0];
2403                            }),
2404
2405                            "last": createPositionalPseudo(function (matchIndexes, length) {
2406                                return [length - 1];
2407                            }),
2408
2409                            "eq": createPositionalPseudo(function (matchIndexes, length, argument) {
2410                                return [argument < 0 ? argument + length : argument];
2411                            }),
2412
2413                            "even": createPositionalPseudo(function (matchIndexes, length) {
2414                                var i = 0;
2415                                for (; i < length; i += 2) {
2416                                    matchIndexes.push(i);
2417                                }
2418                                return matchIndexes;
2419                            }),
2420
2421                            "odd": createPositionalPseudo(function (matchIndexes, length) {
2422                                var i = 1;
2423                                for (; i < length; i += 2) {
2424                                    matchIndexes.push(i);
2425                                }
2426                                return matchIndexes;
2427                            }),
2428
2429                            "lt": createPositionalPseudo(function (matchIndexes, length, argument) {
2430                                var i = argument < 0 ? argument + length : argument;
2431                                for (; --i >= 0;) {
2432                                    matchIndexes.push(i);
2433                                }
2434                                return matchIndexes;
2435                            }),
2436
2437                            "gt": createPositionalPseudo(function (matchIndexes, length, argument) {
2438                                var i = argument < 0 ? argument + length : argument;
2439                                for (; ++i < length;) {
2440                                    matchIndexes.push(i);
2441                                }
2442                                return matchIndexes;
2443                            })
2444                        }
2445                    };
2446
2447                    Expr.pseudos["nth"] = Expr.pseudos["eq"];
2448
2449// Add button/input type pseudos
2450                    for (i in {radio: true, checkbox: true, file: true, password: true, image: true}) {
2451                        Expr.pseudos[i] = createInputPseudo(i);
2452                    }
2453                    for (i in {submit: true, reset: true}) {
2454                        Expr.pseudos[i] = createButtonPseudo(i);
2455                    }
2456
2457// Easy API for creating new setFilters
2458                    function setFilters() {
2459                    }
2460
2461                    setFilters.prototype = Expr.filters = Expr.pseudos;
2462                    Expr.setFilters = new setFilters();
2463
2464                    tokenize = Sizzle.tokenize = function (selector, parseOnly) {
2465                        var matched, match, tokens, type,
2466                            soFar, groups, preFilters,
vendor: 14,081 bytes, lines 2467-2746
2467                            cached = tokenCache[selector + " "];
2468
2469                        if (cached) {
2470                            return parseOnly ? 0 : cached.slice(0);
2471                        }
2472
2473                        soFar = selector;
2474                        groups = [];
2475                        preFilters = Expr.preFilter;
2476
2477                        while (soFar) {
2478
2479                            // Comma and first run
2480                            if (!matched || (match = rcomma.exec(soFar))) {
2481                                if (match) {
2482                                    // Don't consume trailing commas as valid
2483                                    soFar = soFar.slice(match[0].length) || soFar;
2484                                }
2485                                groups.push((tokens = []));
2486                            }
2487
2488                            matched = false;
2489
2490                            // Combinators
2491                            if ((match = rcombinators.exec(soFar))) {
2492                                matched = match.shift();
2493                                tokens.push({
2494                                    value: matched,
2495                                    // Cast descendant combinators to space
2496                                    type: match[0].replace(rtrim, " ")
2497                                });
2498                                soFar = soFar.slice(matched.length);
2499                            }
2500
2501                            // Filters
2502                            for (type in Expr.filter) {
2503                                if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] ||
2504                                    (match = preFilters[type](match)))) {
2505                                    matched = match.shift();
2506                                    tokens.push({
2507                                        value: matched,
2508                                        type: type,
2509                                        matches: match
2510                                    });
2511                                    soFar = soFar.slice(matched.length);
2512                                }
2513                            }
2514
2515                            if (!matched) {
2516                                break;
2517                            }
2518                        }
2519
2520                        // Return the length of the invalid excess
2521                        // if we're just parsing
2522                        // Otherwise, throw an error or return tokens
2523                        return parseOnly ?
2524                            soFar.length :
2525                            soFar ?
2526                                Sizzle.error(selector) :
2527                                // Cache the tokens
2528                                tokenCache(selector, groups).slice(0);
2529                    };
2530
2531                    function toSelector(tokens) {
2532                        var i = 0,
2533                            len = tokens.length,
2534                            selector = "";
2535                        for (; i < len; i++) {
2536                            selector += tokens[i].value;
2537                        }
2538                        return selector;
2539                    }
2540
2541                    function addCombinator(matcher, combinator, base) {
2542                        var dir = combinator.dir,
2543                            skip = combinator.next,
2544                            key = skip || dir,
2545                            checkNonElements = base && key === "parentNode",
2546                            doneName = done++;
2547
2548                        return combinator.first ?
2549                            // Check against closest ancestor/preceding element
2550                            function (elem, context, xml) {
2551                                while ((elem = elem[dir])) {
2552                                    if (elem.nodeType === 1 || checkNonElements) {
2553                                        return matcher(elem, context, xml);
2554                                    }
2555                                }
2556                                return false;
2557                            } :
2558
2559                            // Check against all ancestor/preceding elements
2560                            function (elem, context, xml) {
2561                                var oldCache, uniqueCache, outerCache,
2562                                    newCache = [dirruns, doneName];
2563
2564                                // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
2565                                if (xml) {
2566                                    while ((elem = elem[dir])) {
2567                                        if (elem.nodeType === 1 || checkNonElements) {
2568                                            if (matcher(elem, context, xml)) {
2569                                                return true;
2570                                            }
2571                                        }
2572                                    }
2573                                } else {
2574                                    while ((elem = elem[dir])) {
2575                                        if (elem.nodeType === 1 || checkNonElements) {
2576                                            outerCache = elem[expando] || (elem[expando] = {});
2577
2578                                            // Support: IE <9 only
2579                                            // Defend against cloned attroperties (jQuery gh-1709)
2580                                            uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
2581
2582                                            if (skip && skip === elem.nodeName.toLowerCase()) {
2583                                                elem = elem[dir] || elem;
2584                                            } else if ((oldCache = uniqueCache[key]) &&
2585                                                oldCache[0] === dirruns && oldCache[1] === doneName) {
2586
2587                                                // Assign to newCache so results back-propagate to previous elements
2588                                                return (newCache[2] = oldCache[2]);
2589                                            } else {
2590                                                // Reuse newcache so results back-propagate to previous elements
2591                                                uniqueCache[key] = newCache;
2592
2593                                                // A match means we're done; a fail means we have to keep checking
2594                                                if ((newCache[2] = matcher(elem, context, xml))) {
2595                                                    return true;
2596                                                }
2597                                            }
2598                                        }
2599                                    }
2600                                }
2601                                return false;
2602                            };
2603                    }
2604
2605                    function elementMatcher(matchers) {
2606                        return matchers.length > 1 ?
2607                            function (elem, context, xml) {
2608                                var i = matchers.length;
2609                                while (i--) {
2610                                    if (!matchers[i](elem, context, xml)) {
2611                                        return false;
2612                                    }
2613                                }
2614                                return true;
2615                            } :
2616                            matchers[0];
2617                    }
2618
2619                    function multipleContexts(selector, contexts, results) {
2620                        var i = 0,
2621                            len = contexts.length;
2622                        for (; i < len; i++) {
2623                            Sizzle(selector, contexts[i], results);
2624                        }
2625                        return results;
2626                    }
2627
2628                    function condense(unmatched, map, filter, context, xml) {
2629                        var elem,
2630                            newUnmatched = [],
2631                            i = 0,
2632                            len = unmatched.length,
2633                            mapped = map != null;
2634
2635                        for (; i < len; i++) {
2636                            if ((elem = unmatched[i])) {
2637                                if (!filter || filter(elem, context, xml)) {
2638                                    newUnmatched.push(elem);
2639                                    if (mapped) {
2640                                        map.push(i);
2641                                    }
2642                                }
2643                            }
2644                        }
2645
2646                        return newUnmatched;
2647                    }
2648
2649                    function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
2650                        if (postFilter && !postFilter[expando]) {
2651                            postFilter = setMatcher(postFilter);
2652                        }
2653                        if (postFinder && !postFinder[expando]) {
2654                            postFinder = setMatcher(postFinder, postSelector);
2655                        }
2656                        return markFunction(function (seed, results, context, xml) {
2657                            var temp, i, elem,
2658                                preMap = [],
2659                                postMap = [],
2660                                preexisting = results.length,
2661
2662                                // Get initial elements from seed or context
2663                                elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
2664
2665                                // Prefilter to get matcher input, preserving a map for seed-results synchronization
2666                                matcherIn = preFilter && (seed || !selector) ?
2667                                    condense(elems, preMap, preFilter, context, xml) :
2668                                    elems,
2669
2670                                matcherOut = matcher ?
2671                                    // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2672                                    postFinder || (seed ? preFilter : preexisting || postFilter) ?
2673
2674                                        // ...intermediate processing is necessary
2675                                        [] :
2676
2677                                        // ...otherwise use results directly
2678                                        results :
2679                                    matcherIn;
2680
2681                            // Find primary matches
2682                            if (matcher) {
2683                                matcher(matcherIn, matcherOut, context, xml);
2684                            }
2685
2686                            // Apply postFilter
2687                            if (postFilter) {
2688                                temp = condense(matcherOut, postMap);
2689                                postFilter(temp, [], context, xml);
2690
2691                                // Un-match failing elements by moving them back to matcherIn
2692                                i = temp.length;
2693                                while (i--) {
2694                                    if ((elem = temp[i])) {
2695                                        matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
2696                                    }
2697                                }
2698                            }
2699
2700                            if (seed) {
2701                                if (postFinder || preFilter) {
2702                                    if (postFinder) {
2703                                        // Get the final matcherOut by condensing this intermediate into postFinder contexts
2704                                        temp = [];
2705                                        i = matcherOut.length;
2706                                        while (i--) {
2707                                            if ((elem = matcherOut[i])) {
2708                                                // Restore matcherIn since elem is not yet a final match
2709                                                temp.push((matcherIn[i] = elem));
2710                                            }
2711                                        }
2712                                        postFinder(null, (matcherOut = []), temp, xml);
2713                                    }
2714
2715                                    // Move matched elements from seed to results to keep them synchronized
2716                                    i = matcherOut.length;
2717                                    while (i--) {
2718                                        if ((elem = matcherOut[i]) &&
2719                                            (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
2720
2721                                            seed[temp] = !(results[temp] = elem);
2722                                        }
2723                                    }
2724                                }
2725
2726                                // Add elements to results, through postFinder if defined
2727                            } else {
2728                                matcherOut = condense(
2729                                    matcherOut === results ?
2730                                        matcherOut.splice(preexisting, matcherOut.length) :
2731                                        matcherOut
2732                                );
2733                                if (postFinder) {
2734                                    postFinder(null, results, matcherOut, xml);
2735                                } else {
2736                                    push.apply(results, matcherOut);
2737                                }
2738                            }
2739                        });
2740                    }
2741
2742                    function matcherFromTokens(tokens) {
2743                        var checkContext, matcher, j,
2744                            len = tokens.length,
2745                            leadingRelative = Expr.relative[tokens[0].type],
2746                            implicitRelative = leadingRelative || Expr.relative[" "],
vendor: 4,564 bytes, lines 2747-2820
2747                            i = leadingRelative ? 1 : 0,
2748
2749                            // The foundational matcher ensures that elements are reachable from top-level context(s)
2750                            matchContext = addCombinator(function (elem) {
2751                                return elem === checkContext;
2752                            }, implicitRelative, true),
2753                            matchAnyContext = addCombinator(function (elem) {
2754                                return indexOf(checkContext, elem) > -1;
2755                            }, implicitRelative, true),
2756                            matchers = [function (elem, context, xml) {
2757                                var ret = (!leadingRelative && (xml || context !== outermostContext)) || (
2758                                    (checkContext = context).nodeType ?
2759                                        matchContext(elem, context, xml) :
2760                                        matchAnyContext(elem, context, xml));
2761                                // Avoid hanging onto element (issue #299)
2762                                checkContext = null;
2763                                return ret;
2764                            }];
2765
2766                        for (; i < len; i++) {
2767                            if ((matcher = Expr.relative[tokens[i].type])) {
2768                                matchers = [addCombinator(elementMatcher(matchers), matcher)];
2769                            } else {
2770                                matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
2771
2772                                // Return special upon seeing a positional matcher
2773                                if (matcher[expando]) {
2774                                    // Find the next relative operator (if any) for proper handling
2775                                    j = ++i;
2776                                    for (; j < len; j++) {
2777                                        if (Expr.relative[tokens[j].type]) {
2778                                            break;
2779                                        }
2780                                    }
2781                                    return setMatcher(
2782                                        i > 1 && elementMatcher(matchers),
2783                                        i > 1 && toSelector(
2784                                            // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2785                                            tokens.slice(0, i - 1).concat({value: tokens[i - 2].type === " " ? "*" : ""})
2786                                        ).replace(rtrim, "$1"),
2787                                        matcher,
2788                                        i < j && matcherFromTokens(tokens.slice(i, j)),
2789                                        j < len && matcherFromTokens((tokens = tokens.slice(j))),
2790                                        j < len && toSelector(tokens)
2791                                    );
2792                                }
2793                                matchers.push(matcher);
2794                            }
2795                        }
2796
2797                        return elementMatcher(matchers);
2798                    }
2799
2800                    function matcherFromGroupMatchers(elementMatchers, setMatchers) {
2801                        var bySet = setMatchers.length > 0,
2802                            byElement = elementMatchers.length > 0,
2803                            superMatcher = function (seed, context, xml, results, outermost) {
2804                                var elem, j, matcher,
2805                                    matchedCount = 0,
2806                                    i = "0",
2807                                    unmatched = seed && [],
2808                                    setMatched = [],
2809                                    contextBackup = outermostContext,
2810                                    // We must always have either seed elements or outermost context
2811                                    elems = seed || byElement && Expr.find["TAG"]("*", outermost),
2812                                    // Use integer dirruns iff this is the outermost matcher
2813                                    dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
2814                                    len = elems.length;
2815
2816                                if (outermost) {
2817                                    outermostContext = context === document || context || outermost;
2818                                }
2819
2820                                // Add elements passing elementMatchers directly to results
vendor: 28,913 bytes, lines 2821-3481
2821                                // Support: IE<9, Safari
2822                                // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
2823                                for (; i !== len && (elem = elems[i]) != null; i++) {
2824                                    if (byElement && elem) {
2825                                        j = 0;
2826                                        if (!context && elem.ownerDocument !== document) {
2827                                            setDocument(elem);
2828                                            xml = !documentIsHTML;
2829                                        }
2830                                        while ((matcher = elementMatchers[j++])) {
2831                                            if (matcher(elem, context || document, xml)) {
2832                                                results.push(elem);
2833                                                break;
2834                                            }
2835                                        }
2836                                        if (outermost) {
2837                                            dirruns = dirrunsUnique;
2838                                        }
2839                                    }
2840
2841                                    // Track unmatched elements for set filters
2842                                    if (bySet) {
2843                                        // They will have gone through all possible matchers
2844                                        if ((elem = !matcher && elem)) {
2845                                            matchedCount--;
2846                                        }
2847
2848                                        // Lengthen the array for every element, matched or not
2849                                        if (seed) {
2850                                            unmatched.push(elem);
2851                                        }
2852                                    }
2853                                }
2854
2855                                // `i` is now the count of elements visited above, and adding it to `matchedCount`
2856                                // makes the latter nonnegative.
2857                                matchedCount += i;
2858
2859                                // Apply set filters to unmatched elements
2860                                // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
2861                                // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
2862                                // no element matchers and no seed.
2863                                // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
2864                                // case, which will result in a "00" `matchedCount` that differs from `i` but is also
2865                                // numerically zero.
2866                                if (bySet && i !== matchedCount) {
2867                                    j = 0;
2868                                    while ((matcher = setMatchers[j++])) {
2869                                        matcher(unmatched, setMatched, context, xml);
2870                                    }
2871
2872                                    if (seed) {
2873                                        // Reintegrate element matches to eliminate the need for sorting
2874                                        if (matchedCount > 0) {
2875                                            while (i--) {
2876                                                if (!(unmatched[i] || setMatched[i])) {
2877                                                    setMatched[i] = pop.call(results);
2878                                                }
2879                                            }
2880                                        }
2881
2882                                        // Discard index placeholder values to get only actual matches
2883                                        setMatched = condense(setMatched);
2884                                    }
2885
2886                                    // Add matches to results
2887                                    push.apply(results, setMatched);
2888
2889                                    // Seedless set matches succeeding multiple successful matchers stipulate sorting
2890                                    if (outermost && !seed && setMatched.length > 0 &&
2891                                        (matchedCount + setMatchers.length) > 1) {
2892
2893                                        Sizzle.uniqueSort(results);
2894                                    }
2895                                }
2896
2897                                // Override manipulation of globals by nested matchers
2898                                if (outermost) {
2899                                    dirruns = dirrunsUnique;
2900                                    outermostContext = contextBackup;
2901                                }
2902
2903                                return unmatched;
2904                            };
2905
2906                        return bySet ?
2907                            markFunction(superMatcher) :
2908                            superMatcher;
2909                    }
2910
2911                    compile = Sizzle.compile = function (selector, match /* Internal Use Only */) {
2912                        var i,
2913                            setMatchers = [],
2914                            elementMatchers = [],
2915                            cached = compilerCache[selector + " "];
2916
2917                        if (!cached) {
2918                            // Generate a function of recursive functions that can be used to check each element
2919                            if (!match) {
2920                                match = tokenize(selector);
2921                            }
2922                            i = match.length;
2923                            while (i--) {
2924                                cached = matcherFromTokens(match[i]);
2925                                if (cached[expando]) {
2926                                    setMatchers.push(cached);
2927                                } else {
2928                                    elementMatchers.push(cached);
2929                                }
2930                            }
2931
2932                            // Cache the compiled function
2933                            cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
2934
2935                            // Save selector and tokenization
2936                            cached.selector = selector;
2937                        }
2938                        return cached;
2939                    };
2940
2941                    /**
2942                     * A low-level selection function that works with Sizzle's compiled
2943                     *  selector functions
2944                     * @param {String|Function} selector A selector or a pre-compiled
2945                     *  selector function built with Sizzle.compile
2946                     * @param {Element} context
2947                     * @param {Array} [results]
2948                     * @param {Array} [seed] A set of elements to match against
2949                     */
2950                    select = Sizzle.select = function (selector, context, results, seed) {
2951                        var i, tokens, token, type, find,
2952                            compiled = typeof selector === "function" && selector,
2953                            match = !seed && tokenize((selector = compiled.selector || selector));
2954
2955                        results = results || [];
2956
2957                        // Try to minimize operations if there is only one selector in the list and no seed
2958                        // (the latter of which guarantees us context)
2959                        if (match.length === 1) {
2960
2961                            // Reduce context if the leading compound selector is an ID
2962                            tokens = match[0] = match[0].slice(0);
2963                            if (tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2964                                context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
2965
2966                                context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
2967                                if (!context) {
2968                                    return results;
2969
2970                                    // Precompiled matchers will still verify ancestry, so step up a level
2971                                } else if (compiled) {
2972                                    context = context.parentNode;
2973                                }
2974
2975                                selector = selector.slice(tokens.shift().value.length);
2976                            }
2977
2978                            // Fetch a seed set for right-to-left matching
2979                            i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
2980                            while (i--) {
2981                                token = tokens[i];
2982
2983                                // Abort if we hit a combinator
2984                                if (Expr.relative[(type = token.type)]) {
2985                                    break;
2986                                }
2987                                if ((find = Expr.find[type])) {
2988                                    // Search, expanding context for leading sibling combinators
2989                                    if ((seed = find(
2990                                        token.matches[0].replace(runescape, funescape),
2991                                        rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
2992                                    ))) {
2993
2994                                        // If seed is empty or no tokens remain, we can return early
2995                                        tokens.splice(i, 1);
2996                                        selector = seed.length && toSelector(tokens);
2997                                        if (!selector) {
2998                                            push.apply(results, seed);
2999                                            return results;
3000                                        }
3001
3002                                        break;
3003                                    }
3004                                }
3005                            }
3006                        }
3007
3008                        // Compile and execute a filtering function if one is not provided
3009                        // Provide `match` to avoid retokenization if we modified the selector above
3010                        (compiled || compile(selector, match))(
3011                            seed,
3012                            context,
3013                            !documentIsHTML,
3014                            results,
3015                            !context || rsibling.test(selector) && testContext(context.parentNode) || context
3016                        );
3017                        return results;
3018                    };
3019
3020// One-time assignments
3021
3022// Sort stability
3023                    support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
3024
3025// Support: Chrome 14-35+
3026// Always assume duplicates if they aren't passed to the comparison function
3027                    support.detectDuplicates = !!hasDuplicate;
3028
3029// Initialize against the default document
3030                    setDocument();
3031
3032// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
3033// Detached nodes confoundingly follow *each other*
3034                    support.sortDetached = assert(function (el) {
3035                        // Should return 1, but returns 4 (following)
3036                        return el.compareDocumentPosition(document.createElement("fieldset")) & 1;
3037                    });
3038
3039// Support: IE<8
3040// Prevent attribute/property "interpolation"
3041// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
3042                    if (!assert(function (el) {
3043                        el.innerHTML = "<a href='#'></a>";
3044                        return el.firstChild.getAttribute("href") === "#";
3045                    })) {
3046                        addHandle("type|href|height|width", function (elem, name, isXML) {
3047                            if (!isXML) {
3048                                return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
3049                            }
3050                        });
3051                    }
3052
3053// Support: IE<9
3054// Use defaultValue in place of getAttribute("value")
3055                    if (!support.attributes || !assert(function (el) {
3056                        el.innerHTML = "<input/>";
3057                        el.firstChild.setAttribute("value", "");
3058                        return el.firstChild.getAttribute("value") === "";
3059                    })) {
3060                        addHandle("value", function (elem, name, isXML) {
3061                            if (!isXML && elem.nodeName.toLowerCase() === "input") {
3062                                return elem.defaultValue;
3063                            }
3064                        });
3065                    }
3066
3067// Support: IE<9
3068// Use getAttributeNode to fetch booleans when getAttribute lies
3069                    if (!assert(function (el) {
3070                        return el.getAttribute("disabled") == null;
3071                    })) {
3072                        addHandle(booleans, function (elem, name, isXML) {
3073                            var val;
3074                            if (!isXML) {
3075                                return elem[name] === true ? name.toLowerCase() :
3076                                    (val = elem.getAttributeNode(name)) && val.specified ?
3077                                        val.value :
3078                                        null;
3079                            }
3080                        });
3081                    }
3082
3083                    return Sizzle;
3084
3085                })(window);
3086
3087
3088            jQuery.find = Sizzle;
3089            jQuery.expr = Sizzle.selectors;
3090
3091// Deprecated
3092            jQuery.expr[":"] = jQuery.expr.pseudos;
3093            jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
3094            jQuery.text = Sizzle.getText;
3095            jQuery.isXMLDoc = Sizzle.isXML;
3096            jQuery.contains = Sizzle.contains;
3097            jQuery.escapeSelector = Sizzle.escape;
3098
3099
3100            var dir = function (elem, dir, until) {
3101                var matched = [],
3102                    truncate = until !== undefined;
3103
3104                while ((elem = elem[dir]) && elem.nodeType !== 9) {
3105                    if (elem.nodeType === 1) {
3106                        if (truncate && jQuery(elem).is(until)) {
3107                            break;
3108                        }
3109                        matched.push(elem);
3110                    }
3111                }
3112                return matched;
3113            };
3114
3115
3116            var siblings = function (n, elem) {
3117                var matched = [];
3118
3119                for (; n; n = n.nextSibling) {
3120                    if (n.nodeType === 1 && n !== elem) {
3121                        matched.push(n);
3122                    }
3123                }
3124
3125                return matched;
3126            };
3127
3128
3129            var rneedsContext = jQuery.expr.match.needsContext;
3130
3131
3132            function nodeName(elem, name) {
3133
3134                return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
3135
3136            };
3137            var rsingleTag = (/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);
3138
3139
3140// Implement the identical functionality for filter and not
3141            function winnow(elements, qualifier, not) {
3142                if (isFunction(qualifier)) {
3143                    return jQuery.grep(elements, function (elem, i) {
3144                        return !!qualifier.call(elem, i, elem) !== not;
3145                    });
3146                }
3147
3148                // Single element
3149                if (qualifier.nodeType) {
3150                    return jQuery.grep(elements, function (elem) {
3151                        return (elem === qualifier) !== not;
3152                    });
3153                }
3154
3155                // Arraylike of elements (jQuery, arguments, Array)
3156                if (typeof qualifier !== "string") {
3157                    return jQuery.grep(elements, function (elem) {
3158                        return (indexOf.call(qualifier, elem) > -1) !== not;
3159                    });
3160                }
3161
3162                // Filtered directly for both simple and complex selectors
3163                return jQuery.filter(qualifier, elements, not);
3164            }
3165
3166            jQuery.filter = function (expr, elems, not) {
3167                var elem = elems[0];
3168
3169                if (not) {
3170                    expr = ":not(" + expr + ")";
3171                }
3172
3173                if (elems.length === 1 && elem.nodeType === 1) {
3174                    return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
3175                }
3176
3177                return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
3178                    return elem.nodeType === 1;
3179                }));
3180            };
3181
3182            jQuery.fn.extend({
3183                find: function (selector) {
3184                    var i, ret,
3185                        len = this.length,
3186                        self = this;
3187
3188                    if (typeof selector !== "string") {
3189                        return this.pushStack(jQuery(selector).filter(function () {
3190                            for (i = 0; i < len; i++) {
3191                                if (jQuery.contains(self[i], this)) {
3192                                    return true;
3193                                }
3194                            }
3195                        }));
3196                    }
3197
3198                    ret = this.pushStack([]);
3199
3200                    for (i = 0; i < len; i++) {
3201                        jQuery.find(selector, self[i], ret);
3202                    }
3203
3204                    return len > 1 ? jQuery.uniqueSort(ret) : ret;
3205                },
3206                filter: function (selector) {
3207                    return this.pushStack(winnow(this, selector || [], false));
3208                },
3209                not: function (selector) {
3210                    return this.pushStack(winnow(this, selector || [], true));
3211                },
3212                is: function (selector) {
3213                    return !!winnow(
3214                        this,
3215
3216                        // If this is a positional/relative selector, check membership in the returned set
3217                        // so $("p:first").is("p:last") won't return true for a doc with two "p".
3218                        typeof selector === "string" && rneedsContext.test(selector) ?
3219                            jQuery(selector) :
3220                            selector || [],
3221                        false
3222                    ).length;
3223                }
3224            });
3225
3226
3227// Initialize a jQuery object
3228
3229
3230// A central reference to the root jQuery(document)
3231            var rootjQuery,
3232
3233                // A simple way to check for HTML strings
3234                // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
3235                // Strict HTML recognition (#--11290: must start with <)
3236                // Shortcut simple #id case for speed
3237                rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
3238
3239                init = jQuery.fn.init = function (selector, context, root) {
3240                    var match, elem;
3241
3242                    // HANDLE: $(""), $(null), $(undefined), $(false)
3243                    if (!selector) {
3244                        return this;
3245                    }
3246
3247                    // Method init() accepts an alternate rootjQuery
3248                    // so migrate can support jQuery.sub (gh-2101)
3249                    root = root || rootjQuery;
3250
3251                    // Handle HTML strings
3252                    if (typeof selector === "string") {
3253                        if (selector[0] === "<" &&
3254                            selector[selector.length - 1] === ">" &&
3255                            selector.length >= 3) {
3256
3257                            // Assume that strings that start and end with <> are HTML and skip the regex check
3258                            match = [null, selector, null];
3259
3260                        } else {
3261                            match = rquickExpr.exec(selector);
3262                        }
3263
3264                        // Match html or make sure no context is specified for #id
3265                        if (match && (match[1] || !context)) {
3266
3267                            // HANDLE: $(html) -> $(array)
3268                            if (match[1]) {
3269                                context = context instanceof jQuery ? context[0] : context;
3270
3271                                // Option to run scripts is true for back-compat
3272                                // Intentionally let the error be thrown if parseHTML is not present
3273                                jQuery.merge(this, jQuery.parseHTML(
3274                                    match[1],
3275                                    context && context.nodeType ? context.ownerDocument || context : document,
3276                                    true
3277                                ));
3278
3279                                // HANDLE: $(html, props)
3280                                if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
3281                                    for (match in context) {
3282
3283                                        // Properties of context are called as methods if possible
3284                                        if (isFunction(this[match])) {
3285                                            this[match](context[match]);
3286
3287                                            // ...and otherwise set as attributes
3288                                        } else {
3289                                            this.attr(match, context[match]);
3290                                        }
3291                                    }
3292                                }
3293
3294                                return this;
3295
3296                                // HANDLE: $(#id)
3297                            } else {
3298                                elem = document.getElementById(match[2]);
3299
3300                                if (elem) {
3301
3302                                    // Inject the element directly into the jQuery object
3303                                    this[0] = elem;
3304                                    this.length = 1;
3305                                }
3306                                return this;
3307                            }
3308
3309                            // HANDLE: $(expr, $(...))
3310                        } else if (!context || context.jquery) {
3311                            return (context || root).find(selector);
3312
3313                            // HANDLE: $(expr, context)
3314                            // (which is just equivalent to: $(context).find(expr)
3315                        } else {
3316                            return this.constructor(context).find(selector);
3317                        }
3318
3319                        // HANDLE: $(DOMElement)
3320                    } else if (selector.nodeType) {
3321                        this[0] = selector;
3322                        this.length = 1;
3323                        return this;
3324
3325                        // HANDLE: $(function)
3326                        // Shortcut for document ready
3327                    } else if (isFunction(selector)) {
3328                        return root.ready !== undefined ?
3329                            root.ready(selector) :
3330
3331                            // Execute immediately if ready is not present
3332                            selector(jQuery);
3333                    }
3334
3335                    return jQuery.makeArray(selector, this);
3336                };
3337
3338// Give the init function the jQuery prototype for later instantiation
3339            init.prototype = jQuery.fn;
3340
3341// Initialize central reference
3342            rootjQuery = jQuery(document);
3343
3344
3345            var rparentsprev = /^(?:parents|prev(?:Until|All))/,
3346
3347                // Methods guaranteed to produce a unique set when starting from a unique set
3348                guaranteedUnique = {
3349                    children: true,
3350                    contents: true,
3351                    next: true,
3352                    prev: true
3353                };
3354
3355            jQuery.fn.extend({
3356                has: function (target) {
3357                    var targets = jQuery(target, this),
3358                        l = targets.length;
3359
3360                    return this.filter(function () {
3361                        var i = 0;
3362                        for (; i < l; i++) {
3363                            if (jQuery.contains(this, targets[i])) {
3364                                return true;
3365                            }
3366                        }
3367                    });
3368                },
3369
3370                closest: function (selectors, context) {
3371                    var cur,
3372                        i = 0,
3373                        l = this.length,
3374                        matched = [],
3375                        targets = typeof selectors !== "string" && jQuery(selectors);
3376
3377                    // Positional selectors never match, since there's no _selection_ context
3378                    if (!rneedsContext.test(selectors)) {
3379                        for (; i < l; i++) {
3380                            for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
3381
3382                                // Always skip document fragments
3383                                if (cur.nodeType < 11 && (targets ?
3384                                    targets.index(cur) > -1 :
3385
3386                                    // Don't pass non-elements to Sizzle
3387                                    cur.nodeType === 1 &&
3388                                    jQuery.find.matchesSelector(cur, selectors))) {
3389
3390                                    matched.push(cur);
3391                                    break;
3392                                }
3393                            }
3394                        }
3395                    }
3396
3397                    return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
3398                },
3399
3400                // Determine the position of an element within the set
3401                index: function (elem) {
3402
3403                    // No argument, return index in parent
3404                    if (!elem) {
3405                        return (this[0] && this[0].parentNode) ? this.first().prevAll().length : -1;
3406                    }
3407
3408                    // Index in selector
3409                    if (typeof elem === "string") {
3410                        return indexOf.call(jQuery(elem), this[0]);
3411                    }
3412
3413                    // Locate the position of the desired element
3414                    return indexOf.call(this,
3415
3416                        // If it receives a jQuery object, the first element is used
3417                        elem.jquery ? elem[0] : elem
3418                    );
3419                },
3420
3421                add: function (selector, context) {
3422                    return this.pushStack(
3423                        jQuery.uniqueSort(
3424                            jQuery.merge(this.get(), jQuery(selector, context))
3425                        )
3426                    );
3427                },
3428
3429                addBack: function (selector) {
3430                    return this.add(selector == null ?
3431                        this.prevObject : this.prevObject.filter(selector)
3432                    );
3433                }
3434            });
3435
3436            function sibling(cur, dir) {
3437                while ((cur = cur[dir]) && cur.nodeType !== 1) {
3438                }
3439                return cur;
3440            }
3441
3442            jQuery.each({
3443                parent: function (elem) {
3444                    var parent = elem.parentNode;
3445                    return parent && parent.nodeType !== 11 ? parent : null;
3446                },
3447                parents: function (elem) {
3448                    return dir(elem, "parentNode");
3449                },
3450                parentsUntil: function (elem, i, until) {
3451                    return dir(elem, "parentNode", until);
3452                },
3453                next: function (elem) {
3454                    return sibling(elem, "nextSibling");
3455                },
3456                prev: function (elem) {
3457                    return sibling(elem, "previousSibling");
3458                },
3459                nextAll: function (elem) {
3460                    return dir(elem, "nextSibling");
3461                },
3462                prevAll: function (elem) {
3463                    return dir(elem, "previousSibling");
3464                },
3465                nextUntil: function (elem, i, until) {
3466                    return dir(elem, "nextSibling", until);
3467                },
3468                prevUntil: function (elem, i, until) {
3469                    return dir(elem, "previousSibling", until);
3470                },
3471                siblings: function (elem) {
3472                    return siblings((elem.parentNode || {}).firstChild, elem);
3473                },
3474                children: function (elem) {
3475                    return siblings(elem.firstChild);
3476                },
3477                contents: function (elem) {
3478                    if (nodeName(elem, "iframe")) {
3479                        return elem.contentDocument;
3480                    }
3481
vendor: 40,174 bytes, lines 3482-4398
3482                    // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
3483                    // Treat the template element as a regular one in browsers that
3484                    // don't support it.
3485                    if (nodeName(elem, "template")) {
3486                        elem = elem.content || elem;
3487                    }
3488
3489                    return jQuery.merge([], elem.childNodes);
3490                }
3491            }, function (name, fn) {
3492                jQuery.fn[name] = function (until, selector) {
3493                    var matched = jQuery.map(this, fn, until);
3494
3495                    if (name.slice(-5) !== "Until") {
3496                        selector = until;
3497                    }
3498
3499                    if (selector && typeof selector === "string") {
3500                        matched = jQuery.filter(selector, matched);
3501                    }
3502
3503                    if (this.length > 1) {
3504
3505                        // Remove duplicates
3506                        if (!guaranteedUnique[name]) {
3507                            jQuery.uniqueSort(matched);
3508                        }
3509
3510                        // Reverse order for parents* and prev-derivatives
3511                        if (rparentsprev.test(name)) {
3512                            matched.reverse();
3513                        }
3514                    }
3515
3516                    return this.pushStack(matched);
3517                };
3518            });
3519            var rnothtmlwhite = (/[^\x20\t\r\n\f]+/g);
3520
3521
3522// Convert String-formatted options into Object-formatted ones
3523            function createOptions(options) {
3524                var object = {};
3525                jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) {
3526                    object[flag] = true;
3527                });
3528                return object;
3529            }
3530
3531            /*
3532 * Create a callback list using the following parameters:
3533 *
3534 *	options: an optional list of space-separated options that will change how
3535 *			the callback list behaves or a more traditional option object
3536 *
3537 * By default a callback list will act like an event callback list and can be
3538 * "fired" multiple times.
3539 *
3540 * Possible options:
3541 *
3542 *	once:			will ensure the callback list can only be fired once (like a Deferred)
3543 *
3544 *	memory:			will keep track of previous values and will call any callback added
3545 *					after the list has been fired right away with the latest "memorized"
3546 *					values (like a Deferred)
3547 *
3548 *	unique:			will ensure a callback can only be added once (no duplicate in the list)
3549 *
3550 *	stopOnFalse:	interrupt callings when a callback returns false
3551 *
3552 */
3553            jQuery.Callbacks = function (options) {
3554
3555                // Convert options from String-formatted to Object-formatted if needed
3556                // (we check in cache first)
3557                options = typeof options === "string" ?
3558                    createOptions(options) :
3559                    jQuery.extend({}, options);
3560
3561                var // Flag to know if list is currently firing
3562                    firing,
3563
3564                    // Last fire value for non-forgettable lists
3565                    memory,
3566
3567                    // Flag to know if list was already fired
3568                    fired,
3569
3570                    // Flag to prevent firing
3571                    locked,
3572
3573                    // Actual callback list
3574                    list = [],
3575
3576                    // Queue of execution data for repeatable lists
3577                    queue = [],
3578
3579                    // Index of currently firing callback (modified by add/remove as needed)
3580                    firingIndex = -1,
3581
3582                    // Fire callbacks
3583                    fire = function () {
3584
3585                        // Enforce single-firing
3586                        locked = locked || options.once;
3587
3588                        // Execute callbacks for all pending executions,
3589                        // respecting firingIndex overrides and runtime changes
3590                        fired = firing = true;
3591                        for (; queue.length; firingIndex = -1) {
3592                            memory = queue.shift();
3593                            while (++firingIndex < list.length) {
3594
3595                                // Run callback and check for early termination
3596                                if (list[firingIndex].apply(memory[0], memory[1]) === false &&
3597                                    options.stopOnFalse) {
3598
3599                                    // Jump to end and forget the data so .add doesn't re-fire
3600                                    firingIndex = list.length;
3601                                    memory = false;
3602                                }
3603                            }
3604                        }
3605
3606                        // Forget the data if we're done with it
3607                        if (!options.memory) {
3608                            memory = false;
3609                        }
3610
3611                        firing = false;
3612
3613                        // Clean up if we're done firing for good
3614                        if (locked) {
3615
3616                            // Keep an empty list if we have data for future add calls
3617                            if (memory) {
3618                                list = [];
3619
3620                                // Otherwise, this object is spent
3621                            } else {
3622                                list = "";
3623                            }
3624                        }
3625                    },
3626
3627                    // Actual Callbacks object
3628                    self = {
3629
3630                        // Add a callback or a collection of callbacks to the list
3631                        add: function () {
3632                            if (list) {
3633
3634                                // If we have memory from a past run, we should fire after adding
3635                                if (memory && !firing) {
3636                                    firingIndex = list.length - 1;
3637                                    queue.push(memory);
3638                                }
3639
3640                                (function add(args) {
3641                                    jQuery.each(args, function (_, arg) {
3642                                        if (isFunction(arg)) {
3643                                            if (!options.unique || !self.has(arg)) {
3644                                                list.push(arg);
3645                                            }
3646                                        } else if (arg && arg.length && toType(arg) !== "string") {
3647
3648                                            // Inspect recursively
3649                                            add(arg);
3650                                        }
3651                                    });
3652                                })(arguments);
3653
3654                                if (memory && !firing) {
3655                                    fire();
3656                                }
3657                            }
3658                            return this;
3659                        },
3660
3661                        // Remove a callback from the list
3662                        remove: function () {
3663                            jQuery.each(arguments, function (_, arg) {
3664                                var index;
3665                                while ((index = jQuery.inArray(arg, list, index)) > -1) {
3666                                    list.splice(index, 1);
3667
3668                                    // Handle firing indexes
3669                                    if (index <= firingIndex) {
3670                                        firingIndex--;
3671                                    }
3672                                }
3673                            });
3674                            return this;
3675                        },
3676
3677                        // Check if a given callback is in the list.
3678                        // If no argument is given, return whether or not list has callbacks attached.
3679                        has: function (fn) {
3680                            return fn ?
3681                                jQuery.inArray(fn, list) > -1 :
3682                                list.length > 0;
3683                        },
3684
3685                        // Remove all callbacks from the list
3686                        empty: function () {
3687                            if (list) {
3688                                list = [];
3689                            }
3690                            return this;
3691                        },
3692
3693                        // Disable .fire and .add
3694                        // Abort any current/pending executions
3695                        // Clear all callbacks and values
3696                        disable: function () {
3697                            locked = queue = [];
3698                            list = memory = "";
3699                            return this;
3700                        },
3701                        disabled: function () {
3702                            return !list;
3703                        },
3704
3705                        // Disable .fire
3706                        // Also disable .add unless we have memory (since it would have no effect)
3707                        // Abort any pending executions
3708                        lock: function () {
3709                            locked = queue = [];
3710                            if (!memory && !firing) {
3711                                list = memory = "";
3712                            }
3713                            return this;
3714                        },
3715                        locked: function () {
3716                            return !!locked;
3717                        },
3718
3719                        // Call all callbacks with the given context and arguments
3720                        fireWith: function (context, args) {
3721                            if (!locked) {
3722                                args = args || [];
3723                                args = [context, args.slice ? args.slice() : args];
3724                                queue.push(args);
3725                                if (!firing) {
3726                                    fire();
3727                                }
3728                            }
3729                            return this;
3730                        },
3731
3732                        // Call all the callbacks with the given arguments
3733                        fire: function () {
3734                            self.fireWith(this, arguments);
3735                            return this;
3736                        },
3737
3738                        // To know if the callbacks have already been called at least once
3739                        fired: function () {
3740                            return !!fired;
3741                        }
3742                    };
3743
3744                return self;
3745            };
3746
3747
3748            function Identity(v) {
3749                return v;
3750            }
3751
3752            function Thrower(ex) {
3753                throw ex;
3754            }
3755
3756            function adoptValue(value, resolve, reject, noValue) {
3757                var method;
3758
3759                try {
3760
3761                    // Check for promise aspect first to privilege synchronous behavior
3762                    if (value && isFunction((method = value.promise))) {
3763                        method.call(value).done(resolve).fail(reject);
3764
3765                        // Other thenables
3766                    } else if (value && isFunction((method = value.then))) {
3767                        method.call(value, resolve, reject);
3768
3769                        // Other non-thenables
3770                    } else {
3771
3772                        // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
3773                        // * false: [ value ].slice( 0 ) => resolve( value )
3774                        // * true: [ value ].slice( 1 ) => resolve()
3775                        resolve.apply(undefined, [value].slice(noValue));
3776                    }
3777
3778                    // For Promises/A+, convert exceptions into rejections
3779                    // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
3780                    // Deferred#then to conditionally suppress rejection.
3781                } catch (value) {
3782
3783                    // Support: Android 4.0 only
3784                    // Strict mode functions invoked without .call/.apply get global-object context
3785                    reject.apply(undefined, [value]);
3786                }
3787            }
3788
3789            jQuery.extend({
3790
3791                Deferred: function (func) {
3792                    var tuples = [
3793
3794                            // action, add listener, callbacks,
3795                            // ... .then handlers, argument index, [final state]
3796                            ["notify", "progress", jQuery.Callbacks("memory"),
3797                                jQuery.Callbacks("memory"), 2],
3798                            ["resolve", "done", jQuery.Callbacks("once memory"),
3799                                jQuery.Callbacks("once memory"), 0, "resolved"],
3800                            ["reject", "fail", jQuery.Callbacks("once memory"),
3801                                jQuery.Callbacks("once memory"), 1, "rejected"]
3802                        ],
3803                        state = "pending",
3804                        promise = {
3805                            state: function () {
3806                                return state;
3807                            },
3808                            always: function () {
3809                                deferred.done(arguments).fail(arguments);
3810                                return this;
3811                            },
3812                            "catch": function (fn) {
3813                                return promise.then(null, fn);
3814                            },
3815
3816                            // Keep pipe for back-compat
3817                            pipe: function ( /* fnDone, fnFail, fnProgress */) {
3818                                var fns = arguments;
3819
3820                                return jQuery.Deferred(function (newDefer) {
3821                                    jQuery.each(tuples, function (i, tuple) {
3822
3823                                        // Map tuples (progress, done, fail) to arguments (done, fail, progress)
3824                                        var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];
3825
3826                                        // deferred.progress(function() { bind to newDefer or newDefer.notify })
3827                                        // deferred.done(function() { bind to newDefer or newDefer.resolve })
3828                                        // deferred.fail(function() { bind to newDefer or newDefer.reject })
3829                                        deferred[tuple[1]](function () {
3830                                            var returned = fn && fn.apply(this, arguments);
3831                                            if (returned && isFunction(returned.promise)) {
3832                                                returned.promise()
3833                                                    .progress(newDefer.notify)
3834                                                    .done(newDefer.resolve)
3835                                                    .fail(newDefer.reject);
3836                                            } else {
3837                                                newDefer[tuple[0] + "With"](
3838                                                    this,
3839                                                    fn ? [returned] : arguments
3840                                                );
3841                                            }
3842                                        });
3843                                    });
3844                                    fns = null;
3845                                }).promise();
3846                            },
3847                            then: function (onFulfilled, onRejected, onProgress) {
3848                                var maxDepth = 0;
3849
3850                                function resolve(depth, deferred, handler, special) {
3851                                    return function () {
3852                                        var that = this,
3853                                            args = arguments,
3854                                            mightThrow = function () {
3855                                                var returned, then;
3856
3857                                                // Support: Promises/A+ section 2.3.3.3.3
3858                                                // https://promisesaplus.com/#point-59
3859                                                // Ignore double-resolution attempts
3860                                                if (depth < maxDepth) {
3861                                                    return;
3862                                                }
3863
3864                                                returned = handler.apply(that, args);
3865
3866                                                // Support: Promises/A+ section 2.3.1
3867                                                // https://promisesaplus.com/#point-48
3868                                                if (returned === deferred.promise()) {
3869                                                    throw new TypeError("Thenable self-resolution");
3870                                                }
3871
3872                                                // Support: Promises/A+ sections 2.3.3.1, 3.5
3873                                                // https://promisesaplus.com/#point-54
3874                                                // https://promisesaplus.com/#point-75
3875                                                // Retrieve `then` only once
3876                                                then = returned &&
3877
3878                                                    // Support: Promises/A+ section 2.3.4
3879                                                    // https://promisesaplus.com/#point-64
3880                                                    // Only check objects and functions for thenability
3881                                                    (typeof returned === "object" ||
3882                                                        typeof returned === "function") &&
3883                                                    returned.then;
3884
3885                                                // Handle a returned thenable
3886                                                if (isFunction(then)) {
3887
3888                                                    // Special processors (notify) just wait for resolution
3889                                                    if (special) {
3890                                                        then.call(
3891                                                            returned,
3892                                                            resolve(maxDepth, deferred, Identity, special),
3893                                                            resolve(maxDepth, deferred, Thrower, special)
3894                                                        );
3895
3896                                                        // Normal processors (resolve) also hook into progress
3897                                                    } else {
3898
3899                                                        // ...and disregard older resolution values
3900                                                        maxDepth++;
3901
3902                                                        then.call(
3903                                                            returned,
3904                                                            resolve(maxDepth, deferred, Identity, special),
3905                                                            resolve(maxDepth, deferred, Thrower, special),
3906                                                            resolve(maxDepth, deferred, Identity,
3907                                                                deferred.notifyWith)
3908                                                        );
3909                                                    }
3910
3911                                                    // Handle all other returned values
3912                                                } else {
3913
3914                                                    // Only substitute handlers pass on context
3915                                                    // and multiple values (non-spec behavior)
3916                                                    if (handler !== Identity) {
3917                                                        that = undefined;
3918                                                        args = [returned];
3919                                                    }
3920
3921                                                    // Process the value(s)
3922                                                    // Default process is resolve
3923                                                    (special || deferred.resolveWith)(that, args);
3924                                                }
3925                                            },
3926
3927                                            // Only normal processors (resolve) catch and reject exceptions
3928                                            process = special ?
3929                                                mightThrow :
3930                                                function () {
3931                                                    try {
3932                                                        mightThrow();
3933                                                    } catch (e) {
3934
3935                                                        if (jQuery.Deferred.exceptionHook) {
3936                                                            jQuery.Deferred.exceptionHook(e,
3937                                                                process.stackTrace);
3938                                                        }
3939
3940                                                        // Support: Promises/A+ section 2.3.3.3.4.1
3941                                                        // https://promisesaplus.com/#point-61
3942                                                        // Ignore post-resolution exceptions
3943                                                        if (depth + 1 >= maxDepth) {
3944
3945                                                            // Only substitute handlers pass on context
3946                                                            // and multiple values (non-spec behavior)
3947                                                            if (handler !== Thrower) {
3948                                                                that = undefined;
3949                                                                args = [e];
3950                                                            }
3951
3952                                                            deferred.rejectWith(that, args);
3953                                                        }
3954                                                    }
3955                                                };
3956
3957                                        // Support: Promises/A+ section 2.3.3.3.1
3958                                        // https://promisesaplus.com/#point-57
3959                                        // Re-resolve promises immediately to dodge false rejection from
3960                                        // subsequent errors
3961                                        if (depth) {
3962                                            process();
3963                                        } else {
3964
3965                                            // Call an optional hook to record the stack, in case of exception
3966                                            // since it's otherwise lost when execution goes async
3967                                            if (jQuery.Deferred.getStackHook) {
3968                                                process.stackTrace = jQuery.Deferred.getStackHook();
3969                                            }
3970                                            window.setTimeout(process);
3971                                        }
3972                                    };
3973                                }
3974
3975                                return jQuery.Deferred(function (newDefer) {
3976
3977                                    // progress_handlers.add( ... )
3978                                    tuples[0][3].add(
3979                                        resolve(
3980                                            0,
3981                                            newDefer,
3982                                            isFunction(onProgress) ?
3983                                                onProgress :
3984                                                Identity,
3985                                            newDefer.notifyWith
3986                                        )
3987                                    );
3988
3989                                    // fulfilled_handlers.add( ... )
3990                                    tuples[1][3].add(
3991                                        resolve(
3992                                            0,
3993                                            newDefer,
3994                                            isFunction(onFulfilled) ?
3995                                                onFulfilled :
3996                                                Identity
3997                                        )
3998                                    );
3999
4000                                    // rejected_handlers.add( ... )
4001                                    tuples[2][3].add(
4002                                        resolve(
4003                                            0,
4004                                            newDefer,
4005                                            isFunction(onRejected) ?
4006                                                onRejected :
4007                                                Thrower
4008                                        )
4009                                    );
4010                                }).promise();
4011                            },
4012
4013                            // Get a promise for this deferred
4014                            // If obj is provided, the promise aspect is added to the object
4015                            promise: function (obj) {
4016                                return obj != null ? jQuery.extend(obj, promise) : promise;
4017                            }
4018                        },
4019                        deferred = {};
4020
4021                    // Add list-specific methods
4022                    jQuery.each(tuples, function (i, tuple) {
4023                        var list = tuple[2],
4024                            stateString = tuple[5];
4025
4026                        // promise.progress = list.add
4027                        // promise.done = list.add
4028                        // promise.fail = list.add
4029                        promise[tuple[1]] = list.add;
4030
4031                        // Handle state
4032                        if (stateString) {
4033                            list.add(
4034                                function () {
4035
4036                                    // state = "resolved" (i.e., fulfilled)
4037                                    // state = "rejected"
4038                                    state = stateString;
4039                                },
4040
4041                                // rejected_callbacks.disable
4042                                // fulfilled_callbacks.disable
4043                                tuples[3 - i][2].disable,
4044
4045                                // rejected_handlers.disable
4046                                // fulfilled_handlers.disable
4047                                tuples[3 - i][3].disable,
4048
4049                                // progress_callbacks.lock
4050                                tuples[0][2].lock,
4051
4052                                // progress_handlers.lock
4053                                tuples[0][3].lock
4054                            );
4055                        }
4056
4057                        // progress_handlers.fire
4058                        // fulfilled_handlers.fire
4059                        // rejected_handlers.fire
4060                        list.add(tuple[3].fire);
4061
4062                        // deferred.notify = function() { deferred.notifyWith(...) }
4063                        // deferred.resolve = function() { deferred.resolveWith(...) }
4064                        // deferred.reject = function() { deferred.rejectWith(...) }
4065                        deferred[tuple[0]] = function () {
4066                            deferred[tuple[0] + "With"](this === deferred ? undefined : this, arguments);
4067                            return this;
4068                        };
4069
4070                        // deferred.notifyWith = list.fireWith
4071                        // deferred.resolveWith = list.fireWith
4072                        // deferred.rejectWith = list.fireWith
4073                        deferred[tuple[0] + "With"] = list.fireWith;
4074                    });
4075
4076                    // Make the deferred a promise
4077                    promise.promise(deferred);
4078
4079                    // Call given func if any
4080                    if (func) {
4081                        func.call(deferred, deferred);
4082                    }
4083
4084                    // All done!
4085                    return deferred;
4086                },
4087
4088                // Deferred helper
4089                when: function (singleValue) {
4090                    var
4091
4092                        // count of uncompleted subordinates
4093                        remaining = arguments.length,
4094
4095                        // count of unprocessed arguments
4096                        i = remaining,
4097
4098                        // subordinate fulfillment data
4099                        resolveContexts = Array(i),
4100                        resolveValues = slice.call(arguments),
4101
4102                        // the master Deferred
4103                        master = jQuery.Deferred(),
4104
4105                        // subordinate callback factory
4106                        updateFunc = function (i) {
4107                            return function (value) {
4108                                resolveContexts[i] = this;
4109                                resolveValues[i] = arguments.length > 1 ? slice.call(arguments) : value;
4110                                if (!(--remaining)) {
4111                                    master.resolveWith(resolveContexts, resolveValues);
4112                                }
4113                            };
4114                        };
4115
4116                    // Single- and empty arguments are adopted like Promise.resolve
4117                    if (remaining <= 1) {
4118                        adoptValue(singleValue, master.done(updateFunc(i)).resolve, master.reject,
4119                            !remaining);
4120
4121                        // Use .then() to unwrap secondary thenables (cf. gh-3000)
4122                        if (master.state() === "pending" ||
4123                            isFunction(resolveValues[i] && resolveValues[i].then)) {
4124
4125                            return master.then();
4126                        }
4127                    }
4128
4129                    // Multiple arguments are aggregated like Promise.all array elements
4130                    while (i--) {
4131                        adoptValue(resolveValues[i], updateFunc(i), master.reject);
4132                    }
4133
4134                    return master.promise();
4135                }
4136            });
4137
4138
4139// These usually indicate a programmer mistake during development,
4140// warn about them ASAP rather than swallowing them by default.
4141            var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
4142
4143            jQuery.Deferred.exceptionHook = function (error, stack) {
4144
4145                // Support: IE 8 - 9 only
4146                // Console exists when dev tools are open, which can happen at any time
4147                if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {
4148                    window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack);
4149                }
4150            };
4151
4152
4153            jQuery.readyException = function (error) {
4154                window.setTimeout(function () {
4155                    throw error;
4156                });
4157            };
4158
4159
4160// The deferred used on DOM ready
4161            var readyList = jQuery.Deferred();
4162
4163            jQuery.fn.ready = function (fn) {
4164
4165                readyList
4166                    .then(fn)
4167
4168                    // Wrap jQuery.readyException in a function so that the lookup
4169                    // happens at the time of error handling instead of callback
4170                    // registration.
4171                    .catch(function (error) {
4172                        jQuery.readyException(error);
4173                    });
4174
4175                return this;
4176            };
4177
4178            jQuery.extend({
4179
4180                // Is the DOM ready to be used? Set to true once it occurs.
4181                isReady: false,
4182
4183                // A counter to track how many items to wait for before
4184                // the ready event fires. See #6781
4185                readyWait: 1,
4186
4187                // Handle when the DOM is ready
4188                ready: function (wait) {
4189
4190                    // Abort if there are pending holds or we're already ready
4191                    if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
4192                        return;
4193                    }
4194
4195                    // Remember that the DOM is ready
4196                    jQuery.isReady = true;
4197
4198                    // If a normal DOM Ready event fired, decrement, and wait if need be
4199                    if (wait !== true && --jQuery.readyWait > 0) {
4200                        return;
4201                    }
4202
4203                    // If there are functions bound, to execute
4204                    readyList.resolveWith(document, [jQuery]);
4205                }
4206            });
4207
4208            jQuery.ready.then = readyList.then;
4209
4210// The ready event handler and self cleanup method
4211            function completed() {
4212                document.removeEventListener("DOMContentLoaded", completed);
4213                window.removeEventListener("load", completed);
4214                jQuery.ready();
4215            }
4216
4217// Catch cases where $(document).ready() is called
4218// after the browser event has already occurred.
4219// Support: IE <=9 - 10 only
4220// Older IE sometimes signals "interactive" too soon
4221            if (document.readyState === "complete" ||
4222                (document.readyState !== "loading" && !document.documentElement.doScroll)) {
4223
4224                // Handle it asynchronously to allow scripts the opportunity to delay ready
4225                window.setTimeout(jQuery.ready);
4226
4227            } else {
4228
4229                // Use the handy event callback
4230                document.addEventListener("DOMContentLoaded", completed);
4231
4232                // A fallback to window.onload, that will always work
4233                window.addEventListener("load", completed);
4234            }
4235
4236
4237// Multifunctional method to get and set values of a collection
4238// The value/s can optionally be executed if it's a function
4239            var access = function (elems, fn, key, value, chainable, emptyGet, raw) {
4240                var i = 0,
4241                    len = elems.length,
4242                    bulk = key == null;
4243
4244                // Sets many values
4245                if (toType(key) === "object") {
4246                    chainable = true;
4247                    for (i in key) {
4248                        access(elems, fn, i, key[i], true, emptyGet, raw);
4249                    }
4250
4251                    // Sets one value
4252                } else if (value !== undefined) {
4253                    chainable = true;
4254
4255                    if (!isFunction(value)) {
4256                        raw = true;
4257                    }
4258
4259                    if (bulk) {
4260
4261                        // Bulk operations run against the entire set
4262                        if (raw) {
4263                            fn.call(elems, value);
4264                            fn = null;
4265
4266                            // ...except when executing function values
4267                        } else {
4268                            bulk = fn;
4269                            fn = function (elem, key, value) {
4270                                return bulk.call(jQuery(elem), value);
4271                            };
4272                        }
4273                    }
4274
4275                    if (fn) {
4276                        for (; i < len; i++) {
4277                            fn(
4278                                elems[i], key, raw ?
4279                                    value :
4280                                    value.call(elems[i], i, fn(elems[i], key))
4281                            );
4282                        }
4283                    }
4284                }
4285
4286                if (chainable) {
4287                    return elems;
4288                }
4289
4290                // Gets
4291                if (bulk) {
4292                    return fn.call(elems);
4293                }
4294
4295                return len ? fn(elems[0], key) : emptyGet;
4296            };
4297
4298
4299// Matches dashed string for camelizing
4300            var rmsPrefix = /^-ms-/,
4301                rdashAlpha = /-([a-z])/g;
4302
4303// Used by camelCase as callback to replace()
4304            function fcamelCase(all, letter) {
4305                return letter.toUpperCase();
4306            }
4307
4308// Convert dashed to camelCase; used by the css and data modules
4309// Support: IE <=9 - 11, Edge 12 - 15
4310// Microsoft forgot to hump their vendor prefix (#9572)
4311            function camelCase(string) {
4312                return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
4313            }
4314
4315            var acceptData = function (owner) {
4316
4317                // Accepts only:
4318                //  - Node
4319                //    - Node.ELEMENT_NODE
4320                //    - Node.DOCUMENT_NODE
4321                //  - Object
4322                //    - Any
4323                return owner.nodeType === 1 || owner.nodeType === 9 || !(+owner.nodeType);
4324            };
4325
4326
4327            function Data() {
4328                this.expando = jQuery.expando + Data.uid++;
4329            }
4330
4331            Data.uid = 1;
4332
4333            Data.prototype = {
4334
4335                cache: function (owner) {
4336
4337                    // Check if the owner object already has a cache
4338                    var value = owner[this.expando];
4339
4340                    // If not, create one
4341                    if (!value) {
4342                        value = {};
4343
4344                        // We can accept data for non-element nodes in modern browsers,
4345                        // but we should not, see #8335.
4346                        // Always return an empty object.
4347                        if (acceptData(owner)) {
4348
4349                            // If it is a node unlikely to be stringify-ed or looped over
4350                            // use plain assignment
4351                            if (owner.nodeType) {
4352                                owner[this.expando] = value;
4353
4354                                // Otherwise secure it in a non-enumerable property
4355                                // configurable must be true to allow the property to be
4356                                // deleted when data is removed
4357                            } else {
4358                                Object.defineProperty(owner, this.expando, {
4359                                    value: value,
4360                                    configurable: true
4361                                });
4362                            }
4363                        }
4364                    }
4365
4366                    return value;
4367                },
4368                set: function (owner, data, value) {
4369                    var prop,
4370                        cache = this.cache(owner);
4371
4372                    // Handle: [ owner, key, value ] args
4373                    // Always use camelCase key (gh-2257)
4374                    if (typeof data === "string") {
4375                        cache[camelCase(data)] = value;
4376
4377                        // Handle: [ owner, { properties } ] args
4378                    } else {
4379
4380                        // Copy the properties one-by-one to the cache object
4381                        for (prop in data) {
4382                            cache[camelCase(prop)] = data[prop];
4383                        }
4384                    }
4385                    return cache;
4386                },
4387                get: function (owner, key) {
4388                    return key === undefined ?
4389                        this.cache(owner) :
4390
4391                        // Always use camelCase key (gh-2257)
4392                        owner[this.expando] && owner[this.expando][camelCase(key)];
4393                },
4394                access: function (owner, key, value) {
4395
4396                    // In cases where either:
4397                    //
4398                    //   1. No key was specified
vendor: 8,697 bytes, lines 4399-4617
4399                    //   2. A string key was specified, but no value provided
4400                    //
4401                    // Take the "read" path and allow the get method to determine
4402                    // which value to return, respectively either:
4403                    //
4404                    //   1. The entire cache object
4405                    //   2. The data stored at the key
4406                    //
4407                    if (key === undefined ||
4408                        ((key && typeof key === "string") && value === undefined)) {
4409
4410                        return this.get(owner, key);
4411                    }
4412
4413                    // When the key is not a string, or both a key and value
4414                    // are specified, set or extend (existing objects) with either:
4415                    //
4416                    //   1. An object of properties
4417                    //   2. A key and value
4418                    //
4419                    this.set(owner, key, value);
4420
4421                    // Since the "set" path can have two possible entry points
4422                    // return the expected data based on which path was taken[*]
4423                    return value !== undefined ? value : key;
4424                },
4425                remove: function (owner, key) {
4426                    var i,
4427                        cache = owner[this.expando];
4428
4429                    if (cache === undefined) {
4430                        return;
4431                    }
4432
4433                    if (key !== undefined) {
4434
4435                        // Support array or space separated string of keys
4436                        if (Array.isArray(key)) {
4437
4438                            // If key is an array of keys...
4439                            // We always set camelCase keys, so remove that.
4440                            key = key.map(camelCase);
4441                        } else {
4442                            key = camelCase(key);
4443
4444                            // If a key with the spaces exists, use it.
4445                            // Otherwise, create an array by matching non-whitespace
4446                            key = key in cache ?
4447                                [key] :
4448                                (key.match(rnothtmlwhite) || []);
4449                        }
4450
4451                        i = key.length;
4452
4453                        while (i--) {
4454                            delete cache[key[i]];
4455                        }
4456                    }
4457
4458                    // Remove the expando if there's no more data
4459                    if (key === undefined || jQuery.isEmptyObject(cache)) {
4460
4461                        // Support: Chrome <=35 - 45
4462                        // Webkit & Blink performance suffers when deleting properties
4463                        // from DOM nodes, so set to undefined instead
4464                        // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
4465                        if (owner.nodeType) {
4466                            owner[this.expando] = undefined;
4467                        } else {
4468                            delete owner[this.expando];
4469                        }
4470                    }
4471                },
4472                hasData: function (owner) {
4473                    var cache = owner[this.expando];
4474                    return cache !== undefined && !jQuery.isEmptyObject(cache);
4475                }
4476            };
4477            var dataPriv = new Data();
4478
4479            var dataUser = new Data();
4480
4481
4482//	Implementation Summary
4483//
4484//	1. Enforce API surface and semantic compatibility with 1.9.x branch
4485//	2. Improve the module's maintainability by reducing the storage
4486//		paths to a single mechanism.
4487//	3. Use the same single mechanism to support "private" and "user" data.
4488//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
4489//	5. Avoid exposing implementation details on user objects (eg. expando properties)
4490//	6. Provide a clear path for implementation upgrade to WeakMap in 2014
4491
4492            var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
4493                rmultiDash = /[A-Z]/g;
4494
4495            function getData(data) {
4496                if (data === "true") {
4497                    return true;
4498                }
4499
4500                if (data === "false") {
4501                    return false;
4502                }
4503
4504                if (data === "null") {
4505                    return null;
4506                }
4507
4508                // Only convert to a number if it doesn't change the string
4509                if (data === +data + "") {
4510                    return +data;
4511                }
4512
4513                if (rbrace.test(data)) {
4514                    return JSON.parse(data);
4515                }
4516
4517                return data;
4518            }
4519
4520            function dataAttr(elem, key, data) {
4521                var name;
4522
4523                // If nothing was found internally, try to fetch any
4524                // data from the HTML5 data-* attribute
4525                if (data === undefined && elem.nodeType === 1) {
4526                    name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
4527                    data = elem.getAttribute(name);
4528
4529                    if (typeof data === "string") {
4530                        try {
4531                            data = getData(data);
4532                        } catch (e) {
4533                        }
4534
4535                        // Make sure we set the data so it isn't changed later
4536                        dataUser.set(elem, key, data);
4537                    } else {
4538                        data = undefined;
4539                    }
4540                }
4541                return data;
4542            }
4543
4544            jQuery.extend({
4545                hasData: function (elem) {
4546                    return dataUser.hasData(elem) || dataPriv.hasData(elem);
4547                },
4548
4549                data: function (elem, name, data) {
4550                    return dataUser.access(elem, name, data);
4551                },
4552
4553                removeData: function (elem, name) {
4554                    dataUser.remove(elem, name);
4555                },
4556
4557                // TODO: Now that all calls to _data and _removeData have been replaced
4558                // with direct calls to dataPriv methods, these can be deprecated.
4559                _data: function (elem, name, data) {
4560                    return dataPriv.access(elem, name, data);
4561                },
4562
4563                _removeData: function (elem, name) {
4564                    dataPriv.remove(elem, name);
4565                }
4566            });
4567
4568            jQuery.fn.extend({
4569                data: function (key, value) {
4570                    var i, name, data,
4571                        elem = this[0],
4572                        attrs = elem && elem.attributes;
4573
4574                    // Gets all values
4575                    if (key === undefined) {
4576                        if (this.length) {
4577                            data = dataUser.get(elem);
4578
4579                            if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
4580                                i = attrs.length;
4581                                while (i--) {
4582
4583                                    // Support: IE 11 only
4584                                    // The attrs elements can be null (#--14894)
4585                                    if (attrs[i]) {
4586                                        name = attrs[i].name;
4587                                        if (name.indexOf("data-") === 0) {
4588                                            name = camelCase(name.slice(5));
4589                                            dataAttr(elem, name, data[name]);
4590                                        }
4591                                    }
4592                                }
4593                                dataPriv.set(elem, "hasDataAttrs", true);
4594                            }
4595                        }
4596
4597                        return data;
4598                    }
4599
4600                    // Sets multiple values
4601                    if (typeof key === "object") {
4602                        return this.each(function () {
4603                            dataUser.set(this, key);
4604                        });
4605                    }
4606
4607                    return access(this, function (value) {
4608                        var data;
4609
4610                        // The calling jQuery object (element matches) is not empty
4611                        // (and therefore has an element appears at this[ 0 ]) and the
4612                        // `value` parameter was not undefined. An empty jQuery object
4613                        // will result in `undefined` for elem = this[ 0 ] which will
4614                        // throw an exception if an attempt to read a data cache is made.
4615                        if (elem && value === undefined) {
4616
4617                            // Attempt to get data from the cache
vendor: 6,474 bytes, lines 4618-4787
4618                            // The key will always be camelCased in Data
4619                            data = dataUser.get(elem, key);
4620                            if (data !== undefined) {
4621                                return data;
4622                            }
4623
4624                            // Attempt to "discover" the data in
4625                            // HTML5 custom data-* attrs
4626                            data = dataAttr(elem, key);
4627                            if (data !== undefined) {
4628                                return data;
4629                            }
4630
4631                            // We tried really hard, but the data doesn't exist.
4632                            return;
4633                        }
4634
4635                        // Set the data...
4636                        this.each(function () {
4637
4638                            // We always store the camelCased key
4639                            dataUser.set(this, key, value);
4640                        });
4641                    }, null, value, arguments.length > 1, null, true);
4642                },
4643
4644                removeData: function (key) {
4645                    return this.each(function () {
4646                        dataUser.remove(this, key);
4647                    });
4648                }
4649            });
4650
4651
4652            jQuery.extend({
4653                queue: function (elem, type, data) {
4654                    var queue;
4655
4656                    if (elem) {
4657                        type = (type || "fx") + "queue";
4658                        queue = dataPriv.get(elem, type);
4659
4660                        // Speed up dequeue by getting out quickly if this is just a lookup
4661                        if (data) {
4662                            if (!queue || Array.isArray(data)) {
4663                                queue = dataPriv.access(elem, type, jQuery.makeArray(data));
4664                            } else {
4665                                queue.push(data);
4666                            }
4667                        }
4668                        return queue || [];
4669                    }
4670                },
4671
4672                dequeue: function (elem, type) {
4673                    type = type || "fx";
4674
4675                    var queue = jQuery.queue(elem, type),
4676                        startLength = queue.length,
4677                        fn = queue.shift(),
4678                        hooks = jQuery._queueHooks(elem, type),
4679                        next = function () {
4680                            jQuery.dequeue(elem, type);
4681                        };
4682
4683                    // If the fx queue is dequeued, always remove the progress sentinel
4684                    if (fn === "inprogress") {
4685                        fn = queue.shift();
4686                        startLength--;
4687                    }
4688
4689                    if (fn) {
4690
4691                        // Add a progress sentinel to prevent the fx queue from being
4692                        // automatically dequeued
4693                        if (type === "fx") {
4694                            queue.unshift("inprogress");
4695                        }
4696
4697                        // Clear up the last queue stop function
4698                        delete hooks.stop;
4699                        fn.call(elem, next, hooks);
4700                    }
4701
4702                    if (!startLength && hooks) {
4703                        hooks.empty.fire();
4704                    }
4705                },
4706
4707                // Not public - generate a queueHooks object, or return the current one
4708                _queueHooks: function (elem, type) {
4709                    var key = type + "queueHooks";
4710                    return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
4711                        empty: jQuery.Callbacks("once memory").add(function () {
4712                            dataPriv.remove(elem, [type + "queue", key]);
4713                        })
4714                    });
4715                }
4716            });
4717
4718            jQuery.fn.extend({
4719                queue: function (type, data) {
4720                    var setter = 2;
4721
4722                    if (typeof type !== "string") {
4723                        data = type;
4724                        type = "fx";
4725                        setter--;
4726                    }
4727
4728                    if (arguments.length < setter) {
4729                        return jQuery.queue(this[0], type);
4730                    }
4731
4732                    return data === undefined ?
4733                        this :
4734                        this.each(function () {
4735                            var queue = jQuery.queue(this, type, data);
4736
4737                            // Ensure a hooks for this queue
4738                            jQuery._queueHooks(this, type);
4739
4740                            if (type === "fx" && queue[0] !== "inprogress") {
4741                                jQuery.dequeue(this, type);
4742                            }
4743                        });
4744                },
4745                dequeue: function (type) {
4746                    return this.each(function () {
4747                        jQuery.dequeue(this, type);
4748                    });
4749                },
4750                clearQueue: function (type) {
4751                    return this.queue(type || "fx", []);
4752                },
4753
4754                // Get a promise resolved when queues of a certain type
4755                // are emptied (fx is the type by default)
4756                promise: function (type, obj) {
4757                    var tmp,
4758                        count = 1,
4759                        defer = jQuery.Deferred(),
4760                        elements = this,
4761                        i = this.length,
4762                        resolve = function () {
4763                            if (!(--count)) {
4764                                defer.resolveWith(elements, [elements]);
4765                            }
4766                        };
4767
4768                    if (typeof type !== "string") {
4769                        obj = type;
4770                        type = undefined;
4771                    }
4772                    type = type || "fx";
4773
4774                    while (i--) {
4775                        tmp = dataPriv.get(elements[i], type + "queueHooks");
4776                        if (tmp && tmp.empty) {
4777                            count++;
4778                            tmp.empty.add(resolve);
4779                        }
4780                    }
4781                    resolve();
4782                    return defer.promise(obj);
4783                }
4784            });
4785            var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
4786
4787            var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z
vendor: 13,874 bytes, lines 4787-5157
4787%]*)$", "i");
4788
4789
4790            var cssExpand = ["Top", "Right", "Bottom", "Left"];
4791
4792            var isHiddenWithinTree = function (elem, el) {
4793
4794                // isHiddenWithinTree might be called from jQuery#filter function;
4795                // in that case, element will be second argument
4796                elem = el || elem;
4797
4798                // Inline style trumps all
4799                return elem.style.display === "none" ||
4800                    elem.style.display === "" &&
4801
4802                    // Otherwise, check computed style
4803                    // Support: Firefox <=43 - 45
4804                    // Disconnected elements can have computed display: none, so first confirm that elem is
4805                    // in the document.
4806                    jQuery.contains(elem.ownerDocument, elem) &&
4807
4808                    jQuery.css(elem, "display") === "none";
4809            };
4810
4811            var swap = function (elem, options, callback, args) {
4812                var ret, name,
4813                    old = {};
4814
4815                // Remember the old values, and insert the new ones
4816                for (name in options) {
4817                    old[name] = elem.style[name];
4818                    elem.style[name] = options[name];
4819                }
4820
4821                ret = callback.apply(elem, args || []);
4822
4823                // Revert the old values
4824                for (name in options) {
4825                    elem.style[name] = old[name];
4826                }
4827
4828                return ret;
4829            };
4830
4831
4832            function adjustCSS(elem, prop, valueParts, tween) {
4833                var adjusted, scale,
4834                    maxIterations = 20,
4835                    currentValue = tween ?
4836                        function () {
4837                            return tween.cur();
4838                        } :
4839                        function () {
4840                            return jQuery.css(elem, prop, "");
4841                        },
4842                    initial = currentValue(),
4843                    unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
4844
4845                    // Starting value computation is required for potential unit mismatches
4846                    initialInUnit = (jQuery.cssNumber[prop] || unit !== "px" && +initial) &&
4847                        rcssNum.exec(jQuery.css(elem, prop));
4848
4849                if (initialInUnit && initialInUnit[3] !== unit) {
4850
4851                    // Support: Firefox <=54
4852                    // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
4853                    initial = initial / 2;
4854
4855                    // Trust units reported by jQuery.css
4856                    unit = unit || initialInUnit[3];
4857
4858                    // Iteratively approximate from a nonzero starting point
4859                    initialInUnit = +initial || 1;
4860
4861                    while (maxIterations--) {
4862
4863                        // Evaluate and update our best guess (doubling guesses that zero out).
4864                        // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
4865                        jQuery.style(elem, prop, initialInUnit + unit);
4866                        if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
4867                            maxIterations = 0;
4868                        }
4869                        initialInUnit = initialInUnit / scale;
4870
4871                    }
4872
4873                    initialInUnit = initialInUnit * 2;
4874                    jQuery.style(elem, prop, initialInUnit + unit);
4875
4876                    // Make sure we update the tween properties later on
4877                    valueParts = valueParts || [];
4878                }
4879
4880                if (valueParts) {
4881                    initialInUnit = +initialInUnit || +initial || 0;
4882
4883                    // Apply relative offset (+=/-=) if specified
4884                    adjusted = valueParts[1] ?
4885                        initialInUnit + (valueParts[1] + 1) * valueParts[2] :
4886                        +valueParts[2];
4887                    if (tween) {
4888                        tween.unit = unit;
4889                        tween.start = initialInUnit;
4890                        tween.end = adjusted;
4891                    }
4892                }
4893                return adjusted;
4894            }
4895
4896
4897            var defaultDisplayMap = {};
4898
4899            function getDefaultDisplay(elem) {
4900                var temp,
4901                    doc = elem.ownerDocument,
4902                    nodeName = elem.nodeName,
4903                    display = defaultDisplayMap[nodeName];
4904
4905                if (display) {
4906                    return display;
4907                }
4908
4909                temp = doc.body.appendChild(doc.createElement(nodeName));
4910                display = jQuery.css(temp, "display");
4911
4912                temp.parentNode.removeChild(temp);
4913
4914                if (display === "none") {
4915                    display = "block";
4916                }
4917                defaultDisplayMap[nodeName] = display;
4918
4919                return display;
4920            }
4921
4922            function showHide(elements, show) {
4923                var display, elem,
4924                    values = [],
4925                    index = 0,
4926                    length = elements.length;
4927
4928                // Determine new display value for elements that need to change
4929                for (; index < length; index++) {
4930                    elem = elements[index];
4931                    if (!elem.style) {
4932                        continue;
4933                    }
4934
4935                    display = elem.style.display;
4936                    if (show) {
4937
4938                        // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
4939                        // check is required in this first loop unless we have a nonempty display value (either
4940                        // inline or about-to-be-restored)
4941                        if (display === "none") {
4942                            values[index] = dataPriv.get(elem, "display") || null;
4943                            if (!values[index]) {
4944                                elem.style.display = "";
4945                            }
4946                        }
4947                        if (elem.style.display === "" && isHiddenWithinTree(elem)) {
4948                            values[index] = getDefaultDisplay(elem);
4949                        }
4950                    } else {
4951                        if (display !== "none") {
4952                            values[index] = "none";
4953
4954                            // Remember what we're overwriting
4955                            dataPriv.set(elem, "display", display);
4956                        }
4957                    }
4958                }
4959
4960                // Set the display of the elements in a second loop to avoid constant reflow
4961                for (index = 0; index < length; index++) {
4962                    if (values[index] != null) {
4963                        elements[index].style.display = values[index];
4964                    }
4965                }
4966
4967                return elements;
4968            }
4969
4970            jQuery.fn.extend({
4971                show: function () {
4972                    return showHide(this, true);
4973                },
4974                hide: function () {
4975                    return showHide(this);
4976                },
4977                toggle: function (state) {
4978                    if (typeof state === "boolean") {
4979                        return state ? this.show() : this.hide();
4980                    }
4981
4982                    return this.each(function () {
4983                        if (isHiddenWithinTree(this)) {
4984                            jQuery(this).show();
4985                        } else {
4986                            jQuery(this).hide();
4987                        }
4988                    });
4989                }
4990            });
4991            var rcheckableType = (/^(?:checkbox|radio)$/i);
4992
4993            var rtagName = (/<([a-z][^\/\0>\x20\t\r\n\f]+)/i);
4994
4995            var rscriptType = (/^$|^module$|\/(?:java|ecma)script/i);
4996
4997
4998// We have to close these tags to support XHTML (#--13200)
4999            var wrapMap = {
5000
5001                // Support: IE <=9 only
5002                option: [1, "<select multiple='multiple'>", "</select>"],
5003
5004                // XHTML parsers do not magically insert elements in the
5005                // same way that tag soup parsers do. So we cannot shorten
5006                // this by omitting <tbody> or other required elements.
5007                thead: [1, "<table>", "</table>"],
5008                col: [2, "<table><colgroup>", "</colgroup></table>"],
5009                tr: [2, "<table><tbody>", "</tbody></table>"],
5010                td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
5011
5012                _default: [0, "", ""]
5013            };
5014
5015// Support: IE <=9 only
5016            wrapMap.optgroup = wrapMap.option;
5017
5018            wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5019            wrapMap.th = wrapMap.td;
5020
5021
5022            function getAll(context, tag) {
5023
5024                // Support: IE <=9 - 11 only
5025                // Use typeof to avoid zero-argument method invocation on host objects (#--15151)
5026                var ret;
5027
5028                if (typeof context.getElementsByTagName !== "undefined") {
5029                    ret = context.getElementsByTagName(tag || "*");
5030
5031                } else if (typeof context.querySelectorAll !== "undefined") {
5032                    ret = context.querySelectorAll(tag || "*");
5033
5034                } else {
5035                    ret = [];
5036                }
5037
5038                if (tag === undefined || tag && nodeName(context, tag)) {
5039                    return jQuery.merge([context], ret);
5040                }
5041
5042                return ret;
5043            }
5044
5045
5046// Mark scripts as having already been evaluated
5047            function setGlobalEval(elems, refElements) {
5048                var i = 0,
5049                    l = elems.length;
5050
5051                for (; i < l; i++) {
5052                    dataPriv.set(
5053                        elems[i],
5054                        "globalEval",
5055                        !refElements || dataPriv.get(refElements[i], "globalEval")
5056                    );
5057                }
5058            }
5059
5060
5061            var rhtml = /<|&#?\w+;/;
5062
5063            function buildFragment(elems, context, scripts, selection, ignored) {
5064                var elem, tmp, tag, wrap, contains, j,
5065                    fragment = context.createDocumentFragment(),
5066                    nodes = [],
5067                    i = 0,
5068                    l = elems.length;
5069
5070                for (; i < l; i++) {
5071                    elem = elems[i];
5072
5073                    if (elem || elem === 0) {
5074
5075                        // Add nodes directly
5076                        if (toType(elem) === "object") {
5077
5078                            // Support: Android <=4.0 only, PhantomJS 1 only
5079                            // push.apply(_, arraylike) throws on ancient WebKit
5080                            jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
5081
5082                            // Convert non-html into a text node
5083                        } else if (!rhtml.test(elem)) {
5084                            nodes.push(context.createTextNode(elem));
5085
5086                            // Convert html into DOM nodes
5087                        } else {
5088                            tmp = tmp || fragment.appendChild(context.createElement("div"));
5089
5090                            // Deserialize a standard representation
5091                            tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
5092                            wrap = wrapMap[tag] || wrapMap._default;
5093                            tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
5094
5095                            // Descend through wrappers to the right content
5096                            j = wrap[0];
5097                            while (j--) {
5098                                tmp = tmp.lastChild;
5099                            }
5100
5101                            // Support: Android <=4.0 only, PhantomJS 1 only
5102                            // push.apply(_, arraylike) throws on ancient WebKit
5103                            jQuery.merge(nodes, tmp.childNodes);
5104
5105                            // Remember the top-level container
5106                            tmp = fragment.firstChild;
5107
5108                            // Ensure the created nodes are orphaned (#--12392)
5109                            tmp.textContent = "";
5110                        }
5111                    }
5112                }
5113
5114                // Remove wrapper from fragment
5115                fragment.textContent = "";
5116
5117                i = 0;
5118                while ((elem = nodes[i++])) {
5119
5120                    // Skip elements already in the context collection (trac-4087)
5121                    if (selection && jQuery.inArray(elem, selection) > -1) {
5122                        if (ignored) {
5123                            ignored.push(elem);
5124                        }
5125                        continue;
5126                    }
5127
5128                    contains = jQuery.contains(elem.ownerDocument, elem);
5129
5130                    // Append to fragment
5131                    tmp = getAll(fragment.appendChild(elem), "script");
5132
5133                    // Preserve script evaluation history
5134                    if (contains) {
5135                        setGlobalEval(tmp);
5136                    }
5137
5138                    // Capture executables
5139                    if (scripts) {
5140                        j = 0;
5141                        while ((elem = tmp[j++])) {
5142                            if (rscriptType.test(elem.type || "")) {
5143                                scripts.push(elem);
5144                            }
5145                        }
5146                    }
5147                }
5148
5149                return fragment;
5150            }
5151
5152
5153            (function () {
5154                var fragment = document.createDocumentFragment(),
5155                    div = fragment.appendChild(document.createElement("div")),
5156                    input = document.createElement("input");
5157
vendor: 14,710 bytes, lines 5158-5496
5158                // Support: Android 4.0 - 4.3 only
5159                // Check state lost if the name is set (#--11217)
5160                // Support: Windows Web Apps (WWA)
5161                // `name` and `type` must use .setAttribute for WWA (#--14901)
5162                input.setAttribute("type", "radio");
5163                input.setAttribute("checked", "checked");
5164                input.setAttribute("name", "t");
5165
5166                div.appendChild(input);
5167
5168                // Support: Android <=4.1 only
5169                // Older WebKit doesn't clone checked state correctly in fragments
5170                support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
5171
5172                // Support: IE <=11 only
5173                // Make sure textarea (and checkbox) defaultValue is properly cloned
5174                div.innerHTML = "<textarea>x</textarea>";
5175                support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
5176            })();
5177            var documentElement = document.documentElement;
5178
5179
5180            var
5181                rkeyEvent = /^key/,
5182                rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
5183                rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
5184
5185            function returnTrue() {
5186                return true;
5187            }
5188
5189            function returnFalse() {
5190                return false;
5191            }
5192
5193// Support: IE <=9 only
5194// See #--13393 for more info
5195            function safeActiveElement() {
5196                try {
5197                    return document.activeElement;
5198                } catch (err) {
5199                }
5200            }
5201
5202            function on(elem, types, selector, data, fn, one) {
5203                var origFn, type;
5204
5205                // Types can be a map of types/handlers
5206                if (typeof types === "object") {
5207
5208                    // ( types-Object, selector, data )
5209                    if (typeof selector !== "string") {
5210
5211                        // ( types-Object, data )
5212                        data = data || selector;
5213                        selector = undefined;
5214                    }
5215                    for (type in types) {
5216                        on(elem, type, selector, data, types[type], one);
5217                    }
5218                    return elem;
5219                }
5220
5221                if (data == null && fn == null) {
5222
5223                    // ( types, fn )
5224                    fn = selector;
5225                    data = selector = undefined;
5226                } else if (fn == null) {
5227                    if (typeof selector === "string") {
5228
5229                        // ( types, selector, fn )
5230                        fn = data;
5231                        data = undefined;
5232                    } else {
5233
5234                        // ( types, data, fn )
5235                        fn = data;
5236                        data = selector;
5237                        selector = undefined;
5238                    }
5239                }
5240                if (fn === false) {
5241                    fn = returnFalse;
5242                } else if (!fn) {
5243                    return elem;
5244                }
5245
5246                if (one === 1) {
5247                    origFn = fn;
5248                    fn = function (event) {
5249
5250                        // Can use an empty set, since event contains the info
5251                        jQuery().off(event);
5252                        return origFn.apply(this, arguments);
5253                    };
5254
5255                    // Use same guid so caller can remove using origFn
5256                    fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
5257                }
5258                return elem.each(function () {
5259                    jQuery.event.add(this, types, fn, data, selector);
5260                });
5261            }
5262
5263            /*
5264 * Helper functions for managing events -- not part of the public interface.
5265 * Props to Dean Edwards' addEvent library for many of the ideas.
5266 */
5267            jQuery.event = {
5268
5269                global: {},
5270
5271                add: function (elem, types, handler, data, selector) {
5272
5273                    var handleObjIn, eventHandle, tmp,
5274                        events, t, handleObj,
5275                        special, handlers, type, namespaces, origType,
5276                        elemData = dataPriv.get(elem);
5277
5278                    // Don't attach events to noData or text/comment nodes (but allow plain objects)
5279                    if (!elemData) {
5280                        return;
5281                    }
5282
5283                    // Caller can pass in an object of custom data in lieu of the handler
5284                    if (handler.handler) {
5285                        handleObjIn = handler;
5286                        handler = handleObjIn.handler;
5287                        selector = handleObjIn.selector;
5288                    }
5289
5290                    // Ensure that invalid selectors throw exceptions at attach time
5291                    // Evaluate against documentElement in case elem is a non-element node (e.g., document)
5292                    if (selector) {
5293                        jQuery.find.matchesSelector(documentElement, selector);
5294                    }
5295
5296                    // Make sure that the handler has a unique ID, used to find/remove it later
5297                    if (!handler.guid) {
5298                        handler.guid = jQuery.guid++;
5299                    }
5300
5301                    // Init the element's event structure and main handler, if this is the first
5302                    if (!(events = elemData.events)) {
5303                        events = elemData.events = {};
5304                    }
5305                    if (!(eventHandle = elemData.handle)) {
5306                        eventHandle = elemData.handle = function (e) {
5307
5308                            // Discard the second event of a jQuery.event.trigger() and
5309                            // when an event is called after a page has unloaded
5310                            return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
5311                                jQuery.event.dispatch.apply(elem, arguments) : undefined;
5312                        };
5313                    }
5314
5315                    // Handle multiple events separated by a space
5316                    types = (types || "").match(rnothtmlwhite) || [""];
5317                    t = types.length;
5318                    while (t--) {
5319                        tmp = rtypenamespace.exec(types[t]) || [];
5320                        type = origType = tmp[1];
5321                        namespaces = (tmp[2] || "").split(".").sort();
5322
5323                        // There *must* be a type, no attaching namespace-only handlers
5324                        if (!type) {
5325                            continue;
5326                        }
5327
5328                        // If event changes its type, use the special event handlers for the changed type
5329                        special = jQuery.event.special[type] || {};
5330
5331                        // If selector defined, determine special event api type, otherwise given type
5332                        type = (selector ? special.delegateType : special.bindType) || type;
5333
5334                        // Update special based on newly reset type
5335                        special = jQuery.event.special[type] || {};
5336
5337                        // handleObj is passed to all event handlers
5338                        handleObj = jQuery.extend({
5339                            type: type,
5340                            origType: origType,
5341                            data: data,
5342                            handler: handler,
5343                            guid: handler.guid,
5344                            selector: selector,
5345                            needsContext: selector && jQuery.expr.match.needsContext.test(selector),
5346                            namespace: namespaces.join(".")
5347                        }, handleObjIn);
5348
5349                        // Init the event handler queue if we're the first
5350                        if (!(handlers = events[type])) {
5351                            handlers = events[type] = [];
5352                            handlers.delegateCount = 0;
5353
5354                            // Only use addEventListener if the special events handler returns false
5355                            if (!special.setup ||
5356                                special.setup.call(elem, data, namespaces, eventHandle) === false) {
5357
5358                                if (elem.addEventListener) {
5359                                    elem.addEventListener(type, eventHandle);
5360                                }
5361                            }
5362                        }
5363
5364                        if (special.add) {
5365                            special.add.call(elem, handleObj);
5366
5367                            if (!handleObj.handler.guid) {
5368                                handleObj.handler.guid = handler.guid;
5369                            }
5370                        }
5371
5372                        // Add to the element's handler list, delegates in front
5373                        if (selector) {
5374                            handlers.splice(handlers.delegateCount++, 0, handleObj);
5375                        } else {
5376                            handlers.push(handleObj);
5377                        }
5378
5379                        // Keep track of which events have ever been used, for event optimization
5380                        jQuery.event.global[type] = true;
5381                    }
5382
5383                },
5384
5385                // Detach an event or set of events from an element
5386                remove: function (elem, types, handler, selector, mappedTypes) {
5387
5388                    var j, origCount, tmp,
5389                        events, t, handleObj,
5390                        special, handlers, type, namespaces, origType,
5391                        elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
5392
5393                    if (!elemData || !(events = elemData.events)) {
5394                        return;
5395                    }
5396
5397                    // Once for each type.namespace in types; type may be omitted
5398                    types = (types || "").match(rnothtmlwhite) || [""];
5399                    t = types.length;
5400                    while (t--) {
5401                        tmp = rtypenamespace.exec(types[t]) || [];
5402                        type = origType = tmp[1];
5403                        namespaces = (tmp[2] || "").split(".").sort();
5404
5405                        // Unbind all events (on this namespace, if provided) for the element
5406                        if (!type) {
5407                            for (type in events) {
5408                                jQuery.event.remove(elem, type + types[t], handler, selector, true);
5409                            }
5410                            continue;
5411                        }
5412
5413                        special = jQuery.event.special[type] || {};
5414                        type = (selector ? special.delegateType : special.bindType) || type;
5415                        handlers = events[type] || [];
5416                        tmp = tmp[2] &&
5417                            new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
5418
5419                        // Remove matching events
5420                        origCount = j = handlers.length;
5421                        while (j--) {
5422                            handleObj = handlers[j];
5423
5424                            if ((mappedTypes || origType === handleObj.origType) &&
5425                                (!handler || handler.guid === handleObj.guid) &&
5426                                (!tmp || tmp.test(handleObj.namespace)) &&
5427                                (!selector || selector === handleObj.selector ||
5428                                    selector === "**" && handleObj.selector)) {
5429                                handlers.splice(j, 1);
5430
5431                                if (handleObj.selector) {
5432                                    handlers.delegateCount--;
5433                                }
5434                                if (special.remove) {
5435                                    special.remove.call(elem, handleObj);
5436                                }
5437                            }
5438                        }
5439
5440                        // Remove generic event handler if we removed something and no more handlers exist
5441                        // (avoids potential for endless recursion during removal of special event handlers)
5442                        if (origCount && !handlers.length) {
5443                            if (!special.teardown ||
5444                                special.teardown.call(elem, namespaces, elemData.handle) === false) {
5445
5446                                jQuery.removeEvent(elem, type, elemData.handle);
5447                            }
5448
5449                            delete events[type];
5450                        }
5451                    }
5452
5453                    // Remove data and the expando if it's no longer used
5454                    if (jQuery.isEmptyObject(events)) {
5455                        dataPriv.remove(elem, "handle events");
5456                    }
5457                },
5458
5459                dispatch: function (nativeEvent) {
5460
5461                    // Make a writable jQuery.Event from the native event object
5462                    var event = jQuery.event.fix(nativeEvent);
5463
5464                    var i, j, ret, matched, handleObj, handlerQueue,
5465                        args = new Array(arguments.length),
5466                        handlers = (dataPriv.get(this, "events") || {})[event.type] || [],
5467                        special = jQuery.event.special[event.type] || {};
5468
5469                    // Use the fix-ed jQuery.Event rather than the (read-only) native event
5470                    args[0] = event;
5471
5472                    for (i = 1; i < arguments.length; i++) {
5473                        args[i] = arguments[i];
5474                    }
5475
5476                    event.delegateTarget = this;
5477
5478                    // Call the preDispatch hook for the mapped type, and let it bail if desired
5479                    if (special.preDispatch && special.preDispatch.call(this, event) === false) {
5480                        return;
5481                    }
5482
5483                    // Determine handlers
5484                    handlerQueue = jQuery.event.handlers.call(this, event, handlers);
5485
5486                    // Run delegates first; they may want to stop propagation beneath us
5487                    i = 0;
5488                    while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
5489                        event.currentTarget = matched.elem;
5490
5491                        j = 0;
5492                        while ((handleObj = matched.handlers[j++]) &&
5493                        !event.isImmediatePropagationStopped()) {
5494
5495                            // Triggered event must either 1) have no namespace, or 2) have namespace(s)
5496                            // a subset or equal to those in the bound event (both can have no namespace).
vendor: 28,036 bytes, lines 5497-6181
5497                            if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) {
5498
5499                                event.handleObj = handleObj;
5500                                event.data = handleObj.data;
5501
5502                                ret = ((jQuery.event.special[handleObj.origType] || {}).handle ||
5503                                    handleObj.handler).apply(matched.elem, args);
5504
5505                                if (ret !== undefined) {
5506                                    if ((event.result = ret) === false) {
5507                                        event.preventDefault();
5508                                        event.stopPropagation();
5509                                    }
5510                                }
5511                            }
5512                        }
5513                    }
5514
5515                    // Call the postDispatch hook for the mapped type
5516                    if (special.postDispatch) {
5517                        special.postDispatch.call(this, event);
5518                    }
5519
5520                    return event.result;
5521                },
5522
5523                handlers: function (event, handlers) {
5524                    var i, handleObj, sel, matchedHandlers, matchedSelectors,
5525                        handlerQueue = [],
5526                        delegateCount = handlers.delegateCount,
5527                        cur = event.target;
5528
5529                    // Find delegate handlers
5530                    if (delegateCount &&
5531
5532                        // Support: IE <=9
5533                        // Black-hole SVG <use> instance trees (trac-13180)
5534                        cur.nodeType &&
5535
5536                        // Support: Firefox <=42
5537                        // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
5538                        // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
5539                        // Support: IE 11 only
5540                        // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
5541                        !(event.type === "click" && event.button >= 1)) {
5542
5543                        for (; cur !== this; cur = cur.parentNode || this) {
5544
5545                            // Don't check non-elements (#--13208)
5546                            // Don't process clicks on disabled elements (#6911, #8165, #--11382, #--11764)
5547                            if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
5548                                matchedHandlers = [];
5549                                matchedSelectors = {};
5550                                for (i = 0; i < delegateCount; i++) {
5551                                    handleObj = handlers[i];
5552
5553                                    // Don't conflict with Object.prototype properties (#--13203)
5554                                    sel = handleObj.selector + " ";
5555
5556                                    if (matchedSelectors[sel] === undefined) {
5557                                        matchedSelectors[sel] = handleObj.needsContext ?
5558                                            jQuery(sel, this).index(cur) > -1 :
5559                                            jQuery.find(sel, this, null, [cur]).length;
5560                                    }
5561                                    if (matchedSelectors[sel]) {
5562                                        matchedHandlers.push(handleObj);
5563                                    }
5564                                }
5565                                if (matchedHandlers.length) {
5566                                    handlerQueue.push({elem: cur, handlers: matchedHandlers});
5567                                }
5568                            }
5569                        }
5570                    }
5571
5572                    // Add the remaining (directly-bound) handlers
5573                    cur = this;
5574                    if (delegateCount < handlers.length) {
5575                        handlerQueue.push({elem: cur, handlers: handlers.slice(delegateCount)});
5576                    }
5577
5578                    return handlerQueue;
5579                },
5580
5581                addProp: function (name, hook) {
5582                    Object.defineProperty(jQuery.Event.prototype, name, {
5583                        enumerable: true,
5584                        configurable: true,
5585
5586                        get: isFunction(hook) ?
5587                            function () {
5588                                if (this.originalEvent) {
5589                                    return hook(this.originalEvent);
5590                                }
5591                            } :
5592                            function () {
5593                                if (this.originalEvent) {
5594                                    return this.originalEvent[name];
5595                                }
5596                            },
5597
5598                        set: function (value) {
5599                            Object.defineProperty(this, name, {
5600                                enumerable: true,
5601                                configurable: true,
5602                                writable: true,
5603                                value: value
5604                            });
5605                        }
5606                    });
5607                },
5608
5609                fix: function (originalEvent) {
5610                    return originalEvent[jQuery.expando] ?
5611                        originalEvent :
5612                        new jQuery.Event(originalEvent);
5613                },
5614
5615                special: {
5616                    load: {
5617
5618                        // Prevent triggered image.load events from bubbling to window.load
5619                        noBubble: true
5620                    },
5621                    focus: {
5622
5623                        // Fire native event if possible so blur/focus sequence is correct
5624                        trigger: function () {
5625                            if (this !== safeActiveElement() && this.focus) {
5626                                this.focus();
5627                                return false;
5628                            }
5629                        },
5630                        delegateType: "focusin"
5631                    },
5632                    blur: {
5633                        trigger: function () {
5634                            if (this === safeActiveElement() && this.blur) {
5635                                this.blur();
5636                                return false;
5637                            }
5638                        },
5639                        delegateType: "focusout"
5640                    },
5641                    click: {
5642
5643                        // For checkbox, fire native event so checked state will be right
5644                        trigger: function () {
5645                            if (this.type === "checkbox" && this.click && nodeName(this, "input")) {
5646                                this.click();
5647                                return false;
5648                            }
5649                        },
5650
5651                        // For cross-browser consistency, don't fire native .click() on links
5652                        _default: function (event) {
5653                            return nodeName(event.target, "a");
5654                        }
5655                    },
5656
5657                    beforeunload: {
5658                        postDispatch: function (event) {
5659
5660                            // Support: Firefox 20+
5661                            // Firefox doesn't alert if the returnValue field is not set.
5662                            if (event.result !== undefined && event.originalEvent) {
5663                                event.originalEvent.returnValue = event.result;
5664                            }
5665                        }
5666                    }
5667                }
5668            };
5669
5670            jQuery.removeEvent = function (elem, type, handle) {
5671
5672                // This "if" is needed for plain objects
5673                if (elem.removeEventListener) {
5674                    elem.removeEventListener(type, handle);
5675                }
5676            };
5677
5678            jQuery.Event = function (src, props) {
5679
5680                // Allow instantiation without the 'new' keyword
5681                if (!(this instanceof jQuery.Event)) {
5682                    return new jQuery.Event(src, props);
5683                }
5684
5685                // Event object
5686                if (src && src.type) {
5687                    this.originalEvent = src;
5688                    this.type = src.type;
5689
5690                    // Events bubbling up the document may have been marked as prevented
5691                    // by a handler lower down the tree; reflect the correct value.
5692                    this.isDefaultPrevented = src.defaultPrevented ||
5693                    src.defaultPrevented === undefined &&
5694
5695                    // Support: Android <=2.3 only
5696                    src.returnValue === false ?
5697                        returnTrue :
5698                        returnFalse;
5699
5700                    // Create target properties
5701                    // Support: Safari <=6 - 7 only
5702                    // Target should not be a text node (#--534, #--13143)
5703                    this.target = (src.target && src.target.nodeType === 3) ?
5704                        src.target.parentNode :
5705                        src.target;
5706
5707                    this.currentTarget = src.currentTarget;
5708                    this.relatedTarget = src.relatedTarget;
5709
5710                    // Event type
5711                } else {
5712                    this.type = src;
5713                }
5714
5715                // Put explicitly provided properties onto the event object
5716                if (props) {
5717                    jQuery.extend(this, props);
5718                }
5719
5720                // Create a timestamp if incoming event doesn't have one
5721                this.timeStamp = src && src.timeStamp || Date.now();
5722
5723                // Mark it as fixed
5724                this[jQuery.expando] = true;
5725            };
5726
5727// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5728// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5729            jQuery.Event.prototype = {
5730                constructor: jQuery.Event,
5731                isDefaultPrevented: returnFalse,
5732                isPropagationStopped: returnFalse,
5733                isImmediatePropagationStopped: returnFalse,
5734                isSimulated: false,
5735
5736                preventDefault: function () {
5737                    var e = this.originalEvent;
5738
5739                    this.isDefaultPrevented = returnTrue;
5740
5741                    if (e && !this.isSimulated) {
5742                        e.preventDefault();
5743                    }
5744                },
5745                stopPropagation: function () {
5746                    var e = this.originalEvent;
5747
5748                    this.isPropagationStopped = returnTrue;
5749
5750                    if (e && !this.isSimulated) {
5751                        e.stopPropagation();
5752                    }
5753                },
5754                stopImmediatePropagation: function () {
5755                    var e = this.originalEvent;
5756
5757                    this.isImmediatePropagationStopped = returnTrue;
5758
5759                    if (e && !this.isSimulated) {
5760                        e.stopImmediatePropagation();
5761                    }
5762
5763                    this.stopPropagation();
5764                }
5765            };
5766
5767// Includes all common event props including KeyEvent and MouseEvent specific props
5768            jQuery.each({
5769                altKey: true,
5770                bubbles: true,
5771                cancelable: true,
5772                changedTouches: true,
5773                ctrlKey: true,
5774                detail: true,
5775                eventPhase: true,
5776                metaKey: true,
5777                pageX: true,
5778                pageY: true,
5779                shiftKey: true,
5780                view: true,
5781                "char": true,
5782                charCode: true,
5783                key: true,
5784                keyCode: true,
5785                button: true,
5786                buttons: true,
5787                clientX: true,
5788                clientY: true,
5789                offsetX: true,
5790                offsetY: true,
5791                pointerId: true,
5792                pointerType: true,
5793                screenX: true,
5794                screenY: true,
5795                targetTouches: true,
5796                toElement: true,
5797                touches: true,
5798
5799                which: function (event) {
5800                    var button = event.button;
5801
5802                    // Add which for key events
5803                    if (event.which == null && rkeyEvent.test(event.type)) {
5804                        return event.charCode != null ? event.charCode : event.keyCode;
5805                    }
5806
5807                    // Add which for click: 1 === left; 2 === middle; 3 === right
5808                    if (!event.which && button !== undefined && rmouseEvent.test(event.type)) {
5809                        if (button & 1) {
5810                            return 1;
5811                        }
5812
5813                        if (button & 2) {
5814                            return 3;
5815                        }
5816
5817                        if (button & 4) {
5818                            return 2;
5819                        }
5820
5821                        return 0;
5822                    }
5823
5824                    return event.which;
5825                }
5826            }, jQuery.event.addProp);
5827
5828// Create mouseenter/leave events using mouseover/out and event-time checks
5829// so that event delegation works in jQuery.
5830// Do the same for pointerenter/pointerleave and pointerover/pointerout
5831//
5832// Support: Safari 7 only
5833// Safari sends mouseenter too often; see:
5834// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
5835// for the description of the bug (it existed in older Chrome versions as well).
5836            jQuery.each({
5837                mouseenter: "mouseover",
5838                mouseleave: "mouseout",
5839                pointerenter: "pointerover",
5840                pointerleave: "pointerout"
5841            }, function (orig, fix) {
5842                jQuery.event.special[orig] = {
5843                    delegateType: fix,
5844                    bindType: fix,
5845
5846                    handle: function (event) {
5847                        var ret,
5848                            target = this,
5849                            related = event.relatedTarget,
5850                            handleObj = event.handleObj;
5851
5852                        // For mouseenter/leave call the handler if related is outside the target.
5853                        // NB: No relatedTarget if the mouse left/entered the browser window
5854                        if (!related || (related !== target && !jQuery.contains(target, related))) {
5855                            event.type = handleObj.origType;
5856                            ret = handleObj.handler.apply(this, arguments);
5857                            event.type = fix;
5858                        }
5859                        return ret;
5860                    }
5861                };
5862            });
5863
5864            jQuery.fn.extend({
5865
5866                on: function (types, selector, data, fn) {
5867                    return on(this, types, selector, data, fn);
5868                },
5869                one: function (types, selector, data, fn) {
5870                    return on(this, types, selector, data, fn, 1);
5871                },
5872                off: function (types, selector, fn) {
5873                    var handleObj, type;
5874                    if (types && types.preventDefault && types.handleObj) {
5875
5876                        // ( event )  dispatched jQuery.Event
5877                        handleObj = types.handleObj;
5878                        jQuery(types.delegateTarget).off(
5879                            handleObj.namespace ?
5880                                handleObj.origType + "." + handleObj.namespace :
5881                                handleObj.origType,
5882                            handleObj.selector,
5883                            handleObj.handler
5884                        );
5885                        return this;
5886                    }
5887                    if (typeof types === "object") {
5888
5889                        // ( types-object [, selector] )
5890                        for (type in types) {
5891                            this.off(type, selector, types[type]);
5892                        }
5893                        return this;
5894                    }
5895                    if (selector === false || typeof selector === "function") {
5896
5897                        // ( types [, fn] )
5898                        fn = selector;
5899                        selector = undefined;
5900                    }
5901                    if (fn === false) {
5902                        fn = returnFalse;
5903                    }
5904                    return this.each(function () {
5905                        jQuery.event.remove(this, types, fn, selector);
5906                    });
5907                }
5908            });
5909
5910
5911            var
5912
5913                /* eslint-disable max-len */
5914
5915                // See https://github.com/eslint/eslint/issues/3229
5916                rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
5917
5918                /* eslint-enable */
5919
5920                // Support: IE <=10 - 11, Edge 12 - 13 only
5921                // In IE/Edge using regex groups here causes severe slowdowns.
5922                // See https://connect.microsoft.com/IE/feedback/details/1736512/
5923                rnoInnerhtml = /<script|<style|<link/i,
5924
5925                // checked="checked" or checked
5926                rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
5927                rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
5928
5929// Prefer a tbody over its parent table for containing new rows
5930            function manipulationTarget(elem, content) {
5931                if (nodeName(elem, "table") &&
5932                    nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
5933
5934                    return jQuery(elem).children("tbody")[0] || elem;
5935                }
5936
5937                return elem;
5938            }
5939
5940// Replace/restore the type attribute of script elements for safe DOM manipulation
5941            function disableScript(elem) {
5942                elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
5943                return elem;
5944            }
5945
5946            function restoreScript(elem) {
5947                if ((elem.type || "").slice(0, 5) === "true/") {
5948                    elem.type = elem.type.slice(5);
5949                } else {
5950                    elem.removeAttribute("type");
5951                }
5952
5953                return elem;
5954            }
5955
5956            function cloneCopyEvent(src, dest) {
5957                var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
5958
5959                if (dest.nodeType !== 1) {
5960                    return;
5961                }
5962
5963                // 1. Copy private data: events, handlers, etc.
5964                if (dataPriv.hasData(src)) {
5965                    pdataOld = dataPriv.access(src);
5966                    pdataCur = dataPriv.set(dest, pdataOld);
5967                    events = pdataOld.events;
5968
5969                    if (events) {
5970                        delete pdataCur.handle;
5971                        pdataCur.events = {};
5972
5973                        for (type in events) {
5974                            for (i = 0, l = events[type].length; i < l; i++) {
5975                                jQuery.event.add(dest, type, events[type][i]);
5976                            }
5977                        }
5978                    }
5979                }
5980
5981                // 2. Copy user data
5982                if (dataUser.hasData(src)) {
5983                    udataOld = dataUser.access(src);
5984                    udataCur = jQuery.extend({}, udataOld);
5985
5986                    dataUser.set(dest, udataCur);
5987                }
5988            }
5989
5990// Fix IE bugs, see support tests
5991            function fixInput(src, dest) {
5992                var nodeName = dest.nodeName.toLowerCase();
5993
5994                // Fails to persist the checked state of a cloned checkbox or radio button.
5995                if (nodeName === "input" && rcheckableType.test(src.type)) {
5996                    dest.checked = src.checked;
5997
5998                    // Fails to return the selected option to the default selected state when cloning options
5999                } else if (nodeName === "input" || nodeName === "textarea") {
6000                    dest.defaultValue = src.defaultValue;
6001                }
6002            }
6003
6004            function domManip(collection, args, callback, ignored) {
6005
6006                // Flatten any nested arrays
6007                args = concat.apply([], args);
6008
6009                var fragment, first, scripts, hasScripts, node, doc,
6010                    i = 0,
6011                    l = collection.length,
6012                    iNoClone = l - 1,
6013                    value = args[0],
6014                    valueIsFunction = isFunction(value);
6015
6016                // We can't cloneNode fragments that contain checked, in WebKit
6017                if (valueIsFunction ||
6018                    (l > 1 && typeof value === "string" &&
6019                        !support.checkClone && rchecked.test(value))) {
6020                    return collection.each(function (index) {
6021                        var self = collection.eq(index);
6022                        if (valueIsFunction) {
6023                            args[0] = value.call(this, index, self.html());
6024                        }
6025                        domManip(self, args, callback, ignored);
6026                    });
6027                }
6028
6029                if (l) {
6030                    fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
6031                    first = fragment.firstChild;
6032
6033                    if (fragment.childNodes.length === 1) {
6034                        fragment = first;
6035                    }
6036
6037                    // Require either new content or an interest in ignored elements to invoke the callback
6038                    if (first || ignored) {
6039                        scripts = jQuery.map(getAll(fragment, "script"), disableScript);
6040                        hasScripts = scripts.length;
6041
6042                        // Use the original fragment for the last item
6043                        // instead of the first because it can end up
6044                        // being emptied incorrectly in certain situations (#--8070).
6045                        for (; i < l; i++) {
6046                            node = fragment;
6047
6048                            if (i !== iNoClone) {
6049                                node = jQuery.clone(node, true, true);
6050
6051                                // Keep references to cloned scripts for later restoration
6052                                if (hasScripts) {
6053
6054                                    // Support: Android <=4.0 only, PhantomJS 1 only
6055                                    // push.apply(_, arraylike) throws on ancient WebKit
6056                                    jQuery.merge(scripts, getAll(node, "script"));
6057                                }
6058                            }
6059
6060                            callback.call(collection[i], node, i);
6061                        }
6062
6063                        if (hasScripts) {
6064                            doc = scripts[scripts.length - 1].ownerDocument;
6065
6066                            // Reenable scripts
6067                            jQuery.map(scripts, restoreScript);
6068
6069                            // Evaluate executable scripts on first document insertion
6070                            for (i = 0; i < hasScripts; i++) {
6071                                node = scripts[i];
6072                                if (rscriptType.test(node.type || "") &&
6073                                    !dataPriv.access(node, "globalEval") &&
6074                                    jQuery.contains(doc, node)) {
6075
6076                                    if (node.src && (node.type || "").toLowerCase() !== "module") {
6077
6078                                        // Optional AJAX dependency, but won't run scripts if not present
6079                                        if (jQuery._evalUrl) {
6080                                            jQuery._evalUrl(node.src);
6081                                        }
6082                                    } else {
6083                                        DOMEval(node.textContent.replace(rcleanScript, ""), doc, node);
6084                                    }
6085                                }
6086                            }
6087                        }
6088                    }
6089                }
6090
6091                return collection;
6092            }
6093
6094            function remove(elem, selector, keepData) {
6095                var node,
6096                    nodes = selector ? jQuery.filter(selector, elem) : elem,
6097                    i = 0;
6098
6099                for (; (node = nodes[i]) != null; i++) {
6100                    if (!keepData && node.nodeType === 1) {
6101                        jQuery.cleanData(getAll(node));
6102                    }
6103
6104                    if (node.parentNode) {
6105                        if (keepData && jQuery.contains(node.ownerDocument, node)) {
6106                            setGlobalEval(getAll(node, "script"));
6107                        }
6108                        node.parentNode.removeChild(node);
6109                    }
6110                }
6111
6112                return elem;
6113            }
6114
6115            jQuery.extend({
6116                htmlPrefilter: function (html) {
6117                    return html.replace(rxhtmlTag, "<$1></$2>");
6118                },
6119
6120                clone: function (elem, dataAndEvents, deepDataAndEvents) {
6121                    var i, l, srcElements, destElements,
6122                        clone = elem.cloneNode(true),
6123                        inPage = jQuery.contains(elem.ownerDocument, elem);
6124
6125                    // Fix IE cloning issues
6126                    if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) &&
6127                        !jQuery.isXMLDoc(elem)) {
6128
6129                        // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
6130                        destElements = getAll(clone);
6131                        srcElements = getAll(elem);
6132
6133                        for (i = 0, l = srcElements.length; i < l; i++) {
6134                            fixInput(srcElements[i], destElements[i]);
6135                        }
6136                    }
6137
6138                    // Copy the events from the original to the clone
6139                    if (dataAndEvents) {
6140                        if (deepDataAndEvents) {
6141                            srcElements = srcElements || getAll(elem);
6142                            destElements = destElements || getAll(clone);
6143
6144                            for (i = 0, l = srcElements.length; i < l; i++) {
6145                                cloneCopyEvent(srcElements[i], destElements[i]);
6146                            }
6147                        } else {
6148                            cloneCopyEvent(elem, clone);
6149                        }
6150                    }
6151
6152                    // Preserve script evaluation history
6153                    destElements = getAll(clone, "script");
6154                    if (destElements.length > 0) {
6155                        setGlobalEval(destElements, !inPage && getAll(elem, "script"));
6156                    }
6157
6158                    // Return the cloned set
6159                    return clone;
6160                },
6161
6162                cleanData: function (elems) {
6163                    var data, elem, type,
6164                        special = jQuery.event.special,
6165                        i = 0;
6166
6167                    for (; (elem = elems[i]) !== undefined; i++) {
6168                        if (acceptData(elem)) {
6169                            if ((data = elem[dataPriv.expando])) {
6170                                if (data.events) {
6171                                    for (type in data.events) {
6172                                        if (special[type]) {
6173                                            jQuery.event.remove(elem, type);
6174
6175                                            // This is a shortcut to avoid jQuery.event.remove's overhead
6176                                        } else {
6177                                            jQuery.removeEvent(elem, type, data.handle);
6178                                        }
6179                                    }
6180                                }
6181
vendor: 4,447 bytes, lines 6182-6290
6182                                // Support: Chrome <=35 - 45+
6183                                // Assign undefined instead of using delete, see Data#remove
6184                                elem[dataPriv.expando] = undefined;
6185                            }
6186                            if (elem[dataUser.expando]) {
6187
6188                                // Support: Chrome <=35 - 45+
6189                                // Assign undefined instead of using delete, see Data#remove
6190                                elem[dataUser.expando] = undefined;
6191                            }
6192                        }
6193                    }
6194                }
6195            });
6196
6197            jQuery.fn.extend({
6198                detach: function (selector) {
6199                    return remove(this, selector, true);
6200                },
6201
6202                remove: function (selector) {
6203                    return remove(this, selector);
6204                },
6205
6206                text: function (value) {
6207                    return access(this, function (value) {
6208                        return value === undefined ?
6209                            jQuery.text(this) :
6210                            this.empty().each(function () {
6211                                if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6212                                    this.textContent = value;
6213                                }
6214                            });
6215                    }, null, value, arguments.length);
6216                },
6217
6218                append: function () {
6219                    return domManip(this, arguments, function (elem) {
6220                        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6221                            var target = manipulationTarget(this, elem);
6222                            target.appendChild(elem);
6223                        }
6224                    });
6225                },
6226
6227                prepend: function () {
6228                    return domManip(this, arguments, function (elem) {
6229                        if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6230                            var target = manipulationTarget(this, elem);
6231                            target.insertBefore(elem, target.firstChild);
6232                        }
6233                    });
6234                },
6235
6236                before: function () {
6237                    return domManip(this, arguments, function (elem) {
6238                        if (this.parentNode) {
6239                            this.parentNode.insertBefore(elem, this);
6240                        }
6241                    });
6242                },
6243
6244                after: function () {
6245                    return domManip(this, arguments, function (elem) {
6246                        if (this.parentNode) {
6247                            this.parentNode.insertBefore(elem, this.nextSibling);
6248                        }
6249                    });
6250                },
6251
6252                empty: function () {
6253                    var elem,
6254                        i = 0;
6255
6256                    for (; (elem = this[i]) != null; i++) {
6257                        if (elem.nodeType === 1) {
6258
6259                            // Prevent memory leaks
6260                            jQuery.cleanData(getAll(elem, false));
6261
6262                            // Remove any remaining nodes
6263                            elem.textContent = "";
6264                        }
6265                    }
6266
6267                    return this;
6268                },
6269
6270                clone: function (dataAndEvents, deepDataAndEvents) {
6271                    dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6272                    deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6273
6274                    return this.map(function () {
6275                        return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
6276                    });
6277                },
6278
6279                html: function (value) {
6280                    return access(this, function (value) {
6281                        var elem = this[0] || {},
6282                            i = 0,
6283                            l = this.length;
6284
6285                        if (value === undefined && elem.nodeType === 1) {
6286                            return elem.innerHTML;
6287                        }
6288
6289                        // See if we can take a shortcut and just use innerHTML
6290                        if (typeof value === "string" && !rnoInnerhtml.test(value) &&
vendor: 39,645 bytes, lines 6291-7245
6291                            !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
6292
6293                            value = jQuery.htmlPrefilter(value);
6294
6295                            try {
6296                                for (; i < l; i++) {
6297                                    elem = this[i] || {};
6298
6299                                    // Remove element nodes and prevent memory leaks
6300                                    if (elem.nodeType === 1) {
6301                                        jQuery.cleanData(getAll(elem, false));
6302                                        elem.innerHTML = value;
6303                                    }
6304                                }
6305
6306                                elem = 0;
6307
6308                                // If using innerHTML throws an exception, use the fallback method
6309                            } catch (e) {
6310                            }
6311                        }
6312
6313                        if (elem) {
6314                            this.empty().append(value);
6315                        }
6316                    }, null, value, arguments.length);
6317                },
6318
6319                replaceWith: function () {
6320                    var ignored = [];
6321
6322                    // Make the changes, replacing each non-ignored context element with the new content
6323                    return domManip(this, arguments, function (elem) {
6324                        var parent = this.parentNode;
6325
6326                        if (jQuery.inArray(this, ignored) < 0) {
6327                            jQuery.cleanData(getAll(this));
6328                            if (parent) {
6329                                parent.replaceChild(elem, this);
6330                            }
6331                        }
6332
6333                        // Force callback invocation
6334                    }, ignored);
6335                }
6336            });
6337
6338            jQuery.each({
6339                appendTo: "append",
6340                prependTo: "prepend",
6341                insertBefore: "before",
6342                insertAfter: "after",
6343                replaceAll: "replaceWith"
6344            }, function (name, original) {
6345                jQuery.fn[name] = function (selector) {
6346                    var elems,
6347                        ret = [],
6348                        insert = jQuery(selector),
6349                        last = insert.length - 1,
6350                        i = 0;
6351
6352                    for (; i <= last; i++) {
6353                        elems = i === last ? this : this.clone(true);
6354                        jQuery(insert[i])[original](elems);
6355
6356                        // Support: Android <=4.0 only, PhantomJS 1 only
6357                        // .get() because push.apply(_, arraylike) throws on ancient WebKit
6358                        push.apply(ret, elems.get());
6359                    }
6360
6361                    return this.pushStack(ret);
6362                };
6363            });
6364            var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
6365
6366            var getStyles = function (elem) {
6367
6368                // Support: IE <=11 only, Firefox <=30 (#--15098, #--14150)
6369                // IE throws on elements created in popups
6370                // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6371                var view = elem.ownerDocument.defaultView;
6372
6373                if (!view || !view.opener) {
6374                    view = window;
6375                }
6376
6377                return view.getComputedStyle(elem);
6378            };
6379
6380            var rboxStyle = new RegExp(cssExpand.join("|"), "i");
6381
6382
6383            (function () {
6384
6385                // Executing both pixelPosition & boxSizingReliable tests require only one layout
6386                // so they're executed at the same time to save the second computation.
6387                function computeStyleTests() {
6388
6389                    // This is a singleton, we need to execute it only once
6390                    if (!div) {
6391                        return;
6392                    }
6393
6394                    container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
6395                        "margin-top:1px;padding:0;border:0";
6396                    div.style.cssText =
6397                        "position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
6398                        "margin:auto;border:1px;padding:1px;" +
6399                        "width:60%;top:1%";
6400                    documentElement.appendChild(container).appendChild(div);
6401
6402                    var divStyle = window.getComputedStyle(div);
6403                    pixelPositionVal = divStyle.top !== "1%";
6404
6405                    // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
6406                    reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
6407
6408                    // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
6409                    // Some styles come back with percentage values, even though they shouldn't
6410                    div.style.right = "60%";
6411                    pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
6412
6413                    // Support: IE 9 - 11 only
6414                    // Detect misreporting of content dimensions for box-sizing:border-box elements
6415                    boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
6416
6417                    // Support: IE 9 only
6418                    // Detect overflow:scroll screwiness (gh-3699)
6419                    div.style.position = "absolute";
6420                    scrollboxSizeVal = div.offsetWidth === 36 || "absolute";
6421
6422                    documentElement.removeChild(container);
6423
6424                    // Nullify the div so it wouldn't be stored in the memory and
6425                    // it will also be a sign that checks already performed
6426                    div = null;
6427                }
6428
6429                function roundPixelMeasures(measure) {
6430                    return Math.round(parseFloat(measure));
6431                }
6432
6433                var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
6434                    reliableMarginLeftVal,
6435                    container = document.createElement("div"),
6436                    div = document.createElement("div");
6437
6438                // Finish early in limited (non-browser) environments
6439                if (!div.style) {
6440                    return;
6441                }
6442
6443                // Support: IE <=9 - 11 only
6444                // Style of cloned element affects source element cloned (#--8908)
6445                div.style.backgroundClip = "content-box";
6446                div.cloneNode(true).style.backgroundClip = "";
6447                support.clearCloneStyle = div.style.backgroundClip === "content-box";
6448
6449                jQuery.extend(support, {
6450                    boxSizingReliable: function () {
6451                        computeStyleTests();
6452                        return boxSizingReliableVal;
6453                    },
6454                    pixelBoxStyles: function () {
6455                        computeStyleTests();
6456                        return pixelBoxStylesVal;
6457                    },
6458                    pixelPosition: function () {
6459                        computeStyleTests();
6460                        return pixelPositionVal;
6461                    },
6462                    reliableMarginLeft: function () {
6463                        computeStyleTests();
6464                        return reliableMarginLeftVal;
6465                    },
6466                    scrollboxSize: function () {
6467                        computeStyleTests();
6468                        return scrollboxSizeVal;
6469                    }
6470                });
6471            })();
6472
6473
6474            function curCSS(elem, name, computed) {
6475                var width, minWidth, maxWidth, ret,
6476
6477                    // Support: Firefox 51+
6478                    // Retrieving style before computed somehow
6479                    // fixes an issue with getting wrong values
6480                    // on detached elements
6481                    style = elem.style;
6482
6483                computed = computed || getStyles(elem);
6484
6485                // getPropertyValue is needed for:
6486                //   .css('filter') (IE 9 only, #--12537)
6487                //   .css('--customProperty) (#--3144)
6488                if (computed) {
6489                    ret = computed.getPropertyValue(name) || computed[name];
6490
6491                    if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
6492                        ret = jQuery.style(elem, name);
6493                    }
6494
6495                    // A tribute to the "awesome hack by Dean Edwards"
6496                    // Android Browser returns percentage for some values,
6497                    // but width seems to be reliably pixels.
6498                    // This is against the CSSOM draft spec:
6499                    // https://drafts.csswg.org/cssom/#resolved-values
6500                    if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
6501
6502                        // Remember the original values
6503                        width = style.width;
6504                        minWidth = style.minWidth;
6505                        maxWidth = style.maxWidth;
6506
6507                        // Put in the new values to get a computed value out
6508                        style.minWidth = style.maxWidth = style.width = ret;
6509                        ret = computed.width;
6510
6511                        // Revert the changed values
6512                        style.width = width;
6513                        style.minWidth = minWidth;
6514                        style.maxWidth = maxWidth;
6515                    }
6516                }
6517
6518                return ret !== undefined ?
6519
6520                    // Support: IE <=9 - 11 only
6521                    // IE returns zIndex value as an integer.
6522                    ret + "" :
6523                    ret;
6524            }
6525
6526
6527            function addGetHookIf(conditionFn, hookFn) {
6528
6529                // Define the hook, we'll check on the first run if it's really needed.
6530                return {
6531                    get: function () {
6532                        if (conditionFn()) {
6533
6534                            // Hook not needed (or it's not possible to use it due
6535                            // to missing dependency), remove it.
6536                            delete this.get;
6537                            return;
6538                        }
6539
6540                        // Hook needed; redefine it so that the support test is not executed again.
6541                        return (this.get = hookFn).apply(this, arguments);
6542                    }
6543                };
6544            }
6545
6546
6547            var
6548
6549                // Swappable if display is none or starts with table
6550                // except "table", "table-cell", or "table-caption"
6551                // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6552                rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6553                rcustomProp = /^--/,
6554                cssShow = {position: "absolute", visibility: "hidden", display: "block"},
6555                cssNormalTransform = {
6556                    letterSpacing: "0",
6557                    fontWeight: "400"
6558                },
6559
6560                cssPrefixes = ["Webkit", "Moz", "ms"],
6561                emptyStyle = document.createElement("div").style;
6562
6563// Return a css property mapped to a potentially vendor prefixed property
6564            function vendorPropName(name) {
6565
6566                // Shortcut for names that are not vendor prefixed
6567                if (name in emptyStyle) {
6568                    return name;
6569                }
6570
6571                // Check for vendor prefixed names
6572                var capName = name[0].toUpperCase() + name.slice(1),
6573                    i = cssPrefixes.length;
6574
6575                while (i--) {
6576                    name = cssPrefixes[i] + capName;
6577                    if (name in emptyStyle) {
6578                        return name;
6579                    }
6580                }
6581            }
6582
6583// Return a property mapped along what jQuery.cssProps suggests or to
6584// a vendor prefixed property.
6585            function finalPropName(name) {
6586                var ret = jQuery.cssProps[name];
6587                if (!ret) {
6588                    ret = jQuery.cssProps[name] = vendorPropName(name) || name;
6589                }
6590                return ret;
6591            }
6592
6593            function setPositiveNumber(elem, value, subtract) {
6594
6595                // Any relative (+/-) values have already been
6596                // normalized at this point
6597                var matches = rcssNum.exec(value);
6598                return matches ?
6599
6600                    // Guard against undefined "subtract", e.g., when used as in cssHooks
6601                    Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") :
6602                    value;
6603            }
6604
6605            function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
6606                var i = dimension === "width" ? 1 : 0,
6607                    extra = 0,
6608                    delta = 0;
6609
6610                // Adjustment may not be necessary
6611                if (box === (isBorderBox ? "border" : "content")) {
6612                    return 0;
6613                }
6614
6615                for (; i < 4; i += 2) {
6616
6617                    // Both box models exclude margin
6618                    if (box === "margin") {
6619                        delta += jQuery.css(elem, box + cssExpand[i], true, styles);
6620                    }
6621
6622                    // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
6623                    if (!isBorderBox) {
6624
6625                        // Add padding
6626                        delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
6627
6628                        // For "border" or "margin", add border
6629                        if (box !== "padding") {
6630                            delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6631
6632                            // But still keep track of it otherwise
6633                        } else {
6634                            extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6635                        }
6636
6637                        // If we get here with a border-box (content + padding + border), we're seeking "content" or
6638                        // "padding" or "margin"
6639                    } else {
6640
6641                        // For "content", subtract padding
6642                        if (box === "content") {
6643                            delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
6644                        }
6645
6646                        // For "content" or "padding", subtract border
6647                        if (box !== "margin") {
6648                            delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
6649                        }
6650                    }
6651                }
6652
6653                // Account for positive content-box scroll gutter when requested by providing computedVal
6654                if (!isBorderBox && computedVal >= 0) {
6655
6656                    // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
6657                    // Assuming integer scroll gutter, subtract the rest and round down
6658                    delta += Math.max(0, Math.ceil(
6659                        elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] -
6660                        computedVal -
6661                        delta -
6662                        extra -
6663                        0.5
6664                    ));
6665                }
6666
6667                return delta;
6668            }
6669
6670            function getWidthOrHeight(elem, dimension, extra) {
6671
6672                // Start with computed style
6673                var styles = getStyles(elem),
6674                    val = curCSS(elem, dimension, styles),
6675                    isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6676                    valueIsBorderBox = isBorderBox;
6677
6678                // Support: Firefox <=54
6679                // Return a confounding non-pixel value or feign ignorance, as appropriate.
6680                if (rnumnonpx.test(val)) {
6681                    if (!extra) {
6682                        return val;
6683                    }
6684                    val = "auto";
6685                }
6686
6687                // Check for style in case a browser which returns unreliable values
6688                // for getComputedStyle silently falls back to the reliable elem.style
6689                valueIsBorderBox = valueIsBorderBox &&
6690                    (support.boxSizingReliable() || val === elem.style[dimension]);
6691
6692                // Fall back to offsetWidth/offsetHeight when value is "auto"
6693                // This happens for inline elements with no explicit setting (gh-3571)
6694                // Support: Android <=4.1 - 4.3 only
6695                // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
6696                if (val === "auto" ||
6697                    !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") {
6698
6699                    val = elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)];
6700
6701                    // offsetWidth/offsetHeight provide border-box values
6702                    valueIsBorderBox = true;
6703                }
6704
6705                // Normalize "" and auto
6706                val = parseFloat(val) || 0;
6707
6708                // Adjust for the element's box model
6709                return (val +
6710                    boxModelAdjustment(
6711                        elem,
6712                        dimension,
6713                        extra || (isBorderBox ? "border" : "content"),
6714                        valueIsBorderBox,
6715                        styles,
6716
6717                        // Provide the current computed size to request scroll gutter calculation (gh-3589)
6718                        val
6719                    )
6720                ) + "px";
6721            }
6722
6723            jQuery.extend({
6724
6725                // Add in style property hooks for overriding the default
6726                // behavior of getting and setting a style property
6727                cssHooks: {
6728                    opacity: {
6729                        get: function (elem, computed) {
6730                            if (computed) {
6731
6732                                // We should always get a number back from opacity
6733                                var ret = curCSS(elem, "opacity");
6734                                return ret === "" ? "1" : ret;
6735                            }
6736                        }
6737                    }
6738                },
6739
6740                // Don't automatically add "px" to these possibly-unitless properties
6741                cssNumber: {
6742                    "animationIterationCount": true,
6743                    "columnCount": true,
6744                    "fillOpacity": true,
6745                    "flexGrow": true,
6746                    "flexShrink": true,
6747                    "fontWeight": true,
6748                    "lineHeight": true,
6749                    "opacity": true,
6750                    "order": true,
6751                    "orphans": true,
6752                    "widows": true,
6753                    "zIndex": true,
6754                    "zoom": true
6755                },
6756
6757                // Add in properties whose names you wish to fix before
6758                // setting or getting the value
6759                cssProps: {},
6760
6761                // Get and set the style property on a DOM Node
6762                style: function (elem, name, value, extra) {
6763
6764                    // Don't set styles on text and comment nodes
6765                    if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
6766                        return;
6767                    }
6768
6769                    // Make sure that we're working with the right name
6770                    var ret, type, hooks,
6771                        origName = camelCase(name),
6772                        isCustomProp = rcustomProp.test(name),
6773                        style = elem.style;
6774
6775                    // Make sure that we're working with the right name. We don't
6776                    // want to query the value if it is a CSS custom property
6777                    // since they are user-defined.
6778                    if (!isCustomProp) {
6779                        name = finalPropName(origName);
6780                    }
6781
6782                    // Gets hook for the prefixed version, then unprefixed version
6783                    hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
6784
6785                    // Check if we're setting a value
6786                    if (value !== undefined) {
6787                        type = typeof value;
6788
6789                        // Convert "+=" or "-=" to relative numbers (#--7345)
6790                        if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
6791                            value = adjustCSS(elem, name, ret);
6792
6793                            // Fixes bug #9237
6794                            type = "number";
6795                        }
6796
6797                        // Make sure that null and NaN values aren't set (#--7116)
6798                        if (value == null || value !== value) {
6799                            return;
6800                        }
6801
6802                        // If a number was passed in, add the unit (except for certain CSS properties)
6803                        if (type === "number") {
6804                            value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
6805                        }
6806
6807                        // background-* props affect original clone's values
6808                        if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
6809                            style[name] = "inherit";
6810                        }
6811
6812                        // If a hook was provided, use that value, otherwise just set the specified value
6813                        if (!hooks || !("set" in hooks) ||
6814                            (value = hooks.set(elem, value, extra)) !== undefined) {
6815
6816                            if (isCustomProp) {
6817                                style.setProperty(name, value);
6818                            } else {
6819                                style[name] = value;
6820                            }
6821                        }
6822
6823                    } else {
6824
6825                        // If a hook was provided get the non-computed value from there
6826                        if (hooks && "get" in hooks &&
6827                            (ret = hooks.get(elem, false, extra)) !== undefined) {
6828
6829                            return ret;
6830                        }
6831
6832                        // Otherwise just get the value from the style object
6833                        return style[name];
6834                    }
6835                },
6836
6837                css: function (elem, name, extra, styles) {
6838                    var val, num, hooks,
6839                        origName = camelCase(name),
6840                        isCustomProp = rcustomProp.test(name);
6841
6842                    // Make sure that we're working with the right name. We don't
6843                    // want to modify the value if it is a CSS custom property
6844                    // since they are user-defined.
6845                    if (!isCustomProp) {
6846                        name = finalPropName(origName);
6847                    }
6848
6849                    // Try prefixed name followed by the unprefixed name
6850                    hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
6851
6852                    // If a hook was provided get the computed value from there
6853                    if (hooks && "get" in hooks) {
6854                        val = hooks.get(elem, true, extra);
6855                    }
6856
6857                    // Otherwise, if a way to get the computed value exists, use that
6858                    if (val === undefined) {
6859                        val = curCSS(elem, name, styles);
6860                    }
6861
6862                    // Convert "normal" to computed value
6863                    if (val === "normal" && name in cssNormalTransform) {
6864                        val = cssNormalTransform[name];
6865                    }
6866
6867                    // Make numeric if forced or a qualifier was provided and val looks numeric
6868                    if (extra === "" || extra) {
6869                        num = parseFloat(val);
6870                        return extra === true || isFinite(num) ? num || 0 : val;
6871                    }
6872
6873                    return val;
6874                }
6875            });
6876
6877            jQuery.each(["height", "width"], function (i, dimension) {
6878                jQuery.cssHooks[dimension] = {
6879                    get: function (elem, computed, extra) {
6880                        if (computed) {
6881
6882                            // Certain elements can have dimension info if we invisibly show them
6883                            // but it must have a current display style that would benefit
6884                            return rdisplayswap.test(jQuery.css(elem, "display")) &&
6885
6886                            // Support: Safari 8+
6887                            // Table columns in Safari have non-zero offsetWidth & zero
6888                            // getBoundingClientRect().width unless display is changed.
6889                            // Support: IE <=11 only
6890                            // Running getBoundingClientRect on a disconnected node
6891                            // in IE throws an error.
6892                            (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ?
6893                                swap(elem, cssShow, function () {
6894                                    return getWidthOrHeight(elem, dimension, extra);
6895                                }) :
6896                                getWidthOrHeight(elem, dimension, extra);
6897                        }
6898                    },
6899
6900                    set: function (elem, value, extra) {
6901                        var matches,
6902                            styles = getStyles(elem),
6903                            isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box",
6904                            subtract = extra && boxModelAdjustment(
6905                                elem,
6906                                dimension,
6907                                extra,
6908                                isBorderBox,
6909                                styles
6910                            );
6911
6912                        // Account for unreliable border-box dimensions by comparing offset* to computed and
6913                        // faking a content-box to get border and padding (gh-3699)
6914                        if (isBorderBox && support.scrollboxSize() === styles.position) {
6915                            subtract -= Math.ceil(
6916                                elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] -
6917                                parseFloat(styles[dimension]) -
6918                                boxModelAdjustment(elem, dimension, "border", false, styles) -
6919                                0.5
6920                            );
6921                        }
6922
6923                        // Convert to pixels if value adjustment is needed
6924                        if (subtract && (matches = rcssNum.exec(value)) &&
6925                            (matches[3] || "px") !== "px") {
6926
6927                            elem.style[dimension] = value;
6928                            value = jQuery.css(elem, dimension);
6929                        }
6930
6931                        return setPositiveNumber(elem, value, subtract);
6932                    }
6933                };
6934            });
6935
6936            jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft,
6937                function (elem, computed) {
6938                    if (computed) {
6939                        return (parseFloat(curCSS(elem, "marginLeft")) ||
6940                            elem.getBoundingClientRect().left -
6941                            swap(elem, {marginLeft: 0}, function () {
6942                                return elem.getBoundingClientRect().left;
6943                            })
6944                        ) + "px";
6945                    }
6946                }
6947            );
6948
6949// These hooks are used by animate to expand properties
6950            jQuery.each({
6951                margin: "",
6952                padding: "",
6953                border: "Width"
6954            }, function (prefix, suffix) {
6955                jQuery.cssHooks[prefix + suffix] = {
6956                    expand: function (value) {
6957                        var i = 0,
6958                            expanded = {},
6959
6960                            // Assumes a single number if not a string
6961                            parts = typeof value === "string" ? value.split(" ") : [value];
6962
6963                        for (; i < 4; i++) {
6964                            expanded[prefix + cssExpand[i] + suffix] =
6965                                parts[i] || parts[i - 2] || parts[0];
6966                        }
6967
6968                        return expanded;
6969                    }
6970                };
6971
6972                if (prefix !== "margin") {
6973                    jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
6974                }
6975            });
6976
6977            jQuery.fn.extend({
6978                css: function (name, value) {
6979                    return access(this, function (elem, name, value) {
6980                        var styles, len,
6981                            map = {},
6982                            i = 0;
6983
6984                        if (Array.isArray(name)) {
6985                            styles = getStyles(elem);
6986                            len = name.length;
6987
6988                            for (; i < len; i++) {
6989                                map[name[i]] = jQuery.css(elem, name[i], false, styles);
6990                            }
6991
6992                            return map;
6993                        }
6994
6995                        return value !== undefined ?
6996                            jQuery.style(elem, name, value) :
6997                            jQuery.css(elem, name);
6998                    }, name, value, arguments.length > 1);
6999                }
7000            });
7001
7002
7003            function Tween(elem, options, prop, end, easing) {
7004                return new Tween.prototype.init(elem, options, prop, end, easing);
7005            }
7006
7007            jQuery.Tween = Tween;
7008
7009            Tween.prototype = {
7010                constructor: Tween,
7011                init: function (elem, options, prop, end, easing, unit) {
7012                    this.elem = elem;
7013                    this.prop = prop;
7014                    this.easing = easing || jQuery.easing._default;
7015                    this.options = options;
7016                    this.start = this.now = this.cur();
7017                    this.end = end;
7018                    this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
7019                },
7020                cur: function () {
7021                    var hooks = Tween.propHooks[this.prop];
7022
7023                    return hooks && hooks.get ?
7024                        hooks.get(this) :
7025                        Tween.propHooks._default.get(this);
7026                },
7027                run: function (percent) {
7028                    var eased,
7029                        hooks = Tween.propHooks[this.prop];
7030
7031                    if (this.options.duration) {
7032                        this.pos = eased = jQuery.easing[this.easing](
7033                            percent, this.options.duration * percent, 0, 1, this.options.duration
7034                        );
7035                    } else {
7036                        this.pos = eased = percent;
7037                    }
7038                    this.now = (this.end - this.start) * eased + this.start;
7039
7040                    if (this.options.step) {
7041                        this.options.step.call(this.elem, this.now, this);
7042                    }
7043
7044                    if (hooks && hooks.set) {
7045                        hooks.set(this);
7046                    } else {
7047                        Tween.propHooks._default.set(this);
7048                    }
7049                    return this;
7050                }
7051            };
7052
7053            Tween.prototype.init.prototype = Tween.prototype;
7054
7055            Tween.propHooks = {
7056                _default: {
7057                    get: function (tween) {
7058                        var result;
7059
7060                        // Use a property on the element directly when it is not a DOM element,
7061                        // or when there is no matching style property that exists.
7062                        if (tween.elem.nodeType !== 1 ||
7063                            tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
7064                            return tween.elem[tween.prop];
7065                        }
7066
7067                        // Passing an empty string as a 3rd parameter to .css will automatically
7068                        // attempt a parseFloat and fallback to a string if the parse fails.
7069                        // Simple values such as "10px" are parsed to Float;
7070                        // complex values such as "rotate(1rad)" are returned as-is.
7071                        result = jQuery.css(tween.elem, tween.prop, "");
7072
7073                        // Empty strings, null, undefined and "auto" are converted to 0.
7074                        return !result || result === "auto" ? 0 : result;
7075                    },
7076                    set: function (tween) {
7077
7078                        // Use step hook for back compat.
7079                        // Use cssHook if its there.
7080                        // Use .style if available and use plain properties where available.
7081                        if (jQuery.fx.step[tween.prop]) {
7082                            jQuery.fx.step[tween.prop](tween);
7083                        } else if (tween.elem.nodeType === 1 &&
7084                            (tween.elem.style[jQuery.cssProps[tween.prop]] != null ||
7085                                jQuery.cssHooks[tween.prop])) {
7086                            jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
7087                        } else {
7088                            tween.elem[tween.prop] = tween.now;
7089                        }
7090                    }
7091                }
7092            };
7093
7094// Support: IE <=9 only
7095// Panic based approach to setting things on disconnected nodes
7096            Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
7097                set: function (tween) {
7098                    if (tween.elem.nodeType && tween.elem.parentNode) {
7099                        tween.elem[tween.prop] = tween.now;
7100                    }
7101                }
7102            };
7103
7104            jQuery.easing = {
7105                linear: function (p) {
7106                    return p;
7107                },
7108                swing: function (p) {
7109                    return 0.5 - Math.cos(p * Math.PI) / 2;
7110                },
7111                _default: "swing"
7112            };
7113
7114            jQuery.fx = Tween.prototype.init;
7115
7116// Back compat <1.8 extension point
7117            jQuery.fx.step = {};
7118
7119
7120            var
7121                fxNow, inProgress,
7122                rfxtypes = /^(?:toggle|show|hide)$/,
7123                rrun = /queueHooks$/;
7124
7125            function schedule() {
7126                if (inProgress) {
7127                    if (document.hidden === false && window.requestAnimationFrame) {
7128                        window.requestAnimationFrame(schedule);
7129                    } else {
7130                        window.setTimeout(schedule, jQuery.fx.interval);
7131                    }
7132
7133                    jQuery.fx.tick();
7134                }
7135            }
7136
7137// Animations created synchronously will run synchronously
7138            function createFxNow() {
7139                window.setTimeout(function () {
7140                    fxNow = undefined;
7141                });
7142                return (fxNow = Date.now());
7143            }
7144
7145// Generate parameters to create a standard animation
7146            function genFx(type, includeWidth) {
7147                var which,
7148                    i = 0,
7149                    attrs = {height: type};
7150
7151                // If we include width, step value is 1 to do all cssExpand values,
7152                // otherwise step value is 2 to skip over Left and Right
7153                includeWidth = includeWidth ? 1 : 0;
7154                for (; i < 4; i += 2 - includeWidth) {
7155                    which = cssExpand[i];
7156                    attrs["margin" + which] = attrs["padding" + which] = type;
7157                }
7158
7159                if (includeWidth) {
7160                    attrs.opacity = attrs.width = type;
7161                }
7162
7163                return attrs;
7164            }
7165
7166            function createTween(value, prop, animation) {
7167                var tween,
7168                    collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]),
7169                    index = 0,
7170                    length = collection.length;
7171                for (; index < length; index++) {
7172                    if ((tween = collection[index].call(animation, prop, value))) {
7173
7174                        // We're done with this property
7175                        return tween;
7176                    }
7177                }
7178            }
7179
7180            function defaultPrefilter(elem, props, opts) {
7181                var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
7182                    isBox = "width" in props || "height" in props,
7183                    anim = this,
7184                    orig = {},
7185                    style = elem.style,
7186                    hidden = elem.nodeType && isHiddenWithinTree(elem),
7187                    dataShow = dataPriv.get(elem, "fxshow");
7188
7189                // Queue-skipping animations hijack the fx hooks
7190                if (!opts.queue) {
7191                    hooks = jQuery._queueHooks(elem, "fx");
7192                    if (hooks.unqueued == null) {
7193                        hooks.unqueued = 0;
7194                        oldfire = hooks.empty.fire;
7195                        hooks.empty.fire = function () {
7196                            if (!hooks.unqueued) {
7197                                oldfire();
7198                            }
7199                        };
7200                    }
7201                    hooks.unqueued++;
7202
7203                    anim.always(function () {
7204
7205                        // Ensure the complete handler is called before this completes
7206                        anim.always(function () {
7207                            hooks.unqueued--;
7208                            if (!jQuery.queue(elem, "fx").length) {
7209                                hooks.empty.fire();
7210                            }
7211                        });
7212                    });
7213                }
7214
7215                // Detect show/hide animations
7216                for (prop in props) {
7217                    value = props[prop];
7218                    if (rfxtypes.test(value)) {
7219                        delete props[prop];
7220                        toggle = toggle || value === "toggle";
7221                        if (value === (hidden ? "hide" : "show")) {
7222
7223                            // Pretend to be hidden if this is a "show" and
7224                            // there is still data from a stopped show/hide
7225                            if (value === "show" && dataShow && dataShow[prop] !== undefined) {
7226                                hidden = true;
7227
7228                                // Ignore all other no-op show/hide data
7229                            } else {
7230                                continue;
7231                            }
7232                        }
7233                        orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
7234                    }
7235                }
7236
7237                // Bail out if this is a no-op like .hide().hide()
7238                propTween = !jQuery.isEmptyObject(props);
7239                if (!propTween && jQuery.isEmptyObject(orig)) {
7240                    return;
7241                }
7242
7243                // Restrict "overflow" and "display" styles during box animations
7244                if (isBox && elem.nodeType === 1) {
7245
vendor: 6,061 bytes, lines 7246-7383
7246                    // Support: IE <=9 - 11, Edge 12 - 15
7247                    // Record all 3 overflow attributes because IE does not infer the shorthand
7248                    // from identically-valued overflowX and overflowY and Edge just mirrors
7249                    // the overflowX value there.
7250                    opts.overflow = [style.overflow, style.overflowX, style.overflowY];
7251
7252                    // Identify a display type, preferring old show/hide data over the CSS cascade
7253                    restoreDisplay = dataShow && dataShow.display;
7254                    if (restoreDisplay == null) {
7255                        restoreDisplay = dataPriv.get(elem, "display");
7256                    }
7257                    display = jQuery.css(elem, "display");
7258                    if (display === "none") {
7259                        if (restoreDisplay) {
7260                            display = restoreDisplay;
7261                        } else {
7262
7263                            // Get nonempty value(s) by temporarily forcing visibility
7264                            showHide([elem], true);
7265                            restoreDisplay = elem.style.display || restoreDisplay;
7266                            display = jQuery.css(elem, "display");
7267                            showHide([elem]);
7268                        }
7269                    }
7270
7271                    // Animate inline elements as inline-block
7272                    if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
7273                        if (jQuery.css(elem, "float") === "none") {
7274
7275                            // Restore the original display value at the end of pure show/hide animations
7276                            if (!propTween) {
7277                                anim.done(function () {
7278                                    style.display = restoreDisplay;
7279                                });
7280                                if (restoreDisplay == null) {
7281                                    display = style.display;
7282                                    restoreDisplay = display === "none" ? "" : display;
7283                                }
7284                            }
7285                            style.display = "inline-block";
7286                        }
7287                    }
7288                }
7289
7290                if (opts.overflow) {
7291                    style.overflow = "hidden";
7292                    anim.always(function () {
7293                        style.overflow = opts.overflow[0];
7294                        style.overflowX = opts.overflow[1];
7295                        style.overflowY = opts.overflow[2];
7296                    });
7297                }
7298
7299                // Implement show/hide animations
7300                propTween = false;
7301                for (prop in orig) {
7302
7303                    // General show/hide setup for this element animation
7304                    if (!propTween) {
7305                        if (dataShow) {
7306                            if ("hidden" in dataShow) {
7307                                hidden = dataShow.hidden;
7308                            }
7309                        } else {
7310                            dataShow = dataPriv.access(elem, "fxshow", {display: restoreDisplay});
7311                        }
7312
7313                        // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
7314                        if (toggle) {
7315                            dataShow.hidden = !hidden;
7316                        }
7317
7318                        // Show elements before animating them
7319                        if (hidden) {
7320                            showHide([elem], true);
7321                        }
7322
7323                        /* eslint-disable no-loop-func */
7324
7325                        anim.done(function () {
7326
7327                            /* eslint-enable no-loop-func */
7328
7329                            // The final step of a "hide" animation is actually hiding the element
7330                            if (!hidden) {
7331                                showHide([elem]);
7332                            }
7333                            dataPriv.remove(elem, "fxshow");
7334                            for (prop in orig) {
7335                                jQuery.style(elem, prop, orig[prop]);
7336                            }
7337                        });
7338                    }
7339
7340                    // Per-property setup
7341                    propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
7342                    if (!(prop in dataShow)) {
7343                        dataShow[prop] = propTween.start;
7344                        if (hidden) {
7345                            propTween.end = propTween.start;
7346                            propTween.start = 0;
7347                        }
7348                    }
7349                }
7350            }
7351
7352            function propFilter(props, specialEasing) {
7353                var index, name, easing, value, hooks;
7354
7355                // camelCase, specialEasing and expand cssHook pass
7356                for (index in props) {
7357                    name = camelCase(index);
7358                    easing = specialEasing[name];
7359                    value = props[index];
7360                    if (Array.isArray(value)) {
7361                        easing = value[1];
7362                        value = props[index] = value[0];
7363                    }
7364
7365                    if (index !== name) {
7366                        props[name] = value;
7367                        delete props[index];
7368                    }
7369
7370                    hooks = jQuery.cssHooks[name];
7371                    if (hooks && "expand" in hooks) {
7372                        value = hooks.expand(value);
7373                        delete props[name];
7374
7375                        // Not quite $.extend, this won't overwrite existing keys.
7376                        // Reusing 'index' because we have the correct "name"
7377                        for (index in value) {
7378                            if (!(index in props)) {
7379                                props[index] = value[index];
7380                                specialEasing[index] = easing;
7381                            }
7382                        }
7383                    } else {
vendor: 9,402 bytes, lines 7384-7613
7384                        specialEasing[name] = easing;
7385                    }
7386                }
7387            }
7388
7389            function Animation(elem, properties, options) {
7390                var result,
7391                    stopped,
7392                    index = 0,
7393                    length = Animation.prefilters.length,
7394                    deferred = jQuery.Deferred().always(function () {
7395
7396                        // Don't match elem in the :animated selector
7397                        delete tick.elem;
7398                    }),
7399                    tick = function () {
7400                        if (stopped) {
7401                            return false;
7402                        }
7403                        var currentTime = fxNow || createFxNow(),
7404                            remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
7405
7406                            // Support: Android 2.3 only
7407                            // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#--12497)
7408                            temp = remaining / animation.duration || 0,
7409                            percent = 1 - temp,
7410                            index = 0,
7411                            length = animation.tweens.length;
7412
7413                        for (; index < length; index++) {
7414                            animation.tweens[index].run(percent);
7415                        }
7416
7417                        deferred.notifyWith(elem, [animation, percent, remaining]);
7418
7419                        // If there's more to do, yield
7420                        if (percent < 1 && length) {
7421                            return remaining;
7422                        }
7423
7424                        // If this was an empty animation, synthesize a final progress notification
7425                        if (!length) {
7426                            deferred.notifyWith(elem, [animation, 1, 0]);
7427                        }
7428
7429                        // Resolve the animation and report its conclusion
7430                        deferred.resolveWith(elem, [animation]);
7431                        return false;
7432                    },
7433                    animation = deferred.promise({
7434                        elem: elem,
7435                        props: jQuery.extend({}, properties),
7436                        opts: jQuery.extend(true, {
7437                            specialEasing: {},
7438                            easing: jQuery.easing._default
7439                        }, options),
7440                        originalProperties: properties,
7441                        originalOptions: options,
7442                        startTime: fxNow || createFxNow(),
7443                        duration: options.duration,
7444                        tweens: [],
7445                        createTween: function (prop, end) {
7446                            var tween = jQuery.Tween(elem, animation.opts, prop, end,
7447                                animation.opts.specialEasing[prop] || animation.opts.easing);
7448                            animation.tweens.push(tween);
7449                            return tween;
7450                        },
7451                        stop: function (gotoEnd) {
7452                            var index = 0,
7453
7454                                // If we are going to the end, we want to run all the tweens
7455                                // otherwise we skip this part
7456                                length = gotoEnd ? animation.tweens.length : 0;
7457                            if (stopped) {
7458                                return this;
7459                            }
7460                            stopped = true;
7461                            for (; index < length; index++) {
7462                                animation.tweens[index].run(1);
7463                            }
7464
7465                            // Resolve when we played the last frame; otherwise, reject
7466                            if (gotoEnd) {
7467                                deferred.notifyWith(elem, [animation, 1, 0]);
7468                                deferred.resolveWith(elem, [animation, gotoEnd]);
7469                            } else {
7470                                deferred.rejectWith(elem, [animation, gotoEnd]);
7471                            }
7472                            return this;
7473                        }
7474                    }),
7475                    props = animation.props;
7476
7477                propFilter(props, animation.opts.specialEasing);
7478
7479                for (; index < length; index++) {
7480                    result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
7481                    if (result) {
7482                        if (isFunction(result.stop)) {
7483                            jQuery._queueHooks(animation.elem, animation.opts.queue).stop =
7484                                result.stop.bind(result);
7485                        }
7486                        return result;
7487                    }
7488                }
7489
7490                jQuery.map(props, createTween, animation);
7491
7492                if (isFunction(animation.opts.start)) {
7493                    animation.opts.start.call(elem, animation);
7494                }
7495
7496                // Attach callbacks from options
7497                animation
7498                    .progress(animation.opts.progress)
7499                    .done(animation.opts.done, animation.opts.complete)
7500                    .fail(animation.opts.fail)
7501                    .always(animation.opts.always);
7502
7503                jQuery.fx.timer(
7504                    jQuery.extend(tick, {
7505                        elem: elem,
7506                        anim: animation,
7507                        queue: animation.opts.queue
7508                    })
7509                );
7510
7511                return animation;
7512            }
7513
7514            jQuery.Animation = jQuery.extend(Animation, {
7515
7516                tweeners: {
7517                    "*": [function (prop, value) {
7518                        var tween = this.createTween(prop, value);
7519                        adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
7520                        return tween;
7521                    }]
7522                },
7523
7524                tweener: function (props, callback) {
7525                    if (isFunction(props)) {
7526                        callback = props;
7527                        props = ["*"];
7528                    } else {
7529                        props = props.match(rnothtmlwhite);
7530                    }
7531
7532                    var prop,
7533                        index = 0,
7534                        length = props.length;
7535
7536                    for (; index < length; index++) {
7537                        prop = props[index];
7538                        Animation.tweeners[prop] = Animation.tweeners[prop] || [];
7539                        Animation.tweeners[prop].unshift(callback);
7540                    }
7541                },
7542
7543                prefilters: [defaultPrefilter],
7544
7545                prefilter: function (callback, prepend) {
7546                    if (prepend) {
7547                        Animation.prefilters.unshift(callback);
7548                    } else {
7549                        Animation.prefilters.push(callback);
7550                    }
7551                }
7552            });
7553
7554            jQuery.speed = function (speed, easing, fn) {
7555                var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
7556                    complete: fn || !fn && easing ||
7557                        isFunction(speed) && speed,
7558                    duration: speed,
7559                    easing: fn && easing || easing && !isFunction(easing) && easing
7560                };
7561
7562                // Go to the end state if fx are off
7563                if (jQuery.fx.off) {
7564                    opt.duration = 0;
7565
7566                } else {
7567                    if (typeof opt.duration !== "number") {
7568                        if (opt.duration in jQuery.fx.speeds) {
7569                            opt.duration = jQuery.fx.speeds[opt.duration];
7570
7571                        } else {
7572                            opt.duration = jQuery.fx.speeds._default;
7573                        }
7574                    }
7575                }
7576
7577                // Normalize opt.queue - true/undefined/null -> "fx"
7578                if (opt.queue == null || opt.queue === true) {
7579                    opt.queue = "fx";
7580                }
7581
7582                // Queueing
7583                opt.old = opt.complete;
7584
7585                opt.complete = function () {
7586                    if (isFunction(opt.old)) {
7587                        opt.old.call(this);
7588                    }
7589
7590                    if (opt.queue) {
7591                        jQuery.dequeue(this, opt.queue);
7592                    }
7593                };
7594
7595                return opt;
7596            };
7597
7598            jQuery.fn.extend({
7599                fadeTo: function (speed, to, easing, callback) {
7600
7601                    // Show any hidden elements after setting opacity to 0
7602                    return this.filter(isHiddenWithinTree).css("opacity", 0).show()
7603
7604                        // Animate to the value specified
7605                        .end().animate({opacity: to}, speed, easing, callback);
7606                },
7607                animate: function (prop, speed, easing, callback) {
7608                    var empty = jQuery.isEmptyObject(prop),
7609                        optall = jQuery.speed(speed, easing, callback),
7610                        doAnimation = function () {
7611
7612                            // Operate on a copy of prop so per-property easing won't be lost
7613                            var anim = Animation(this, jQuery.extend({}
vendor: 7,061 bytes, lines 7613-7796
7613, prop), optall);
7614
7615                            // Empty animations, or finishing resolves immediately
7616                            if (empty || dataPriv.get(this, "finish")) {
7617                                anim.stop(true);
7618                            }
7619                        };
7620                    doAnimation.finish = doAnimation;
7621
7622                    return empty || optall.queue === false ?
7623                        this.each(doAnimation) :
7624                        this.queue(optall.queue, doAnimation);
7625                },
7626                stop: function (type, clearQueue, gotoEnd) {
7627                    var stopQueue = function (hooks) {
7628                        var stop = hooks.stop;
7629                        delete hooks.stop;
7630                        stop(gotoEnd);
7631                    };
7632
7633                    if (typeof type !== "string") {
7634                        gotoEnd = clearQueue;
7635                        clearQueue = type;
7636                        type = undefined;
7637                    }
7638                    if (clearQueue && type !== false) {
7639                        this.queue(type || "fx", []);
7640                    }
7641
7642                    return this.each(function () {
7643                        var dequeue = true,
7644                            index = type != null && type + "queueHooks",
7645                            timers = jQuery.timers,
7646                            data = dataPriv.get(this);
7647
7648                        if (index) {
7649                            if (data[index] && data[index].stop) {
7650                                stopQueue(data[index]);
7651                            }
7652                        } else {
7653                            for (index in data) {
7654                                if (data[index] && data[index].stop && rrun.test(index)) {
7655                                    stopQueue(data[index]);
7656                                }
7657                            }
7658                        }
7659
7660                        for (index = timers.length; index--;) {
7661                            if (timers[index].elem === this &&
7662                                (type == null || timers[index].queue === type)) {
7663
7664                                timers[index].anim.stop(gotoEnd);
7665                                dequeue = false;
7666                                timers.splice(index, 1);
7667                            }
7668                        }
7669
7670                        // Start the next in the queue if the last step wasn't forced.
7671                        // Timers currently will call their complete callbacks, which
7672                        // will dequeue but only if they were gotoEnd.
7673                        if (dequeue || !gotoEnd) {
7674                            jQuery.dequeue(this, type);
7675                        }
7676                    });
7677                },
7678                finish: function (type) {
7679                    if (type !== false) {
7680                        type = type || "fx";
7681                    }
7682                    return this.each(function () {
7683                        var index,
7684                            data = dataPriv.get(this),
7685                            queue = data[type + "queue"],
7686                            hooks = data[type + "queueHooks"],
7687                            timers = jQuery.timers,
7688                            length = queue ? queue.length : 0;
7689
7690                        // Enable finishing flag on private data
7691                        data.finish = true;
7692
7693                        // Empty the queue first
7694                        jQuery.queue(this, type, []);
7695
7696                        if (hooks && hooks.stop) {
7697                            hooks.stop.call(this, true);
7698                        }
7699
7700                        // Look for any active animations, and finish them
7701                        for (index = timers.length; index--;) {
7702                            if (timers[index].elem === this && timers[index].queue === type) {
7703                                timers[index].anim.stop(true);
7704                                timers.splice(index, 1);
7705                            }
7706                        }
7707
7708                        // Look for any animations in the old queue and finish them
7709                        for (index = 0; index < length; index++) {
7710                            if (queue[index] && queue[index].finish) {
7711                                queue[index].finish.call(this);
7712                            }
7713                        }
7714
7715                        // Turn off finishing flag
7716                        delete data.finish;
7717                    });
7718                }
7719            });
7720
7721            jQuery.each(["toggle", "show", "hide"], function (i, name) {
7722                var cssFn = jQuery.fn[name];
7723                jQuery.fn[name] = function (speed, easing, callback) {
7724                    return speed == null || typeof speed === "boolean" ?
7725                        cssFn.apply(this, arguments) :
7726                        this.animate(genFx(name, true), speed, easing, callback);
7727                };
7728            });
7729
7730// Generate shortcuts for custom animations
7731            jQuery.each({
7732                slideDown: genFx("show"),
7733                slideUp: genFx("hide"),
7734                slideToggle: genFx("toggle"),
7735                fadeIn: {opacity: "show"},
7736                fadeOut: {opacity: "hide"},
7737                fadeToggle: {opacity: "toggle"}
7738            }, function (name, props) {
7739                jQuery.fn[name] = function (speed, easing, callback) {
7740                    return this.animate(props, speed, easing, callback);
7741                };
7742            });
7743
7744            jQuery.timers = [];
7745            jQuery.fx.tick = function () {
7746                var timer,
7747                    i = 0,
7748                    timers = jQuery.timers;
7749
7750                fxNow = Date.now();
7751
7752                for (; i < timers.length; i++) {
7753                    timer = timers[i];
7754
7755                    // Run the timer and safely remove it when done (allowing for external removal)
7756                    if (!timer() && timers[i] === timer) {
7757                        timers.splice(i--, 1);
7758                    }
7759                }
7760
7761                if (!timers.length) {
7762                    jQuery.fx.stop();
7763                }
7764                fxNow = undefined;
7765            };
7766
7767            jQuery.fx.timer = function (timer) {
7768                jQuery.timers.push(timer);
7769                jQuery.fx.start();
7770            };
7771
7772            jQuery.fx.interval = 13;
7773            jQuery.fx.start = function () {
7774                if (inProgress) {
7775                    return;
7776                }
7777
7778                inProgress = true;
7779                schedule();
7780            };
7781
7782            jQuery.fx.stop = function () {
7783                inProgress = null;
7784            };
7785
7786            jQuery.fx.speeds = {
7787                slow: 600,
7788                fast: 200,
7789
7790                // Default speed
7791                _default: 400
7792            };
7793
7794
7795// Based off of the plugin by Clint Helfers, with permission.
7796// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 8,158 bytes, lines 7797-8015
7797            jQuery.fn.delay = function (time, type) {
7798                time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
7799                type = type || "fx";
7800
7801                return this.queue(type, function (next, hooks) {
7802                    var timeout = window.setTimeout(next, time);
7803                    hooks.stop = function () {
7804                        window.clearTimeout(timeout);
7805                    };
7806                });
7807            };
7808
7809
7810            (function () {
7811                var input = document.createElement("input"),
7812                    select = document.createElement("select"),
7813                    opt = select.appendChild(document.createElement("option"));
7814
7815                input.type = "checkbox";
7816
7817                // Support: Android <=4.3 only
7818                // Default value for a checkbox should be "on"
7819                support.checkOn = input.value !== "";
7820
7821                // Support: IE <=11 only
7822                // Must access selectedIndex to make default options select
7823                support.optSelected = opt.selected;
7824
7825                // Support: IE <=11 only
7826                // An input loses its value after becoming a radio
7827                input = document.createElement("input");
7828                input.value = "t";
7829                input.type = "radio";
7830                support.radioValue = input.value === "t";
7831            })();
7832
7833
7834            var boolHook,
7835                attrHandle = jQuery.expr.attrHandle;
7836
7837            jQuery.fn.extend({
7838                attr: function (name, value) {
7839                    return access(this, jQuery.attr, name, value, arguments.length > 1);
7840                },
7841
7842                removeAttr: function (name) {
7843                    return this.each(function () {
7844                        jQuery.removeAttr(this, name);
7845                    });
7846                }
7847            });
7848
7849            jQuery.extend({
7850                attr: function (elem, name, value) {
7851                    var ret, hooks,
7852                        nType = elem.nodeType;
7853
7854                    // Don't get/set attributes on text, comment and attribute nodes
7855                    if (nType === 3 || nType === 8 || nType === 2) {
7856                        return;
7857                    }
7858
7859                    // Fallback to prop when attributes are not supported
7860                    if (typeof elem.getAttribute === "undefined") {
7861                        return jQuery.prop(elem, name, value);
7862                    }
7863
7864                    // Attribute hooks are determined by the lowercase version
7865                    // Grab necessary hook if one is defined
7866                    if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7867                        hooks = jQuery.attrHooks[name.toLowerCase()] ||
7868                            (jQuery.expr.match.bool.test(name) ? boolHook : undefined);
7869                    }
7870
7871                    if (value !== undefined) {
7872                        if (value === null) {
7873                            jQuery.removeAttr(elem, name);
7874                            return;
7875                        }
7876
7877                        if (hooks && "set" in hooks &&
7878                            (ret = hooks.set(elem, value, name)) !== undefined) {
7879                            return ret;
7880                        }
7881
7882                        elem.setAttribute(name, value + "");
7883                        return value;
7884                    }
7885
7886                    if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
7887                        return ret;
7888                    }
7889
7890                    ret = jQuery.find.attr(elem, name);
7891
7892                    // Non-existent attributes return null, we normalize to undefined
7893                    return ret == null ? undefined : ret;
7894                },
7895
7896                attrHooks: {
7897                    type: {
7898                        set: function (elem, value) {
7899                            if (!support.radioValue && value === "radio" &&
7900                                nodeName(elem, "input")) {
7901                                var val = elem.value;
7902                                elem.setAttribute("type", value);
7903                                if (val) {
7904                                    elem.value = val;
7905                                }
7906                                return value;
7907                            }
7908                        }
7909                    }
7910                },
7911
7912                removeAttr: function (elem, value) {
7913                    var name,
7914                        i = 0,
7915
7916                        // Attribute names can contain non-HTML whitespace characters
7917                        // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
7918                        attrNames = value && value.match(rnothtmlwhite);
7919
7920                    if (attrNames && elem.nodeType === 1) {
7921                        while ((name = attrNames[i++])) {
7922                            elem.removeAttribute(name);
7923                        }
7924                    }
7925                }
7926            });
7927
7928// Hooks for boolean attributes
7929            boolHook = {
7930                set: function (elem, value, name) {
7931                    if (value === false) {
7932
7933                        // Remove boolean attributes when set to false
7934                        jQuery.removeAttr(elem, name);
7935                    } else {
7936                        elem.setAttribute(name, name);
7937                    }
7938                    return name;
7939                }
7940            };
7941
7942            jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) {
7943                var getter = attrHandle[name] || jQuery.find.attr;
7944
7945                attrHandle[name] = function (elem, name, isXML) {
7946                    var ret, handle,
7947                        lowercaseName = name.toLowerCase();
7948
7949                    if (!isXML) {
7950
7951                        // Avoid an infinite loop by temporarily removing this function from the getter
7952                        handle = attrHandle[lowercaseName];
7953                        attrHandle[lowercaseName] = ret;
7954                        ret = getter(elem, name, isXML) != null ?
7955                            lowercaseName :
7956                            null;
7957                        attrHandle[lowercaseName] = handle;
7958                    }
7959                    return ret;
7960                };
7961            });
7962
7963
7964            var rfocusable = /^(?:input|select|textarea|button)$/i,
7965                rclickable = /^(?:a|area)$/i;
7966
7967            jQuery.fn.extend({
7968                prop: function (name, value) {
7969                    return access(this, jQuery.prop, name, value, arguments.length > 1);
7970                },
7971
7972                removeProp: function (name) {
7973                    return this.each(function () {
7974                        delete this[jQuery.propFix[name] || name];
7975                    });
7976                }
7977            });
7978
7979            jQuery.extend({
7980                prop: function (elem, name, value) {
7981                    var ret, hooks,
7982                        nType = elem.nodeType;
7983
7984                    // Don't get/set properties on text, comment and attribute nodes
7985                    if (nType === 3 || nType === 8 || nType === 2) {
7986                        return;
7987                    }
7988
7989                    if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
7990
7991                        // Fix name and attach hooks
7992                        name = jQuery.propFix[name] || name;
7993                        hooks = jQuery.propHooks[name];
7994                    }
7995
7996                    if (value !== undefined) {
7997                        if (hooks && "set" in hooks &&
7998                            (ret = hooks.set(elem, value, name)) !== undefined) {
7999                            return ret;
8000                        }
8001
8002                        return (elem[name] = value);
8003                    }
8004
8005                    if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
8006                        return ret;
8007                    }
8008
8009                    return elem[name];
8010                },
8011
8012                propHooks: {
8013                    tabIndex: {
8014                        get: function (elem) {
8015
vendor: 25,671 bytes, lines 8016-8652
8016                            // Support: IE <=9 - 11 only
8017                            // elem.tabIndex doesn't always return the
8018                            // correct value when it hasn't been explicitly set
8019                            // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
8020                            // Use proper attribute retrieval(#--12072)
8021                            var tabindex = jQuery.find.attr(elem, "tabindex");
8022
8023                            if (tabindex) {
8024                                return parseInt(tabindex, 10);
8025                            }
8026
8027                            if (
8028                                rfocusable.test(elem.nodeName) ||
8029                                rclickable.test(elem.nodeName) &&
8030                                elem.href
8031                            ) {
8032                                return 0;
8033                            }
8034
8035                            return -1;
8036                        }
8037                    }
8038                },
8039
8040                propFix: {
8041                    "for": "htmlFor",
8042                    "class": "className"
8043                }
8044            });
8045
8046// Support: IE <=11 only
8047// Accessing the selectedIndex property
8048// forces the browser to respect setting selected
8049// on the option
8050// The getter ensures a default option is selected
8051// when in an optgroup
8052// eslint rule "no-unused-expressions" is disabled for this code
8053// since it considers such accessions noop
8054            if (!support.optSelected) {
8055                jQuery.propHooks.selected = {
8056                    get: function (elem) {
8057
8058                        /* eslint no-unused-expressions: "off" */
8059
8060                        var parent = elem.parentNode;
8061                        if (parent && parent.parentNode) {
8062                            parent.parentNode.selectedIndex;
8063                        }
8064                        return null;
8065                    },
8066                    set: function (elem) {
8067
8068                        /* eslint no-unused-expressions: "off" */
8069
8070                        var parent = elem.parentNode;
8071                        if (parent) {
8072                            parent.selectedIndex;
8073
8074                            if (parent.parentNode) {
8075                                parent.parentNode.selectedIndex;
8076                            }
8077                        }
8078                    }
8079                };
8080            }
8081
8082            jQuery.each([
8083                "tabIndex",
8084                "readOnly",
8085                "maxLength",
8086                "cellSpacing",
8087                "cellPadding",
8088                "rowSpan",
8089                "colSpan",
8090                "useMap",
8091                "frameBorder",
8092                "contentEditable"
8093            ], function () {
8094                jQuery.propFix[this.toLowerCase()] = this;
8095            });
8096
8097
8098            // Strip and collapse whitespace according to HTML spec
8099            // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
8100            function stripAndCollapse(value) {
8101                var tokens = value.match(rnothtmlwhite) || [];
8102                return tokens.join(" ");
8103            }
8104
8105
8106            function getClass(elem) {
8107                return elem.getAttribute && elem.getAttribute("class") || "";
8108            }
8109
8110            function classesToArray(value) {
8111                if (Array.isArray(value)) {
8112                    return value;
8113                }
8114                if (typeof value === "string") {
8115                    return value.match(rnothtmlwhite) || [];
8116                }
8117                return [];
8118            }
8119
8120            jQuery.fn.extend({
8121                addClass: function (value) {
8122                    var classes, elem, cur, curValue, clazz, j, finalValue,
8123                        i = 0;
8124
8125                    if (isFunction(value)) {
8126                        return this.each(function (j) {
8127                            jQuery(this).addClass(value.call(this, j, getClass(this)));
8128                        });
8129                    }
8130
8131                    classes = classesToArray(value);
8132
8133                    if (classes.length) {
8134                        while ((elem = this[i++])) {
8135                            curValue = getClass(elem);
8136                            cur = elem.nodeType === 1 && (" " + stripAndCollapse(curValue) + " ");
8137
8138                            if (cur) {
8139                                j = 0;
8140                                while ((clazz = classes[j++])) {
8141                                    if (cur.indexOf(" " + clazz + " ") < 0) {
8142                                        cur += clazz + " ";
8143                                    }
8144                                }
8145
8146                                // Only assign if different to avoid unneeded rendering.
8147                                finalValue = stripAndCollapse(cur);
8148                                if (curValue !== finalValue) {
8149                                    elem.setAttribute("class", finalValue);
8150                                }
8151                            }
8152                        }
8153                    }
8154
8155                    return this;
8156                },
8157
8158                removeClass: function (value) {
8159                    var classes, elem, cur, curValue, clazz, j, finalValue,
8160                        i = 0;
8161
8162                    if (isFunction(value)) {
8163                        return this.each(function (j) {
8164                            jQuery(this).removeClass(value.call(this, j, getClass(this)));
8165                        });
8166                    }
8167
8168                    if (!arguments.length) {
8169                        return this.attr("class", "");
8170                    }
8171
8172                    classes = classesToArray(value);
8173
8174                    if (classes.length) {
8175                        while ((elem = this[i++])) {
8176                            curValue = getClass(elem);
8177
8178                            // This expression is here for better compressibility (see addClass)
8179                            cur = elem.nodeType === 1 && (" " + stripAndCollapse(curValue) + " ");
8180
8181                            if (cur) {
8182                                j = 0;
8183                                while ((clazz = classes[j++])) {
8184
8185                                    // Remove *all* instances
8186                                    while (cur.indexOf(" " + clazz + " ") > -1) {
8187                                        cur = cur.replace(" " + clazz + " ", " ");
8188                                    }
8189                                }
8190
8191                                // Only assign if different to avoid unneeded rendering.
8192                                finalValue = stripAndCollapse(cur);
8193                                if (curValue !== finalValue) {
8194                                    elem.setAttribute("class", finalValue);
8195                                }
8196                            }
8197                        }
8198                    }
8199
8200                    return this;
8201                },
8202
8203                toggleClass: function (value, stateVal) {
8204                    var type = typeof value,
8205                        isValidValue = type === "string" || Array.isArray(value);
8206
8207                    if (typeof stateVal === "boolean" && isValidValue) {
8208                        return stateVal ? this.addClass(value) : this.removeClass(value);
8209                    }
8210
8211                    if (isFunction(value)) {
8212                        return this.each(function (i) {
8213                            jQuery(this).toggleClass(
8214                                value.call(this, i, getClass(this), stateVal),
8215                                stateVal
8216                            );
8217                        });
8218                    }
8219
8220                    return this.each(function () {
8221                        var className, i, self, classNames;
8222
8223                        if (isValidValue) {
8224
8225                            // Toggle individual class names
8226                            i = 0;
8227                            self = jQuery(this);
8228                            classNames = classesToArray(value);
8229
8230                            while ((className = classNames[i++])) {
8231
8232                                // Check each className given, space separated list
8233                                if (self.hasClass(className)) {
8234                                    self.removeClass(className);
8235                                } else {
8236                                    self.addClass(className);
8237                                }
8238                            }
8239
8240                            // Toggle whole class name
8241                        } else if (value === undefined || type === "boolean") {
8242                            className = getClass(this);
8243                            if (className) {
8244
8245                                // Store className if set
8246                                dataPriv.set(this, "__className__", className);
8247                            }
8248
8249                            // If the element has a class name or if we're passed `false`,
8250                            // then remove the whole classname (if there was one, the above saved it).
8251                            // Otherwise bring back whatever was previously saved (if anything),
8252                            // falling back to the empty string if nothing was stored.
8253                            if (this.setAttribute) {
8254                                this.setAttribute("class",
8255                                    className || value === false ?
8256                                        "" :
8257                                        dataPriv.get(this, "__className__") || ""
8258                                );
8259                            }
8260                        }
8261                    });
8262                },
8263
8264                hasClass: function (selector) {
8265                    var className, elem,
8266                        i = 0;
8267
8268                    className = " " + selector + " ";
8269                    while ((elem = this[i++])) {
8270                        if (elem.nodeType === 1 &&
8271                            (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
8272                            return true;
8273                        }
8274                    }
8275
8276                    return false;
8277                }
8278            });
8279
8280
8281            var rreturn = /\r/g;
8282
8283            jQuery.fn.extend({
8284                val: function (value) {
8285                    var hooks, ret, valueIsFunction,
8286                        elem = this[0];
8287
8288                    if (!arguments.length) {
8289                        if (elem) {
8290                            hooks = jQuery.valHooks[elem.type] ||
8291                                jQuery.valHooks[elem.nodeName.toLowerCase()];
8292
8293                            if (hooks &&
8294                                "get" in hooks &&
8295                                (ret = hooks.get(elem, "value")) !== undefined
8296                            ) {
8297                                return ret;
8298                            }
8299
8300                            ret = elem.value;
8301
8302                            // Handle most common string cases
8303                            if (typeof ret === "string") {
8304                                return ret.replace(rreturn, "");
8305                            }
8306
8307                            // Handle cases where value is null/undef or number
8308                            return ret == null ? "" : ret;
8309                        }
8310
8311                        return;
8312                    }
8313
8314                    valueIsFunction = isFunction(value);
8315
8316                    return this.each(function (i) {
8317                        var val;
8318
8319                        if (this.nodeType !== 1) {
8320                            return;
8321                        }
8322
8323                        if (valueIsFunction) {
8324                            val = value.call(this, i, jQuery(this).val());
8325                        } else {
8326                            val = value;
8327                        }
8328
8329                        // Treat null/undefined as ""; convert numbers to string
8330                        if (val == null) {
8331                            val = "";
8332
8333                        } else if (typeof val === "number") {
8334                            val += "";
8335
8336                        } else if (Array.isArray(val)) {
8337                            val = jQuery.map(val, function (value) {
8338                                return value == null ? "" : value + "";
8339                            });
8340                        }
8341
8342                        hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
8343
8344                        // If set returns undefined, fall back to normal setting
8345                        if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
8346                            this.value = val;
8347                        }
8348                    });
8349                }
8350            });
8351
8352            jQuery.extend({
8353                valHooks: {
8354                    option: {
8355                        get: function (elem) {
8356
8357                            var val = jQuery.find.attr(elem, "value");
8358                            return val != null ?
8359                                val :
8360
8361                                // Support: IE <=10 - 11 only
8362                                // option.text throws exceptions (#--14686, #--14858)
8363                                // Strip and collapse whitespace
8364                                // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
8365                                stripAndCollapse(jQuery.text(elem));
8366                        }
8367                    },
8368                    select: {
8369                        get: function (elem) {
8370                            var value, option, i,
8371                                options = elem.options,
8372                                index = elem.selectedIndex,
8373                                one = elem.type === "select-one",
8374                                values = one ? null : [],
8375                                max = one ? index + 1 : options.length;
8376
8377                            if (index < 0) {
8378                                i = max;
8379
8380                            } else {
8381                                i = one ? index : 0;
8382                            }
8383
8384                            // Loop through all the selected options
8385                            for (; i < max; i++) {
8386                                option = options[i];
8387
8388                                // Support: IE <=9 only
8389                                // IE8-9 doesn't update selected after form reset (#--2551)
8390                                if ((option.selected || i === index) &&
8391
8392                                    // Don't return options that are disabled or in a disabled optgroup
8393                                    !option.disabled &&
8394                                    (!option.parentNode.disabled ||
8395                                        !nodeName(option.parentNode, "optgroup"))) {
8396
8397                                    // Get the specific value for the option
8398                                    value = jQuery(option).val();
8399
8400                                    // We don't need an array for one selects
8401                                    if (one) {
8402                                        return value;
8403                                    }
8404
8405                                    // Multi-Selects return an array
8406                                    values.push(value);
8407                                }
8408                            }
8409
8410                            return values;
8411                        },
8412
8413                        set: function (elem, value) {
8414                            var optionSet, option,
8415                                options = elem.options,
8416                                values = jQuery.makeArray(value),
8417                                i = options.length;
8418
8419                            while (i--) {
8420                                option = options[i];
8421
8422                                /* eslint-disable no-cond-assign */
8423
8424                                if (option.selected =
8425                                    jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1
8426                                ) {
8427                                    optionSet = true;
8428                                }
8429
8430                                /* eslint-enable no-cond-assign */
8431                            }
8432
8433                            // Force browsers to behave consistently when non-matching value is set
8434                            if (!optionSet) {
8435                                elem.selectedIndex = -1;
8436                            }
8437                            return values;
8438                        }
8439                    }
8440                }
8441            });
8442
8443// Radios and checkboxes getter/setter
8444            jQuery.each(["radio", "checkbox"], function () {
8445                jQuery.valHooks[this] = {
8446                    set: function (elem, value) {
8447                        if (Array.isArray(value)) {
8448                            return (elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1);
8449                        }
8450                    }
8451                };
8452                if (!support.checkOn) {
8453                    jQuery.valHooks[this].get = function (elem) {
8454                        return elem.getAttribute("value") === null ? "on" : elem.value;
8455                    };
8456                }
8457            });
8458
8459
8460// Return jQuery for attributes-only inclusion
8461
8462
8463            support.focusin = "onfocusin" in window;
8464
8465
8466            var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
8467                stopPropagationCallback = function (e) {
8468                    e.stopPropagation();
8469                };
8470
8471            jQuery.extend(jQuery.event, {
8472
8473                trigger: function (event, data, elem, onlyHandlers) {
8474
8475                    var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
8476                        eventPath = [elem || document],
8477                        type = hasOwn.call(event, "type") ? event.type : event,
8478                        namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
8479
8480                    cur = lastElement = tmp = elem = elem || document;
8481
8482                    // Don't do events on text and comment nodes
8483                    if (elem.nodeType === 3 || elem.nodeType === 8) {
8484                        return;
8485                    }
8486
8487                    // focus/blur morphs to focusin/out; ensure we're not firing them right now
8488                    if (rfocusMorph.test(type + jQuery.event.triggered)) {
8489                        return;
8490                    }
8491
8492                    if (type.indexOf(".") > -1) {
8493
8494                        // Namespaced trigger; create a regexp to match event type in handle()
8495                        namespaces = type.split(".");
8496                        type = namespaces.shift();
8497                        namespaces.sort();
8498                    }
8499                    ontype = type.indexOf(":") < 0 && "on" + type;
8500
8501                    // Caller can pass in a jQuery.Event object, Object, or just an event type string
8502                    event = event[jQuery.expando] ?
8503                        event :
8504                        new jQuery.Event(type, typeof event === "object" && event);
8505
8506                    // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
8507                    event.isTrigger = onlyHandlers ? 2 : 3;
8508                    event.namespace = namespaces.join(".");
8509                    event.rnamespace = event.namespace ?
8510                        new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") :
8511                        null;
8512
8513                    // Clean up the event in case it is being reused
8514                    event.result = undefined;
8515                    if (!event.target) {
8516                        event.target = elem;
8517                    }
8518
8519                    // Clone any incoming data and prepend the event, creating the handler arg list
8520                    data = data == null ?
8521                        [event] :
8522                        jQuery.makeArray(data, [event]);
8523
8524                    // Allow special events to draw outside the lines
8525                    special = jQuery.event.special[type] || {};
8526                    if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
8527                        return;
8528                    }
8529
8530                    // Determine event propagation path in advance, per W3C events spec (#9951)
8531                    // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
8532                    if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
8533
8534                        bubbleType = special.delegateType || type;
8535                        if (!rfocusMorph.test(bubbleType + type)) {
8536                            cur = cur.parentNode;
8537                        }
8538                        for (; cur; cur = cur.parentNode) {
8539                            eventPath.push(cur);
8540                            tmp = cur;
8541                        }
8542
8543                        // Only add window if we got to document (e.g., not plain obj or detached DOM)
8544                        if (tmp === (elem.ownerDocument || document)) {
8545                            eventPath.push(tmp.defaultView || tmp.parentWindow || window);
8546                        }
8547                    }
8548
8549                    // Fire handlers on the event path
8550                    i = 0;
8551                    while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
8552                        lastElement = cur;
8553                        event.type = i > 1 ?
8554                            bubbleType :
8555                            special.bindType || type;
8556
8557                        // jQuery handler
8558                        handle = (dataPriv.get(cur, "events") || {})[event.type] &&
8559                            dataPriv.get(cur, "handle");
8560                        if (handle) {
8561                            handle.apply(cur, data);
8562                        }
8563
8564                        // Native handler
8565                        handle = ontype && cur[ontype];
8566                        if (handle && handle.apply && acceptData(cur)) {
8567                            event.result = handle.apply(cur, data);
8568                            if (event.result === false) {
8569                                event.preventDefault();
8570                            }
8571                        }
8572                    }
8573                    event.type = type;
8574
8575                    // If nobody prevented the default action, do it now
8576                    if (!onlyHandlers && !event.isDefaultPrevented()) {
8577
8578                        if ((!special._default ||
8579                                special._default.apply(eventPath.pop(), data) === false) &&
8580                            acceptData(elem)) {
8581
8582                            // Call a native DOM method on the target with the same name as the event.
8583                            // Don't do default actions on window, that's where global variables be (#565)
8584                            if (ontype && isFunction(elem[type]) && !isWindow(elem)) {
8585
8586                                // Don't re-trigger an onFOO event when we call its FOO() method
8587                                tmp = elem[ontype];
8588
8589                                if (tmp) {
8590                                    elem[ontype] = null;
8591                                }
8592
8593                                // Prevent re-triggering of the same event, since we already bubbled it above
8594                                jQuery.event.triggered = type;
8595
8596                                if (event.isPropagationStopped()) {
8597                                    lastElement.addEventListener(type, stopPropagationCallback);
8598                                }
8599
8600                                elem[type]();
8601
8602                                if (event.isPropagationStopped()) {
8603                                    lastElement.removeEventListener(type, stopPropagationCallback);
8604                                }
8605
8606                                jQuery.event.triggered = undefined;
8607
8608                                if (tmp) {
8609                                    elem[ontype] = tmp;
8610                                }
8611                            }
8612                        }
8613                    }
8614
8615                    return event.result;
8616                },
8617
8618                // Piggyback on a donor event to simulate a different one
8619                // Used only for `focus(in | out)` events
8620                simulate: function (type, elem, event) {
8621                    var e = jQuery.extend(
8622                        new jQuery.Event(),
8623                        event,
8624                        {
8625                            type: type,
8626                            isSimulated: true
8627                        }
8628                    );
8629
8630                    jQuery.event.trigger(e, null, elem);
8631                }
8632
8633            });
8634
8635            jQuery.fn.extend({
8636
8637                trigger: function (type, data) {
8638                    return this.each(function () {
8639                        jQuery.event.trigger(type, data, this);
8640                    });
8641                },
8642                triggerHandler: function (type, data) {
8643                    var elem = this[0];
8644                    if (elem) {
8645                        return jQuery.event.trigger(type, data, elem, true);
8646                    }
8647                }
8648            });
8649
8650
8651// Support: Firefox <=44
8652// Firefox doesn't have focus(in | out) events
vendor: 1,727 bytes, lines 8653-8686
8653// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
8654//
8655// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
8656// focus(in | out) events fire after focus & blur events,
8657// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
8658// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
8659            if (!support.focusin) {
8660                jQuery.each({focus: "focusin", blur: "focusout"}, function (orig, fix) {
8661
8662                    // Attach a single capturing handler on the document while someone wants focusin/focusout
8663                    var handler = function (event) {
8664                        jQuery.event.simulate(fix, event.target, jQuery.event.fix(event));
8665                    };
8666
8667                    jQuery.event.special[fix] = {
8668                        setup: function () {
8669                            var doc = this.ownerDocument || this,
8670                                attaches = dataPriv.access(doc, fix);
8671
8672                            if (!attaches) {
8673                                doc.addEventListener(orig, handler, true);
8674                            }
8675                            dataPriv.access(doc, fix, (attaches || 0) + 1);
8676                        },
8677                        teardown: function () {
8678                            var doc = this.ownerDocument || this,
8679                                attaches = dataPriv.access(doc, fix) - 1;
8680
8681                            if (!attaches) {
8682                                doc.removeEventListener(orig, handler, true);
8683                                dataPriv.remove(doc, fix);
8684
8685                            } else {
8686                                dataPriv.access(doc, fix, attaches
vendor: 4,635 bytes, lines 8686-8816
8686);
8687                            }
8688                        }
8689                    };
8690                });
8691            }
8692            var location = window.location;
8693
8694            var nonce = Date.now();
8695
8696            var rquery = (/\?/);
8697
8698
8699// Cross-browser xml parsing
8700            jQuery.parseXML = function (data) {
8701                var xml;
8702                if (!data || typeof data !== "string") {
8703                    return null;
8704                }
8705
8706                // Support: IE 9 - 11 only
8707                // IE throws on parseFromString with invalid input.
8708                try {
8709                    xml = (new window.DOMParser()).parseFromString(data, "text/xml");
8710                } catch (e) {
8711                    xml = undefined;
8712                }
8713
8714                if (!xml || xml.getElementsByTagName("parsererror").length) {
8715                    jQuery.error("Invalid XML: " + data);
8716                }
8717                return xml;
8718            };
8719
8720
8721            var
8722                rbracket = /\[\]$/,
8723                rCRLF = /\r?\n/g,
8724                rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
8725                rsubmittable = /^(?:input|select|textarea|keygen)/i;
8726
8727            function buildParams(prefix, obj, traditional, add) {
8728                var name;
8729
8730                if (Array.isArray(obj)) {
8731
8732                    // Serialize array item.
8733                    jQuery.each(obj, function (i, v) {
8734                        if (traditional || rbracket.test(prefix)) {
8735
8736                            // Treat each array item as a scalar.
8737                            add(prefix, v);
8738
8739                        } else {
8740
8741                            // Item is non-scalar (array or object), encode its numeric index.
8742                            buildParams(
8743                                prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]",
8744                                v,
8745                                traditional,
8746                                add
8747                            );
8748                        }
8749                    });
8750
8751                } else if (!traditional && toType(obj) === "object") {
8752
8753                    // Serialize object item.
8754                    for (name in obj) {
8755                        buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
8756                    }
8757
8758                } else {
8759
8760                    // Serialize scalar item.
8761                    add(prefix, obj);
8762                }
8763            }
8764
8765// Serialize an array of form elements or a set of
8766// key/values into a query string
8767            jQuery.param = function (a, traditional) {
8768                var prefix,
8769                    s = [],
8770                    add = function (key, valueOrFunction) {
8771
8772                        // If value is a function, invoke it and use its return value
8773                        var value = isFunction(valueOrFunction) ?
8774                            valueOrFunction() :
8775                            valueOrFunction;
8776
8777                        s[s.length] = encodeURIComponent(key) + "=" +
8778                            encodeURIComponent(value == null ? "" : value);
8779                    };
8780
8781                // If an array was passed in, assume that it is an array of form elements.
8782                if (Array.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
8783
8784                    // Serialize the form elements
8785                    jQuery.each(a, function () {
8786                        add(this.name, this.value);
8787                    });
8788
8789                } else {
8790
8791                    // If traditional, encode the "old" way (the way 1.3.2 or older
8792                    // did it), otherwise encode params recursively.
8793                    for (prefix in a) {
8794                        buildParams(prefix, a[prefix], traditional, add);
8795                    }
8796                }
8797
8798                // Return the resulting serialization
8799                return s.join("&");
8800            };
8801
8802            jQuery.fn.extend({
8803                serialize: function () {
8804                    return jQuery.param(this.serializeArray());
8805                },
8806                serializeArray: function () {
8807                    return this.map(function () {
8808
8809                        // Can add propHook for "elements" to filter or add form elements
8810                        var elements = jQuery.prop(this, "elements");
8811                        return elements ? jQuery.makeArray(elements) : this;
8812                    })
8813                        .filter(function () {
8814                            var type = this.type;
8815
8816                            // Use .is( ":disabled" ) so that fieldset[disabled] w
vendor: 4,167 bytes, lines 8816-8918
8816orks
8817                            return this.name && !jQuery(this).is(":disabled") &&
8818                                rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) &&
8819                                (this.checked || !rcheckableType.test(type));
8820                        })
8821                        .map(function (i, elem) {
8822                            var val = jQuery(this).val();
8823
8824                            if (val == null) {
8825                                return null;
8826                            }
8827
8828                            if (Array.isArray(val)) {
8829                                return jQuery.map(val, function (val) {
8830                                    return {name: elem.name, value: val.replace(rCRLF, "\r\n")};
8831                                });
8832                            }
8833
8834                            return {name: elem.name, value: val.replace(rCRLF, "\r\n")};
8835                        }).get();
8836                }
8837            });
8838
8839
8840            var
8841                r20 = /%20/g,
8842                rhash = /#.*$/,
8843                rantiCache = /([?&])_=[^&]*/,
8844                rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
8845
8846                // #7653, #8125, #8152: local protocol detection
8847                rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
8848                rnoContent = /^(?:GET|HEAD)$/,
8849                rprotocol = /^\/\//,
8850
8851                /* Prefilters
8852	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
8853	 * 2) These are called:
8854	 *    - BEFORE asking for a transport
8855	 *    - AFTER param serialization (s.data is a string if s.processData is true)
8856	 * 3) key is the dataType
8857	 * 4) the catchall symbol "*" can be used
8858	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
8859	 */
8860                prefilters = {},
8861
8862                /* Transports bindings
8863	 * 1) key is the dataType
8864	 * 2) the catchall symbol "*" can be used
8865	 * 3) selection will start with transport dataType and THEN go to "*" if needed
8866	 */
8867                transports = {},
8868
8869                // Avoid comment-prolog char sequence (#--10098); must appease lint and evade compression
8870                allTypes = "*/".concat("*"),
8871
8872                // Anchor tag for parsing the document origin
8873                originAnchor = document.createElement("a");
8874            originAnchor.href = location.href;
8875
8876// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
8877            function addToPrefiltersOrTransports(structure) {
8878
8879                // dataTypeExpression is optional and defaults to "*"
8880                return function (dataTypeExpression, func) {
8881
8882                    if (typeof dataTypeExpression !== "string") {
8883                        func = dataTypeExpression;
8884                        dataTypeExpression = "*";
8885                    }
8886
8887                    var dataType,
8888                        i = 0,
8889                        dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
8890
8891                    if (isFunction(func)) {
8892
8893                        // For each dataType in the dataTypeExpression
8894                        while ((dataType = dataTypes[i++])) {
8895
8896                            // Prepend if requested
8897                            if (dataType[0] === "+") {
8898                                dataType = dataType.slice(1) || "*";
8899                                (structure[dataType] = structure[dataType] || []).unshift(func);
8900
8901                                // Otherwise append
8902                            } else {
8903                                (structure[dataType] = structure[dataType] || []).push(func);
8904                            }
8905                        }
8906                    }
8907                };
8908            }
8909
8910// Base inspection function for prefilters and transports
8911            function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
8912
8913                var inspected = {},
8914                    seekingTransport = (structure === transports);
8915
8916                function inspect(dataType) {
8917                    var selected;
8918                    inspected[dataType] = true;
vendor: 5,106 bytes, lines 8919-9050
8919                    jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
8920                        var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
8921                        if (typeof dataTypeOrTransport === "string" &&
8922                            !seekingTransport && !inspected[dataTypeOrTransport]) {
8923
8924                            options.dataTypes.unshift(dataTypeOrTransport);
8925                            inspect(dataTypeOrTransport);
8926                            return false;
8927                        } else if (seekingTransport) {
8928                            return !(selected = dataTypeOrTransport);
8929                        }
8930                    });
8931                    return selected;
8932                }
8933
8934                return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
8935            }
8936
8937// A special extend for ajax options
8938// that takes "flat" options (not to be deep extended)
8939// Fixes #9887
8940            function ajaxExtend(target, src) {
8941                var key, deep,
8942                    flatOptions = jQuery.ajaxSettings.flatOptions || {};
8943
8944                for (key in src) {
8945                    if (src[key] !== undefined) {
8946                        (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key];
8947                    }
8948                }
8949                if (deep) {
8950                    jQuery.extend(true, target, deep);
8951                }
8952
8953                return target;
8954            }
8955
8956            /* Handles responses to an ajax request:
8957 * - finds the right dataType (mediates between content-type and expected dataType)
8958 * - returns the corresponding response
8959 */
8960            function ajaxHandleResponses(s, jqXHR, responses) {
8961
8962                var ct, type, finalDataType, firstDataType,
8963                    contents = s.contents,
8964                    dataTypes = s.dataTypes;
8965
8966                // Remove auto dataType and get content-type in the process
8967                while (dataTypes[0] === "*") {
8968                    dataTypes.shift();
8969                    if (ct === undefined) {
8970                        ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8971                    }
8972                }
8973
8974                // Check if we're dealing with a known content-type
8975                if (ct) {
8976                    for (type in contents) {
8977                        if (contents[type] && contents[type].test(ct)) {
8978                            dataTypes.unshift(type);
8979                            break;
8980                        }
8981                    }
8982                }
8983
8984                // Check to see if we have a response for the expected dataType
8985                if (dataTypes[0] in responses) {
8986                    finalDataType = dataTypes[0];
8987                } else {
8988
8989                    // Try convertible dataTypes
8990                    for (type in responses) {
8991                        if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
8992                            finalDataType = type;
8993                            break;
8994                        }
8995                        if (!firstDataType) {
8996                            firstDataType = type;
8997                        }
8998                    }
8999
9000                    // Or just use first one
9001                    finalDataType = finalDataType || firstDataType;
9002                }
9003
9004                // If we found a dataType
9005                // We add the dataType to the list if needed
9006                // and return the corresponding response
9007                if (finalDataType) {
9008                    if (finalDataType !== dataTypes[0]) {
9009                        dataTypes.unshift(finalDataType);
9010                    }
9011                    return responses[finalDataType];
9012                }
9013            }
9014
9015            /* Chain conversions given the request and the original response
9016 * Also sets the responseXXX fields on the jqXHR instance
9017 */
9018            function ajaxConvert(s, response, jqXHR, isSuccess) {
9019                var conv2, current, conv, tmp, prev,
9020                    converters = {},
9021
9022                    // Work with a copy of dataTypes in case we need to modify it for conversion
9023                    dataTypes = s.dataTypes.slice();
9024
9025                // Create converters map with lowercased keys
9026                if (dataTypes[1]) {
9027                    for (conv in s.converters) {
9028                        converters[conv.toLowerCase()] = s.converters[conv];
9029                    }
9030                }
9031
9032                current = dataTypes.shift();
9033
9034                // Convert to each sequential dataType
9035                while (current) {
9036
9037                    if (s.responseFields[current]) {
9038                        jqXHR[s.responseFields[current]] = response;
9039                    }
9040
9041                    // Apply the dataFilter if provided
9042                    if (!prev && isSuccess && s.dataFilter) {
9043                        response = s.dataFilter(response, s.dataType);
9044                    }
9045
9046                    prev = current;
9047                    current = dataTypes.shift();
9048
9049                    if (current) {
9050
vendor: 29,962 bytes, lines 9051-9778
9051                        // There's only work to do if current dataType is non-auto
9052                        if (current === "*") {
9053
9054                            current = prev;
9055
9056                            // Convert response if prev dataType is non-auto and differs from current
9057                        } else if (prev !== "*" && prev !== current) {
9058
9059                            // Seek a direct converter
9060                            conv = converters[prev + " " + current] || converters["* " + current];
9061
9062                            // If none found, seek a pair
9063                            if (!conv) {
9064                                for (conv2 in converters) {
9065
9066                                    // If conv2 outputs current
9067                                    tmp = conv2.split(" ");
9068                                    if (tmp[1] === current) {
9069
9070                                        // If prev can be converted to accepted input
9071                                        conv = converters[prev + " " + tmp[0]] ||
9072                                            converters["* " + tmp[0]];
9073                                        if (conv) {
9074
9075                                            // Condense equivalence converters
9076                                            if (conv === true) {
9077                                                conv = converters[conv2];
9078
9079                                                // Otherwise, insert the intermediate dataType
9080                                            } else if (converters[conv2] !== true) {
9081                                                current = tmp[0];
9082                                                dataTypes.unshift(tmp[1]);
9083                                            }
9084                                            break;
9085                                        }
9086                                    }
9087                                }
9088                            }
9089
9090                            // Apply converter (if not an equivalence)
9091                            if (conv !== true) {
9092
9093                                // Unless errors are allowed to bubble, catch and return them
9094                                if (conv && s.throws) {
9095                                    response = conv(response);
9096                                } else {
9097                                    try {
9098                                        response = conv(response);
9099                                    } catch (e) {
9100                                        return {
9101                                            state: "parsererror",
9102                                            error: conv ? e : "No conversion from " + prev + " to " + current
9103                                        };
9104                                    }
9105                                }
9106                            }
9107                        }
9108                    }
9109                }
9110
9111                return {state: "success", data: response};
9112            }
9113
9114            jQuery.extend({
9115
9116                // Counter for holding the number of active queries
9117                active: 0,
9118
9119                // Last-Modified header cache for next request
9120                lastModified: {},
9121                etag: {},
9122
9123                ajaxSettings: {
9124                    url: location.href,
9125                    type: "GET",
9126                    isLocal: rlocalProtocol.test(location.protocol),
9127                    global: true,
9128                    processData: true,
9129                    async: true,
9130                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
9131
9132                    /*
9133		timeout: 0,
9134		data: null,
9135		dataType: null,
9136		username: null,
9137		password: null,
9138		cache: null,
9139		throws: false,
9140		traditional: false,
9141		headers: {},
9142		*/
9143
9144                    accepts: {
9145                        "*": allTypes,
9146                        text: "text/plain",
9147                        html: "text/html",
9148                        xml: "application/xml, text/xml",
9149                        json: "application/json, text/javascript"
9150                    },
9151
9152                    contents: {
9153                        xml: /\bxml\b/,
9154                        html: /\bhtml/,
9155                        json: /\bjson\b/
9156                    },
9157
9158                    responseFields: {
9159                        xml: "responseXML",
9160                        text: "responseText",
9161                        json: "responseJSON"
9162                    },
9163
9164                    // Data converters
9165                    // Keys separate source (or catchall "*") and destination types with a single space
9166                    converters: {
9167
9168                        // Convert anything to text
9169                        "* text": String,
9170
9171                        // Text to html (true = no transformation)
9172                        "text html": true,
9173
9174                        // Evaluate text as a json expression
9175                        "text json": JSON.parse,
9176
9177                        // Parse text as xml
9178                        "text xml": jQuery.parseXML
9179                    },
9180
9181                    // For options that shouldn't be deep extended:
9182                    // you can add your own custom options here if
9183                    // and when you create one that shouldn't be
9184                    // deep extended (see ajaxExtend)
9185                    flatOptions: {
9186                        url: true,
9187                        context: true
9188                    }
9189                },
9190
9191                // Creates a full fledged settings object into target
9192                // with both ajaxSettings and settings fields.
9193                // If target is omitted, writes into ajaxSettings.
9194                ajaxSetup: function (target, settings) {
9195                    return settings ?
9196
9197                        // Building a settings object
9198                        ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) :
9199
9200                        // Extending ajaxSettings
9201                        ajaxExtend(jQuery.ajaxSettings, target);
9202                },
9203
9204                ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
9205                ajaxTransport: addToPrefiltersOrTransports(transports),
9206
9207                // Main method
9208                ajax: function (url, options) {
9209
9210                    // If url is an object, simulate pre-1.5 signature
9211                    if (typeof url === "object") {
9212                        options = url;
9213                        url = undefined;
9214                    }
9215
9216                    // Force options to be an object
9217                    options = options || {};
9218
9219                    var transport,
9220
9221                        // URL without anti-cache param
9222                        cacheURL,
9223
9224                        // Response headers
9225                        responseHeadersString,
9226                        responseHeaders,
9227
9228                        // timeout handle
9229                        timeoutTimer,
9230
9231                        // Url cleanup var
9232                        urlAnchor,
9233
9234                        // Request state (becomes false upon send and true upon completion)
9235                        completed,
9236
9237                        // To know if global events are to be dispatched
9238                        fireGlobals,
9239
9240                        // Loop variable
9241                        i,
9242
9243                        // uncached part of the url
9244                        uncached,
9245
9246                        // Create the final options object
9247                        s = jQuery.ajaxSetup({}, options),
9248
9249                        // Callbacks context
9250                        callbackContext = s.context || s,
9251
9252                        // Context for global events is callbackContext if it is a DOM node or jQuery collection
9253                        globalEventContext = s.context &&
9254                        (callbackContext.nodeType || callbackContext.jquery) ?
9255                            jQuery(callbackContext) :
9256                            jQuery.event,
9257
9258                        // Deferreds
9259                        deferred = jQuery.Deferred(),
9260                        completeDeferred = jQuery.Callbacks("once memory"),
9261
9262                        // Status-dependent callbacks
9263                        statusCode = s.statusCode || {},
9264
9265                        // Headers (they are sent all at once)
9266                        requestHeaders = {},
9267                        requestHeadersNames = {},
9268
9269                        // Default abort message
9270                        strAbort = "canceled",
9271
9272                        // Fake xhr
9273                        jqXHR = {
9274                            readyState: 0,
9275
9276                            // Builds headers hashtable if needed
9277                            getResponseHeader: function (key) {
9278                                var match;
9279                                if (completed) {
9280                                    if (!responseHeaders) {
9281                                        responseHeaders = {};
9282                                        while ((match = rheaders.exec(responseHeadersString))) {
9283                                            responseHeaders[match[1].toLowerCase()] = match[2];
9284                                        }
9285                                    }
9286                                    match = responseHeaders[key.toLowerCase()];
9287                                }
9288                                return match == null ? null : match;
9289                            },
9290
9291                            // Raw string
9292                            getAllResponseHeaders: function () {
9293                                return completed ? responseHeadersString : null;
9294                            },
9295
9296                            // Caches the header
9297                            setRequestHeader: function (name, value) {
9298                                if (completed == null) {
9299                                    name = requestHeadersNames[name.toLowerCase()] =
9300                                        requestHeadersNames[name.toLowerCase()] || name;
9301                                    requestHeaders[name] = value;
9302                                }
9303                                return this;
9304                            },
9305
9306                            // Overrides response content-type header
9307                            overrideMimeType: function (type) {
9308                                if (completed == null) {
9309                                    s.mimeType = type;
9310                                }
9311                                return this;
9312                            },
9313
9314                            // Status-dependent callbacks
9315                            statusCode: function (map) {
9316                                var code;
9317                                if (map) {
9318                                    if (completed) {
9319
9320                                        // Execute the appropriate callbacks
9321                                        jqXHR.always(map[jqXHR.status]);
9322                                    } else {
9323
9324                                        // Lazy-add the new callbacks in a way that preserves old ones
9325                                        for (code in map) {
9326                                            statusCode[code] = [statusCode[code], map[code]];
9327                                        }
9328                                    }
9329                                }
9330                                return this;
9331                            },
9332
9333                            // Cancel the request
9334                            abort: function (statusText) {
9335                                var finalText = statusText || strAbort;
9336                                if (transport) {
9337                                    transport.abort(finalText);
9338                                }
9339                                done(0, finalText);
9340                                return this;
9341                            }
9342                        };
9343
9344                    // Attach deferreds
9345                    deferred.promise(jqXHR);
9346
9347                    // Add protocol if not provided (prefilters might expect it)
9348                    // Handle falsy url in the settings object (#--10093: consistency with old signature)
9349                    // We also use the url parameter if available
9350                    s.url = ((url || s.url || location.href) + "")
9351                        .replace(rprotocol, location.protocol + "//");
9352
9353                    // Alias method option to type as per ticket #12004
9354                    s.type = options.method || options.type || s.method || s.type;
9355
9356                    // Extract dataTypes list
9357                    s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
9358
9359                    // A cross-domain request is in order when the origin doesn't match the current origin.
9360                    if (s.crossDomain == null) {
9361                        urlAnchor = document.createElement("a");
9362
9363                        // Support: IE <=8 - 11, Edge 12 - 15
9364                        // IE throws exception on accessing the href property if url is malformed,
9365                        // e.g. http://example.com:80x/
9366                        try {
9367                            urlAnchor.href = s.url;
9368
9369                            // Support: IE <=8 - 11 only
9370                            // Anchor's host property isn't correctly set when s.url is relative
9371                            urlAnchor.href = urlAnchor.href;
9372                            s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
9373                                urlAnchor.protocol + "//" + urlAnchor.host;
9374                        } catch (e) {
9375
9376                            // If there is an error parsing the URL, assume it is crossDomain,
9377                            // it can be rejected by the transport if it is invalid
9378                            s.crossDomain = true;
9379                        }
9380                    }
9381
9382                    // Convert data if not already a string
9383                    if (s.data && s.processData && typeof s.data !== "string") {
9384                        s.data = jQuery.param(s.data, s.traditional);
9385                    }
9386
9387                    // Apply prefilters
9388                    inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
9389
9390                    // If request was aborted inside a prefilter, stop there
9391                    if (completed) {
9392                        return jqXHR;
9393                    }
9394
9395                    // We can fire global events as of now if asked to
9396                    // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#--15118)
9397                    fireGlobals = jQuery.event && s.global;
9398
9399                    // Watch for a new set of requests
9400                    if (fireGlobals && jQuery.active++ === 0) {
9401                        jQuery.event.trigger("ajaxStart");
9402                    }
9403
9404                    // Uppercase the type
9405                    s.type = s.type.toUpperCase();
9406
9407                    // Determine if request has content
9408                    s.hasContent = !rnoContent.test(s.type);
9409
9410                    // Save the URL in case we're toying with the If-Modified-Since
9411                    // and/or If-None-Match header later on
9412                    // Remove hash to simplify url manipulation
9413                    cacheURL = s.url.replace(rhash, "");
9414
9415                    // More options handling for requests with no content
9416                    if (!s.hasContent) {
9417
9418                        // Remember the hash so we can put it back
9419                        uncached = s.url.slice(cacheURL.length);
9420
9421                        // If data is available and should be processed, append data to url
9422                        if (s.data && (s.processData || typeof s.data === "string")) {
9423                            cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data;
9424
9425                            // #9682: remove data so that it's not used in an eventual retry
9426                            delete s.data;
9427                        }
9428
9429                        // Add or update anti-cache param if needed
9430                        if (s.cache === false) {
9431                            cacheURL = cacheURL.replace(rantiCache, "$1");
9432                            uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + (nonce++) + uncached;
9433                        }
9434
9435                        // Put hash and anti-cache on the URL that will be requested (gh-1732)
9436                        s.url = cacheURL + uncached;
9437
9438                        // Change '%20' to '+' if this is encoded form body content (gh-2658)
9439                    } else if (s.data && s.processData &&
9440                        (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
9441                        s.data = s.data.replace(r20, "+");
9442                    }
9443
9444                    // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9445                    if (s.ifModified) {
9446                        if (jQuery.lastModified[cacheURL]) {
9447                            jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
9448                        }
9449                        if (jQuery.etag[cacheURL]) {
9450                            jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
9451                        }
9452                    }
9453
9454                    // Set the correct header, if data is being sent
9455                    if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
9456                        jqXHR.setRequestHeader("Content-Type", s.contentType);
9457                    }
9458
9459                    // Set the Accepts header for the server, depending on the dataType
9460                    jqXHR.setRequestHeader(
9461                        "Accept",
9462                        s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
9463                            s.accepts[s.dataTypes[0]] +
9464                            (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") :
9465                            s.accepts["*"]
9466                    );
9467
9468                    // Check for headers option
9469                    for (i in s.headers) {
9470                        jqXHR.setRequestHeader(i, s.headers[i]);
9471                    }
9472
9473                    // Allow custom headers/mimetypes and early abort
9474                    if (s.beforeSend &&
9475                        (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) {
9476
9477                        // Abort if not done already and return
9478                        return jqXHR.abort();
9479                    }
9480
9481                    // Aborting is no longer a cancellation
9482                    strAbort = "abort";
9483
9484                    // Install callbacks on deferreds
9485                    completeDeferred.add(s.complete);
9486                    jqXHR.done(s.success);
9487                    jqXHR.fail(s.error);
9488
9489                    // Get transport
9490                    transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
9491
9492                    // If no transport, we auto-abort
9493                    if (!transport) {
9494                        done(-1, "No Transport");
9495                    } else {
9496                        jqXHR.readyState = 1;
9497
9498                        // Send global event
9499                        if (fireGlobals) {
9500                            globalEventContext.trigger("ajaxSend", [jqXHR, s]);
9501                        }
9502
9503                        // If request was aborted inside ajaxSend, stop there
9504                        if (completed) {
9505                            return jqXHR;
9506                        }
9507
9508                        // Timeout
9509                        if (s.async && s.timeout > 0) {
9510                            timeoutTimer = window.setTimeout(function () {
9511                                jqXHR.abort("timeout");
9512                            }, s.timeout);
9513                        }
9514
9515                        try {
9516                            completed = false;
9517                            transport.send(requestHeaders, done);
9518                        } catch (e) {
9519
9520                            // Rethrow post-completion exceptions
9521                            if (completed) {
9522                                throw e;
9523                            }
9524
9525                            // Propagate others as results
9526                            done(-1, e);
9527                        }
9528                    }
9529
9530                    // Callback for when everything is done
9531                    function done(status, nativeStatusText, responses, headers) {
9532                        var isSuccess, success, error, response, modified,
9533                            statusText = nativeStatusText;
9534
9535                        // Ignore repeat invocations
9536                        if (completed) {
9537                            return;
9538                        }
9539
9540                        completed = true;
9541
9542                        // Clear timeout if it exists
9543                        if (timeoutTimer) {
9544                            window.clearTimeout(timeoutTimer);
9545                        }
9546
9547                        // Dereference transport for early garbage collection
9548                        // (no matter how long the jqXHR object will be used)
9549                        transport = undefined;
9550
9551                        // Cache response headers
9552                        responseHeadersString = headers || "";
9553
9554                        // Set readyState
9555                        jqXHR.readyState = status > 0 ? 4 : 0;
9556
9557                        // Determine if successful
9558                        isSuccess = status >= 200 && status < 300 || status === 304;
9559
9560                        // Get response data
9561                        if (responses) {
9562                            response = ajaxHandleResponses(s, jqXHR, responses);
9563                        }
9564
9565                        // Convert no matter what (that way responseXXX fields are always set)
9566                        response = ajaxConvert(s, response, jqXHR, isSuccess);
9567
9568                        // If successful, handle type chaining
9569                        if (isSuccess) {
9570
9571                            // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
9572                            if (s.ifModified) {
9573                                modified = jqXHR.getResponseHeader("Last-Modified");
9574                                if (modified) {
9575                                    jQuery.lastModified[cacheURL] = modified;
9576                                }
9577                                modified = jqXHR.getResponseHeader("etag");
9578                                if (modified) {
9579                                    jQuery.etag[cacheURL] = modified;
9580                                }
9581                            }
9582
9583                            // if no content
9584                            if (status === 204 || s.type === "HEAD") {
9585                                statusText = "nocontent";
9586
9587                                // if not modified
9588                            } else if (status === 304) {
9589                                statusText = "notmodified";
9590
9591                                // If we have data, let's convert it
9592                            } else {
9593                                statusText = response.state;
9594                                success = response.data;
9595                                error = response.error;
9596                                isSuccess = !error;
9597                            }
9598                        } else {
9599
9600                            // Extract error from statusText and normalize for non-aborts
9601                            error = statusText;
9602                            if (status || !statusText) {
9603                                statusText = "error";
9604                                if (status < 0) {
9605                                    status = 0;
9606                                }
9607                            }
9608                        }
9609
9610                        // Set data for the fake xhr object
9611                        jqXHR.status = status;
9612                        jqXHR.statusText = (nativeStatusText || statusText) + "";
9613
9614                        // Success/Error
9615                        if (isSuccess) {
9616                            deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
9617                        } else {
9618                            deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
9619                        }
9620
9621                        // Status-dependent callbacks
9622                        jqXHR.statusCode(statusCode);
9623                        statusCode = undefined;
9624
9625                        if (fireGlobals) {
9626                            globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError",
9627                                [jqXHR, s, isSuccess ? success : error]);
9628                        }
9629
9630                        // Complete
9631                        completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
9632
9633                        if (fireGlobals) {
9634                            globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
9635
9636                            // Handle the global AJAX counter
9637                            if (!(--jQuery.active)) {
9638                                jQuery.event.trigger("ajaxStop");
9639                            }
9640                        }
9641                    }
9642
9643                    return jqXHR;
9644                },
9645
9646                getJSON: function (url, data, callback) {
9647                    return jQuery.get(url, data, callback, "json");
9648                },
9649
9650                getScript: function (url, callback) {
9651                    return jQuery.get(url, undefined, callback, "script");
9652                }
9653            });
9654
9655            jQuery.each(["get", "post"], function (i, method) {
9656                jQuery[method] = function (url, data, callback, type) {
9657
9658                    // Shift arguments if data argument was omitted
9659                    if (isFunction(data)) {
9660                        type = type || callback;
9661                        callback = data;
9662                        data = undefined;
9663                    }
9664
9665                    // The url can be an options object (which then must have .url)
9666                    return jQuery.ajax(jQuery.extend({
9667                        url: url,
9668                        type: method,
9669                        dataType: type,
9670                        data: data,
9671                        success: callback
9672                    }, jQuery.isPlainObject(url) && url));
9673                };
9674            });
9675
9676
9677            jQuery._evalUrl = function (url) {
9678                return jQuery.ajax({
9679                    url: url,
9680
9681                    // Make this explicit, since user can override this through ajaxSetup (#--11264)
9682                    type: "GET",
9683                    dataType: "script",
9684                    cache: true,
9685                    async: false,
9686                    global: false,
9687                    "throws": true
9688                });
9689            };
9690
9691
9692            jQuery.fn.extend({
9693                wrapAll: function (html) {
9694                    var wrap;
9695
9696                    if (this[0]) {
9697                        if (isFunction(html)) {
9698                            html = html.call(this[0]);
9699                        }
9700
9701                        // The elements to wrap the target around
9702                        wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
9703
9704                        if (this[0].parentNode) {
9705                            wrap.insertBefore(this[0]);
9706                        }
9707
9708                        wrap.map(function () {
9709                            var elem = this;
9710
9711                            while (elem.firstElementChild) {
9712                                elem = elem.firstElementChild;
9713                            }
9714
9715                            return elem;
9716                        }).append(this);
9717                    }
9718
9719                    return this;
9720                },
9721
9722                wrapInner: function (html) {
9723                    if (isFunction(html)) {
9724                        return this.each(function (i) {
9725                            jQuery(this).wrapInner(html.call(this, i));
9726                        });
9727                    }
9728
9729                    return this.each(function () {
9730                        var self = jQuery(this),
9731                            contents = self.contents();
9732
9733                        if (contents.length) {
9734                            contents.wrapAll(html);
9735
9736                        } else {
9737                            self.append(html);
9738                        }
9739                    });
9740                },
9741
9742                wrap: function (html) {
9743                    var htmlIsFunction = isFunction(html);
9744
9745                    return this.each(function (i) {
9746                        jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
9747                    });
9748                },
9749
9750                unwrap: function (selector) {
9751                    this.parent(selector).not("body").each(function () {
9752                        jQuery(this).replaceWith(this.childNodes);
9753                    });
9754                    return this;
9755                }
9756            });
9757
9758
9759            jQuery.expr.pseudos.hidden = function (elem) {
9760                return !jQuery.expr.pseudos.visible(elem);
9761            };
9762            jQuery.expr.pseudos.visible = function (elem) {
9763                return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
9764            };
9765
9766
9767            jQuery.ajaxSettings.xhr = function () {
9768                try {
9769                    return new window.XMLHttpRequest();
9770                } catch (e) {
9771                }
9772            };
9773
9774            var xhrSuccessStatus = {
9775
9776                    // File protocol always yields status code 0, assume 200
9777                    0: 200,
9778
vendor: 7,054 bytes, lines 9779-9912
9779                    // Support: IE <=9 only
9780                    // #--1450: sometimes IE returns 1223 when it should be 204
9781                    1223: 204
9782                },
9783                xhrSupported = jQuery.ajaxSettings.xhr();
9784
9785            support.cors = !!xhrSupported && ("withCredentials" in xhrSupported);
9786            support.ajax = xhrSupported = !!xhrSupported;
9787
9788            jQuery.ajaxTransport(function (options) {
9789                var callback, errorCallback;
9790
9791                // Cross domain only allowed if supported through XMLHttpRequest
9792                if (support.cors || xhrSupported && !options.crossDomain) {
9793                    return {
9794                        send: function (headers, complete) {
9795                            var i,
9796                                xhr = options.xhr();
9797
9798                            xhr.open(
9799                                options.type,
9800                                options.url,
9801                                options.async,
9802                                options.username,
9803                                options.password
9804                            );
9805
9806                            // Apply custom fields if provided
9807                            if (options.xhrFields) {
9808                                for (i in options.xhrFields) {
9809                                    xhr[i] = options.xhrFields[i];
9810                                }
9811                            }
9812
9813                            // Override mime type if needed
9814                            if (options.mimeType && xhr.overrideMimeType) {
9815                                xhr.overrideMimeType(options.mimeType);
9816                            }
9817
9818                            // X-Requested-With header
9819                            // For cross-domain requests, seeing as conditions for a preflight are
9820                            // akin to a jigsaw puzzle, we simply never set it to be sure.
9821                            // (it can always be set on a per-request basis or even using ajaxSetup)
9822                            // For same-domain requests, won't change header if already provided.
9823                            if (!options.crossDomain && !headers["X-Requested-With"]) {
9824                                headers["X-Requested-With"] = "XMLHttpRequest";
9825                            }
9826
9827                            // Set headers
9828                            for (i in headers) {
9829                                xhr.setRequestHeader(i, headers[i]);
9830                            }
9831
9832                            // Callback
9833                            callback = function (type) {
9834                                return function () {
9835                                    if (callback) {
9836                                        callback = errorCallback = xhr.onload =
9837                                            xhr.onerror = xhr.onabort = xhr.ontimeout =
9838                                                xhr.onreadystatechange = null;
9839
9840                                        if (type === "abort") {
9841                                            xhr.abort();
9842                                        } else if (type === "error") {
9843
9844                                            // Support: IE <=9 only
9845                                            // On a manual native abort, IE9 throws
9846                                            // errors on any property access that is not readyState
9847                                            if (typeof xhr.status !== "number") {
9848                                                complete(0, "error");
9849                                            } else {
9850                                                complete(
9851                                                    // File: protocol always yields status 0; see #--8605, #--14207
9852                                                    xhr.status,
9853                                                    xhr.statusText
9854                                                );
9855                                            }
9856                                        } else {
9857                                            complete(
9858                                                xhrSuccessStatus[xhr.status] || xhr.status,
9859                                                xhr.statusText,
9860
9861                                                // Support: IE <=9 only
9862                                                // IE9 has no XHR2 but throws on binary (trac-11426)
9863                                                // For XHR2 non-text, let the caller handle it (gh-2498)
9864                                                (xhr.responseType || "text") !== "text" ||
9865                                                typeof xhr.responseText !== "string" ?
9866                                                    {binary: xhr.response} :
9867                                                    {text: xhr.responseText},
9868                                                xhr.getAllResponseHeaders()
9869                                            );
9870                                        }
9871                                    }
9872                                };
9873                            };
9874
9875                            // Listen to events
9876                            xhr.onload = callback();
9877                            errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
9878
9879                            // Support: IE 9 only
9880                            // Use onreadystatechange to replace onabort
9881                            // to handle uncaught aborts
9882                            if (xhr.onabort !== undefined) {
9883                                xhr.onabort = errorCallback;
9884                            } else {
9885                                xhr.onreadystatechange = function () {
9886
9887                                    // Check readyState before timeout as it changes
9888                                    if (xhr.readyState === 4) {
9889
9890                                        // Allow onerror to be called first,
9891                                        // but that will not handle a native abort
9892                                        // Also, save errorCallback to a variable
9893                                        // as xhr.onerror cannot be accessed
9894                                        window.setTimeout(function () {
9895                                            if (callback) {
9896                                                errorCallback();
9897                                            }
9898                                        });
9899                                    }
9900                                };
9901                            }
9902
9903                            // Create the abort callback
9904                            callback = callback("abort");
9905
9906                            try {
9907
9908                                // Do send the request (this may raise an exception)
9909                                xhr.send(options.hasContent && options.data || null);
9910                            } catch (e) {
9911
9912                                // #--14683: Only rethrow if this hasn't been n
vendor: 17,906 bytes, lines 9912-10360
9912otified as an error yet
9913                                if (callback) {
9914                                    throw e;
9915                                }
9916                            }
9917                        },
9918
9919                        abort: function () {
9920                            if (callback) {
9921                                callback();
9922                            }
9923                        }
9924                    };
9925                }
9926            });
9927
9928
9929// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
9930            jQuery.ajaxPrefilter(function (s) {
9931                if (s.crossDomain) {
9932                    s.contents.script = false;
9933                }
9934            });
9935
9936// Install script dataType
9937            jQuery.ajaxSetup({
9938                accepts: {
9939                    script: "text/javascript, application/javascript, " +
9940                        "application/ecmascript, application/x-ecmascript"
9941                },
9942                contents: {
9943                    script: /\b(?:java|ecma)script\b/
9944                },
9945                converters: {
9946                    "text script": function (text) {
9947                        jQuery.globalEval(text);
9948                        return text;
9949                    }
9950                }
9951            });
9952
9953// Handle cache's special case and crossDomain
9954            jQuery.ajaxPrefilter("script", function (s) {
9955                if (s.cache === undefined) {
9956                    s.cache = false;
9957                }
9958                if (s.crossDomain) {
9959                    s.type = "GET";
9960                }
9961            });
9962
9963// Bind script tag hack transport
9964            jQuery.ajaxTransport("script", function (s) {
9965
9966                // This transport only deals with cross domain requests
9967                if (s.crossDomain) {
9968                    var script, callback;
9969                    return {
9970                        send: function (_, complete) {
9971                            script = jQuery("<script>").prop({
9972                                charset: s.scriptCharset,
9973                                src: s.url
9974                            }).on(
9975                                "load error",
9976                                callback = function (evt) {
9977                                    script.remove();
9978                                    callback = null;
9979                                    if (evt) {
9980                                        complete(evt.type === "error" ? 404 : 200, evt.type);
9981                                    }
9982                                }
9983                            );
9984
9985                            // Use native DOM manipulation to avoid our domManip AJAX trickery
9986                            document.head.appendChild(script[0]);
9987                        },
9988                        abort: function () {
9989                            if (callback) {
9990                                callback();
9991                            }
9992                        }
9993                    };
9994                }
9995            });
9996
9997
9998            var oldCallbacks = [],
9999                rjsonp = /(=)\?(?=&|$)|\?\?/;
10000
10001// Default jsonp settings
10002            jQuery.ajaxSetup({
10003                jsonp: "callback",
10004                jsonpCallback: function () {
10005                    var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (nonce++));
10006                    this[callback] = true;
10007                    return callback;
10008                }
10009            });
10010
10011// Detect, normalize options and install callbacks for jsonp requests
10012            jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
10013
10014                var callbackName, overwritten, responseContainer,
10015                    jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ?
10016                            "url" :
10017                            typeof s.data === "string" &&
10018                            (s.contentType || "")
10019                                .indexOf("application/x-www-form-urlencoded") === 0 &&
10020                            rjsonp.test(s.data) && "data"
10021                    );
10022
10023                // Handle iff the expected data type is "jsonp" or we have a parameter to set
10024                if (jsonProp || s.dataTypes[0] === "jsonp") {
10025
10026                    // Get callback name, remembering preexisting value associated with it
10027                    callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ?
10028                        s.jsonpCallback() :
10029                        s.jsonpCallback;
10030
10031                    // Insert callback into url or form data
10032                    if (jsonProp) {
10033                        s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
10034                    } else if (s.jsonp !== false) {
10035                        s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
10036                    }
10037
10038                    // Use data converter to retrieve json after script execution
10039                    s.converters["script json"] = function () {
10040                        if (!responseContainer) {
10041                            jQuery.error(callbackName + " was not called");
10042                        }
10043                        return responseContainer[0];
10044                    };
10045
10046                    // Force json dataType
10047                    s.dataTypes[0] = "json";
10048
10049                    // Install callback
10050                    overwritten = window[callbackName];
10051                    window[callbackName] = function () {
10052                        responseContainer = arguments;
10053                    };
10054
10055                    // Clean-up function (fires after converters)
10056                    jqXHR.always(function () {
10057
10058                        // If previous value didn't exist - remove it
10059                        if (overwritten === undefined) {
10060                            jQuery(window).removeProp(callbackName);
10061
10062                            // Otherwise restore preexisting value
10063                        } else {
10064                            window[callbackName] = overwritten;
10065                        }
10066
10067                        // Save back as free
10068                        if (s[callbackName]) {
10069
10070                            // Make sure that re-using the options doesn't screw things around
10071                            s.jsonpCallback = originalSettings.jsonpCallback;
10072
10073                            // Save the callback name for future use
10074                            oldCallbacks.push(callbackName);
10075                        }
10076
10077                        // Call if it was a function and we have a response
10078                        if (responseContainer && isFunction(overwritten)) {
10079                            overwritten(responseContainer[0]);
10080                        }
10081
10082                        responseContainer = overwritten = undefined;
10083                    });
10084
10085                    // Delegate to script
10086                    return "script";
10087                }
10088            });
10089
10090
10091// Support: Safari 8 only
10092// In Safari 8 documents created via document.implementation.createHTMLDocument
10093// collapse sibling forms: the second one becomes a child of the first one.
10094// Because of that, this security measure has to be disabled in Safari 8.
10095// https://bugs.webkit.org/show_bug.cgi?id=137337
10096            support.createHTMLDocument = (function () {
10097                var body = document.implementation.createHTMLDocument("").body;
10098                body.innerHTML = "<form></form><form></form>";
10099                return body.childNodes.length === 2;
10100            })();
10101
10102
10103// Argument "data" should be string of html
10104// context (optional): If specified, the fragment will be created in this context,
10105// defaults to document
10106// keepScripts (optional): If true, will include scripts passed in the html string
10107            jQuery.parseHTML = function (data, context, keepScripts) {
10108                if (typeof data !== "string") {
10109                    return [];
10110                }
10111                if (typeof context === "boolean") {
10112                    keepScripts = context;
10113                    context = false;
10114                }
10115
10116                var base, parsed, scripts;
10117
10118                if (!context) {
10119
10120                    // Stop scripts or inline event handlers from being executed immediately
10121                    // by using document.implementation
10122                    if (support.createHTMLDocument) {
10123                        context = document.implementation.createHTMLDocument("");
10124
10125                        // Set the base href for the created document
10126                        // so any parsed elements with URLs
10127                        // are based on the document's URL (gh-2965)
10128                        base = context.createElement("base");
10129                        base.href = document.location.href;
10130                        context.head.appendChild(base);
10131                    } else {
10132                        context = document;
10133                    }
10134                }
10135
10136                parsed = rsingleTag.exec(data);
10137                scripts = !keepScripts && [];
10138
10139                // Single tag
10140                if (parsed) {
10141                    return [context.createElement(parsed[1])];
10142                }
10143
10144                parsed = buildFragment([data], context, scripts);
10145
10146                if (scripts && scripts.length) {
10147                    jQuery(scripts).remove();
10148                }
10149
10150                return jQuery.merge([], parsed.childNodes);
10151            };
10152
10153
10154            /**
10155             * Load a url into a page
10156             */
10157            jQuery.fn.load = function (url, params, callback) {
10158                var selector, type, response,
10159                    self = this,
10160                    off = url.indexOf(" ");
10161
10162                if (off > -1) {
10163                    selector = stripAndCollapse(url.slice(off));
10164                    url = url.slice(0, off);
10165                }
10166
10167                // If it's a function
10168                if (isFunction(params)) {
10169
10170                    // We assume that it's the callback
10171                    callback = params;
10172                    params = undefined;
10173
10174                    // Otherwise, build a param string
10175                } else if (params && typeof params === "object") {
10176                    type = "POST";
10177                }
10178
10179                // If we have elements to modify, make the request
10180                if (self.length > 0) {
10181                    jQuery.ajax({
10182                        url: url,
10183
10184                        // If "type" variable is undefined, then "GET" method will be used.
10185                        // Make value of this field explicit since
10186                        // user can override it through ajaxSetup method
10187                        type: type || "GET",
10188                        dataType: "html",
10189                        data: params
10190                    }).done(function (responseText) {
10191
10192                        // Save response for use in complete callback
10193                        response = arguments;
10194
10195                        self.html(selector ?
10196
10197                            // If a selector was specified, locate the right elements in a dummy div
10198                            // Exclude scripts to avoid IE 'Permission Denied' errors
10199                            jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) :
10200
10201                            // Otherwise use the full result
10202                            responseText);
10203
10204                        // If the request succeeds, this function gets "data", "status", "jqXHR"
10205                        // but they are ignored because response was set above.
10206                        // If it fails, this function gets "jqXHR", "status", "error"
10207                    }).always(callback && function (jqXHR, status) {
10208                        self.each(function () {
10209                            callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
10210                        });
10211                    });
10212                }
10213
10214                return this;
10215            };
10216
10217
10218// Attach a bunch of functions for handling common AJAX events
10219            jQuery.each([
10220                "ajaxStart",
10221                "ajaxStop",
10222                "ajaxComplete",
10223                "ajaxError",
10224                "ajaxSuccess",
10225                "ajaxSend"
10226            ], function (i, type) {
10227                jQuery.fn[type] = function (fn) {
10228                    return this.on(type, fn);
10229                };
10230            });
10231
10232
10233            jQuery.expr.pseudos.animated = function (elem) {
10234                return jQuery.grep(jQuery.timers, function (fn) {
10235                    return elem === fn.elem;
10236                }).length;
10237            };
10238
10239
10240            jQuery.offset = {
10241                setOffset: function (elem, options, i) {
10242                    var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
10243                        position = jQuery.css(elem, "position"),
10244                        curElem = jQuery(elem),
10245                        props = {};
10246
10247                    // Set position first, in-case top/left are set even on static elem
10248                    if (position === "static") {
10249                        elem.style.position = "relative";
10250                    }
10251
10252                    curOffset = curElem.offset();
10253                    curCSSTop = jQuery.css(elem, "top");
10254                    curCSSLeft = jQuery.css(elem, "left");
10255                    calculatePosition = (position === "absolute" || position === "fixed") &&
10256                        (curCSSTop + curCSSLeft).indexOf("auto") > -1;
10257
10258                    // Need to be able to calculate position if either
10259                    // top or left is auto and position is either absolute or fixed
10260                    if (calculatePosition) {
10261                        curPosition = curElem.position();
10262                        curTop = curPosition.top;
10263                        curLeft = curPosition.left;
10264
10265                    } else {
10266                        curTop = parseFloat(curCSSTop) || 0;
10267                        curLeft = parseFloat(curCSSLeft) || 0;
10268                    }
10269
10270                    if (isFunction(options)) {
10271
10272                        // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
10273                        options = options.call(elem, i, jQuery.extend({}, curOffset));
10274                    }
10275
10276                    if (options.top != null) {
10277                        props.top = (options.top - curOffset.top) + curTop;
10278                    }
10279                    if (options.left != null) {
10280                        props.left = (options.left - curOffset.left) + curLeft;
10281                    }
10282
10283                    if ("using" in options) {
10284                        options.using.call(elem, props);
10285
10286                    } else {
10287                        curElem.css(props);
10288                    }
10289                }
10290            };
10291
10292            jQuery.fn.extend({
10293
10294                // offset() relates an element's border box to the document origin
10295                offset: function (options) {
10296
10297                    // Preserve chaining for setter
10298                    if (arguments.length) {
10299                        return options === undefined ?
10300                            this :
10301                            this.each(function (i) {
10302                                jQuery.offset.setOffset(this, options, i);
10303                            });
10304                    }
10305
10306                    var rect, win,
10307                        elem = this[0];
10308
10309                    if (!elem) {
10310                        return;
10311                    }
10312
10313                    // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
10314                    // Support: IE <=11 only
10315                    // Running getBoundingClientRect on a
10316                    // disconnected node in IE throws an error
10317                    if (!elem.getClientRects().length) {
10318                        return {top: 0, left: 0};
10319                    }
10320
10321                    // Get document-relative position by adding viewport scroll to viewport-relative gBCR
10322                    rect = elem.getBoundingClientRect();
10323                    win = elem.ownerDocument.defaultView;
10324                    return {
10325                        top: rect.top + win.pageYOffset,
10326                        left: rect.left + win.pageXOffset
10327                    };
10328                },
10329
10330                // position() relates an element's margin box to its offset parent's padding box
10331                // This corresponds to the behavior of CSS absolute positioning
10332                position: function () {
10333                    if (!this[0]) {
10334                        return;
10335                    }
10336
10337                    var offsetParent, offset, doc,
10338                        elem = this[0],
10339                        parentOffset = {top: 0, left: 0};
10340
10341                    // position:fixed elements are offset from the viewport, which itself always has zero offset
10342                    if (jQuery.css(elem, "position") === "fixed") {
10343
10344                        // Assume position:fixed implies availability of getBoundingClientRect
10345                        offset = elem.getBoundingClientRect();
10346
10347                    } else {
10348                        offset = this.offset();
10349
10350                        // Account for the *real* offset parent, which can be the document or its root element
10351                        // when a statically positioned element is identified
10352                        doc = elem.ownerDocument;
10353                        offsetParent = elem.offsetParent || doc.documentElement;
10354                        while (offsetParent &&
10355                        (offsetParent === doc.body || offsetParent === doc.documentElement) &&
10356                        jQuery.css(offsetParent, "position") === "static") {
10357
10358                            offsetParent = offsetParent.parentNode;
10359                        }
10360                        if (offsetParent && offsetParent !== elem && offsetParent.
vendor: 4,370 bytes, lines 10360-10454
10360nodeType === 1) {
10361
10362                            // Incorporate borders into its offset, since they are outside its content origin
10363                            parentOffset = jQuery(offsetParent).offset();
10364                            parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
10365                            parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
10366                        }
10367                    }
10368
10369                    // Subtract parent offsets and element margins
10370                    return {
10371                        top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
10372                        left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
10373                    };
10374                },
10375
10376                // This method will return documentElement in the following cases:
10377                // 1) For the element inside the iframe without offsetParent, this method will return
10378                //    documentElement of the parent window
10379                // 2) For the hidden or detached element
10380                // 3) For body or html element, i.e. in case of the html node - it will return itself
10381                //
10382                // but those exceptions were never presented as a real life use-cases
10383                // and might be considered as more preferable results.
10384                //
10385                // This logic, however, is not guaranteed and can change at any point in the future
10386                offsetParent: function () {
10387                    return this.map(function () {
10388                        var offsetParent = this.offsetParent;
10389
10390                        while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
10391                            offsetParent = offsetParent.offsetParent;
10392                        }
10393
10394                        return offsetParent || documentElement;
10395                    });
10396                }
10397            });
10398
10399// Create scrollLeft and scrollTop methods
10400            jQuery.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (method, prop) {
10401                var top = "pageYOffset" === prop;
10402
10403                jQuery.fn[method] = function (val) {
10404                    return access(this, function (elem, method, val) {
10405
10406                        // Coalesce documents and windows
10407                        var win;
10408                        if (isWindow(elem)) {
10409                            win = elem;
10410                        } else if (elem.nodeType === 9) {
10411                            win = elem.defaultView;
10412                        }
10413
10414                        if (val === undefined) {
10415                            return win ? win[prop] : elem[method];
10416                        }
10417
10418                        if (win) {
10419                            win.scrollTo(
10420                                !top ? val : win.pageXOffset,
10421                                top ? val : win.pageYOffset
10422                            );
10423
10424                        } else {
10425                            elem[method] = val;
10426                        }
10427                    }, method, val, arguments.length);
10428                };
10429            });
10430
10431// Support: Safari <=7 - 9.1, Chrome <=37 - 49
10432// Add the top/left cssHooks using jQuery.fn.position
10433// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
10434// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
10435// getComputedStyle returns percent when specified for top/left/bottom/right;
10436// rather than make the css module depend on the offset module, just check for it here
10437            jQuery.each(["top", "left"], function (i, prop) {
10438                jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition,
10439                    function (elem, computed) {
10440                        if (computed) {
10441                            computed = curCSS(elem, prop);
10442
10443                            // If curCSS returns percentage, fallback to offset
10444                            return rnumnonpx.test(computed) ?
10445                                jQuery(elem).position()[prop] + "px" :
10446                                computed;
10447                        }
10448                    }
10449                );
10450            });
10451
10452
10453// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10454            jQuery.each({Height: "height", Width: "width"}, function (name, type) {
vendor: 7,058 bytes, lines 10455-10614
10455                jQuery.each({padding: "inner" + name, content: type, "": "outer" + name},
10456                    function (defaultExtra, funcName) {
10457
10458                        // Margin is only for outerHeight, outerWidth
10459                        jQuery.fn[funcName] = function (margin, value) {
10460                            var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
10461                                extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
10462
10463                            return access(this, function (elem, type, value) {
10464                                var doc;
10465
10466                                if (isWindow(elem)) {
10467
10468                                    // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
10469                                    return funcName.indexOf("outer") === 0 ?
10470                                        elem["inner" + name] :
10471                                        elem.document.documentElement["client" + name];
10472                                }
10473
10474                                // Get document width or height
10475                                if (elem.nodeType === 9) {
10476                                    doc = elem.documentElement;
10477
10478                                    // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
10479                                    // whichever is greatest
10480                                    return Math.max(
10481                                        elem.body["scroll" + name], doc["scroll" + name],
10482                                        elem.body["offset" + name], doc["offset" + name],
10483                                        doc["client" + name]
10484                                    );
10485                                }
10486
10487                                return value === undefined ?
10488
10489                                    // Get width or height on the element, requesting but not forcing parseFloat
10490                                    jQuery.css(elem, type, extra) :
10491
10492                                    // Set width or height on the element
10493                                    jQuery.style(elem, type, value, extra);
10494                            }, type, chainable ? margin : undefined, chainable);
10495                        };
10496                    });
10497            });
10498
10499
10500            jQuery.each(("blur focus focusin focusout resize scroll click dblclick " +
10501                    "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
10502                    "change select submit keydown keypress keyup contextmenu").split(" "),
10503                function (i, name) {
10504
10505                    // Handle event binding
10506                    jQuery.fn[name] = function (data, fn) {
10507                        return arguments.length > 0 ?
10508                            this.on(name, null, data, fn) :
10509                            this.trigger(name);
10510                    };
10511                });
10512
10513            jQuery.fn.extend({
10514                hover: function (fnOver, fnOut) {
10515                    return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
10516                }
10517            });
10518
10519
10520            jQuery.fn.extend({
10521
10522                bind: function (types, data, fn) {
10523                    return this.on(types, null, data, fn);
10524                },
10525                unbind: function (types, fn) {
10526                    return this.off(types, null, fn);
10527                },
10528
10529                delegate: function (selector, types, data, fn) {
10530                    return this.on(types, selector, data, fn);
10531                },
10532                undelegate: function (selector, types, fn) {
10533
10534                    // ( namespace ) or ( selector, types [, fn] )
10535                    return arguments.length === 1 ?
10536                        this.off(selector, "**") :
10537                        this.off(types, selector || "**", fn);
10538                }
10539            });
10540
10541// Bind a function to a context, optionally partially applying any
10542// arguments.
10543// jQuery.proxy is deprecated to promote standards (specifically Function#bind)
10544// However, it is not slated for removal any time soon
10545            jQuery.proxy = function (fn, context) {
10546                var tmp, args, proxy;
10547
10548                if (typeof context === "string") {
10549                    tmp = fn[context];
10550                    context = fn;
10551                    fn = tmp;
10552                }
10553
10554                // Quick check to determine if target is callable, in the spec
10555                // this throws a TypeError, but we will just return undefined.
10556                if (!isFunction(fn)) {
10557                    return undefined;
10558                }
10559
10560                // Simulated bind
10561                args = slice.call(arguments, 2);
10562                proxy = function () {
10563                    return fn.apply(context || this, args.concat(slice.call(arguments)));
10564                };
10565
10566                // Set the guid of unique handler to the same of original handler, so it can be removed
10567                proxy.guid = fn.guid = fn.guid || jQuery.guid++;
10568
10569                return proxy;
10570            };
10571
10572            jQuery.holdReady = function (hold) {
10573                if (hold) {
10574                    jQuery.readyWait++;
10575                } else {
10576                    jQuery.ready(true);
10577                }
10578            };
10579            jQuery.isArray = Array.isArray;
10580            jQuery.parseJSON = JSON.parse;
10581            jQuery.nodeName = nodeName;
10582            jQuery.isFunction = isFunction;
10583            jQuery.isWindow = isWindow;
10584            jQuery.camelCase = camelCase;
10585            jQuery.type = toType;
10586
10587            jQuery.now = Date.now;
10588
10589            jQuery.isNumeric = function (obj) {
10590
10591                // As of jQuery 3.0, isNumeric is limited to
10592                // strings and numbers (primitives or objects)
10593                // that can be coerced to finite numbers (gh-2662)
10594                var type = jQuery.type(obj);
10595                return (type === "number" || type === "string") &&
10596
10597                    // parseFloat NaNs numeric-cast false positives ("")
10598                    // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
10599                    // subtraction forces infinities to NaN
10600                    !isNaN(obj - parseFloat(obj));
10601            };
10602
10603
10604// Register as a named AMD module, since jQuery can be concatenated with other
10605// files that may use define, but not via a proper concatenation script that
10606// understands anonymous AMD modules. A named AMD is safest and most robust
10607// way to register. Lowercase jquery is used because AMD module names are
10608// derived from file names, and jQuery is normally delivered in a lowercase
10609// file name. Do this after creating the global so that if an AMD module wants
10610// to call noConflict to hide this version of jQuery, it will work.
10611
10612// Note that for maximum portability, libraries that are not jQuery should
10613// declare themselves as anonymous modules, and avoid setting a global if an
10614// AMD loader is present. jQuery is a special case. For more information, see
10615// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
10616
10617            if (true) {
10618                !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
10619                    return jQuery;
10620                }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
10621                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
10622            }
10623
10624
10625            var
10626
10627                // Map over jQuery in case of overwrite
10628                _jQuery = window.jQuery,
10629
10630                // Map over the $ in case of overwrite
10631                _$ = window.$;
10632
10633            jQuery.noConflict = function (deep) {
10634                if (window.$ === jQuery) {
10635                    window.$ = _$;
10636                }
10637
10638                if (deep && window.jQuery === jQuery) {
10639                    window.jQuery = _jQuery;
10640                }
10641
10642                return jQuery;
10643            };
10644
10645// Expose jQuery and $ identifiers, even in AMD
10646// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
10647// and CommonJS for browser emulators (#13566)
10648            if (!noGlobal) {
10649                window.jQuery = window.$ = jQuery;
10650            }
10651
10652
10653            return jQuery;
10654        });
10655
10656
10657        /***/
10658    }),
10659    /* 4 */
10660    /***/ (function (module, exports, __webpack_require__) {
10661
10662        /* WEBPACK VAR INJECTION */
10663        (function (global) {
10664            /**!
10665             * @fileOverview Kickass library to create and place poppers near their reference elements.
10666             * @version 1.14.4
10667             * @license
10668             * Copyright (c) 2016 Federico Zivolo and contributors
10669             *
10670             * Permission is hereby granted, free of charge, to any person obtaining a copy
10671             * of this software and associated documentation files (the "Software"), to deal
10672             * in the Software without restriction, including without limitation the rights
10673             * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10674             * copies of the Software, and to permit persons to whom the Software is
10675             * furnished to do so, subject to the following conditions:
10676             *
10677             * The above copyright notice and this permission notice shall be included in all
10678             * copies or substantial portions of the Software.
10679             *
10680             * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10681             * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10682             * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10683             * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10684             * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10685             * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
10686             * SOFTWARE.
10687             */
10688            (function (global, factory) {
10689                true ? module.exports = factory() :
10690                    undefined;
10691            }(this, (function () {
10692                'use strict';
10693
10694                var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
10695
10696                var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
10697                var timeoutDuration = 0;
10698                for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
10699                    if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
10700                        timeoutDuration = 1;
10701                        break;
10702                    }
10703                }
10704
10705                function microtaskDebounce(fn) {
10706                    var called = false;
10707                    return function () {
10708                        if (called) {
10709                            return;
10710                        }
10711                        called = true;
10712                        window.Promise.resolve().then(function () {
10713                            called = false;
10714                            fn();
10715                        });
10716                    };
10717                }
10718
10719                function taskDebounce(fn) {
10720                    var scheduled = false;
vendor: 5,766 bytes, lines 10721-10863
10721                    return function () {
10722                        if (!scheduled) {
10723                            scheduled = true;
10724                            setTimeout(function () {
10725                                scheduled = false;
10726                                fn();
10727                            }, timeoutDuration);
10728                        }
10729                    };
10730                }
10731
10732                var supportsMicroTasks = isBrowser && window.Promise;
10733
10734                /**
10735                 * Create a debounced version of a method, that's asynchronously deferred
10736                 * but called in the minimum time possible.
10737                 *
10738                 * @method
10739                 * @memberof Popper.Utils
10740                 * @argument {Function} fn
10741                 * @returns {Function}
10742                 */
10743                var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
10744
10745                /**
10746                 * Check if the given variable is a function
10747                 * @method
10748                 * @memberof Popper.Utils
10749                 * @argument {Any} functionToCheck - variable to check
10750                 * @returns {Boolean} answer to: is a function?
10751                 */
10752                function isFunction(functionToCheck) {
10753                    var getType = {};
10754                    return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
10755                }
10756
10757                /**
10758                 * Get CSS computed property of the given element
10759                 * @method
10760                 * @memberof Popper.Utils
10761                 * @argument {Eement} element
10762                 * @argument {String} property
10763                 */
10764                function getStyleComputedProperty(element, property) {
10765                    if (element.nodeType !== 1) {
10766                        return [];
10767                    }
10768                    // NOTE: 1 DOM access here
10769                    var css = getComputedStyle(element, null);
10770                    return property ? css[property] : css;
10771                }
10772
10773                /**
10774                 * Returns the parentNode or the host of the element
10775                 * @method
10776                 * @memberof Popper.Utils
10777                 * @argument {Element} element
10778                 * @returns {Element} parent
10779                 */
10780                function getParentNode(element) {
10781                    if (element.nodeName === 'HTML') {
10782                        return element;
10783                    }
10784                    return element.parentNode || element.host;
10785                }
10786
10787                /**
10788                 * Returns the scrolling parent of the given element
10789                 * @method
10790                 * @memberof Popper.Utils
10791                 * @argument {Element} element
10792                 * @returns {Element} scroll parent
10793                 */
10794                function getScrollParent(element) {
10795                    // Return body, `getScroll` will take care to get the correct `scrollTop` from it
10796                    if (!element) {
10797                        return document.body;
10798                    }
10799
10800                    switch (element.nodeName) {
10801                        case 'HTML':
10802                        case 'BODY':
10803                            return element.ownerDocument.body;
10804                        case '#document':
10805                            return element.body;
10806                    }
10807
10808                    // Firefox want us to check `-x` and `-y` variations as well
10809
10810                    var _getStyleComputedProp = getStyleComputedProperty(element),
10811                        overflow = _getStyleComputedProp.overflow,
10812                        overflowX = _getStyleComputedProp.overflowX,
10813                        overflowY = _getStyleComputedProp.overflowY;
10814
10815                    if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
10816                        return element;
10817                    }
10818
10819                    return getScrollParent(getParentNode(element));
10820                }
10821
10822                var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
10823                var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
10824
10825                /**
10826                 * Determines if the browser is Internet Explorer
10827                 * @method
10828                 * @memberof Popper.Utils
10829                 * @param {Number} version to check
10830                 * @returns {Boolean} isIE
10831                 */
10832                function isIE(version) {
10833                    if (version === 11) {
10834                        return isIE11;
10835                    }
10836                    if (version === 10) {
10837                        return isIE10;
10838                    }
10839                    return isIE11 || isIE10;
10840                }
10841
10842                /**
10843                 * Returns the offset parent of the given element
10844                 * @method
10845                 * @memberof Popper.Utils
10846                 * @argument {Element} element
10847                 * @returns {Element} offset parent
10848                 */
10849                function getOffsetParent(element) {
10850                    if (!element) {
10851                        return document.documentElement;
10852                    }
10853
10854                    var noOffsetParent = isIE(10) ? document.body : null;
10855
10856                    // NOTE: 1 DOM access here
10857                    var offsetParent = element.offsetParent;
10858                    // Skip hidden elements which don't have an offsetParent
10859                    while (offsetParent === noOffsetParent && element.nextElementSibling) {
10860                        offsetParent = (element = element.nextElementSibling).offsetParent;
10861                    }
10862
10863                    var nodeName = offsetParent && offsetParent.
vendor: 5,337 bytes, lines 10863-10979
10863nodeName;
10864
10865                    if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
10866                        return element ? element.ownerDocument.documentElement : document.documentElement;
10867                    }
10868
10869                    // .offsetParent will return the closest TD or TABLE in case
10870                    // no offsetParent is present, I hate this job...
10871                    if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
10872                        return getOffsetParent(offsetParent);
10873                    }
10874
10875                    return offsetParent;
10876                }
10877
10878                function isOffsetContainer(element) {
10879                    var nodeName = element.nodeName;
10880
10881                    if (nodeName === 'BODY') {
10882                        return false;
10883                    }
10884                    return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
10885                }
10886
10887                /**
10888                 * Finds the root node (document, shadowDOM root) of the given element
10889                 * @method
10890                 * @memberof Popper.Utils
10891                 * @argument {Element} node
10892                 * @returns {Element} root node
10893                 */
10894                function getRoot(node) {
10895                    if (node.parentNode !== null) {
10896                        return getRoot(node.parentNode);
10897                    }
10898
10899                    return node;
10900                }
10901
10902                /**
10903                 * Finds the offset parent common to the two provided nodes
10904                 * @method
10905                 * @memberof Popper.Utils
10906                 * @argument {Element} element1
10907                 * @argument {Element} element2
10908                 * @returns {Element} common offset parent
10909                 */
10910                function findCommonOffsetParent(element1, element2) {
10911                    // This check is needed to avoid errors in case one of the elements isn't defined for any reason
10912                    if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
10913                        return document.documentElement;
10914                    }
10915
10916                    // Here we make sure to give as "start" the element that comes first in the DOM
10917                    var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
10918                    var start = order ? element1 : element2;
10919                    var end = order ? element2 : element1;
10920
10921                    // Get common ancestor container
10922                    var range = document.createRange();
10923                    range.setStart(start, 0);
10924                    range.setEnd(end, 0);
10925                    var commonAncestorContainer = range.commonAncestorContainer;
10926
10927                    // Both nodes are inside #document
10928
10929                    if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
10930                        if (isOffsetContainer(commonAncestorContainer)) {
10931                            return commonAncestorContainer;
10932                        }
10933
10934                        return getOffsetParent(commonAncestorContainer);
10935                    }
10936
10937                    // one of the nodes is inside shadowDOM, find which one
10938                    var element1root = getRoot(element1);
10939                    if (element1root.host) {
10940                        return findCommonOffsetParent(element1root.host, element2);
10941                    } else {
10942                        return findCommonOffsetParent(element1, getRoot(element2).host);
10943                    }
10944                }
10945
10946                /**
10947                 * Gets the scroll value of the given element in the given side (top and left)
10948                 * @method
10949                 * @memberof Popper.Utils
10950                 * @argument {Element} element
10951                 * @argument {String} side `top` or `left`
10952                 * @returns {number} amount of scrolled pixels
10953                 */
10954                function getScroll(element) {
10955                    var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
10956
10957                    var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
10958                    var nodeName = element.nodeName;
10959
10960                    if (nodeName === 'BODY' || nodeName === 'HTML') {
10961                        var html = element.ownerDocument.documentElement;
10962                        var scrollingElement = element.ownerDocument.scrollingElement || html;
10963                        return scrollingElement[upperSide];
10964                    }
10965
10966                    return element[upperSide];
10967                }
10968
10969                /*
10970 * Sum or subtract the element scroll values (left and top) from a given rect object
10971 * @method
10972 * @memberof Popper.Utils
10973 * @param {Object} rect - Rect object you want to change
10974 * @param {HTMLElement} element - The element from the function reads the scroll values
10975 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
10976 * @return {Object} rect - The modifier rect object
10977 */
10978                function includeScroll(rect, element) {
10979                    var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
vendor: 10,451 bytes, lines 10980-11200
10980
10981                    var scrollTop = getScroll(element, 'top');
10982                    var scrollLeft = getScroll(element, 'left');
10983                    var modifier = subtract ? -1 : 1;
10984                    rect.top += scrollTop * modifier;
10985                    rect.bottom += scrollTop * modifier;
10986                    rect.left += scrollLeft * modifier;
10987                    rect.right += scrollLeft * modifier;
10988                    return rect;
10989                }
10990
10991                /*
10992 * Helper to detect borders of a given element
10993 * @method
10994 * @memberof Popper.Utils
10995 * @param {CSSStyleDeclaration} styles
10996 * Result of `getStyleComputedProperty` on the given element
10997 * @param {String} axis - `x` or `y`
10998 * @return {number} borders - The borders size of the given axis
10999 */
11000
11001                function getBordersSize(styles, axis) {
11002                    var sideA = axis === 'x' ? 'Left' : 'Top';
11003                    var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
11004
11005                    return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
11006                }
11007
11008                function getSize(axis, body, html, computedStyle) {
11009                    return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
11010                }
11011
11012                function getWindowSizes(document) {
11013                    var body = document.body;
11014                    var html = document.documentElement;
11015                    var computedStyle = isIE(10) && getComputedStyle(html);
11016
11017                    return {
11018                        height: getSize('Height', body, html, computedStyle),
11019                        width: getSize('Width', body, html, computedStyle)
11020                    };
11021                }
11022
11023                var classCallCheck = function (instance, Constructor) {
11024                    if (!(instance instanceof Constructor)) {
11025                        throw new TypeError("Cannot call a class as a function");
11026                    }
11027                };
11028
11029                var createClass = function () {
11030                    function defineProperties(target, props) {
11031                        for (var i = 0; i < props.length; i++) {
11032                            var descriptor = props[i];
11033                            descriptor.enumerable = descriptor.enumerable || false;
11034                            descriptor.configurable = true;
11035                            if ("value" in descriptor) descriptor.writable = true;
11036                            Object.defineProperty(target, descriptor.key, descriptor);
11037                        }
11038                    }
11039
11040                    return function (Constructor, protoProps, staticProps) {
11041                        if (protoProps) defineProperties(Constructor.prototype, protoProps);
11042                        if (staticProps) defineProperties(Constructor, staticProps);
11043                        return Constructor;
11044                    };
11045                }();
11046
11047
11048                var defineProperty = function (obj, key, value) {
11049                    if (key in obj) {
11050                        Object.defineProperty(obj, key, {
11051                            value: value,
11052                            enumerable: true,
11053                            configurable: true,
11054                            writable: true
11055                        });
11056                    } else {
11057                        obj[key] = value;
11058                    }
11059
11060                    return obj;
11061                };
11062
11063                var _extends = Object.assign || function (target) {
11064                    for (var i = 1; i < arguments.length; i++) {
11065                        var source = arguments[i];
11066
11067                        for (var key in source) {
11068                            if (Object.prototype.hasOwnProperty.call(source, key)) {
11069                                target[key] = source[key];
11070                            }
11071                        }
11072                    }
11073
11074                    return target;
11075                };
11076
11077                /**
11078                 * Given element offsets, generate an output similar to getBoundingClientRect
11079                 * @method
11080                 * @memberof Popper.Utils
11081                 * @argument {Object} offsets
11082                 * @returns {Object} ClientRect like output
11083                 */
11084                function getClientRect(offsets) {
11085                    return _extends({}, offsets, {
11086                        right: offsets.left + offsets.width,
11087                        bottom: offsets.top + offsets.height
11088                    });
11089                }
11090
11091                /**
11092                 * Get bounding client rect of given element
11093                 * @method
11094                 * @memberof Popper.Utils
11095                 * @param {HTMLElement} element
11096                 * @return {Object} client rect
11097                 */
11098                function getBoundingClientRect(element) {
11099                    var rect = {};
11100
11101                    // considered in DOM in some circumstances...
11102                    // This isn't reproducible in IE10 compatibility mode of IE11
11103                    try {
11104                        if (isIE(10)) {
11105                            rect = element.getBoundingClientRect();
11106                            var scrollTop = getScroll(element, 'top');
11107                            var scrollLeft = getScroll(element, 'left');
11108                            rect.top += scrollTop;
11109                            rect.left += scrollLeft;
11110                            rect.bottom += scrollTop;
11111                            rect.right += scrollLeft;
11112                        } else {
11113                            rect = element.getBoundingClientRect();
11114                        }
11115                    } catch (e) {
11116                    }
11117
11118                    var result = {
11119                        left: rect.left,
11120                        top: rect.top,
11121                        width: rect.right - rect.left,
11122                        height: rect.bottom - rect.top
11123                    };
11124
11125                    // subtract scrollbar size from sizes
11126                    var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
11127                    var width = sizes.width || element.clientWidth || result.right - result.left;
11128                    var height = sizes.height || element.clientHeight || result.bottom - result.top;
11129
11130                    var horizScrollbar = element.offsetWidth - width;
11131                    var vertScrollbar = element.offsetHeight - height;
11132
11133                    // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
11134                    // we make this check conditional for performance reasons
11135                    if (horizScrollbar || vertScrollbar) {
11136                        var styles = getStyleComputedProperty(element);
11137                        horizScrollbar -= getBordersSize(styles, 'x');
11138                        vertScrollbar -= getBordersSize(styles, 'y');
11139
11140                        result.width -= horizScrollbar;
11141                        result.height -= vertScrollbar;
11142                    }
11143
11144                    return getClientRect(result);
11145                }
11146
11147                function getOffsetRectRelativeToArbitraryNode(children, parent) {
11148                    var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
11149
11150                    var isIE10 = isIE(10);
11151                    var isHTML = parent.nodeName === 'HTML';
11152                    var childrenRect = getBoundingClientRect(children);
11153                    var parentRect = getBoundingClientRect(parent);
11154                    var scrollParent = getScrollParent(children);
11155
11156                    var styles = getStyleComputedProperty(parent);
11157                    var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
11158                    var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
11159
11160                    // In cases where the parent is fixed, we must ignore negative scroll in offset calc
11161                    if (fixedPosition && isHTML) {
11162                        parentRect.top = Math.max(parentRect.top, 0);
11163                        parentRect.left = Math.max(parentRect.left, 0);
11164                    }
11165                    var offsets = getClientRect({
11166                        top: childrenRect.top - parentRect.top - borderTopWidth,
11167                        left: childrenRect.left - parentRect.left - borderLeftWidth,
11168                        width: childrenRect.width,
11169                        height: childrenRect.height
11170                    });
11171                    offsets.marginTop = 0;
11172                    offsets.marginLeft = 0;
11173
11174                    // Subtract margins of documentElement in case it's being used as parent
11175                    // we do this only on HTML because it's the only element that behaves
11176                    // differently when margins are applied to it. The margins are included in
11177                    // the box of the documentElement, in the other cases not.
11178                    if (!isIE10 && isHTML) {
11179                        var marginTop = parseFloat(styles.marginTop, 10);
11180                        var marginLeft = parseFloat(styles.marginLeft, 10);
11181
11182                        offsets.top -= borderTopWidth - marginTop;
11183                        offsets.bottom -= borderTopWidth - marginTop;
11184                        offsets.left -= borderLeftWidth - marginLeft;
11185                        offsets.right -= borderLeftWidth - marginLeft;
11186
11187                        // Attach marginTop and marginLeft because in some circumstances we may need them
11188                        offsets.marginTop = marginTop;
11189                        offsets.marginLeft = marginLeft;
11190                    }
11191
11192                    if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
11193                        offsets = includeScroll(offsets, parent);
11194                    }
11195
11196                    return offsets;
11197                }
11198
11199                function getViewportOffsetRectRelativeToArtbitraryNode(element) {
11200                    var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
vendor: 9,564 bytes, lines 11201-11399
11201
11202                    var html = element.ownerDocument.documentElement;
11203                    var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
11204                    var width = Math.max(html.clientWidth, window.innerWidth || 0);
11205                    var height = Math.max(html.clientHeight, window.innerHeight || 0);
11206
11207                    var scrollTop = !excludeScroll ? getScroll(html) : 0;
11208                    var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
11209
11210                    var offset = {
11211                        top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
11212                        left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
11213                        width: width,
11214                        height: height
11215                    };
11216
11217                    return getClientRect(offset);
11218                }
11219
11220                /**
11221                 * Check if the given element is fixed or is inside a fixed parent
11222                 * @method
11223                 * @memberof Popper.Utils
11224                 * @argument {Element} element
11225                 * @argument {Element} customContainer
11226                 * @returns {Boolean} answer to "isFixed?"
11227                 */
11228                function isFixed(element) {
11229                    var nodeName = element.nodeName;
11230                    if (nodeName === 'BODY' || nodeName === 'HTML') {
11231                        return false;
11232                    }
11233                    if (getStyleComputedProperty(element, 'position') === 'fixed') {
11234                        return true;
11235                    }
11236                    return isFixed(getParentNode(element));
11237                }
11238
11239                /**
11240                 * Finds the first parent of an element that has a transformed property defined
11241                 * @method
11242                 * @memberof Popper.Utils
11243                 * @argument {Element} element
11244                 * @returns {Element} first transformed parent or documentElement
11245                 */
11246
11247                function getFixedPositionOffsetParent(element) {
11248                    // This check is needed to avoid errors in case one of the elements isn't defined for any reason
11249                    if (!element || !element.parentElement || isIE()) {
11250                        return document.documentElement;
11251                    }
11252                    var el = element.parentElement;
11253                    while (el && getStyleComputedProperty(el, 'transform') === 'none') {
11254                        el = el.parentElement;
11255                    }
11256                    return el || document.documentElement;
11257                }
11258
11259                /**
11260                 * Computed the boundaries limits and return them
11261                 * @method
11262                 * @memberof Popper.Utils
11263                 * @param {HTMLElement} popper
11264                 * @param {HTMLElement} reference
11265                 * @param {number} padding
11266                 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
11267                 * @param {Boolean} fixedPosition - Is in fixed position mode
11268                 * @returns {Object} Coordinates of the boundaries
11269                 */
11270                function getBoundaries(popper, reference, padding, boundariesElement) {
11271                    var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
11272
11273                    // NOTE: 1 DOM access here
11274
11275                    var boundaries = {top: 0, left: 0};
11276                    var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
11277
11278                    // Handle viewport case
11279                    if (boundariesElement === 'viewport') {
11280                        boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
11281                    } else {
11282                        // Handle other cases based on DOM element used as boundaries
11283                        var boundariesNode = void 0;
11284                        if (boundariesElement === 'scrollParent') {
11285                            boundariesNode = getScrollParent(getParentNode(reference));
11286                            if (boundariesNode.nodeName === 'BODY') {
11287                                boundariesNode = popper.ownerDocument.documentElement;
11288                            }
11289                        } else if (boundariesElement === 'window') {
11290                            boundariesNode = popper.ownerDocument.documentElement;
11291                        } else {
11292                            boundariesNode = boundariesElement;
11293                        }
11294
11295                        var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
11296
11297                        // In case of HTML, we need a different computation
11298                        if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
11299                            var _getWindowSizes = getWindowSizes(popper.ownerDocument),
11300                                height = _getWindowSizes.height,
11301                                width = _getWindowSizes.width;
11302
11303                            boundaries.top += offsets.top - offsets.marginTop;
11304                            boundaries.bottom = height + offsets.top;
11305                            boundaries.left += offsets.left - offsets.marginLeft;
11306                            boundaries.right = width + offsets.left;
11307                        } else {
11308                            // for all the other DOM elements, this one is good
11309                            boundaries = offsets;
11310                        }
11311                    }
11312
11313                    // Add paddings
11314                    padding = padding || 0;
11315                    var isPaddingNumber = typeof padding === 'number';
11316                    boundaries.left += isPaddingNumber ? padding : padding.left || 0;
11317                    boundaries.top += isPaddingNumber ? padding : padding.top || 0;
11318                    boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
11319                    boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
11320
11321                    return boundaries;
11322                }
11323
11324                function getArea(_ref) {
11325                    var width = _ref.width,
11326                        height = _ref.height;
11327
11328                    return width * height;
11329                }
11330
11331                /**
11332                 * Utility used to transform the `auto` placement to the placement with more
11333                 * available space.
11334                 * @method
11335                 * @memberof Popper.Utils
11336                 * @argument {Object} data - The data object generated by update method
11337                 * @argument {Object} options - Modifiers configuration and options
11338                 * @returns {Object} The data object, properly modified
11339                 */
11340                function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
11341                    var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
11342
11343                    if (placement.indexOf('auto') === -1) {
11344                        return placement;
11345                    }
11346
11347                    var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
11348
11349                    var rects = {
11350                        top: {
11351                            width: boundaries.width,
11352                            height: refRect.top - boundaries.top
11353                        },
11354                        right: {
11355                            width: boundaries.right - refRect.right,
11356                            height: boundaries.height
11357                        },
11358                        bottom: {
11359                            width: boundaries.width,
11360                            height: boundaries.bottom - refRect.bottom
11361                        },
11362                        left: {
11363                            width: refRect.left - boundaries.left,
11364                            height: boundaries.height
11365                        }
11366                    };
11367
11368                    var sortedAreas = Object.keys(rects).map(function (key) {
11369                        return _extends({
11370                            key: key
11371                        }, rects[key], {
11372                            area: getArea(rects[key])
11373                        });
11374                    }).sort(function (a, b) {
11375                        return b.area - a.area;
11376                    });
11377
11378                    var filteredAreas = sortedAreas.filter(function (_ref2) {
11379                        var width = _ref2.width,
11380                            height = _ref2.height;
11381                        return width >= popper.clientWidth && height >= popper.clientHeight;
11382                    });
11383
11384                    var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
11385
11386                    var variation = placement.split('-')[1];
11387
11388                    return computedPlacement + (variation ? '-' + variation : '');
11389                }
11390
11391                /**
11392                 * Get offsets to the reference element
11393                 * @method
11394                 * @memberof Popper.Utils
11395                 * @param {Object} state
11396                 * @param {Element} popper - the popper element
11397                 * @param {Element} reference - the reference element (the popper will be relative to this)
11398                 * @param {Element} fixedPosition - is in fixed position mode
11399                 * @returns {Object}
vendor: 6,369 bytes, lines 11399-11534
11399 An object containing the offsets which will be applied to the popper
11400                 */
11401                function getReferenceOffsets(state, popper, reference) {
11402                    var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
11403
11404                    var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
11405                    return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
11406                }
11407
11408                /**
11409                 * Get the outer sizes of the given element (offset size + margins)
11410                 * @method
11411                 * @memberof Popper.Utils
11412                 * @argument {Element} element
11413                 * @returns {Object} object containing width and height properties
11414                 */
11415                function getOuterSizes(element) {
11416                    var styles = getComputedStyle(element);
11417                    var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
11418                    var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
11419                    var result = {
11420                        width: element.offsetWidth + y,
11421                        height: element.offsetHeight + x
11422                    };
11423                    return result;
11424                }
11425
11426                /**
11427                 * Get the opposite placement of the given one
11428                 * @method
11429                 * @memberof Popper.Utils
11430                 * @argument {String} placement
11431                 * @returns {String} flipped placement
11432                 */
11433                function getOppositePlacement(placement) {
11434                    var hash = {left: 'right', right: 'left', bottom: 'top', top: 'bottom'};
11435                    return placement.replace(/left|right|bottom|top/g, function (matched) {
11436                        return hash[matched];
11437                    });
11438                }
11439
11440                /**
11441                 * Get offsets to the popper
11442                 * @method
11443                 * @memberof Popper.Utils
11444                 * @param {Object} position - CSS position the Popper will get applied
11445                 * @param {HTMLElement} popper - the popper element
11446                 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
11447                 * @param {String} placement - one of the valid placement options
11448                 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
11449                 */
11450                function getPopperOffsets(popper, referenceOffsets, placement) {
11451                    placement = placement.split('-')[0];
11452
11453                    // Get popper node sizes
11454                    var popperRect = getOuterSizes(popper);
11455
11456                    // Add position, width and height to our offsets object
11457                    var popperOffsets = {
11458                        width: popperRect.width,
11459                        height: popperRect.height
11460                    };
11461
11462                    // depending by the popper placement we have to compute its offsets slightly differently
11463                    var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
11464                    var mainSide = isHoriz ? 'top' : 'left';
11465                    var secondarySide = isHoriz ? 'left' : 'top';
11466                    var measurement = isHoriz ? 'height' : 'width';
11467                    var secondaryMeasurement = !isHoriz ? 'height' : 'width';
11468
11469                    popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
11470                    if (placement === secondarySide) {
11471                        popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
11472                    } else {
11473                        popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
11474                    }
11475
11476                    return popperOffsets;
11477                }
11478
11479                /**
11480                 * Mimics the `find` method of Array
11481                 * @method
11482                 * @memberof Popper.Utils
11483                 * @argument {Array} arr
11484                 * @argument prop
11485                 * @argument value
11486                 * @returns index or -1
11487                 */
11488                function find(arr, check) {
11489                    // use native find if supported
11490                    if (Array.prototype.find) {
11491                        return arr.find(check);
11492                    }
11493
11494                    // use `filter` to obtain the same behavior of `find`
11495                    return arr.filter(check)[0];
11496                }
11497
11498                /**
11499                 * Return the index of the matching object
11500                 * @method
11501                 * @memberof Popper.Utils
11502                 * @argument {Array} arr
11503                 * @argument prop
11504                 * @argument value
11505                 * @returns index or -1
11506                 */
11507                function findIndex(arr, prop, value) {
11508                    // use native findIndex if supported
11509                    if (Array.prototype.findIndex) {
11510                        return arr.findIndex(function (cur) {
11511                            return cur[prop] === value;
11512                        });
11513                    }
11514
11515                    // use `find` + `indexOf` if `findIndex` isn't supported
11516                    var match = find(arr, function (obj) {
11517                        return obj[prop] === value;
11518                    });
11519                    return arr.indexOf(match);
11520                }
11521
11522                /**
11523                 * Loop trough the list of modifiers and run them in order,
11524                 * each of them will then edit the data object.
11525                 * @method
11526                 * @memberof Popper.Utils
11527                 * @param {dataObject} data
11528                 * @param {Array} modifiers
11529                 * @param {String} ends - Optional modifier name used as stopper
11530                 * @returns {dataObject}
11531                 */
11532                function runModifiers(modifiers, data, ends) {
11533                    var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
11534
vendor: 22,400 bytes, lines 11535-11990
11535                    modifiersToRun.forEach(function (modifier) {
11536                        if (modifier['function']) {
11537                            // eslint-disable-line dot-notation
11538                            console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
11539                        }
11540                        var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
11541                        if (modifier.enabled && isFunction(fn)) {
11542                            // Add properties to offsets to make them a complete clientRect object
11543                            // we do this before each modifier to make sure the previous one doesn't
11544                            // mess with these values
11545                            data.offsets.popper = getClientRect(data.offsets.popper);
11546                            data.offsets.reference = getClientRect(data.offsets.reference);
11547
11548                            data = fn(data, modifier);
11549                        }
11550                    });
11551
11552                    return data;
11553                }
11554
11555                /**
11556                 * Updates the position of the popper, computing the new offsets and applying
11557                 * the new style.<br />
11558                 * Prefer `scheduleUpdate` over `update` because of performance reasons.
11559                 * @method
11560                 * @memberof Popper
11561                 */
11562                function update() {
11563                    // if popper is destroyed, don't perform any further update
11564                    if (this.state.isDestroyed) {
11565                        return;
11566                    }
11567
11568                    var data = {
11569                        instance: this,
11570                        styles: {},
11571                        arrowStyles: {},
11572                        attributes: {},
11573                        flipped: false,
11574                        offsets: {}
11575                    };
11576
11577                    // compute reference element offsets
11578                    data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
11579
11580                    // compute auto placement, store placement inside the data object,
11581                    // modifiers will be able to edit `placement` if needed
11582                    // and refer to originalPlacement to know the original value
11583                    data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
11584
11585                    // store the computed placement inside `originalPlacement`
11586                    data.originalPlacement = data.placement;
11587
11588                    data.positionFixed = this.options.positionFixed;
11589
11590                    // compute the popper offsets
11591                    data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
11592
11593                    data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
11594
11595                    // run the modifiers
11596                    data = runModifiers(this.modifiers, data);
11597
11598                    // the first `update` will call `onCreate` callback
11599                    // the other ones will call `onUpdate` callback
11600                    if (!this.state.isCreated) {
11601                        this.state.isCreated = true;
11602                        this.options.onCreate(data);
11603                    } else {
11604                        this.options.onUpdate(data);
11605                    }
11606                }
11607
11608                /**
11609                 * Helper used to know if the given modifier is enabled.
11610                 * @method
11611                 * @memberof Popper.Utils
11612                 * @returns {Boolean}
11613                 */
11614                function isModifierEnabled(modifiers, modifierName) {
11615                    return modifiers.some(function (_ref) {
11616                        var name = _ref.name,
11617                            enabled = _ref.enabled;
11618                        return enabled && name === modifierName;
11619                    });
11620                }
11621
11622                /**
11623                 * Get the prefixed supported property name
11624                 * @method
11625                 * @memberof Popper.Utils
11626                 * @argument {String} property (camelCase)
11627                 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
11628                 */
11629                function getSupportedPropertyName(property) {
11630                    var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
11631                    var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
11632
11633                    for (var i = 0; i < prefixes.length; i++) {
11634                        var prefix = prefixes[i];
11635                        var toCheck = prefix ? '' + prefix + upperProp : property;
11636                        if (typeof document.body.style[toCheck] !== 'undefined') {
11637                            return toCheck;
11638                        }
11639                    }
11640                    return null;
11641                }
11642
11643                /**
11644                 * Destroys the popper.
11645                 * @method
11646                 * @memberof Popper
11647                 */
11648                function destroy() {
11649                    this.state.isDestroyed = true;
11650
11651                    // touch DOM only if `applyStyle` modifier is enabled
11652                    if (isModifierEnabled(this.modifiers, 'applyStyle')) {
11653                        this.popper.removeAttribute('x-placement');
11654                        this.popper.style.position = '';
11655                        this.popper.style.top = '';
11656                        this.popper.style.left = '';
11657                        this.popper.style.right = '';
11658                        this.popper.style.bottom = '';
11659                        this.popper.style.willChange = '';
11660                        this.popper.style[getSupportedPropertyName('transform')] = '';
11661                    }
11662
11663                    this.disableEventListeners();
11664
11665                    // remove the popper if user explicity asked for the deletion on destroy
11666                    // do not use `remove` because IE11 doesn't support it
11667                    if (this.options.removeOnDestroy) {
11668                        this.popper.parentNode.removeChild(this.popper);
11669                    }
11670                    return this;
11671                }
11672
11673                /**
11674                 * Get the window associated with the element
11675                 * @argument {Element} element
11676                 * @returns {Window}
11677                 */
11678                function getWindow(element) {
11679                    var ownerDocument = element.ownerDocument;
11680                    return ownerDocument ? ownerDocument.defaultView : window;
11681                }
11682
11683                function attachToScrollParents(scrollParent, event, callback, scrollParents) {
11684                    var isBody = scrollParent.nodeName === 'BODY';
11685                    var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
11686                    target.addEventListener(event, callback, {passive: true});
11687
11688                    if (!isBody) {
11689                        attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
11690                    }
11691                    scrollParents.push(target);
11692                }
11693
11694                /**
11695                 * Setup needed event listeners used to update the popper position
11696                 * @method
11697                 * @memberof Popper.Utils
11698                 * @private
11699                 */
11700                function setupEventListeners(reference, options, state, updateBound) {
11701                    // Resize event listener on window
11702                    state.updateBound = updateBound;
11703                    getWindow(reference).addEventListener('resize', state.updateBound, {passive: true});
11704
11705                    // Scroll event listener on scroll parents
11706                    var scrollElement = getScrollParent(reference);
11707                    attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
11708                    state.scrollElement = scrollElement;
11709                    state.eventsEnabled = true;
11710
11711                    return state;
11712                }
11713
11714                /**
11715                 * It will add resize/scroll events and start recalculating
11716                 * position of the popper element when they are triggered.
11717                 * @method
11718                 * @memberof Popper
11719                 */
11720                function enableEventListeners() {
11721                    if (!this.state.eventsEnabled) {
11722                        this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
11723                    }
11724                }
11725
11726                /**
11727                 * Remove event listeners used to update the popper position
11728                 * @method
11729                 * @memberof Popper.Utils
11730                 * @private
11731                 */
11732                function removeEventListeners(reference, state) {
11733                    // Remove resize event listener on window
11734                    getWindow(reference).removeEventListener('resize', state.updateBound);
11735
11736                    // Remove scroll event listener on scroll parents
11737                    state.scrollParents.forEach(function (target) {
11738                        target.removeEventListener('scroll', state.updateBound);
11739                    });
11740
11741                    // Reset state
11742                    state.updateBound = null;
11743                    state.scrollParents = [];
11744                    state.scrollElement = null;
11745                    state.eventsEnabled = false;
11746                    return state;
11747                }
11748
11749                /**
11750                 * It will remove resize/scroll events and won't recalculate popper position
11751                 * when they are triggered. It also won't trigger `onUpdate` callback anymore,
11752                 * unless you call `update` method manually.
11753                 * @method
11754                 * @memberof Popper
11755                 */
11756                function disableEventListeners() {
11757                    if (this.state.eventsEnabled) {
11758                        cancelAnimationFrame(this.scheduleUpdate);
11759                        this.state = removeEventListeners(this.reference, this.state);
11760                    }
11761                }
11762
11763                /**
11764                 * Tells if a given input is a number
11765                 * @method
11766                 * @memberof Popper.Utils
11767                 * @param {*} input to check
11768                 * @return {Boolean}
11769                 */
11770                function isNumeric(n) {
11771                    return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
11772                }
11773
11774                /**
11775                 * Set the style to the given popper
11776                 * @method
11777                 * @memberof Popper.Utils
11778                 * @argument {Element} element - Element to apply the style to
11779                 * @argument {Object} styles
11780                 * Object with a list of properties and values which will be applied to the element
11781                 */
11782                function setStyles(element, styles) {
11783                    Object.keys(styles).forEach(function (prop) {
11784                        var unit = '';
11785                        // add unit if the value is numeric and is one of the following
11786                        if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
11787                            unit = 'px';
11788                        }
11789                        element.style[prop] = styles[prop] + unit;
11790                    });
11791                }
11792
11793                /**
11794                 * Set the attributes to the given popper
11795                 * @method
11796                 * @memberof Popper.Utils
11797                 * @argument {Element} element - Element to apply the attributes to
11798                 * @argument {Object} styles
11799                 * Object with a list of properties and values which will be applied to the element
11800                 */
11801                function setAttributes(element, attributes) {
11802                    Object.keys(attributes).forEach(function (prop) {
11803                        var value = attributes[prop];
11804                        if (value !== false) {
11805                            element.setAttribute(prop, attributes[prop]);
11806                        } else {
11807                            element.removeAttribute(prop);
11808                        }
11809                    });
11810                }
11811
11812                /**
11813                 * @function
11814                 * @memberof Modifiers
11815                 * @argument {Object} data - The data object generated by `update` method
11816                 * @argument {Object} data.styles - List of style properties - values to apply to popper element
11817                 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
11818                 * @argument {Object} options - Modifiers configuration and options
11819                 * @returns {Object} The same data object
11820                 */
11821                function applyStyle(data) {
11822                    // any property present in `data.styles` will be applied to the popper,
11823                    // in this way we can make the 3rd party modifiers add custom styles to it
11824                    // Be aware, modifiers could override the properties defined in the previous
11825                    // lines of this modifier!
11826                    setStyles(data.instance.popper, data.styles);
11827
11828                    // any property present in `data.attributes` will be applied to the popper,
11829                    // they will be set as HTML attributes of the element
11830                    setAttributes(data.instance.popper, data.attributes);
11831
11832                    // if arrowElement is defined and arrowStyles has some properties
11833                    if (data.arrowElement && Object.keys(data.arrowStyles).length) {
11834                        setStyles(data.arrowElement, data.arrowStyles);
11835                    }
11836
11837                    return data;
11838                }
11839
11840                /**
11841                 * Set the x-placement attribute before everything else because it could be used
11842                 * to add margins to the popper margins needs to be calculated to get the
11843                 * correct popper offsets.
11844                 * @method
11845                 * @memberof Popper.modifiers
11846                 * @param {HTMLElement} reference - The reference element used to position the popper
11847                 * @param {HTMLElement} popper - The HTML element used as popper
11848                 * @param {Object} options - Popper.js options
11849                 */
11850                function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
11851                    // compute reference element offsets
11852                    var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
11853
11854                    // compute auto placement, store placement inside the data object,
11855                    // modifiers will be able to edit `placement` if needed
11856                    // and refer to originalPlacement to know the original value
11857                    var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
11858
11859                    popper.setAttribute('x-placement', placement);
11860
11861                    // Apply `position` to popper before anything else because
11862                    // without the position applied we can't guarantee correct computations
11863                    setStyles(popper, {position: options.positionFixed ? 'fixed' : 'absolute'});
11864
11865                    return options;
11866                }
11867
11868                /**
11869                 * @function
11870                 * @memberof Modifiers
11871                 * @argument {Object} data - The data object generated by `update` method
11872                 * @argument {Object} options - Modifiers configuration and options
11873                 * @returns {Object} The data object, properly modified
11874                 */
11875                function computeStyle(data, options) {
11876                    var x = options.x,
11877                        y = options.y;
11878                    var popper = data.offsets.popper;
11879
11880                    // Remove this legacy support in Popper.js v2
11881
11882                    var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
11883                        return modifier.name === 'applyStyle';
11884                    }).gpuAcceleration;
11885                    if (legacyGpuAccelerationOption !== undefined) {
11886                        console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
11887                    }
11888                    var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
11889
11890                    var offsetParent = getOffsetParent(data.instance.popper);
11891                    var offsetParentRect = getBoundingClientRect(offsetParent);
11892
11893                    // Styles
11894                    var styles = {
11895                        position: popper.position
11896                    };
11897
11898                    // Avoid blurry text by using full pixel integers.
11899                    // For pixel-perfect positioning, top/bottom prefers rounded
11900                    // values, while left/right prefers floored values.
11901                    var offsets = {
11902                        left: Math.floor(popper.left),
11903                        top: Math.round(popper.top),
11904                        bottom: Math.round(popper.bottom),
11905                        right: Math.floor(popper.right)
11906                    };
11907
11908                    var sideA = x === 'bottom' ? 'top' : 'bottom';
11909                    var sideB = y === 'right' ? 'left' : 'right';
11910
11911                    // if gpuAcceleration is set to `true` and transform is supported,
11912                    //  we use `translate3d` to apply the position to the popper we
11913                    // automatically use the supported prefixed version if needed
11914                    var prefixedProperty = getSupportedPropertyName('transform');
11915
11916                    // now, let's make a step back and look at this code closely (wtf?)
11917                    // If the content of the popper grows once it's been positioned, it
11918                    // may happen that the popper gets misplaced because of the new content
11919                    // overflowing its reference element
11920                    // To avoid this problem, we provide two options (x and y), which allow
11921                    // the consumer to define the offset origin.
11922                    // If we position a popper on top of a reference element, we can set
11923                    // `x` to `top` to make the popper grow towards its top instead of
11924                    // its bottom.
11925                    var left = void 0,
11926                        top = void 0;
11927                    if (sideA === 'bottom') {
11928                        // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
11929                        // and not the bottom of the html element
11930                        if (offsetParent.nodeName === 'HTML') {
11931                            top = -offsetParent.clientHeight + offsets.bottom;
11932                        } else {
11933                            top = -offsetParentRect.height + offsets.bottom;
11934                        }
11935                    } else {
11936                        top = offsets.top;
11937                    }
11938                    if (sideB === 'right') {
11939                        if (offsetParent.nodeName === 'HTML') {
11940                            left = -offsetParent.clientWidth + offsets.right;
11941                        } else {
11942                            left = -offsetParentRect.width + offsets.right;
11943                        }
11944                    } else {
11945                        left = offsets.left;
11946                    }
11947                    if (gpuAcceleration && prefixedProperty) {
11948                        styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
11949                        styles[sideA] = 0;
11950                        styles[sideB] = 0;
11951                        styles.willChange = 'transform';
11952                    } else {
11953                        // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
11954                        var invertTop = sideA === 'bottom' ? -1 : 1;
11955                        var invertLeft = sideB === 'right' ? -1 : 1;
11956                        styles[sideA] = top * invertTop;
11957                        styles[sideB] = left * invertLeft;
11958                        styles.willChange = sideA + ', ' + sideB;
11959                    }
11960
11961                    // Attributes
11962                    var attributes = {
11963                        'x-placement': data.placement
11964                    };
11965
11966                    // Update `data` attributes, styles and arrowStyles
11967                    data.attributes = _extends({}, attributes, data.attributes);
11968                    data.styles = _extends({}, styles, data.styles);
11969                    data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
11970
11971                    return data;
11972                }
11973
11974                /**
11975                 * Helper used to know if the given modifier depends from another one.<br />
11976                 * It checks if the needed modifier is listed and enabled.
11977                 * @method
11978                 * @memberof Popper.Utils
11979                 * @param {Array} modifiers - list of modifiers
11980                 * @param {String} requestingName - name of requesting modifier
11981                 * @param {String} requestedName - name of requested modifier
11982                 * @returns {Boolean}
11983                 */
11984                function isModifierRequired(modifiers, requestingName, requestedName) {
11985                    var requesting = find(modifiers, function (_ref) {
11986                        var name = _ref.name;
11987                        return name === requestingName;
11988                    });
11989
11990                    var isRequired = !!requesting && modifiers.some(function (modifier) {
vendor: 5,943 bytes, lines 11991-12110
11991                        return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
11992                    });
11993
11994                    if (!isRequired) {
11995                        var _requesting = '`' + requestingName + '`';
11996                        var requested = '`' + requestedName + '`';
11997                        console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
11998                    }
11999                    return isRequired;
12000                }
12001
12002                /**
12003                 * @function
12004                 * @memberof Modifiers
12005                 * @argument {Object} data - The data object generated by update method
12006                 * @argument {Object} options - Modifiers configuration and options
12007                 * @returns {Object} The data object, properly modified
12008                 */
12009                function arrow(data, options) {
12010                    var _data$offsets$arrow;
12011
12012                    // arrow depends on keepTogether in order to work
12013                    if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
12014                        return data;
12015                    }
12016
12017                    var arrowElement = options.element;
12018
12019                    // if arrowElement is a string, suppose it's a CSS selector
12020                    if (typeof arrowElement === 'string') {
12021                        arrowElement = data.instance.popper.querySelector(arrowElement);
12022
12023                        // if arrowElement is not found, don't run the modifier
12024                        if (!arrowElement) {
12025                            return data;
12026                        }
12027                    } else {
12028                        // if the arrowElement isn't a query selector we must check that the
12029                        // provided DOM node is child of its popper node
12030                        if (!data.instance.popper.contains(arrowElement)) {
12031                            console.warn('WARNING: `arrow.element` must be child of its popper element!');
12032                            return data;
12033                        }
12034                    }
12035
12036                    var placement = data.placement.split('-')[0];
12037                    var _data$offsets = data.offsets,
12038                        popper = _data$offsets.popper,
12039                        reference = _data$offsets.reference;
12040
12041                    var isVertical = ['left', 'right'].indexOf(placement) !== -1;
12042
12043                    var len = isVertical ? 'height' : 'width';
12044                    var sideCapitalized = isVertical ? 'Top' : 'Left';
12045                    var side = sideCapitalized.toLowerCase();
12046                    var altSide = isVertical ? 'left' : 'top';
12047                    var opSide = isVertical ? 'bottom' : 'right';
12048                    var arrowElementSize = getOuterSizes(arrowElement)[len];
12049
12050                    //
12051                    // extends keepTogether behavior making sure the popper and its
12052                    // reference have enough pixels in conjunction
12053                    //
12054
12055                    // top/left side
12056                    if (reference[opSide] - arrowElementSize < popper[side]) {
12057                        data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
12058                    }
12059                    // bottom/right side
12060                    if (reference[side] + arrowElementSize > popper[opSide]) {
12061                        data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
12062                    }
12063                    data.offsets.popper = getClientRect(data.offsets.popper);
12064
12065                    // compute center of the popper
12066                    var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
12067
12068                    // Compute the sideValue using the updated popper offsets
12069                    // take popper margin in account because we don't have this info available
12070                    var css = getStyleComputedProperty(data.instance.popper);
12071                    var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
12072                    var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
12073                    var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
12074
12075                    // prevent arrowElement from being placed not contiguously to its popper
12076                    sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
12077
12078                    data.arrowElement = arrowElement;
12079                    data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
12080
12081                    return data;
12082                }
12083
12084                /**
12085                 * Get the opposite placement variation of the given one
12086                 * @method
12087                 * @memberof Popper.Utils
12088                 * @argument {String} placement variation
12089                 * @returns {String} flipped placement variation
12090                 */
12091                function getOppositeVariation(variation) {
12092                    if (variation === 'end') {
12093                        return 'start';
12094                    } else if (variation === 'start') {
12095                        return 'end';
12096                    }
12097                    return variation;
12098                }
12099
12100                /**
12101                 * List of accepted placements to use as values of the `placement` option.<br />
12102                 * Valid placements are:
12103                 * - `auto`
12104                 * - `top`
12105                 * - `right`
12106                 * - `bottom`
12107                 * - `left`
12108                 *
12109                 * Each placement can have a variation from this list:
12110                 * - `-start`
12111                 * - `-end`
12112                 *
12113                 * Variations are interpreted easily if you think of them as the left to right
12114                 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
12115                 * is right.<br />
12116                 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
12117                 *
12118                 * Some valid examples are:
12119                 * - `top-end` (on top of reference, right aligned)
12120                 * - `right-start` (on right of reference, top aligned)
12121                 * - `bottom` (on bottom, centered)
12122                 * - `auto-end` (on the side with more space available, alignment depends by placement)
12123                 *
12124                 * @static
12125                 * @type {Array}
12126                 * @enum {String}
12127                 * @readonly
12128                 * @method placements
12129                 * @memberof Popper
12130                 */
12131                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'];
12132
12133// Get rid of `auto` `auto-start` and `auto-end`
12134                var validPlacements = placements.slice(3);
12135
12136                /**
12137                 * Given an initial placement, returns all the subsequent placements
12138                 * clockwise (or counter-clockwise).
12139                 *
12140                 * @method
12141                 * @memberof Popper.Utils
12142                 * @argument {String} placement - A valid placement (it accepts variations)
12143                 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
12144                 * @returns {Array} placements including their variations
12145                 */
12146                function clockwise(placement) {
12147                    var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
12148
12149                    var index = validPlacements.indexOf(placement);
12150                    var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
12151                    return counter ? arr.reverse() : arr;
12152                }
12153
12154                var BEHAVIORS = {
12155                    FLIP: 'flip',
12156                    CLOCKWISE: 'clockwise',
12157                    COUNTERCLOCKWISE: 'counterclockwise'
12158                };
12159
12160                /**
12161                 * @function
12162                 * @memberof Modifiers
12163                 * @argument {Object} data - The data object generated by update method
12164                 * @argument {Object} options - Modifiers configuration and options
12165                 * @returns {Object} The data object, properly modified
12166                 */
12167                function flip(data, options) {
12168                    // if `inner` modifier is enabled, we can't use the `flip` modifier
12169                    if (isModifierEnabled(data.instance.modifiers, 'inner')) {
12170                        return data;
12171                    }
12172
12173                    if (data.flipped && data.placement === data.originalPlacement) {
12174                        // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
12175                        return data;
12176                    }
12177
12178                    var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
12179
12180                    var placement = data.placement.split('-')[0];
12181                    var placementOpposite = getOppositePlacement(placement);
12182                    var variation = data.placement.split('-')[1] || '';
12183
12184                    var flipOrder = [];
12185
12186                    switch (options.behavior) {
12187                        case BEHAVIORS.FLIP:
12188                            flipOrder = [placement, placementOpposite];
12189                            break;
12190                        case BEHAVIORS.CLOCKWISE:
12191                            flipOrder = clockwise(placement);
12192                            break;
12193                        case BEHAVIORS.COUNTERCLOCKWISE:
12194                            flipOrder = clockwise(placement, true);
12195                            break;
12196                        default:
12197                            flipOrder = options.behavior;
12198                    }
12199
12200                    flipOrder.forEach(function (step, index) {
12201                        if (placement !== step || flipOrder.length === index + 1) {
12202                            return data;
12203                        }
12204
12205                        placement = data.placement.split('-')[0];
12206                        placementOpposite = getOppositePlacement(placement);
12207
12208                        var popperOffsets = data.offsets.popper;
12209                        var refOffsets = data.offsets.reference;
12210
12211                        // using floor because the reference offsets may contain decimals we are not going to consider here
vendor: 2,084 bytes, lines 12212-12239
12212                        var floor = Math.floor;
12213                        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);
12214
12215                        var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
12216                        var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
12217                        var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
12218                        var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
12219
12220                        var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
12221
12222                        // flip the variation if required
12223                        var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
12224                        var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
12225
12226                        if (overlapsRef || overflowsBoundaries || flippedVariation) {
12227                            // this boolean to detect any flip loop
12228                            data.flipped = true;
12229
12230                            if (overlapsRef || overflowsBoundaries) {
12231                                placement = flipOrder[index + 1];
12232                            }
12233
12234                            if (flippedVariation) {
12235                                variation = getOppositeVariation(variation);
12236                            }
12237
12238                            data.placement = placement + (variation ? '-' + variation : '');
12239
vendor: 21,953 bytes, lines 12240-12675
12240                            // this object contains `position`, we want to preserve it along with
12241                            // any additional property we may add in the future
12242                            data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
12243
12244                            data = runModifiers(data.instance.modifiers, data, 'flip');
12245                        }
12246                    });
12247                    return data;
12248                }
12249
12250                /**
12251                 * @function
12252                 * @memberof Modifiers
12253                 * @argument {Object} data - The data object generated by update method
12254                 * @argument {Object} options - Modifiers configuration and options
12255                 * @returns {Object} The data object, properly modified
12256                 */
12257                function keepTogether(data) {
12258                    var _data$offsets = data.offsets,
12259                        popper = _data$offsets.popper,
12260                        reference = _data$offsets.reference;
12261
12262                    var placement = data.placement.split('-')[0];
12263                    var floor = Math.floor;
12264                    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
12265                    var side = isVertical ? 'right' : 'bottom';
12266                    var opSide = isVertical ? 'left' : 'top';
12267                    var measurement = isVertical ? 'width' : 'height';
12268
12269                    if (popper[side] < floor(reference[opSide])) {
12270                        data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
12271                    }
12272                    if (popper[opSide] > floor(reference[side])) {
12273                        data.offsets.popper[opSide] = floor(reference[side]);
12274                    }
12275
12276                    return data;
12277                }
12278
12279                /**
12280                 * Converts a string containing value + unit into a px value number
12281                 * @function
12282                 * @memberof {modifiers~offset}
12283                 * @private
12284                 * @argument {String} str - Value + unit string
12285                 * @argument {String} measurement - `height` or `width`
12286                 * @argument {Object} popperOffsets
12287                 * @argument {Object} referenceOffsets
12288                 * @returns {Number|String}
12289                 * Value in pixels, or original string if no values were extracted
12290                 */
12291                function toValue(str, measurement, popperOffsets, referenceOffsets) {
12292                    // separate value from unit
12293                    var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
12294                    var value = +split[1];
12295                    var unit = split[2];
12296
12297                    // If it's not a number it's an operator, I guess
12298                    if (!value) {
12299                        return str;
12300                    }
12301
12302                    if (unit.indexOf('%') === 0) {
12303                        var element = void 0;
12304                        switch (unit) {
12305                            case '%p':
12306                                element = popperOffsets;
12307                                break;
12308                            case '%':
12309                            case '%r':
12310                            default:
12311                                element = referenceOffsets;
12312                        }
12313
12314                        var rect = getClientRect(element);
12315                        return rect[measurement] / 100 * value;
12316                    } else if (unit === 'vh' || unit === 'vw') {
12317                        // if is a vh or vw, we calculate the size based on the viewport
12318                        var size = void 0;
12319                        if (unit === 'vh') {
12320                            size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
12321                        } else {
12322                            size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
12323                        }
12324                        return size / 100 * value;
12325                    } else {
12326                        // if is an explicit pixel unit, we get rid of the unit and keep the value
12327                        // if is an implicit unit, it's px, and we return just the value
12328                        return value;
12329                    }
12330                }
12331
12332                /**
12333                 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
12334                 * @function
12335                 * @memberof {modifiers~offset}
12336                 * @private
12337                 * @argument {String} offset
12338                 * @argument {Object} popperOffsets
12339                 * @argument {Object} referenceOffsets
12340                 * @argument {String} basePlacement
12341                 * @returns {Array} a two cells array with x and y offsets in numbers
12342                 */
12343                function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
12344                    var offsets = [0, 0];
12345
12346                    // Use height if placement is left or right and index is 0 otherwise use width
12347                    // in this way the first offset will use an axis and the second one
12348                    // will use the other one
12349                    var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
12350
12351                    // Split the offset string to obtain a list of values and operands
12352                    // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
12353                    var fragments = offset.split(/(\+|\-)/).map(function (frag) {
12354                        return frag.trim();
12355                    });
12356
12357                    // Detect if the offset string contains a pair of values or a single one
12358                    // they could be separated by comma or space
12359                    var divider = fragments.indexOf(find(fragments, function (frag) {
12360                        return frag.search(/,|\s/) !== -1;
12361                    }));
12362
12363                    if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
12364                        console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
12365                    }
12366
12367                    // If divider is found, we divide the list of values and operands to divide
12368                    // them by ofset X and Y.
12369                    var splitRegex = /\s*,\s*|\s+/;
12370                    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];
12371
12372                    // Convert the values with units to absolute pixels to allow our computations
12373                    ops = ops.map(function (op, index) {
12374                        // Most of the units rely on the orientation of the popper
12375                        var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
12376                        var mergeWithPrevious = false;
12377                        return op
12378                            // This aggregates any `+` or `-` sign that aren't considered operators
12379                            // e.g.: 10 + +5 => [10, +, +5]
12380                            .reduce(function (a, b) {
12381                                if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
12382                                    a[a.length - 1] = b;
12383                                    mergeWithPrevious = true;
12384                                    return a;
12385                                } else if (mergeWithPrevious) {
12386                                    a[a.length - 1] += b;
12387                                    mergeWithPrevious = false;
12388                                    return a;
12389                                } else {
12390                                    return a.concat(b);
12391                                }
12392                            }, [])
12393                            // Here we convert the string values into number values (in px)
12394                            .map(function (str) {
12395                                return toValue(str, measurement, popperOffsets, referenceOffsets);
12396                            });
12397                    });
12398
12399                    // Loop trough the offsets arrays and execute the operations
12400                    ops.forEach(function (op, index) {
12401                        op.forEach(function (frag, index2) {
12402                            if (isNumeric(frag)) {
12403                                offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
12404                            }
12405                        });
12406                    });
12407                    return offsets;
12408                }
12409
12410                /**
12411                 * @function
12412                 * @memberof Modifiers
12413                 * @argument {Object} data - The data object generated by update method
12414                 * @argument {Object} options - Modifiers configuration and options
12415                 * @argument {Number|String} options.offset=0
12416                 * The offset value as described in the modifier description
12417                 * @returns {Object} The data object, properly modified
12418                 */
12419                function offset(data, _ref) {
12420                    var offset = _ref.offset;
12421                    var placement = data.placement,
12422                        _data$offsets = data.offsets,
12423                        popper = _data$offsets.popper,
12424                        reference = _data$offsets.reference;
12425
12426                    var basePlacement = placement.split('-')[0];
12427
12428                    var offsets = void 0;
12429                    if (isNumeric(+offset)) {
12430                        offsets = [+offset, 0];
12431                    } else {
12432                        offsets = parseOffset(offset, popper, reference, basePlacement);
12433                    }
12434
12435                    if (basePlacement === 'left') {
12436                        popper.top += offsets[0];
12437                        popper.left -= offsets[1];
12438                    } else if (basePlacement === 'right') {
12439                        popper.top += offsets[0];
12440                        popper.left += offsets[1];
12441                    } else if (basePlacement === 'top') {
12442                        popper.left += offsets[0];
12443                        popper.top -= offsets[1];
12444                    } else if (basePlacement === 'bottom') {
12445                        popper.left += offsets[0];
12446                        popper.top += offsets[1];
12447                    }
12448
12449                    data.popper = popper;
12450                    return data;
12451                }
12452
12453                /**
12454                 * @function
12455                 * @memberof Modifiers
12456                 * @argument {Object} data - The data object generated by `update` method
12457                 * @argument {Object} options - Modifiers configuration and options
12458                 * @returns {Object} The data object, properly modified
12459                 */
12460                function preventOverflow(data, options) {
12461                    var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
12462
12463                    // If offsetParent is the reference element, we really want to
12464                    // go one step up and use the next offsetParent as reference to
12465                    // avoid to make this modifier completely useless and look like broken
12466                    if (data.instance.reference === boundariesElement) {
12467                        boundariesElement = getOffsetParent(boundariesElement);
12468                    }
12469
12470                    // NOTE: DOM access here
12471                    // resets the popper's position so that the document size can be calculated excluding
12472                    // the size of the popper element itself
12473                    var transformProp = getSupportedPropertyName('transform');
12474                    var popperStyles = data.instance.popper.style; // assignment to help minification
12475                    var top = popperStyles.top,
12476                        left = popperStyles.left,
12477                        transform = popperStyles[transformProp];
12478
12479                    popperStyles.top = '';
12480                    popperStyles.left = '';
12481                    popperStyles[transformProp] = '';
12482
12483                    var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
12484
12485                    // NOTE: DOM access here
12486                    // restores the original style properties after the offsets have been computed
12487                    popperStyles.top = top;
12488                    popperStyles.left = left;
12489                    popperStyles[transformProp] = transform;
12490
12491                    options.boundaries = boundaries;
12492
12493                    var order = options.priority;
12494                    var popper = data.offsets.popper;
12495
12496                    var check = {
12497                        primary: function primary(placement) {
12498                            var value = popper[placement];
12499                            if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
12500                                value = Math.max(popper[placement], boundaries[placement]);
12501                            }
12502                            return defineProperty({}, placement, value);
12503                        },
12504                        secondary: function secondary(placement) {
12505                            var mainSide = placement === 'right' ? 'left' : 'top';
12506                            var value = popper[mainSide];
12507                            if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
12508                                value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
12509                            }
12510                            return defineProperty({}, mainSide, value);
12511                        }
12512                    };
12513
12514                    order.forEach(function (placement) {
12515                        var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
12516                        popper = _extends({}, popper, check[side](placement));
12517                    });
12518
12519                    data.offsets.popper = popper;
12520
12521                    return data;
12522                }
12523
12524                /**
12525                 * @function
12526                 * @memberof Modifiers
12527                 * @argument {Object} data - The data object generated by `update` method
12528                 * @argument {Object} options - Modifiers configuration and options
12529                 * @returns {Object} The data object, properly modified
12530                 */
12531                function shift(data) {
12532                    var placement = data.placement;
12533                    var basePlacement = placement.split('-')[0];
12534                    var shiftvariation = placement.split('-')[1];
12535
12536                    // if shift shiftvariation is specified, run the modifier
12537                    if (shiftvariation) {
12538                        var _data$offsets = data.offsets,
12539                            reference = _data$offsets.reference,
12540                            popper = _data$offsets.popper;
12541
12542                        var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
12543                        var side = isVertical ? 'left' : 'top';
12544                        var measurement = isVertical ? 'width' : 'height';
12545
12546                        var shiftOffsets = {
12547                            start: defineProperty({}, side, reference[side]),
12548                            end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
12549                        };
12550
12551                        data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
12552                    }
12553
12554                    return data;
12555                }
12556
12557                /**
12558                 * @function
12559                 * @memberof Modifiers
12560                 * @argument {Object} data - The data object generated by update method
12561                 * @argument {Object} options - Modifiers configuration and options
12562                 * @returns {Object} The data object, properly modified
12563                 */
12564                function hide(data) {
12565                    if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
12566                        return data;
12567                    }
12568
12569                    var refRect = data.offsets.reference;
12570                    var bound = find(data.instance.modifiers, function (modifier) {
12571                        return modifier.name === 'preventOverflow';
12572                    }).boundaries;
12573
12574                    if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
12575                        // Avoid unnecessary DOM access if visibility hasn't changed
12576                        if (data.hide === true) {
12577                            return data;
12578                        }
12579
12580                        data.hide = true;
12581                        data.attributes['x-out-of-boundaries'] = '';
12582                    } else {
12583                        // Avoid unnecessary DOM access if visibility hasn't changed
12584                        if (data.hide === false) {
12585                            return data;
12586                        }
12587
12588                        data.hide = false;
12589                        data.attributes['x-out-of-boundaries'] = false;
12590                    }
12591
12592                    return data;
12593                }
12594
12595                /**
12596                 * @function
12597                 * @memberof Modifiers
12598                 * @argument {Object} data - The data object generated by `update` method
12599                 * @argument {Object} options - Modifiers configuration and options
12600                 * @returns {Object} The data object, properly modified
12601                 */
12602                function inner(data) {
12603                    var placement = data.placement;
12604                    var basePlacement = placement.split('-')[0];
12605                    var _data$offsets = data.offsets,
12606                        popper = _data$offsets.popper,
12607                        reference = _data$offsets.reference;
12608
12609                    var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
12610
12611                    var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
12612
12613                    popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
12614
12615                    data.placement = getOppositePlacement(placement);
12616                    data.offsets.popper = getClientRect(popper);
12617
12618                    return data;
12619                }
12620
12621                /**
12622                 * Modifier function, each modifier can have a function of this type assigned
12623                 * to its `fn` property.<br />
12624                 * These functions will be called on each update, this means that you must
12625                 * make sure they are performant enough to avoid performance bottlenecks.
12626                 *
12627                 * @function ModifierFn
12628                 * @argument {dataObject} data - The data object generated by `update` method
12629                 * @argument {Object} options - Modifiers configuration and options
12630                 * @returns {dataObject} The data object, properly modified
12631                 */
12632
12633                /**
12634                 * Modifiers are plugins used to alter the behavior of your poppers.<br />
12635                 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
12636                 * needed by the library.
12637                 *
12638                 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
12639                 * All the other properties are configurations that could be tweaked.
12640                 * @namespace modifiers
12641                 */
12642                var modifiers = {
12643                    /**
12644                     * Modifier used to shift the popper on the start or end of its reference
12645                     * element.<br />
12646                     * It will read the variation of the `placement` property.<br />
12647                     * It can be one either `-end` or `-start`.
12648                     * @memberof modifiers
12649                     * @inner
12650                     */
12651                    shift: {
12652                        /** @prop {number} order=100 - Index used to define the order of execution */
12653                        order: 100,
12654                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12655                        enabled: true,
12656                        /** @prop {ModifierFn} */
12657                        fn: shift
12658                    },
12659
12660                    /**
12661                     * The `offset` modifier can shift your popper on both its axis.
12662                     *
12663                     * It accepts the following units:
12664                     * - `px` or unit-less, interpreted as pixels
12665                     * - `%` or `%r`, percentage relative to the length of the reference element
12666                     * - `%p`, percentage relative to the length of the popper element
12667                     * - `vw`, CSS viewport width unit
12668                     * - `vh`, CSS viewport height unit
12669                     *
12670                     * For length is intended the main axis relative to the placement of the popper.<br />
12671                     * This means that if the placement is `top` or `bottom`, the length will be the
12672                     * `width`. In case of `left` or `right`, it will be the `height`.
12673                     *
12674                     * You can provide a single value (as `Number` or `String`), or a pair of values
12675                     * as `String` divided by a comma or one (or more) white space
12675s.<br />
12676                     * The latter is a deprecated method because it leads to confusion and will be
12677                     * removed in v2.<br />
12678                     * Additionally, it accepts additions and subtractions between different units.
12679                     * Note that multiplications and divisions aren't supported.
12680                     *
12681                     * Valid examples are:
12682                     * ```
12683                     * 10
12684                     * '10%'
12685                     * '10, 10'
12686                     * '10%, 10'
12687                     * '10 + 10%'
12688                     * '10 - 5vh + 3%'
12689                     * '-10px + 5vh, 5px - 6%'
12690                     * ```
12691                     * @memberof modifiers
12692                     * @inner
12693                     */
12694                    offset: {
12695                        /** @prop {number} order=200 - Index used to define the order of execution */
12696                        order: 200,
12697                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12698                        enabled: true,
12699                        /** @prop {ModifierFn} */
12700                        fn: offset,
12701                        /** @prop {Number|String} offset=0
12702                         * The offset value as described in the modifier description
12703                         */
12704                        offset: 0
12705                    },
12706
12707                    /**
12708                     * Modifier used to prevent the popper from being positioned outside the boundary.
12709                     *
12710                     * A scenario exists where the reference itself is not within the boundaries.<br />
12711                     * We can say it has "escaped the boundaries" — or just "escaped".<br />
12712                     * In this case we need to decide whether the popper should either:
12713                     *
12714                     * - detach from the reference and remain "trapped" in the boundaries, or
12715                     * - if it should ignore the boundary and "escape with its reference"
12716                     *
12717                     * When `escapeWithReference` is set to`true` and reference is completely
12718                     * outside its boundaries, the popper will overflow (or completely leave)
12719                     * the boundaries in order to remain attached to the edge of the reference.
12720                     *
12721                     * @memberof modifiers
12722                     * @inner
12723                     */
12724                    preventOverflow: {
12725                        /** @prop {number} order=300 - Index used to define the order of execution */
12726                        order: 300,
12727                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12728                        enabled: true,
12729                        /** @prop {ModifierFn} */
12730                        fn: preventOverflow,
12731                        /**
12732                         * @prop {Array} [priority=['left','right','top','bottom']]
12733                         * Popper will try to prevent overflow following these priorities by default,
12734                         * then, it could overflow on the left and on top of the `boundariesElement`
12735                         */
12736                        priority: ['left', 'right', 'top', 'bottom'],
12737                        /**
12738                         * @prop {number} padding=5
12739                         * Amount of pixel used to define a minimum distance between the boundaries
12740                         * and the popper. This makes sure the popper always has a little padding
12741                         * between the edges of its container
12742                         */
12743                        padding: 5,
12744                        /**
12745                         * @prop {String|HTMLElement} boundariesElement='scrollParent'
12746                         * Boundaries used by the modifier. Can be `scrollParent`, `window`,
12747                         * `viewport` or any DOM element.
12748                         */
12749                        boundariesElement: 'scrollParent'
12750                    },
12751
12752                    /**
12753                     * Modifier used to make sure the reference and its popper stay near each other
12754                     * without leaving any gap between the two. Especially useful when the arrow is
12755                     * enabled and you want to ensure that it points to its reference element.
12756                     * It cares only about the first axis. You can still have poppers with margin
12757                     * between the popper and its reference element.
12758                     * @memberof modifiers
12759                     * @inner
12760                     */
12761                    keepTogether: {
12762                        /** @prop {number} order=400 - Index used to define the order of execution */
12763                        order: 400,
12764                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12765                        enabled: true,
12766                        /** @prop {ModifierFn} */
12767                        fn: keepTogether
12768                    },
12769
12770                    /**
12771                     * This modifier is used to move the `arrowElement` of the popper to make
12772                     * sure it is positioned between the reference element and its popper element.
12773                     * It will read the outer size of the `arrowElement` node to detect how many
12774                     * pixels of conjunction are needed.
12775                     *
12776                     * It has no effect if no `arrowElement` is provided.
12777                     * @memberof modifiers
12778                     * @inner
12779                     */
12780                    arrow: {
12781                        /** @prop {number} order=500 - Index used to define the order of execution */
12782                        order: 500,
12783                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12784                        enabled: true,
12785                        /** @prop {ModifierFn} */
12786                        fn: arrow,
12787                        /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
12788                        element: '[x-arrow]'
12789                    },
12790
12791                    /**
12792                     * Modifier used to flip the popper's placement when it starts to overlap its
12793                     * reference element.
12794                     *
12795                     * Requires the `preventOverflow` modifier before it in order to work.
12796                     *
12797                     * **NOTE:** this modifier will interrupt the current update cycle and will
12798                     * restart it if it detects the need to flip the placement.
12799                     * @memberof modifiers
12800                     * @inner
12801                     */
12802                    flip: {
12803                        /** @prop {number} order=600 - Index used to define the order of execution */
12804                        order: 600,
12805                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12806                        enabled: true,
12807                        /** @prop {ModifierFn} */
12808                        fn: flip,
12809                        /**
12810                         * @prop {String|Array} behavior='flip'
12811                         * The behavior used to change the popper's placement. It can be one of
12812                         * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
12813                         * placements (with optional variations)
12814                         */
12815                        behavior: 'flip',
12816                        /**
12817                         * @prop {number} padding=5
12818                         * The popper will flip if it hits the edges of the `boundariesElement`
12819                         */
12820                        padding: 5,
12821                        /**
12822                         * @prop {String|HTMLElement} boundariesElement='viewport'
12823                         * The element which will define the boundaries of the popper position.
12824                         * The popper will never be placed outside of the defined boundaries
12825                         * (except if `keepTogether` is enabled)
12826                         */
12827                        boundariesElement: 'viewport'
12828                    },
12829
12830                    /**
12831                     * Modifier used to make the popper flow toward the inner of the reference element.
12832                     * By default, when this modifier is disabled, the popper will be placed outside
12833                     * the reference element.
12834                     * @memberof modifiers
12835                     * @inner
12836                     */
12837                    inner: {
12838                        /** @prop {number} order=700 - Index used to define the order of execution */
12839                        order: 700,
12840                        /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
12841                        enabled: false,
12842                        /** @prop {ModifierFn} */
12843                        fn: inner
12844                    },
12845
12846                    /**
12847                     * Modifier used to hide the popper when its reference element is outside of the
12848                     * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
12849                     * be used to hide with a CSS selector the popper when its reference is
12850                     * out of boundaries.
12851                     *
12852                     * Requires the `preventOverflow` modifier before it in order to work.
12853                     * @memberof modifiers
12854                     * @inner
12855                     */
12856                    hide: {
12857                        /** @prop {number} order=800 - Index used to define the order of execution */
12858                        order: 800,
12859                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12860                        enabled: true,
12861                        /** @prop {ModifierFn} */
12862                        fn: hide
12863                    },
12864
12865                    /**
12866                     * Computes the style that will be applied to the popper element to gets
12867                     * properly positioned.
12868                     *
12869                     * Note that this modifier will not touch the DOM, it just prepares the styles
12870                     * so that `applyStyle` modifier can apply it. This separation is useful
12871                     * in case you need to replace `applyStyle` with a custom implementation.
12872                     *
12873                     * This modifier has `850` as `order` value to maintain backward compatibility
12874                     * with previous versions of Popper.js. Expect the modifiers ordering method
12875                     * to change in future major versions of the library.
12876                     *
12877                     * @memberof modifiers
12878                     * @inner
12879                     */
12880                    computeStyle: {
12881                        /** @prop {number} order=850 - Index used to define the order of execution */
12882                        order: 850,
12883                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12884                        enabled: true,
12885                        /** @prop {ModifierFn} */
12886                        fn: computeStyle,
12887                        /**
12888                         * @prop {Boolean} gpuAcceleration=true
12889                         * If true, it uses the CSS 3D transformation to position the popper.
12890                         * Otherwise, it will use the `top` and `left` properties
12891                         */
12892                        gpuAcceleration: true,
12893                        /**
12894                         * @prop {string} [x='bottom']
12895                         * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
12896                         * Change this if your popper should grow in a direction different from `bottom`
12897                         */
12898                        x: 'bottom',
12899                        /**
12900                         * @prop {string} [x='left']
12901                         * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
12902                         * Change this if your popper should grow in a direction different from `right`
12903                         */
12904                        y: 'right'
12905                    },
12906
12907                    /**
12908                     * Applies the computed styles to the popper element.
12909                     *
12910                     * All the DOM manipulations are limited to this modifier. This is useful in case
12911                     * you want to integrate Popper.js inside a framework or view library and you
12912                     * want to delegate all the DOM manipulations to it.
12913                     *
12914                     * Note that if you disable this modifier, you must make sure the popper element
12915                     * has its position set to `absolute` before Popper.js can do its work!
12916                     *
12917                     * Just disable this modifier and define your own to achieve the desired effect.
12918                     *
12919                     * @memberof modifiers
12920                     * @inner
12921                     */
12922                    applyStyle: {
12923                        /** @prop {number} order=900 - Index used to define the order of execution */
12924                        order: 900,
12925                        /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
12926                        enabled: true,
12927                        /** @prop {ModifierFn} */
12928                        fn: applyStyle,
12929                        /** @prop {Function} */
12930                        onLoad: applyStyleOnLoad,
12931                        /**
12932                         * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
12933                         * @prop {Boolean} gpuAcceleration=true
12934                         * If true, it uses the CSS 3D transformation to position the popper.
12935                         * Otherwise, it will use the `top` and `left` properties
12936                         */
12937                        gpuAcceleration: undefined
12938                    }
12939                };
12940
12941                /**
12942                 * The `dataObject` is an object containing all the information used by Popper.js.
12943                 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
12944                 * @name dataObject
12945                 * @property {Object} data.instance The Popper.js instance
12946                 * @property {String} data.placement Placement applied to popper
12947                 * @property {String} data.originalPlacement Placement originally defined on init
12948                 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
12949                 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
12950                 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
12951                 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
12952                 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
12953                 * @property {Object} data.boundaries Offsets of the popper boundaries
12954                 * @property {Object} data.offsets The measurements of popper, reference and arrow elements
12955                 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
12956                 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
12957                 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
12958                 */
12959
12960                /**
12961                 * Default options provided to Popper.js constructor.<br />
12962                 * These can be overridden using the `options` argument of Popper.js.<br />
12963                 * To override an option, simply pass an object with the same
12964                 * structure of the `options` object, as the 3rd argument. For example:
12965                 * ```
12966                 * new Popper(ref, pop, {
12967                 *   modifiers: {
12968                 *     preventOverflow: { enabled: false }
12969                 *   }
12970                 * })
12971                 * ```
12972                 * @type {Object}
12973                 * @static
12974                 * @memberof Popper
12975                 */
12976                var Defaults = {
12977                    /**
12978                     * Popper's placement.
12979                     * @prop {Popper.placements} placement='bottom'
12980                     */
12981                    placement: 'bottom',
12982
12983                    /**
12984                     * Set this to true if you want popper to position it self in 'fixed' mode
12985                     * @prop {Boolean} positionFixed=false
12986                     */
12987                    positionFixed: false,
12988
12989                    /**
12990                     * Whether events (resize, scroll) are initially enabled.
12991                     * @prop {Boolean} eventsEnabled=true
12992                     */
12993                    eventsEnabled: true,
12994
12995                    /**
12996                     * Set to true if you want to automatically remove the popper when
12997                     * you call the `destroy` method.
12998                     * @prop {Boolean} removeOnDestroy=false
12999                     */
13000                    removeOnDestroy: false,
13001
13002                    /**
13003                     * Callback called when the popper is created.<br />
13004                     * By default, it is set to no-op.<br />
13005                     * Access Popper.js instance with `data.instance`.
13006                     * @prop {onCreate}
13007                     */
13008                    onCreate: function onCreate() {
13009                    },
13010
13011                    /**
13012                     * Callback called when the popper is updated. This callback is not called
13013                     * on the initialization/creation of the popper, but only on subsequent
13014                     * updates.<br />
13015                     * By default, it is set to no-op.<br />
13016                     * Access Popper.js instance with `data.instance`.
vendor: 8,789 bytes, lines 13017-13205
13017                     * @prop {onUpdate}
13018                     */
13019                    onUpdate: function onUpdate() {
13020                    },
13021
13022                    /**
13023                     * List of modifiers used to modify the offsets before they are applied to the popper.
13024                     * They provide most of the functionalities of Popper.js.
13025                     * @prop {modifiers}
13026                     */
13027                    modifiers: modifiers
13028                };
13029
13030                /**
13031                 * @callback onCreate
13032                 * @param {dataObject} data
13033                 */
13034
13035                /**
13036                 * @callback onUpdate
13037                 * @param {dataObject} data
13038                 */
13039
13040// Utils
13041// Methods
13042                var Popper = function () {
13043                    /**
13044                     * Creates a new Popper.js instance.
13045                     * @class Popper
13046                     * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
13047                     * @param {HTMLElement} popper - The HTML element used as the popper
13048                     * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
13049                     * @return {Object} instance - The generated Popper.js instance
13050                     */
13051                    function Popper(reference, popper) {
13052                        var _this = this;
13053
13054                        var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
13055                        classCallCheck(this, Popper);
13056
13057                        this.scheduleUpdate = function () {
13058                            return requestAnimationFrame(_this.update);
13059                        };
13060
13061                        // make update() debounced, so that it only runs at most once-per-tick
13062                        this.update = debounce(this.update.bind(this));
13063
13064                        // with {} we create a new object with the options inside it
13065                        this.options = _extends({}, Popper.Defaults, options);
13066
13067                        // init state
13068                        this.state = {
13069                            isDestroyed: false,
13070                            isCreated: false,
13071                            scrollParents: []
13072                        };
13073
13074                        // get reference and popper elements (allow jQuery wrappers)
13075                        this.reference = reference && reference.jquery ? reference[0] : reference;
13076                        this.popper = popper && popper.jquery ? popper[0] : popper;
13077
13078                        // Deep merge modifiers options
13079                        this.options.modifiers = {};
13080                        Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
13081                            _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
13082                        });
13083
13084                        // Refactoring modifiers' list (Object => Array)
13085                        this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
13086                            return _extends({
13087                                name: name
13088                            }, _this.options.modifiers[name]);
13089                        })
13090                            // sort the modifiers by order
13091                            .sort(function (a, b) {
13092                                return a.order - b.order;
13093                            });
13094
13095                        // modifiers have the ability to execute arbitrary code when Popper.js get inited
13096                        // such code is executed in the same order of its modifier
13097                        // they could add new properties to their options configuration
13098                        // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
13099                        this.modifiers.forEach(function (modifierOptions) {
13100                            if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
13101                                modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
13102                            }
13103                        });
13104
13105                        // fire the first update to position the popper in the right place
13106                        this.update();
13107
13108                        var eventsEnabled = this.options.eventsEnabled;
13109                        if (eventsEnabled) {
13110                            // setup event listeners, they will take care of update the position in specific situations
13111                            this.enableEventListeners();
13112                        }
13113
13114                        this.state.eventsEnabled = eventsEnabled;
13115                    }
13116
13117                    // We can't use class properties because they don't get listed in the
13118                    // class prototype and break stuff like Sinon stubs
13119
13120
13121                    createClass(Popper, [{
13122                        key: 'update',
13123                        value: function update$$1() {
13124                            return update.call(this);
13125                        }
13126                    }, {
13127                        key: 'destroy',
13128                        value: function destroy$$1() {
13129                            return destroy.call(this);
13130                        }
13131                    }, {
13132                        key: 'enableEventListeners',
13133                        value: function enableEventListeners$$1() {
13134                            return enableEventListeners.call(this);
13135                        }
13136                    }, {
13137                        key: 'disableEventListeners',
13138                        value: function disableEventListeners$$1() {
13139                            return disableEventListeners.call(this);
13140                        }
13141
13142                        /**
13143                         * Schedules an update. It will run on the next UI update available.
13144                         * @method scheduleUpdate
13145                         * @memberof Popper
13146                         */
13147
13148
13149                        /**
13150                         * Collection of utilities useful when writing custom modifiers.
13151                         * Starting from version 1.7, this method is available only if you
13152                         * include `popper-utils.js` before `popper.js`.
13153                         *
13154                         * **DEPRECATION**: This way to access PopperUtils is deprecated
13155                         * and will be removed in v2! Use the PopperUtils module directly instead.
13156                         * Due to the high instability of the methods contained in Utils, we can't
13157                         * guarantee them to follow semver. Use them at your own risk!
13158                         * @static
13159                         * @private
13160                         * @type {Object}
13161                         * @deprecated since version 1.8
13162                         * @member Utils
13163                         * @memberof Popper
13164                         */
13165
13166                    }]);
13167                    return Popper;
13168                }();
13169
13170                /**
13171                 * The `referenceObject` is an object that provides an interface compatible with Popper.js
13172                 * and lets you use it as replacement of a real DOM node.<br />
13173                 * You can use this method to position a popper relatively to a set of coordinates
13174                 * in case you don't have a DOM node to use as reference.
13175                 *
13176                 * ```
13177                 * new Popper(referenceObject, popperNode);
13178                 * ```
13179                 *
13180                 * NB: This feature isn't supported in Internet Explorer 10.
13181                 * @name referenceObject
13182                 * @property {Function} data.getBoundingClientRect
13183                 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
13184                 * @property {number} data.clientWidth
13185                 * An ES6 getter that will return the width of the virtual reference element.
13186                 * @property {number} data.clientHeight
13187                 * An ES6 getter that will return the height of the virtual reference element.
13188                 */
13189
13190
13191                Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
13192                Popper.placements = placements;
13193                Popper.Defaults = Defaults;
13194
13195                return Popper;
13196
13197            })));
13198//# sourceMappingURL=popper.js.map
13199
13200            /* WEBPACK VAR INJECTION */
13201        }.call(this, __webpack_require__(5)))
13202
13203        /***/
13204    }),
13205    /* 5 */
vendor: 8,724 bytes, lines 13206-13437
13206    /***/ (function (module, exports) {
13207
13208        var g;
13209
13210// This works in non-strict mode
13211        g = (function () {
13212            return this;
13213        })();
13214
13215        try {
13216            // This works if eval is allowed (see CSP)
13217            g = g || Function("return this")() || (1, eval)("this");
13218        } catch (e) {
13219            // This works if the window reference is available
13220            if (typeof window === "object") g = window;
13221        }
13222
13223// g can still be undefined, but nothing to do about it...
13224// We return undefined, instead of nothing here, so it's
13225// easier to handle this case. if(!global) { ...}
13226
13227        module.exports = g;
13228
13229
13230        /***/
13231    }),
13232    /* 6 */
13233    /***/ (function (module, exports, __webpack_require__) {
13234
13235
13236        /***/
13237    }),
13238    /* 7 */
13239    /***/ (function (module, __webpack_exports__, __webpack_require__) {
13240
13241        "use strict";
13242        __webpack_require__.r(__webpack_exports__);
13243        /* WEBPACK VAR INJECTION */
13244        (function (global) {
13245            /**!
13246             * @fileOverview Kickass library to create and place poppers near their reference elements.
13247             * @version 1.14.4
13248             * @license
13249             * Copyright (c) 2016 Federico Zivolo and contributors
13250             *
13251             * Permission is hereby granted, free of charge, to any person obtaining a copy
13252             * of this software and associated documentation files (the "Software"), to deal
13253             * in the Software without restriction, including without limitation the rights
13254             * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13255             * copies of the Software, and to permit persons to whom the Software is
13256             * furnished to do so, subject to the following conditions:
13257             *
13258             * The above copyright notice and this permission notice shall be included in all
13259             * copies or substantial portions of the Software.
13260             *
13261             * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13262             * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13263             * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13264             * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13265             * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
13266             * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13267             * SOFTWARE.
13268             */
13269            var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
13270
13271            var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
13272            var timeoutDuration = 0;
13273            for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
13274                if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
13275                    timeoutDuration = 1;
13276                    break;
13277                }
13278            }
13279
13280            function microtaskDebounce(fn) {
13281                var called = false;
13282                return function () {
13283                    if (called) {
13284                        return;
13285                    }
13286                    called = true;
13287                    window.Promise.resolve().then(function () {
13288                        called = false;
13289                        fn();
13290                    });
13291                };
13292            }
13293
13294            function taskDebounce(fn) {
13295                var scheduled = false;
13296                return function () {
13297                    if (!scheduled) {
13298                        scheduled = true;
13299                        setTimeout(function () {
13300                            scheduled = false;
13301                            fn();
13302                        }, timeoutDuration);
13303                    }
13304                };
13305            }
13306
13307            var supportsMicroTasks = isBrowser && window.Promise;
13308
13309            /**
13310             * Create a debounced version of a method, that's asynchronously deferred
13311             * but called in the minimum time possible.
13312             *
13313             * @method
13314             * @memberof Popper.Utils
13315             * @argument {Function} fn
13316             * @returns {Function}
13317             */
13318            var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
13319
13320            /**
13321             * Check if the given variable is a function
13322             * @method
13323             * @memberof Popper.Utils
13324             * @argument {Any} functionToCheck - variable to check
13325             * @returns {Boolean} answer to: is a function?
13326             */
13327            function isFunction(functionToCheck) {
13328                var getType = {};
13329                return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
13330            }
13331
13332            /**
13333             * Get CSS computed property of the given element
13334             * @method
13335             * @memberof Popper.Utils
13336             * @argument {Eement} element
13337             * @argument {String} property
13338             */
13339            function getStyleComputedProperty(element, property) {
13340                if (element.nodeType !== 1) {
13341                    return [];
13342                }
13343                // NOTE: 1 DOM access here
13344                var css = getComputedStyle(element, null);
13345                return property ? css[property] : css;
13346            }
13347
13348            /**
13349             * Returns the parentNode or the host of the element
13350             * @method
13351             * @memberof Popper.Utils
13352             * @argument {Element} element
13353             * @returns {Element} parent
13354             */
13355            function getParentNode(element) {
13356                if (element.nodeName === 'HTML') {
13357                    return element;
13358                }
13359                return element.parentNode || element.host;
13360            }
13361
13362            /**
13363             * Returns the scrolling parent of the given element
13364             * @method
13365             * @memberof Popper.Utils
13366             * @argument {Element} element
13367             * @returns {Element} scroll parent
13368             */
13369            function getScrollParent(element) {
13370                // Return body, `getScroll` will take care to get the correct `scrollTop` from it
13371                if (!element) {
13372                    return document.body;
13373                }
13374
13375                switch (element.nodeName) {
13376                    case 'HTML':
13377                    case 'BODY':
13378                        return element.ownerDocument.body;
13379                    case '#document':
13380                        return element.body;
13381                }
13382
13383                // Firefox want us to check `-x` and `-y` variations as well
13384
13385                var _getStyleComputedProp = getStyleComputedProperty(element),
13386                    overflow = _getStyleComputedProp.overflow,
13387                    overflowX = _getStyleComputedProp.overflowX,
13388                    overflowY = _getStyleComputedProp.overflowY;
13389
13390                if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
13391                    return element;
13392                }
13393
13394                return getScrollParent(getParentNode(element));
13395            }
13396
13397            var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
13398            var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
13399
13400            /**
13401             * Determines if the browser is Internet Explorer
13402             * @method
13403             * @memberof Popper.Utils
13404             * @param {Number} version to check
13405             * @returns {Boolean} isIE
13406             */
13407            function isIE(version) {
13408                if (version === 11) {
13409                    return isIE11;
13410                }
13411                if (version === 10) {
13412                    return isIE10;
13413                }
13414                return isIE11 || isIE10;
13415            }
13416
13417            /**
13418             * Returns the offset parent of the given element
13419             * @method
13420             * @memberof Popper.Utils
13421             * @argument {Element} element
13422             * @returns {Element} offset parent
13423             */
13424            function getOffsetParent(element) {
13425                if (!element) {
13426                    return document.documentElement;
13427                }
13428
13429                var noOffsetParent = isIE(10) ? document.body : null;
13430
13431                // NOTE: 1 DOM access here
13432                var offsetParent = element.offsetParent;
13433                // Skip hidden elements which don't have an offsetParent
13434                while (offsetParent === noOffsetParent && element.nextElementSibling) {
13435                    offsetParent = (element = element.nextElementSibling).offsetParent;
13436                }
13437
vendor: 5,041 bytes, lines 13438-13554
13438                var nodeName = offsetParent && offsetParent.nodeName;
13439
13440                if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
13441                    return element ? element.ownerDocument.documentElement : document.documentElement;
13442                }
13443
13444                // .offsetParent will return the closest TD or TABLE in case
13445                // no offsetParent is present, I hate this job...
13446                if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
13447                    return getOffsetParent(offsetParent);
13448                }
13449
13450                return offsetParent;
13451            }
13452
13453            function isOffsetContainer(element) {
13454                var nodeName = element.nodeName;
13455
13456                if (nodeName === 'BODY') {
13457                    return false;
13458                }
13459                return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
13460            }
13461
13462            /**
13463             * Finds the root node (document, shadowDOM root) of the given element
13464             * @method
13465             * @memberof Popper.Utils
13466             * @argument {Element} node
13467             * @returns {Element} root node
13468             */
13469            function getRoot(node) {
13470                if (node.parentNode !== null) {
13471                    return getRoot(node.parentNode);
13472                }
13473
13474                return node;
13475            }
13476
13477            /**
13478             * Finds the offset parent common to the two provided nodes
13479             * @method
13480             * @memberof Popper.Utils
13481             * @argument {Element} element1
13482             * @argument {Element} element2
13483             * @returns {Element} common offset parent
13484             */
13485            function findCommonOffsetParent(element1, element2) {
13486                // This check is needed to avoid errors in case one of the elements isn't defined for any reason
13487                if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
13488                    return document.documentElement;
13489                }
13490
13491                // Here we make sure to give as "start" the element that comes first in the DOM
13492                var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
13493                var start = order ? element1 : element2;
13494                var end = order ? element2 : element1;
13495
13496                // Get common ancestor container
13497                var range = document.createRange();
13498                range.setStart(start, 0);
13499                range.setEnd(end, 0);
13500                var commonAncestorContainer = range.commonAncestorContainer;
13501
13502                // Both nodes are inside #document
13503
13504                if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
13505                    if (isOffsetContainer(commonAncestorContainer)) {
13506                        return commonAncestorContainer;
13507                    }
13508
13509                    return getOffsetParent(commonAncestorContainer);
13510                }
13511
13512                // one of the nodes is inside shadowDOM, find which one
13513                var element1root = getRoot(element1);
13514                if (element1root.host) {
13515                    return findCommonOffsetParent(element1root.host, element2);
13516                } else {
13517                    return findCommonOffsetParent(element1, getRoot(element2).host);
13518                }
13519            }
13520
13521            /**
13522             * Gets the scroll value of the given element in the given side (top and left)
13523             * @method
13524             * @memberof Popper.Utils
13525             * @argument {Element} element
13526             * @argument {String} side `top` or `left`
13527             * @returns {number} amount of scrolled pixels
13528             */
13529            function getScroll(element) {
13530                var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
13531
13532                var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
13533                var nodeName = element.nodeName;
13534
13535                if (nodeName === 'BODY' || nodeName === 'HTML') {
13536                    var html = element.ownerDocument.documentElement;
13537                    var scrollingElement = element.ownerDocument.scrollingElement || html;
13538                    return scrollingElement[upperSide];
13539                }
13540
13541                return element[upperSide];
13542            }
13543
13544            /*
13545 * Sum or subtract the element scroll values (left and top) from a given rect object
13546 * @method
13547 * @memberof Popper.Utils
13548 * @param {Object} rect - Rect object you want to change
13549 * @param {HTMLElement} element - The element from the function reads the scroll values
13550 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
13551 * @return {Object} rect - The modifier rect object
13552 */
13553            function includeScroll(rect, element) {
13554                var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
vendor: 9,739 bytes, lines 13555-13775
13555
13556                var scrollTop = getScroll(element, 'top');
13557                var scrollLeft = getScroll(element, 'left');
13558                var modifier = subtract ? -1 : 1;
13559                rect.top += scrollTop * modifier;
13560                rect.bottom += scrollTop * modifier;
13561                rect.left += scrollLeft * modifier;
13562                rect.right += scrollLeft * modifier;
13563                return rect;
13564            }
13565
13566            /*
13567 * Helper to detect borders of a given element
13568 * @method
13569 * @memberof Popper.Utils
13570 * @param {CSSStyleDeclaration} styles
13571 * Result of `getStyleComputedProperty` on the given element
13572 * @param {String} axis - `x` or `y`
13573 * @return {number} borders - The borders size of the given axis
13574 */
13575
13576            function getBordersSize(styles, axis) {
13577                var sideA = axis === 'x' ? 'Left' : 'Top';
13578                var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
13579
13580                return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
13581            }
13582
13583            function getSize(axis, body, html, computedStyle) {
13584                return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
13585            }
13586
13587            function getWindowSizes(document) {
13588                var body = document.body;
13589                var html = document.documentElement;
13590                var computedStyle = isIE(10) && getComputedStyle(html);
13591
13592                return {
13593                    height: getSize('Height', body, html, computedStyle),
13594                    width: getSize('Width', body, html, computedStyle)
13595                };
13596            }
13597
13598            var classCallCheck = function (instance, Constructor) {
13599                if (!(instance instanceof Constructor)) {
13600                    throw new TypeError("Cannot call a class as a function");
13601                }
13602            };
13603
13604            var createClass = function () {
13605                function defineProperties(target, props) {
13606                    for (var i = 0; i < props.length; i++) {
13607                        var descriptor = props[i];
13608                        descriptor.enumerable = descriptor.enumerable || false;
13609                        descriptor.configurable = true;
13610                        if ("value" in descriptor) descriptor.writable = true;
13611                        Object.defineProperty(target, descriptor.key, descriptor);
13612                    }
13613                }
13614
13615                return function (Constructor, protoProps, staticProps) {
13616                    if (protoProps) defineProperties(Constructor.prototype, protoProps);
13617                    if (staticProps) defineProperties(Constructor, staticProps);
13618                    return Constructor;
13619                };
13620            }();
13621
13622
13623            var defineProperty = function (obj, key, value) {
13624                if (key in obj) {
13625                    Object.defineProperty(obj, key, {
13626                        value: value,
13627                        enumerable: true,
13628                        configurable: true,
13629                        writable: true
13630                    });
13631                } else {
13632                    obj[key] = value;
13633                }
13634
13635                return obj;
13636            };
13637
13638            var _extends = Object.assign || function (target) {
13639                for (var i = 1; i < arguments.length; i++) {
13640                    var source = arguments[i];
13641
13642                    for (var key in source) {
13643                        if (Object.prototype.hasOwnProperty.call(source, key)) {
13644                            target[key] = source[key];
13645                        }
13646                    }
13647                }
13648
13649                return target;
13650            };
13651
13652            /**
13653             * Given element offsets, generate an output similar to getBoundingClientRect
13654             * @method
13655             * @memberof Popper.Utils
13656             * @argument {Object} offsets
13657             * @returns {Object} ClientRect like output
13658             */
13659            function getClientRect(offsets) {
13660                return _extends({}, offsets, {
13661                    right: offsets.left + offsets.width,
13662                    bottom: offsets.top + offsets.height
13663                });
13664            }
13665
13666            /**
13667             * Get bounding client rect of given element
13668             * @method
13669             * @memberof Popper.Utils
13670             * @param {HTMLElement} element
13671             * @return {Object} client rect
13672             */
13673            function getBoundingClientRect(element) {
13674                var rect = {};
13675
13676                // considered in DOM in some circumstances...
13677                // This isn't reproducible in IE10 compatibility mode of IE11
13678                try {
13679                    if (isIE(10)) {
13680                        rect = element.getBoundingClientRect();
13681                        var scrollTop = getScroll(element, 'top');
13682                        var scrollLeft = getScroll(element, 'left');
13683                        rect.top += scrollTop;
13684                        rect.left += scrollLeft;
13685                        rect.bottom += scrollTop;
13686                        rect.right += scrollLeft;
13687                    } else {
13688                        rect = element.getBoundingClientRect();
13689                    }
13690                } catch (e) {
13691                }
13692
13693                var result = {
13694                    left: rect.left,
13695                    top: rect.top,
13696                    width: rect.right - rect.left,
13697                    height: rect.bottom - rect.top
13698                };
13699
13700                // subtract scrollbar size from sizes
13701                var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
13702                var width = sizes.width || element.clientWidth || result.right - result.left;
13703                var height = sizes.height || element.clientHeight || result.bottom - result.top;
13704
13705                var horizScrollbar = element.offsetWidth - width;
13706                var vertScrollbar = element.offsetHeight - height;
13707
13708                // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
13709                // we make this check conditional for performance reasons
13710                if (horizScrollbar || vertScrollbar) {
13711                    var styles = getStyleComputedProperty(element);
13712                    horizScrollbar -= getBordersSize(styles, 'x');
13713                    vertScrollbar -= getBordersSize(styles, 'y');
13714
13715                    result.width -= horizScrollbar;
13716                    result.height -= vertScrollbar;
13717                }
13718
13719                return getClientRect(result);
13720            }
13721
13722            function getOffsetRectRelativeToArbitraryNode(children, parent) {
13723                var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
13724
13725                var isIE10 = isIE(10);
13726                var isHTML = parent.nodeName === 'HTML';
13727                var childrenRect = getBoundingClientRect(children);
13728                var parentRect = getBoundingClientRect(parent);
13729                var scrollParent = getScrollParent(children);
13730
13731                var styles = getStyleComputedProperty(parent);
13732                var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
13733                var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
13734
13735                // In cases where the parent is fixed, we must ignore negative scroll in offset calc
13736                if (fixedPosition && isHTML) {
13737                    parentRect.top = Math.max(parentRect.top, 0);
13738                    parentRect.left = Math.max(parentRect.left, 0);
13739                }
13740                var offsets = getClientRect({
13741                    top: childrenRect.top - parentRect.top - borderTopWidth,
13742                    left: childrenRect.left - parentRect.left - borderLeftWidth,
13743                    width: childrenRect.width,
13744                    height: childrenRect.height
13745                });
13746                offsets.marginTop = 0;
13747                offsets.marginLeft = 0;
13748
13749                // Subtract margins of documentElement in case it's being used as parent
13750                // we do this only on HTML because it's the only element that behaves
13751                // differently when margins are applied to it. The margins are included in
13752                // the box of the documentElement, in the other cases not.
13753                if (!isIE10 && isHTML) {
13754                    var marginTop = parseFloat(styles.marginTop, 10);
13755                    var marginLeft = parseFloat(styles.marginLeft, 10);
13756
13757                    offsets.top -= borderTopWidth - marginTop;
13758                    offsets.bottom -= borderTopWidth - marginTop;
13759                    offsets.left -= borderLeftWidth - marginLeft;
13760                    offsets.right -= borderLeftWidth - marginLeft;
13761
13762                    // Attach marginTop and marginLeft because in some circumstances we may need them
13763                    offsets.marginTop = marginTop;
13764                    offsets.marginLeft = marginLeft;
13765                }
13766
13767                if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
13768                    offsets = includeScroll(offsets, parent);
13769                }
13770
13771                return offsets;
13772            }
13773
13774            function getViewportOffsetRectRelativeToArtbitraryNode(element) {
13775                var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
vendor: 8,880 bytes, lines 13776-13974
13776
13777                var html = element.ownerDocument.documentElement;
13778                var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
13779                var width = Math.max(html.clientWidth, window.innerWidth || 0);
13780                var height = Math.max(html.clientHeight, window.innerHeight || 0);
13781
13782                var scrollTop = !excludeScroll ? getScroll(html) : 0;
13783                var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
13784
13785                var offset = {
13786                    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
13787                    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
13788                    width: width,
13789                    height: height
13790                };
13791
13792                return getClientRect(offset);
13793            }
13794
13795            /**
13796             * Check if the given element is fixed or is inside a fixed parent
13797             * @method
13798             * @memberof Popper.Utils
13799             * @argument {Element} element
13800             * @argument {Element} customContainer
13801             * @returns {Boolean} answer to "isFixed?"
13802             */
13803            function isFixed(element) {
13804                var nodeName = element.nodeName;
13805                if (nodeName === 'BODY' || nodeName === 'HTML') {
13806                    return false;
13807                }
13808                if (getStyleComputedProperty(element, 'position') === 'fixed') {
13809                    return true;
13810                }
13811                return isFixed(getParentNode(element));
13812            }
13813
13814            /**
13815             * Finds the first parent of an element that has a transformed property defined
13816             * @method
13817             * @memberof Popper.Utils
13818             * @argument {Element} element
13819             * @returns {Element} first transformed parent or documentElement
13820             */
13821
13822            function getFixedPositionOffsetParent(element) {
13823                // This check is needed to avoid errors in case one of the elements isn't defined for any reason
13824                if (!element || !element.parentElement || isIE()) {
13825                    return document.documentElement;
13826                }
13827                var el = element.parentElement;
13828                while (el && getStyleComputedProperty(el, 'transform') === 'none') {
13829                    el = el.parentElement;
13830                }
13831                return el || document.documentElement;
13832            }
13833
13834            /**
13835             * Computed the boundaries limits and return them
13836             * @method
13837             * @memberof Popper.Utils
13838             * @param {HTMLElement} popper
13839             * @param {HTMLElement} reference
13840             * @param {number} padding
13841             * @param {HTMLElement} boundariesElement - Element used to define the boundaries
13842             * @param {Boolean} fixedPosition - Is in fixed position mode
13843             * @returns {Object} Coordinates of the boundaries
13844             */
13845            function getBoundaries(popper, reference, padding, boundariesElement) {
13846                var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
13847
13848                // NOTE: 1 DOM access here
13849
13850                var boundaries = {top: 0, left: 0};
13851                var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
13852
13853                // Handle viewport case
13854                if (boundariesElement === 'viewport') {
13855                    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
13856                } else {
13857                    // Handle other cases based on DOM element used as boundaries
13858                    var boundariesNode = void 0;
13859                    if (boundariesElement === 'scrollParent') {
13860                        boundariesNode = getScrollParent(getParentNode(reference));
13861                        if (boundariesNode.nodeName === 'BODY') {
13862                            boundariesNode = popper.ownerDocument.documentElement;
13863                        }
13864                    } else if (boundariesElement === 'window') {
13865                        boundariesNode = popper.ownerDocument.documentElement;
13866                    } else {
13867                        boundariesNode = boundariesElement;
13868                    }
13869
13870                    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
13871
13872                    // In case of HTML, we need a different computation
13873                    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
13874                        var _getWindowSizes = getWindowSizes(popper.ownerDocument),
13875                            height = _getWindowSizes.height,
13876                            width = _getWindowSizes.width;
13877
13878                        boundaries.top += offsets.top - offsets.marginTop;
13879                        boundaries.bottom = height + offsets.top;
13880                        boundaries.left += offsets.left - offsets.marginLeft;
13881                        boundaries.right = width + offsets.left;
13882                    } else {
13883                        // for all the other DOM elements, this one is good
13884                        boundaries = offsets;
13885                    }
13886                }
13887
13888                // Add paddings
13889                padding = padding || 0;
13890                var isPaddingNumber = typeof padding === 'number';
13891                boundaries.left += isPaddingNumber ? padding : padding.left || 0;
13892                boundaries.top += isPaddingNumber ? padding : padding.top || 0;
13893                boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
13894                boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
13895
13896                return boundaries;
13897            }
13898
13899            function getArea(_ref) {
13900                var width = _ref.width,
13901                    height = _ref.height;
13902
13903                return width * height;
13904            }
13905
13906            /**
13907             * Utility used to transform the `auto` placement to the placement with more
13908             * available space.
13909             * @method
13910             * @memberof Popper.Utils
13911             * @argument {Object} data - The data object generated by update method
13912             * @argument {Object} options - Modifiers configuration and options
13913             * @returns {Object} The data object, properly modified
13914             */
13915            function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
13916                var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
13917
13918                if (placement.indexOf('auto') === -1) {
13919                    return placement;
13920                }
13921
13922                var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
13923
13924                var rects = {
13925                    top: {
13926                        width: boundaries.width,
13927                        height: refRect.top - boundaries.top
13928                    },
13929                    right: {
13930                        width: boundaries.right - refRect.right,
13931                        height: boundaries.height
13932                    },
13933                    bottom: {
13934                        width: boundaries.width,
13935                        height: boundaries.bottom - refRect.bottom
13936                    },
13937                    left: {
13938                        width: refRect.left - boundaries.left,
13939                        height: boundaries.height
13940                    }
13941                };
13942
13943                var sortedAreas = Object.keys(rects).map(function (key) {
13944                    return _extends({
13945                        key: key
13946                    }, rects[key], {
13947                        area: getArea(rects[key])
13948                    });
13949                }).sort(function (a, b) {
13950                    return b.area - a.area;
13951                });
13952
13953                var filteredAreas = sortedAreas.filter(function (_ref2) {
13954                    var width = _ref2.width,
13955                        height = _ref2.height;
13956                    return width >= popper.clientWidth && height >= popper.clientHeight;
13957                });
13958
13959                var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
13960
13961                var variation = placement.split('-')[1];
13962
13963                return computedPlacement + (variation ? '-' + variation : '');
13964            }
13965
13966            /**
13967             * Get offsets to the reference element
13968             * @method
13969             * @memberof Popper.Utils
13970             * @param {Object} state
13971             * @param {Element} popper - the popper element
13972             * @param {Element} reference - the reference element (the popper will be relative to this)
13973             * @param {Element} fixedPosition - is in fixed position mode
13974             * @returns {Object}
vendor: 5,889 bytes, lines 13974-14109
13974 An object containing the offsets which will be applied to the popper
13975             */
13976            function getReferenceOffsets(state, popper, reference) {
13977                var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
13978
13979                var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
13980                return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
13981            }
13982
13983            /**
13984             * Get the outer sizes of the given element (offset size + margins)
13985             * @method
13986             * @memberof Popper.Utils
13987             * @argument {Element} element
13988             * @returns {Object} object containing width and height properties
13989             */
13990            function getOuterSizes(element) {
13991                var styles = getComputedStyle(element);
13992                var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
13993                var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
13994                var result = {
13995                    width: element.offsetWidth + y,
13996                    height: element.offsetHeight + x
13997                };
13998                return result;
13999            }
14000
14001            /**
14002             * Get the opposite placement of the given one
14003             * @method
14004             * @memberof Popper.Utils
14005             * @argument {String} placement
14006             * @returns {String} flipped placement
14007             */
14008            function getOppositePlacement(placement) {
14009                var hash = {left: 'right', right: 'left', bottom: 'top', top: 'bottom'};
14010                return placement.replace(/left|right|bottom|top/g, function (matched) {
14011                    return hash[matched];
14012                });
14013            }
14014
14015            /**
14016             * Get offsets to the popper
14017             * @method
14018             * @memberof Popper.Utils
14019             * @param {Object} position - CSS position the Popper will get applied
14020             * @param {HTMLElement} popper - the popper element
14021             * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
14022             * @param {String} placement - one of the valid placement options
14023             * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
14024             */
14025            function getPopperOffsets(popper, referenceOffsets, placement) {
14026                placement = placement.split('-')[0];
14027
14028                // Get popper node sizes
14029                var popperRect = getOuterSizes(popper);
14030
14031                // Add position, width and height to our offsets object
14032                var popperOffsets = {
14033                    width: popperRect.width,
14034                    height: popperRect.height
14035                };
14036
14037                // depending by the popper placement we have to compute its offsets slightly differently
14038                var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
14039                var mainSide = isHoriz ? 'top' : 'left';
14040                var secondarySide = isHoriz ? 'left' : 'top';
14041                var measurement = isHoriz ? 'height' : 'width';
14042                var secondaryMeasurement = !isHoriz ? 'height' : 'width';
14043
14044                popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
14045                if (placement === secondarySide) {
14046                    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
14047                } else {
14048                    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
14049                }
14050
14051                return popperOffsets;
14052            }
14053
14054            /**
14055             * Mimics the `find` method of Array
14056             * @method
14057             * @memberof Popper.Utils
14058             * @argument {Array} arr
14059             * @argument prop
14060             * @argument value
14061             * @returns index or -1
14062             */
14063            function find(arr, check) {
14064                // use native find if supported
14065                if (Array.prototype.find) {
14066                    return arr.find(check);
14067                }
14068
14069                // use `filter` to obtain the same behavior of `find`
14070                return arr.filter(check)[0];
14071            }
14072
14073            /**
14074             * Return the index of the matching object
14075             * @method
14076             * @memberof Popper.Utils
14077             * @argument {Array} arr
14078             * @argument prop
14079             * @argument value
14080             * @returns index or -1
14081             */
14082            function findIndex(arr, prop, value) {
14083                // use native findIndex if supported
14084                if (Array.prototype.findIndex) {
14085                    return arr.findIndex(function (cur) {
14086                        return cur[prop] === value;
14087                    });
14088                }
14089
14090                // use `find` + `indexOf` if `findIndex` isn't supported
14091                var match = find(arr, function (obj) {
14092                    return obj[prop] === value;
14093                });
14094                return arr.indexOf(match);
14095            }
14096
14097            /**
14098             * Loop trough the list of modifiers and run them in order,
14099             * each of them will then edit the data object.
14100             * @method
14101             * @memberof Popper.Utils
14102             * @param {dataObject} data
14103             * @param {Array} modifiers
14104             * @param {String} ends - Optional modifier name used as stopper
14105             * @returns {dataObject}
14106             */
14107            function runModifiers(modifiers, data, ends) {
14108                var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
14109
vendor: 22,082 bytes, lines 14110-14594
14110                modifiersToRun.forEach(function (modifier) {
14111                    if (modifier['function']) {
14112                        // eslint-disable-line dot-notation
14113                        console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
14114                    }
14115                    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
14116                    if (modifier.enabled && isFunction(fn)) {
14117                        // Add properties to offsets to make them a complete clientRect object
14118                        // we do this before each modifier to make sure the previous one doesn't
14119                        // mess with these values
14120                        data.offsets.popper = getClientRect(data.offsets.popper);
14121                        data.offsets.reference = getClientRect(data.offsets.reference);
14122
14123                        data = fn(data, modifier);
14124                    }
14125                });
14126
14127                return data;
14128            }
14129
14130            /**
14131             * Updates the position of the popper, computing the new offsets and applying
14132             * the new style.<br />
14133             * Prefer `scheduleUpdate` over `update` because of performance reasons.
14134             * @method
14135             * @memberof Popper
14136             */
14137            function update() {
14138                // if popper is destroyed, don't perform any further update
14139                if (this.state.isDestroyed) {
14140                    return;
14141                }
14142
14143                var data = {
14144                    instance: this,
14145                    styles: {},
14146                    arrowStyles: {},
14147                    attributes: {},
14148                    flipped: false,
14149                    offsets: {}
14150                };
14151
14152                // compute reference element offsets
14153                data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
14154
14155                // compute auto placement, store placement inside the data object,
14156                // modifiers will be able to edit `placement` if needed
14157                // and refer to originalPlacement to know the original value
14158                data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
14159
14160                // store the computed placement inside `originalPlacement`
14161                data.originalPlacement = data.placement;
14162
14163                data.positionFixed = this.options.positionFixed;
14164
14165                // compute the popper offsets
14166                data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
14167
14168                data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
14169
14170                // run the modifiers
14171                data = runModifiers(this.modifiers, data);
14172
14173                // the first `update` will call `onCreate` callback
14174                // the other ones will call `onUpdate` callback
14175                if (!this.state.isCreated) {
14176                    this.state.isCreated = true;
14177                    this.options.onCreate(data);
14178                } else {
14179                    this.options.onUpdate(data);
14180                }
14181            }
14182
14183            /**
14184             * Helper used to know if the given modifier is enabled.
14185             * @method
14186             * @memberof Popper.Utils
14187             * @returns {Boolean}
14188             */
14189            function isModifierEnabled(modifiers, modifierName) {
14190                return modifiers.some(function (_ref) {
14191                    var name = _ref.name,
14192                        enabled = _ref.enabled;
14193                    return enabled && name === modifierName;
14194                });
14195            }
14196
14197            /**
14198             * Get the prefixed supported property name
14199             * @method
14200             * @memberof Popper.Utils
14201             * @argument {String} property (camelCase)
14202             * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
14203             */
14204            function getSupportedPropertyName(property) {
14205                var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
14206                var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
14207
14208                for (var i = 0; i < prefixes.length; i++) {
14209                    var prefix = prefixes[i];
14210                    var toCheck = prefix ? '' + prefix + upperProp : property;
14211                    if (typeof document.body.style[toCheck] !== 'undefined') {
14212                        return toCheck;
14213                    }
14214                }
14215                return null;
14216            }
14217
14218            /**
14219             * Destroys the popper.
14220             * @method
14221             * @memberof Popper
14222             */
14223            function destroy() {
14224                this.state.isDestroyed = true;
14225
14226                // touch DOM only if `applyStyle` modifier is enabled
14227                if (isModifierEnabled(this.modifiers, 'applyStyle')) {
14228                    this.popper.removeAttribute('x-placement');
14229                    this.popper.style.position = '';
14230                    this.popper.style.top = '';
14231                    this.popper.style.left = '';
14232                    this.popper.style.right = '';
14233                    this.popper.style.bottom = '';
14234                    this.popper.style.willChange = '';
14235                    this.popper.style[getSupportedPropertyName('transform')] = '';
14236                }
14237
14238                this.disableEventListeners();
14239
14240                // remove the popper if user explicity asked for the deletion on destroy
14241                // do not use `remove` because IE11 doesn't support it
14242                if (this.options.removeOnDestroy) {
14243                    this.popper.parentNode.removeChild(this.popper);
14244                }
14245                return this;
14246            }
14247
14248            /**
14249             * Get the window associated with the element
14250             * @argument {Element} element
14251             * @returns {Window}
14252             */
14253            function getWindow(element) {
14254                var ownerDocument = element.ownerDocument;
14255                return ownerDocument ? ownerDocument.defaultView : window;
14256            }
14257
14258            function attachToScrollParents(scrollParent, event, callback, scrollParents) {
14259                var isBody = scrollParent.nodeName === 'BODY';
14260                var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
14261                target.addEventListener(event, callback, {passive: true});
14262
14263                if (!isBody) {
14264                    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
14265                }
14266                scrollParents.push(target);
14267            }
14268
14269            /**
14270             * Setup needed event listeners used to update the popper position
14271             * @method
14272             * @memberof Popper.Utils
14273             * @private
14274             */
14275            function setupEventListeners(reference, options, state, updateBound) {
14276                // Resize event listener on window
14277                state.updateBound = updateBound;
14278                getWindow(reference).addEventListener('resize', state.updateBound, {passive: true});
14279
14280                // Scroll event listener on scroll parents
14281                var scrollElement = getScrollParent(reference);
14282                attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
14283                state.scrollElement = scrollElement;
14284                state.eventsEnabled = true;
14285
14286                return state;
14287            }
14288
14289            /**
14290             * It will add resize/scroll events and start recalculating
14291             * position of the popper element when they are triggered.
14292             * @method
14293             * @memberof Popper
14294             */
14295            function enableEventListeners() {
14296                if (!this.state.eventsEnabled) {
14297                    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
14298                }
14299            }
14300
14301            /**
14302             * Remove event listeners used to update the popper position
14303             * @method
14304             * @memberof Popper.Utils
14305             * @private
14306             */
14307            function removeEventListeners(reference, state) {
14308                // Remove resize event listener on window
14309                getWindow(reference).removeEventListener('resize', state.updateBound);
14310
14311                // Remove scroll event listener on scroll parents
14312                state.scrollParents.forEach(function (target) {
14313                    target.removeEventListener('scroll', state.updateBound);
14314                });
14315
14316                // Reset state
14317                state.updateBound = null;
14318                state.scrollParents = [];
14319                state.scrollElement = null;
14320                state.eventsEnabled = false;
14321                return state;
14322            }
14323
14324            /**
14325             * It will remove resize/scroll events and won't recalculate popper position
14326             * when they are triggered. It also won't trigger `onUpdate` callback anymore,
14327             * unless you call `update` method manually.
14328             * @method
14329             * @memberof Popper
14330             */
14331            function disableEventListeners() {
14332                if (this.state.eventsEnabled) {
14333                    cancelAnimationFrame(this.scheduleUpdate);
14334                    this.state = removeEventListeners(this.reference, this.state);
14335                }
14336            }
14337
14338            /**
14339             * Tells if a given input is a number
14340             * @method
14341             * @memberof Popper.Utils
14342             * @param {*} input to check
14343             * @return {Boolean}
14344             */
14345            function isNumeric(n) {
14346                return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
14347            }
14348
14349            /**
14350             * Set the style to the given popper
14351             * @method
14352             * @memberof Popper.Utils
14353             * @argument {Element} element - Element to apply the style to
14354             * @argument {Object} styles
14355             * Object with a list of properties and values which will be applied to the element
14356             */
14357            function setStyles(element, styles) {
14358                Object.keys(styles).forEach(function (prop) {
14359                    var unit = '';
14360                    // add unit if the value is numeric and is one of the following
14361                    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
14362                        unit = 'px';
14363                    }
14364                    element.style[prop] = styles[prop] + unit;
14365                });
14366            }
14367
14368            /**
14369             * Set the attributes to the given popper
14370             * @method
14371             * @memberof Popper.Utils
14372             * @argument {Element} element - Element to apply the attributes to
14373             * @argument {Object} styles
14374             * Object with a list of properties and values which will be applied to the element
14375             */
14376            function setAttributes(element, attributes) {
14377                Object.keys(attributes).forEach(function (prop) {
14378                    var value = attributes[prop];
14379                    if (value !== false) {
14380                        element.setAttribute(prop, attributes[prop]);
14381                    } else {
14382                        element.removeAttribute(prop);
14383                    }
14384                });
14385            }
14386
14387            /**
14388             * @function
14389             * @memberof Modifiers
14390             * @argument {Object} data - The data object generated by `update` method
14391             * @argument {Object} data.styles - List of style properties - values to apply to popper element
14392             * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
14393             * @argument {Object} options - Modifiers configuration and options
14394             * @returns {Object} The same data object
14395             */
14396            function applyStyle(data) {
14397                // any property present in `data.styles` will be applied to the popper,
14398                // in this way we can make the 3rd party modifiers add custom styles to it
14399                // Be aware, modifiers could override the properties defined in the previous
14400                // lines of this modifier!
14401                setStyles(data.instance.popper, data.styles);
14402
14403                // any property present in `data.attributes` will be applied to the popper,
14404                // they will be set as HTML attributes of the element
14405                setAttributes(data.instance.popper, data.attributes);
14406
14407                // if arrowElement is defined and arrowStyles has some properties
14408                if (data.arrowElement && Object.keys(data.arrowStyles).length) {
14409                    setStyles(data.arrowElement, data.arrowStyles);
14410                }
14411
14412                return data;
14413            }
14414
14415            /**
14416             * Set the x-placement attribute before everything else because it could be used
14417             * to add margins to the popper margins needs to be calculated to get the
14418             * correct popper offsets.
14419             * @method
14420             * @memberof Popper.modifiers
14421             * @param {HTMLElement} reference - The reference element used to position the popper
14422             * @param {HTMLElement} popper - The HTML element used as popper
14423             * @param {Object} options - Popper.js options
14424             */
14425            function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
14426                // compute reference element offsets
14427                var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
14428
14429                // compute auto placement, store placement inside the data object,
14430                // modifiers will be able to edit `placement` if needed
14431                // and refer to originalPlacement to know the original value
14432                var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
14433
14434                popper.setAttribute('x-placement', placement);
14435
14436                // Apply `position` to popper before anything else because
14437                // without the position applied we can't guarantee correct computations
14438                setStyles(popper, {position: options.positionFixed ? 'fixed' : 'absolute'});
14439
14440                return options;
14441            }
14442
14443            /**
14444             * @function
14445             * @memberof Modifiers
14446             * @argument {Object} data - The data object generated by `update` method
14447             * @argument {Object} options - Modifiers configuration and options
14448             * @returns {Object} The data object, properly modified
14449             */
14450            function computeStyle(data, options) {
14451                var x = options.x,
14452                    y = options.y;
14453                var popper = data.offsets.popper;
14454
14455                // Remove this legacy support in Popper.js v2
14456
14457                var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
14458                    return modifier.name === 'applyStyle';
14459                }).gpuAcceleration;
14460                if (legacyGpuAccelerationOption !== undefined) {
14461                    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
14462                }
14463                var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
14464
14465                var offsetParent = getOffsetParent(data.instance.popper);
14466                var offsetParentRect = getBoundingClientRect(offsetParent);
14467
14468                // Styles
14469                var styles = {
14470                    position: popper.position
14471                };
14472
14473                // Avoid blurry text by using full pixel integers.
14474                // For pixel-perfect positioning, top/bottom prefers rounded
14475                // values, while left/right prefers floored values.
14476                var offsets = {
14477                    left: Math.floor(popper.left),
14478                    top: Math.round(popper.top),
14479                    bottom: Math.round(popper.bottom),
14480                    right: Math.floor(popper.right)
14481                };
14482
14483                var sideA = x === 'bottom' ? 'top' : 'bottom';
14484                var sideB = y === 'right' ? 'left' : 'right';
14485
14486                // if gpuAcceleration is set to `true` and transform is supported,
14487                //  we use `translate3d` to apply the position to the popper we
14488                // automatically use the supported prefixed version if needed
14489                var prefixedProperty = getSupportedPropertyName('transform');
14490
14491                // now, let's make a step back and look at this code closely (wtf?)
14492                // If the content of the popper grows once it's been positioned, it
14493                // may happen that the popper gets misplaced because of the new content
14494                // overflowing its reference element
14495                // To avoid this problem, we provide two options (x and y), which allow
14496                // the consumer to define the offset origin.
14497                // If we position a popper on top of a reference element, we can set
14498                // `x` to `top` to make the popper grow towards its top instead of
14499                // its bottom.
14500                var left = void 0,
14501                    top = void 0;
14502                if (sideA === 'bottom') {
14503                    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
14504                    // and not the bottom of the html element
14505                    if (offsetParent.nodeName === 'HTML') {
14506                        top = -offsetParent.clientHeight + offsets.bottom;
14507                    } else {
14508                        top = -offsetParentRect.height + offsets.bottom;
14509                    }
14510                } else {
14511                    top = offsets.top;
14512                }
14513                if (sideB === 'right') {
14514                    if (offsetParent.nodeName === 'HTML') {
14515                        left = -offsetParent.clientWidth + offsets.right;
14516                    } else {
14517                        left = -offsetParentRect.width + offsets.right;
14518                    }
14519                } else {
14520                    left = offsets.left;
14521                }
14522                if (gpuAcceleration && prefixedProperty) {
14523                    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
14524                    styles[sideA] = 0;
14525                    styles[sideB] = 0;
14526                    styles.willChange = 'transform';
14527                } else {
14528                    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
14529                    var invertTop = sideA === 'bottom' ? -1 : 1;
14530                    var invertLeft = sideB === 'right' ? -1 : 1;
14531                    styles[sideA] = top * invertTop;
14532                    styles[sideB] = left * invertLeft;
14533                    styles.willChange = sideA + ', ' + sideB;
14534                }
14535
14536                // Attributes
14537                var attributes = {
14538                    'x-placement': data.placement
14539                };
14540
14541                // Update `data` attributes, styles and arrowStyles
14542                data.attributes = _extends({}, attributes, data.attributes);
14543                data.styles = _extends({}, styles, data.styles);
14544                data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
14545
14546                return data;
14547            }
14548
14549            /**
14550             * Helper used to know if the given modifier depends from another one.<br />
14551             * It checks if the needed modifier is listed and enabled.
14552             * @method
14553             * @memberof Popper.Utils
14554             * @param {Array} modifiers - list of modifiers
14555             * @param {String} requestingName - name of requesting modifier
14556             * @param {String} requestedName - name of requested modifier
14557             * @returns {Boolean}
14558             */
14559            function isModifierRequired(modifiers, requestingName, requestedName) {
14560                var requesting = find(modifiers, function (_ref) {
14561                    var name = _ref.name;
14562                    return name === requestingName;
14563                });
14564
14565                var isRequired = !!requesting && modifiers.some(function (modifier) {
14566                    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
14567                });
14568
14569                if (!isRequired) {
14570                    var _requesting = '`' + requestingName + '`';
14571                    var requested = '`' + requestedName + '`';
14572                    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
14573                }
14574                return isRequired;
14575            }
14576
14577            /**
14578             * @function
14579             * @memberof Modifiers
14580             * @argument {Object} data - The data object generated by update method
14581             * @argument {Object} options - Modifiers configuration and options
14582             * @returns {Object} The data object, properly modified
14583             */
14584            function arrow(data, options) {
14585                var _data$offsets$arrow;
14586
14587                // arrow depends on keepTogether in order to work
14588                if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
14589                    return data;
14590                }
14591
14592                var arrowElement = options.element;
14593
14594                // if arrowElement is a string, suppose it's a CSS 
vendor: 4,253 bytes, lines 14594-14685
14594selector
14595                if (typeof arrowElement === 'string') {
14596                    arrowElement = data.instance.popper.querySelector(arrowElement);
14597
14598                    // if arrowElement is not found, don't run the modifier
14599                    if (!arrowElement) {
14600                        return data;
14601                    }
14602                } else {
14603                    // if the arrowElement isn't a query selector we must check that the
14604                    // provided DOM node is child of its popper node
14605                    if (!data.instance.popper.contains(arrowElement)) {
14606                        console.warn('WARNING: `arrow.element` must be child of its popper element!');
14607                        return data;
14608                    }
14609                }
14610
14611                var placement = data.placement.split('-')[0];
14612                var _data$offsets = data.offsets,
14613                    popper = _data$offsets.popper,
14614                    reference = _data$offsets.reference;
14615
14616                var isVertical = ['left', 'right'].indexOf(placement) !== -1;
14617
14618                var len = isVertical ? 'height' : 'width';
14619                var sideCapitalized = isVertical ? 'Top' : 'Left';
14620                var side = sideCapitalized.toLowerCase();
14621                var altSide = isVertical ? 'left' : 'top';
14622                var opSide = isVertical ? 'bottom' : 'right';
14623                var arrowElementSize = getOuterSizes(arrowElement)[len];
14624
14625                //
14626                // extends keepTogether behavior making sure the popper and its
14627                // reference have enough pixels in conjunction
14628                //
14629
14630                // top/left side
14631                if (reference[opSide] - arrowElementSize < popper[side]) {
14632                    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
14633                }
14634                // bottom/right side
14635                if (reference[side] + arrowElementSize > popper[opSide]) {
14636                    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
14637                }
14638                data.offsets.popper = getClientRect(data.offsets.popper);
14639
14640                // compute center of the popper
14641                var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
14642
14643                // Compute the sideValue using the updated popper offsets
14644                // take popper margin in account because we don't have this info available
14645                var css = getStyleComputedProperty(data.instance.popper);
14646                var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
14647                var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
14648                var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
14649
14650                // prevent arrowElement from being placed not contiguously to its popper
14651                sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
14652
14653                data.arrowElement = arrowElement;
14654                data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
14655
14656                return data;
14657            }
14658
14659            /**
14660             * Get the opposite placement variation of the given one
14661             * @method
14662             * @memberof Popper.Utils
14663             * @argument {String} placement variation
14664             * @returns {String} flipped placement variation
14665             */
14666            function getOppositeVariation(variation) {
14667                if (variation === 'end') {
14668                    return 'start';
14669                } else if (variation === 'start') {
14670                    return 'end';
14671                }
14672                return variation;
14673            }
14674
14675            /**
14676             * List of accepted placements to use as values of the `placement` option.<br />
14677             * Valid placements are:
14678             * - `auto`
14679             * - `top`
14680             * - `right`
14681             * - `bottom`
14682             * - `left`
14683             *
14684             * Each placement can have a variation from this list:
14685             * - `-start`
14686             * - `-end`
14687             *
14688             * Variations are interpreted easily if you think of them as the left to right
14689             * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
14690             * is right.<br />
14691             * Vertically (`left` and `right`), `start` is top and `end` is bottom.
14692             *
14693             * Some valid examples are:
14694             * - `top-end` (on top of reference, right aligned)
14695             * - `right-start` (on right of reference, top aligned)
14696             * - `bottom` (on bottom, centered)
14697             * - `auto-end` (on the side with more space available, alignment depends by placement)
14698             *
14699             * @static
14700             * @type {Array}
14701             * @enum {String}
14702             * @readonly
14703             * @method placements
14704             * @memberof Popper
14705             */
14706            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'];
14707
14708// Get rid of `auto` `auto-start` and `auto-end`
14709            var validPlacements = placements.slice(3);
14710
14711            /**
14712             * Given an initial placement, returns all the subsequent placements
14713             * clockwise (or counter-clockwise).
14714             *
14715             * @method
14716             * @memberof Popper.Utils
14717             * @argument {String} placement - A valid placement (it accepts variations)
14718             * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
14719             * @returns {Array} placements including their variations
14720             */
14721            function clockwise(placement) {
14722                var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
14723
14724                var index = validPlacements.indexOf(placement);
14725                var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
14726                return counter ? arr.reverse() : arr;
14727            }
14728
14729            var BEHAVIORS = {
14730                FLIP: 'flip',
14731                CLOCKWISE: 'clockwise',
14732                COUNTERCLOCKWISE: 'counterclockwise'
14733            };
14734
14735            /**
14736             * @function
14737             * @memberof Modifiers
14738             * @argument {Object} data - The data object generated by update method
14739             * @argument {Object} options - Modifiers configuration and options
14740             * @returns {Object} The data object, properly modified
14741             */
14742            function flip(data, options) {
14743                // if `inner` modifier is enabled, we can't use the `flip` modifier
14744                if (isModifierEnabled(data.instance.modifiers, 'inner')) {
14745                    return data;
14746                }
14747
14748                if (data.flipped && data.placement === data.originalPlacement) {
14749                    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
14750                    return data;
14751                }
14752
14753                var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
14754
14755                var placement = data.placement.split('-')[0];
14756                var placementOpposite = getOppositePlacement(placement);
14757                var variation = data.placement.split('-')[1] || '';
14758
14759                var flipOrder = [];
14760
14761                switch (options.behavior) {
14762                    case BEHAVIORS.FLIP:
14763                        flipOrder = [placement, placementOpposite];
14764                        break;
14765                    case BEHAVIORS.CLOCKWISE:
14766                        flipOrder = clockwise(placement);
14767                        break;
14768                    case BEHAVIORS.COUNTERCLOCKWISE:
14769                        flipOrder = clockwise(placement, true);
14770                        break;
14771                    default:
14772                        flipOrder = options.behavior;
14773                }
14774
14775                flipOrder.forEach(function (step, index) {
14776                    if (placement !== step || flipOrder.length === index + 1) {
14777                        return data;
14778                    }
14779
14780                    placement = data.placement.split('-')[0];
14781                    placementOpposite = getOppositePlacement(placement);
14782
14783                    var popperOffsets = data.offsets.popper;
14784                    var refOffsets = data.offsets.reference;
14785
14786                    // using floor because the reference offsets may contain decimals we are not going to consider here
vendor: 2,004 bytes, lines 14787-14814
14787                    var floor = Math.floor;
14788                    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);
14789
14790                    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
14791                    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
14792                    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
14793                    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
14794
14795                    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
14796
14797                    // flip the variation if required
14798                    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
14799                    var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
14800
14801                    if (overlapsRef || overflowsBoundaries || flippedVariation) {
14802                        // this boolean to detect any flip loop
14803                        data.flipped = true;
14804
14805                        if (overlapsRef || overflowsBoundaries) {
14806                            placement = flipOrder[index + 1];
14807                        }
14808
14809                        if (flippedVariation) {
14810                            variation = getOppositeVariation(variation);
14811                        }
14812
14813                        data.placement = placement + (variation ? '-' + variation : '');
14814
vendor: 20,429 bytes, lines 14815-15250
14815                        // this object contains `position`, we want to preserve it along with
14816                        // any additional property we may add in the future
14817                        data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
14818
14819                        data = runModifiers(data.instance.modifiers, data, 'flip');
14820                    }
14821                });
14822                return data;
14823            }
14824
14825            /**
14826             * @function
14827             * @memberof Modifiers
14828             * @argument {Object} data - The data object generated by update method
14829             * @argument {Object} options - Modifiers configuration and options
14830             * @returns {Object} The data object, properly modified
14831             */
14832            function keepTogether(data) {
14833                var _data$offsets = data.offsets,
14834                    popper = _data$offsets.popper,
14835                    reference = _data$offsets.reference;
14836
14837                var placement = data.placement.split('-')[0];
14838                var floor = Math.floor;
14839                var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
14840                var side = isVertical ? 'right' : 'bottom';
14841                var opSide = isVertical ? 'left' : 'top';
14842                var measurement = isVertical ? 'width' : 'height';
14843
14844                if (popper[side] < floor(reference[opSide])) {
14845                    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
14846                }
14847                if (popper[opSide] > floor(reference[side])) {
14848                    data.offsets.popper[opSide] = floor(reference[side]);
14849                }
14850
14851                return data;
14852            }
14853
14854            /**
14855             * Converts a string containing value + unit into a px value number
14856             * @function
14857             * @memberof {modifiers~offset}
14858             * @private
14859             * @argument {String} str - Value + unit string
14860             * @argument {String} measurement - `height` or `width`
14861             * @argument {Object} popperOffsets
14862             * @argument {Object} referenceOffsets
14863             * @returns {Number|String}
14864             * Value in pixels, or original string if no values were extracted
14865             */
14866            function toValue(str, measurement, popperOffsets, referenceOffsets) {
14867                // separate value from unit
14868                var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
14869                var value = +split[1];
14870                var unit = split[2];
14871
14872                // If it's not a number it's an operator, I guess
14873                if (!value) {
14874                    return str;
14875                }
14876
14877                if (unit.indexOf('%') === 0) {
14878                    var element = void 0;
14879                    switch (unit) {
14880                        case '%p':
14881                            element = popperOffsets;
14882                            break;
14883                        case '%':
14884                        case '%r':
14885                        default:
14886                            element = referenceOffsets;
14887                    }
14888
14889                    var rect = getClientRect(element);
14890                    return rect[measurement] / 100 * value;
14891                } else if (unit === 'vh' || unit === 'vw') {
14892                    // if is a vh or vw, we calculate the size based on the viewport
14893                    var size = void 0;
14894                    if (unit === 'vh') {
14895                        size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
14896                    } else {
14897                        size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
14898                    }
14899                    return size / 100 * value;
14900                } else {
14901                    // if is an explicit pixel unit, we get rid of the unit and keep the value
14902                    // if is an implicit unit, it's px, and we return just the value
14903                    return value;
14904                }
14905            }
14906
14907            /**
14908             * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
14909             * @function
14910             * @memberof {modifiers~offset}
14911             * @private
14912             * @argument {String} offset
14913             * @argument {Object} popperOffsets
14914             * @argument {Object} referenceOffsets
14915             * @argument {String} basePlacement
14916             * @returns {Array} a two cells array with x and y offsets in numbers
14917             */
14918            function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
14919                var offsets = [0, 0];
14920
14921                // Use height if placement is left or right and index is 0 otherwise use width
14922                // in this way the first offset will use an axis and the second one
14923                // will use the other one
14924                var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
14925
14926                // Split the offset string to obtain a list of values and operands
14927                // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
14928                var fragments = offset.split(/(\+|\-)/).map(function (frag) {
14929                    return frag.trim();
14930                });
14931
14932                // Detect if the offset string contains a pair of values or a single one
14933                // they could be separated by comma or space
14934                var divider = fragments.indexOf(find(fragments, function (frag) {
14935                    return frag.search(/,|\s/) !== -1;
14936                }));
14937
14938                if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
14939                    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
14940                }
14941
14942                // If divider is found, we divide the list of values and operands to divide
14943                // them by ofset X and Y.
14944                var splitRegex = /\s*,\s*|\s+/;
14945                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];
14946
14947                // Convert the values with units to absolute pixels to allow our computations
14948                ops = ops.map(function (op, index) {
14949                    // Most of the units rely on the orientation of the popper
14950                    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
14951                    var mergeWithPrevious = false;
14952                    return op
14953                        // This aggregates any `+` or `-` sign that aren't considered operators
14954                        // e.g.: 10 + +5 => [10, +, +5]
14955                        .reduce(function (a, b) {
14956                            if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
14957                                a[a.length - 1] = b;
14958                                mergeWithPrevious = true;
14959                                return a;
14960                            } else if (mergeWithPrevious) {
14961                                a[a.length - 1] += b;
14962                                mergeWithPrevious = false;
14963                                return a;
14964                            } else {
14965                                return a.concat(b);
14966                            }
14967                        }, [])
14968                        // Here we convert the string values into number values (in px)
14969                        .map(function (str) {
14970                            return toValue(str, measurement, popperOffsets, referenceOffsets);
14971                        });
14972                });
14973
14974                // Loop trough the offsets arrays and execute the operations
14975                ops.forEach(function (op, index) {
14976                    op.forEach(function (frag, index2) {
14977                        if (isNumeric(frag)) {
14978                            offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
14979                        }
14980                    });
14981                });
14982                return offsets;
14983            }
14984
14985            /**
14986             * @function
14987             * @memberof Modifiers
14988             * @argument {Object} data - The data object generated by update method
14989             * @argument {Object} options - Modifiers configuration and options
14990             * @argument {Number|String} options.offset=0
14991             * The offset value as described in the modifier description
14992             * @returns {Object} The data object, properly modified
14993             */
14994            function offset(data, _ref) {
14995                var offset = _ref.offset;
14996                var placement = data.placement,
14997                    _data$offsets = data.offsets,
14998                    popper = _data$offsets.popper,
14999                    reference = _data$offsets.reference;
15000
15001                var basePlacement = placement.split('-')[0];
15002
15003                var offsets = void 0;
15004                if (isNumeric(+offset)) {
15005                    offsets = [+offset, 0];
15006                } else {
15007                    offsets = parseOffset(offset, popper, reference, basePlacement);
15008                }
15009
15010                if (basePlacement === 'left') {
15011                    popper.top += offsets[0];
15012                    popper.left -= offsets[1];
15013                } else if (basePlacement === 'right') {
15014                    popper.top += offsets[0];
15015                    popper.left += offsets[1];
15016                } else if (basePlacement === 'top') {
15017                    popper.left += offsets[0];
15018                    popper.top -= offsets[1];
15019                } else if (basePlacement === 'bottom') {
15020                    popper.left += offsets[0];
15021                    popper.top += offsets[1];
15022                }
15023
15024                data.popper = popper;
15025                return data;
15026            }
15027
15028            /**
15029             * @function
15030             * @memberof Modifiers
15031             * @argument {Object} data - The data object generated by `update` method
15032             * @argument {Object} options - Modifiers configuration and options
15033             * @returns {Object} The data object, properly modified
15034             */
15035            function preventOverflow(data, options) {
15036                var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
15037
15038                // If offsetParent is the reference element, we really want to
15039                // go one step up and use the next offsetParent as reference to
15040                // avoid to make this modifier completely useless and look like broken
15041                if (data.instance.reference === boundariesElement) {
15042                    boundariesElement = getOffsetParent(boundariesElement);
15043                }
15044
15045                // NOTE: DOM access here
15046                // resets the popper's position so that the document size can be calculated excluding
15047                // the size of the popper element itself
15048                var transformProp = getSupportedPropertyName('transform');
15049                var popperStyles = data.instance.popper.style; // assignment to help minification
15050                var top = popperStyles.top,
15051                    left = popperStyles.left,
15052                    transform = popperStyles[transformProp];
15053
15054                popperStyles.top = '';
15055                popperStyles.left = '';
15056                popperStyles[transformProp] = '';
15057
15058                var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
15059
15060                // NOTE: DOM access here
15061                // restores the original style properties after the offsets have been computed
15062                popperStyles.top = top;
15063                popperStyles.left = left;
15064                popperStyles[transformProp] = transform;
15065
15066                options.boundaries = boundaries;
15067
15068                var order = options.priority;
15069                var popper = data.offsets.popper;
15070
15071                var check = {
15072                    primary: function primary(placement) {
15073                        var value = popper[placement];
15074                        if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
15075                            value = Math.max(popper[placement], boundaries[placement]);
15076                        }
15077                        return defineProperty({}, placement, value);
15078                    },
15079                    secondary: function secondary(placement) {
15080                        var mainSide = placement === 'right' ? 'left' : 'top';
15081                        var value = popper[mainSide];
15082                        if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
15083                            value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
15084                        }
15085                        return defineProperty({}, mainSide, value);
15086                    }
15087                };
15088
15089                order.forEach(function (placement) {
15090                    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
15091                    popper = _extends({}, popper, check[side](placement));
15092                });
15093
15094                data.offsets.popper = popper;
15095
15096                return data;
15097            }
15098
15099            /**
15100             * @function
15101             * @memberof Modifiers
15102             * @argument {Object} data - The data object generated by `update` method
15103             * @argument {Object} options - Modifiers configuration and options
15104             * @returns {Object} The data object, properly modified
15105             */
15106            function shift(data) {
15107                var placement = data.placement;
15108                var basePlacement = placement.split('-')[0];
15109                var shiftvariation = placement.split('-')[1];
15110
15111                // if shift shiftvariation is specified, run the modifier
15112                if (shiftvariation) {
15113                    var _data$offsets = data.offsets,
15114                        reference = _data$offsets.reference,
15115                        popper = _data$offsets.popper;
15116
15117                    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
15118                    var side = isVertical ? 'left' : 'top';
15119                    var measurement = isVertical ? 'width' : 'height';
15120
15121                    var shiftOffsets = {
15122                        start: defineProperty({}, side, reference[side]),
15123                        end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
15124                    };
15125
15126                    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
15127                }
15128
15129                return data;
15130            }
15131
15132            /**
15133             * @function
15134             * @memberof Modifiers
15135             * @argument {Object} data - The data object generated by update method
15136             * @argument {Object} options - Modifiers configuration and options
15137             * @returns {Object} The data object, properly modified
15138             */
15139            function hide(data) {
15140                if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
15141                    return data;
15142                }
15143
15144                var refRect = data.offsets.reference;
15145                var bound = find(data.instance.modifiers, function (modifier) {
15146                    return modifier.name === 'preventOverflow';
15147                }).boundaries;
15148
15149                if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
15150                    // Avoid unnecessary DOM access if visibility hasn't changed
15151                    if (data.hide === true) {
15152                        return data;
15153                    }
15154
15155                    data.hide = true;
15156                    data.attributes['x-out-of-boundaries'] = '';
15157                } else {
15158                    // Avoid unnecessary DOM access if visibility hasn't changed
15159                    if (data.hide === false) {
15160                        return data;
15161                    }
15162
15163                    data.hide = false;
15164                    data.attributes['x-out-of-boundaries'] = false;
15165                }
15166
15167                return data;
15168            }
15169
15170            /**
15171             * @function
15172             * @memberof Modifiers
15173             * @argument {Object} data - The data object generated by `update` method
15174             * @argument {Object} options - Modifiers configuration and options
15175             * @returns {Object} The data object, properly modified
15176             */
15177            function inner(data) {
15178                var placement = data.placement;
15179                var basePlacement = placement.split('-')[0];
15180                var _data$offsets = data.offsets,
15181                    popper = _data$offsets.popper,
15182                    reference = _data$offsets.reference;
15183
15184                var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
15185
15186                var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
15187
15188                popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
15189
15190                data.placement = getOppositePlacement(placement);
15191                data.offsets.popper = getClientRect(popper);
15192
15193                return data;
15194            }
15195
15196            /**
15197             * Modifier function, each modifier can have a function of this type assigned
15198             * to its `fn` property.<br />
15199             * These functions will be called on each update, this means that you must
15200             * make sure they are performant enough to avoid performance bottlenecks.
15201             *
15202             * @function ModifierFn
15203             * @argument {dataObject} data - The data object generated by `update` method
15204             * @argument {Object} options - Modifiers configuration and options
15205             * @returns {dataObject} The data object, properly modified
15206             */
15207
15208            /**
15209             * Modifiers are plugins used to alter the behavior of your poppers.<br />
15210             * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
15211             * needed by the library.
15212             *
15213             * Usually you don't want to override the `order`, `fn` and `onLoad` props.
15214             * All the other properties are configurations that could be tweaked.
15215             * @namespace modifiers
15216             */
15217            var modifiers = {
15218                /**
15219                 * Modifier used to shift the popper on the start or end of its reference
15220                 * element.<br />
15221                 * It will read the variation of the `placement` property.<br />
15222                 * It can be one either `-end` or `-start`.
15223                 * @memberof modifiers
15224                 * @inner
15225                 */
15226                shift: {
15227                    /** @prop {number} order=100 - Index used to define the order of execution */
15228                    order: 100,
15229                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15230                    enabled: true,
15231                    /** @prop {ModifierFn} */
15232                    fn: shift
15233                },
15234
15235                /**
15236                 * The `offset` modifier can shift your popper on both its axis.
15237                 *
15238                 * It accepts the following units:
15239                 * - `px` or unit-less, interpreted as pixels
15240                 * - `%` or `%r`, percentage relative to the length of the reference element
15241                 * - `%p`, percentage relative to the length of the popper element
15242                 * - `vw`, CSS viewport width unit
15243                 * - `vh`, CSS viewport height unit
15244                 *
15245                 * For length is intended the main axis relative to the placement of the popper.<br />
15246                 * This means that if the placement is `top` or `bottom`, the length will be the
15247                 * `width`. In case of `left` or `right`, it will be the `height`.
15248                 *
15249                 * You can provide a single value (as `Number` or `String`), or a pair of values
15250                 * as `String` divided by a comma or one (or more) white space
15250s.<br />
15251                 * The latter is a deprecated method because it leads to confusion and will be
15252                 * removed in v2.<br />
15253                 * Additionally, it accepts additions and subtractions between different units.
15254                 * Note that multiplications and divisions aren't supported.
15255                 *
15256                 * Valid examples are:
15257                 * ```
15258                 * 10
15259                 * '10%'
15260                 * '10, 10'
15261                 * '10%, 10'
15262                 * '10 + 10%'
15263                 * '10 - 5vh + 3%'
15264                 * '-10px + 5vh, 5px - 6%'
15265                 * ```
15266                 * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
15267                 * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
15268                 * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
15269                 *
15270                 * @memberof modifiers
15271                 * @inner
15272                 */
15273                offset: {
15274                    /** @prop {number} order=200 - Index used to define the order of execution */
15275                    order: 200,
15276                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15277                    enabled: true,
15278                    /** @prop {ModifierFn} */
15279                    fn: offset,
15280                    /** @prop {Number|String} offset=0
15281                     * The offset value as described in the modifier description
15282                     */
15283                    offset: 0
15284                },
15285
15286                /**
15287                 * Modifier used to prevent the popper from being positioned outside the boundary.
15288                 *
15289                 * A scenario exists where the reference itself is not within the boundaries.<br />
15290                 * We can say it has "escaped the boundaries" — or just "escaped".<br />
15291                 * In this case we need to decide whether the popper should either:
15292                 *
15293                 * - detach from the reference and remain "trapped" in the boundaries, or
15294                 * - if it should ignore the boundary and "escape with its reference"
15295                 *
15296                 * When `escapeWithReference` is set to`true` and reference is completely
15297                 * outside its boundaries, the popper will overflow (or completely leave)
15298                 * the boundaries in order to remain attached to the edge of the reference.
15299                 *
15300                 * @memberof modifiers
15301                 * @inner
15302                 */
15303                preventOverflow: {
15304                    /** @prop {number} order=300 - Index used to define the order of execution */
15305                    order: 300,
15306                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15307                    enabled: true,
15308                    /** @prop {ModifierFn} */
15309                    fn: preventOverflow,
15310                    /**
15311                     * @prop {Array} [priority=['left','right','top','bottom']]
15312                     * Popper will try to prevent overflow following these priorities by default,
15313                     * then, it could overflow on the left and on top of the `boundariesElement`
15314                     */
15315                    priority: ['left', 'right', 'top', 'bottom'],
15316                    /**
15317                     * @prop {number} padding=5
15318                     * Amount of pixel used to define a minimum distance between the boundaries
15319                     * and the popper. This makes sure the popper always has a little padding
15320                     * between the edges of its container
15321                     */
15322                    padding: 5,
15323                    /**
15324                     * @prop {String|HTMLElement} boundariesElement='scrollParent'
15325                     * Boundaries used by the modifier. Can be `scrollParent`, `window`,
15326                     * `viewport` or any DOM element.
15327                     */
15328                    boundariesElement: 'scrollParent'
15329                },
15330
15331                /**
15332                 * Modifier used to make sure the reference and its popper stay near each other
15333                 * without leaving any gap between the two. Especially useful when the arrow is
15334                 * enabled and you want to ensure that it points to its reference element.
15335                 * It cares only about the first axis. You can still have poppers with margin
15336                 * between the popper and its reference element.
15337                 * @memberof modifiers
15338                 * @inner
15339                 */
15340                keepTogether: {
15341                    /** @prop {number} order=400 - Index used to define the order of execution */
15342                    order: 400,
15343                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15344                    enabled: true,
15345                    /** @prop {ModifierFn} */
15346                    fn: keepTogether
15347                },
15348
15349                /**
15350                 * This modifier is used to move the `arrowElement` of the popper to make
15351                 * sure it is positioned between the reference element and its popper element.
15352                 * It will read the outer size of the `arrowElement` node to detect how many
15353                 * pixels of conjunction are needed.
15354                 *
15355                 * It has no effect if no `arrowElement` is provided.
15356                 * @memberof modifiers
15357                 * @inner
15358                 */
15359                arrow: {
15360                    /** @prop {number} order=500 - Index used to define the order of execution */
15361                    order: 500,
15362                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15363                    enabled: true,
15364                    /** @prop {ModifierFn} */
15365                    fn: arrow,
15366                    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
15367                    element: '[x-arrow]'
15368                },
15369
15370                /**
15371                 * Modifier used to flip the popper's placement when it starts to overlap its
15372                 * reference element.
15373                 *
15374                 * Requires the `preventOverflow` modifier before it in order to work.
15375                 *
15376                 * **NOTE:** this modifier will interrupt the current update cycle and will
15377                 * restart it if it detects the need to flip the placement.
15378                 * @memberof modifiers
15379                 * @inner
15380                 */
15381                flip: {
15382                    /** @prop {number} order=600 - Index used to define the order of execution */
15383                    order: 600,
15384                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15385                    enabled: true,
15386                    /** @prop {ModifierFn} */
15387                    fn: flip,
15388                    /**
15389                     * @prop {String|Array} behavior='flip'
15390                     * The behavior used to change the popper's placement. It can be one of
15391                     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
15392                     * placements (with optional variations)
15393                     */
15394                    behavior: 'flip',
15395                    /**
15396                     * @prop {number} padding=5
15397                     * The popper will flip if it hits the edges of the `boundariesElement`
15398                     */
15399                    padding: 5,
15400                    /**
15401                     * @prop {String|HTMLElement} boundariesElement='viewport'
15402                     * The element which will define the boundaries of the popper position.
15403                     * The popper will never be placed outside of the defined boundaries
15404                     * (except if `keepTogether` is enabled)
15405                     */
15406                    boundariesElement: 'viewport'
15407                },
15408
15409                /**
15410                 * Modifier used to make the popper flow toward the inner of the reference element.
15411                 * By default, when this modifier is disabled, the popper will be placed outside
15412                 * the reference element.
15413                 * @memberof modifiers
15414                 * @inner
15415                 */
15416                inner: {
15417                    /** @prop {number} order=700 - Index used to define the order of execution */
15418                    order: 700,
15419                    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
15420                    enabled: false,
15421                    /** @prop {ModifierFn} */
15422                    fn: inner
15423                },
15424
15425                /**
15426                 * Modifier used to hide the popper when its reference element is outside of the
15427                 * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
15428                 * be used to hide with a CSS selector the popper when its reference is
15429                 * out of boundaries.
15430                 *
15431                 * Requires the `preventOverflow` modifier before it in order to work.
15432                 * @memberof modifiers
15433                 * @inner
15434                 */
15435                hide: {
15436                    /** @prop {number} order=800 - Index used to define the order of execution */
15437                    order: 800,
15438                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15439                    enabled: true,
15440                    /** @prop {ModifierFn} */
15441                    fn: hide
15442                },
15443
15444                /**
15445                 * Computes the style that will be applied to the popper element to gets
15446                 * properly positioned.
15447                 *
15448                 * Note that this modifier will not touch the DOM, it just prepares the styles
15449                 * so that `applyStyle` modifier can apply it. This separation is useful
15450                 * in case you need to replace `applyStyle` with a custom implementation.
15451                 *
15452                 * This modifier has `850` as `order` value to maintain backward compatibility
15453                 * with previous versions of Popper.js. Expect the modifiers ordering method
15454                 * to change in future major versions of the library.
15455                 *
15456                 * @memberof modifiers
15457                 * @inner
15458                 */
15459                computeStyle: {
15460                    /** @prop {number} order=850 - Index used to define the order of execution */
15461                    order: 850,
15462                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15463                    enabled: true,
15464                    /** @prop {ModifierFn} */
15465                    fn: computeStyle,
15466                    /**
15467                     * @prop {Boolean} gpuAcceleration=true
15468                     * If true, it uses the CSS 3D transformation to position the popper.
15469                     * Otherwise, it will use the `top` and `left` properties
15470                     */
15471                    gpuAcceleration: true,
15472                    /**
15473                     * @prop {string} [x='bottom']
15474                     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
15475                     * Change this if your popper should grow in a direction different from `bottom`
15476                     */
15477                    x: 'bottom',
15478                    /**
15479                     * @prop {string} [x='left']
15480                     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
15481                     * Change this if your popper should grow in a direction different from `right`
15482                     */
15483                    y: 'right'
15484                },
15485
15486                /**
15487                 * Applies the computed styles to the popper element.
15488                 *
15489                 * All the DOM manipulations are limited to this modifier. This is useful in case
15490                 * you want to integrate Popper.js inside a framework or view library and you
15491                 * want to delegate all the DOM manipulations to it.
15492                 *
15493                 * Note that if you disable this modifier, you must make sure the popper element
15494                 * has its position set to `absolute` before Popper.js can do its work!
15495                 *
15496                 * Just disable this modifier and define your own to achieve the desired effect.
15497                 *
15498                 * @memberof modifiers
15499                 * @inner
15500                 */
15501                applyStyle: {
15502                    /** @prop {number} order=900 - Index used to define the order of execution */
15503                    order: 900,
15504                    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
15505                    enabled: true,
15506                    /** @prop {ModifierFn} */
15507                    fn: applyStyle,
15508                    /** @prop {Function} */
15509                    onLoad: applyStyleOnLoad,
15510                    /**
15511                     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
15512                     * @prop {Boolean} gpuAcceleration=true
15513                     * If true, it uses the CSS 3D transformation to position the popper.
15514                     * Otherwise, it will use the `top` and `left` properties
15515                     */
15516                    gpuAcceleration: undefined
15517                }
15518            };
15519
15520            /**
15521             * The `dataObject` is an object containing all the information used by Popper.js.
15522             * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
15523             * @name dataObject
15524             * @property {Object} data.instance The Popper.js instance
15525             * @property {String} data.placement Placement applied to popper
15526             * @property {String} data.originalPlacement Placement originally defined on init
15527             * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
15528             * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
15529             * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
15530             * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
15531             * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
15532             * @property {Object} data.boundaries Offsets of the popper boundaries
15533             * @property {Object} data.offsets The measurements of popper, reference and arrow elements
15534             * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
15535             * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
15536             * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
15537             */
15538
15539            /**
15540             * Default options provided to Popper.js constructor.<br />
15541             * These can be overridden using the `options` argument of Popper.js.<br />
15542             * To override an option, simply pass an object with the same
15543             * structure of the `options` object, as the 3rd argument. For example:
15544             * ```
15545             * new Popper(ref, pop, {
15546             *   modifiers: {
15547             *     preventOverflow: { enabled: false }
15548             *   }
15549             * })
15550             * ```
15551             * @type {Object}
15552             * @static
15553             * @memberof Popper
15554             */
15555            var Defaults = {
15556                /**
15557                 * Popper's placement.
15558                 * @prop {Popper.placements} placement='bottom'
15559                 */
15560                placement: 'bottom',
15561
15562                /**
15563                 * Set this to true if you want popper to position it self in 'fixed' mode
15564                 * @prop {Boolean} positionFixed=false
15565                 */
15566                positionFixed: false,
15567
15568                /**
15569                 * Whether events (resize, scroll) are initially enabled.
15570                 * @prop {Boolean} eventsEnabled=true
15571                 */
15572                eventsEnabled: true,
15573
15574                /**
15575                 * Set to true if you want to automatically remove the popper when
15576                 * you call the `destroy` method.
15577                 * @prop {Boolean} removeOnDestroy=false
15578                 */
15579                removeOnDestroy: false,
15580
15581                /**
15582                 * Callback called when the popper is created.<br />
15583                 * By default, it is set to no-op.<br />
15584                 * Access Popper.js instance with `data.instance`.
15585                 * @prop {onCreate}
15586                 */
15587                onCreate: function onCreate() {
15588                },
15589
15590                /**
15591                 * Callback called when the popper is updated. This callback is not called
15592                 * on the initialization/creation of the popper, but only on subsequent
15593                 * updates.<br />
15594                 * By default, it is set to no-op.<br />
15595                 * Access Popper.js instance with `data.instance`.
vendor: 9,481 bytes, lines 15596-15825
15596                 * @prop {onUpdate}
15597                 */
15598                onUpdate: function onUpdate() {
15599                },
15600
15601                /**
15602                 * List of modifiers used to modify the offsets before they are applied to the popper.
15603                 * They provide most of the functionalities of Popper.js.
15604                 * @prop {modifiers}
15605                 */
15606                modifiers: modifiers
15607            };
15608
15609            /**
15610             * @callback onCreate
15611             * @param {dataObject} data
15612             */
15613
15614            /**
15615             * @callback onUpdate
15616             * @param {dataObject} data
15617             */
15618
15619// Utils
15620// Methods
15621            var Popper = function () {
15622                /**
15623                 * Creates a new Popper.js instance.
15624                 * @class Popper
15625                 * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
15626                 * @param {HTMLElement} popper - The HTML element used as the popper
15627                 * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
15628                 * @return {Object} instance - The generated Popper.js instance
15629                 */
15630                function Popper(reference, popper) {
15631                    var _this = this;
15632
15633                    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
15634                    classCallCheck(this, Popper);
15635
15636                    this.scheduleUpdate = function () {
15637                        return requestAnimationFrame(_this.update);
15638                    };
15639
15640                    // make update() debounced, so that it only runs at most once-per-tick
15641                    this.update = debounce(this.update.bind(this));
15642
15643                    // with {} we create a new object with the options inside it
15644                    this.options = _extends({}, Popper.Defaults, options);
15645
15646                    // init state
15647                    this.state = {
15648                        isDestroyed: false,
15649                        isCreated: false,
15650                        scrollParents: []
15651                    };
15652
15653                    // get reference and popper elements (allow jQuery wrappers)
15654                    this.reference = reference && reference.jquery ? reference[0] : reference;
15655                    this.popper = popper && popper.jquery ? popper[0] : popper;
15656
15657                    // Deep merge modifiers options
15658                    this.options.modifiers = {};
15659                    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
15660                        _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
15661                    });
15662
15663                    // Refactoring modifiers' list (Object => Array)
15664                    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
15665                        return _extends({
15666                            name: name
15667                        }, _this.options.modifiers[name]);
15668                    })
15669                        // sort the modifiers by order
15670                        .sort(function (a, b) {
15671                            return a.order - b.order;
15672                        });
15673
15674                    // modifiers have the ability to execute arbitrary code when Popper.js get inited
15675                    // such code is executed in the same order of its modifier
15676                    // they could add new properties to their options configuration
15677                    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
15678                    this.modifiers.forEach(function (modifierOptions) {
15679                        if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
15680                            modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
15681                        }
15682                    });
15683
15684                    // fire the first update to position the popper in the right place
15685                    this.update();
15686
15687                    var eventsEnabled = this.options.eventsEnabled;
15688                    if (eventsEnabled) {
15689                        // setup event listeners, they will take care of update the position in specific situations
15690                        this.enableEventListeners();
15691                    }
15692
15693                    this.state.eventsEnabled = eventsEnabled;
15694                }
15695
15696                // We can't use class properties because they don't get listed in the
15697                // class prototype and break stuff like Sinon stubs
15698
15699
15700                createClass(Popper, [{
15701                    key: 'update',
15702                    value: function update$$1() {
15703                        return update.call(this);
15704                    }
15705                }, {
15706                    key: 'destroy',
15707                    value: function destroy$$1() {
15708                        return destroy.call(this);
15709                    }
15710                }, {
15711                    key: 'enableEventListeners',
15712                    value: function enableEventListeners$$1() {
15713                        return enableEventListeners.call(this);
15714                    }
15715                }, {
15716                    key: 'disableEventListeners',
15717                    value: function disableEventListeners$$1() {
15718                        return disableEventListeners.call(this);
15719                    }
15720
15721                    /**
15722                     * Schedules an update. It will run on the next UI update available.
15723                     * @method scheduleUpdate
15724                     * @memberof Popper
15725                     */
15726
15727
15728                    /**
15729                     * Collection of utilities useful when writing custom modifiers.
15730                     * Starting from version 1.7, this method is available only if you
15731                     * include `popper-utils.js` before `popper.js`.
15732                     *
15733                     * **DEPRECATION**: This way to access PopperUtils is deprecated
15734                     * and will be removed in v2! Use the PopperUtils module directly instead.
15735                     * Due to the high instability of the methods contained in Utils, we can't
15736                     * guarantee them to follow semver. Use them at your own risk!
15737                     * @static
15738                     * @private
15739                     * @type {Object}
15740                     * @deprecated since version 1.8
15741                     * @member Utils
15742                     * @memberof Popper
15743                     */
15744
15745                }]);
15746                return Popper;
15747            }();
15748
15749            /**
15750             * The `referenceObject` is an object that provides an interface compatible with Popper.js
15751             * and lets you use it as replacement of a real DOM node.<br />
15752             * You can use this method to position a popper relatively to a set of coordinates
15753             * in case you don't have a DOM node to use as reference.
15754             *
15755             * ```
15756             * new Popper(referenceObject, popperNode);
15757             * ```
15758             *
15759             * NB: This feature isn't supported in Internet Explorer 10.
15760             * @name referenceObject
15761             * @property {Function} data.getBoundingClientRect
15762             * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
15763             * @property {number} data.clientWidth
15764             * An ES6 getter that will return the width of the virtual reference element.
15765             * @property {number} data.clientHeight
15766             * An ES6 getter that will return the height of the virtual reference element.
15767             */
15768
15769
15770            Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
15771            Popper.placements = placements;
15772            Popper.Defaults = Defaults;
15773
15774            /* harmony default export */
15775            __webpack_exports__["default"] = (Popper);
15776//# sourceMappingURL=popper.js.map
15777
15778            /* WEBPACK VAR INJECTION */
15779        }.call(this, __webpack_require__(5)))
15780
15781        /***/
15782    }),
15783    /* 8 */
15784    /***/ (function (module, exports, __webpack_require__) {
15785
15786        var __WEBPACK_AMD_DEFINE_RESULT__;//
15787// SmoothScroll for websites v1.4.6 (Balazs Galambosi)
15788// http://www.smoothscroll.net/
15789//
15790// Licensed under the terms of the MIT license.
15791//
15792// You may use it in your theme if you credit me.
15793// It is also free to use on any individual website.
15794//
15795// Exception:
15796// The only restriction is to not publish any
15797// extension for browsers or native application
15798// without getting a written permission first.
15799//
15800
15801        (function () {
15802
15803// Scroll Variables (tweakable)
15804            var defaultOptions = {
15805
15806                // Scrolling Core
15807                frameRate: 150, // [Hz]
15808                animationTime: 400, // [ms]
15809                stepSize: 100, // [px]
15810
15811                // Pulse (less tweakable)
15812                // ratio of "tail" to "acceleration"
15813                pulseAlgorithm: true,
15814                pulseScale: 4,
15815                pulseNormalize: 1,
15816
15817                // Acceleration
15818                accelerationDelta: 50,  // 50
15819                accelerationMax: 3,   // 3
15820
15821                // Keyboard Settings
15822                keyboardSupport: true,  // option
15823                arrowScroll: 50,    // [px]
15824
15825                // Other
vendor: 12,891 bytes, lines 15826-16175
15826                fixedBackground: true,
15827                excluded: ''
15828            };
15829
15830            var options = defaultOptions;
15831
15832
15833// Other Variables
15834            var isExcluded = false;
15835            var isFrame = false;
15836            var direction = {x: 0, y: 0};
15837            var initDone = false;
15838            var root = document.documentElement;
15839            var activeElement;
15840            var observer;
15841            var refreshSize;
15842            var deltaBuffer = [];
15843            var isMac = /^Mac/.test(navigator.platform);
15844
15845            var key = {
15846                left: 37, up: 38, right: 39, down: 40, spacebar: 32,
15847                pageup: 33, pagedown: 34, end: 35, home: 36
15848            };
15849            var arrowKeys = {37: 1, 38: 1, 39: 1, 40: 1};
15850
15851            /***********************************************
15852             * INITIALIZE
15853             ***********************************************/
15854
15855            /**
15856             * Tests if smooth scrolling is allowed. Shuts down everything if not.
15857             */
15858            function initTest() {
15859                if (options.keyboardSupport) {
15860                    addEvent('keydown', keydown);
15861                }
15862            }
15863
15864            /**
15865             * Sets up scrolls array, determines if frames are involved.
15866             */
15867            function init() {
15868
15869                if (initDone || !document.body) return;
15870
15871                initDone = true;
15872
15873                var body = document.body;
15874                var html = document.documentElement;
15875                var windowHeight = window.innerHeight;
15876                var scrollHeight = body.scrollHeight;
15877
15878                // check compat mode for root element
15879                root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
15880                activeElement = body;
15881
15882                initTest();
15883
15884                // Checks if this script is running in a frame
15885                if (top != self) {
15886                    isFrame = true;
15887                }
15888
15889                /**
15890                 * Safari 10 fixed it, Chrome fixed it in v45:
15891                 * This fixes a bug where the areas left and right to
15892                 * the content does not trigger the onmousewheel event
15893                 * on some pages. e.g.: html, body { height: 100% }
15894                 */
15895                else if (isOldSafari &&
15896                    scrollHeight > windowHeight &&
15897                    (body.offsetHeight <= windowHeight ||
15898                        html.offsetHeight <= windowHeight)) {
15899
15900                    var fullPageElem = document.createElement('div');
15901                    fullPageElem.style.cssText = 'position:absolute; z-index:-10000; ' +
15902                        'top:0; left:0; right:0; height:' +
15903                        root.scrollHeight + 'px';
15904                    document.body.appendChild(fullPageElem);
15905
15906                    // DOM changed (throttled) to fix height
15907                    var pendingRefresh;
15908                    refreshSize = function () {
15909                        if (pendingRefresh) return; // could also be: clearTimeout(pendingRefresh);
15910                        pendingRefresh = setTimeout(function () {
15911                            if (isExcluded) return; // could be running after cleanup
15912                            fullPageElem.style.height = '0';
15913                            fullPageElem.style.height = root.scrollHeight + 'px';
15914                            pendingRefresh = null;
15915                        }, 500); // act rarely to stay fast
15916                    };
15917
15918                    setTimeout(refreshSize, 10);
15919
15920                    addEvent('resize', refreshSize);
15921
15922                    // TODO: attributeFilter?
15923                    var config = {
15924                        attributes: true,
15925                        childList: true,
15926                        characterData: false
15927                        // subtree: true
15928                    };
15929
15930                    observer = new MutationObserver(refreshSize);
15931                    observer.observe(body, config);
15932
15933                    if (root.offsetHeight <= windowHeight) {
15934                        var clearfix = document.createElement('div');
15935                        clearfix.style.clear = 'both';
15936                        body.appendChild(clearfix);
15937                    }
15938                }
15939
15940                // disable fixed background
15941                if (!options.fixedBackground && !isExcluded) {
15942                    body.style.backgroundAttachment = 'scroll';
15943                    html.style.backgroundAttachment = 'scroll';
15944                }
15945            }
15946
15947            /**
15948             * Removes event listeners and other traces left on the page.
15949             */
15950            function cleanup() {
15951                observer && observer.disconnect();
15952                removeEvent(wheelEvent, wheel);
15953                removeEvent('mousedown', mousedown);
15954                removeEvent('keydown', keydown);
15955                removeEvent('resize', refreshSize);
15956                removeEvent('load', init);
15957            }
15958
15959
15960            /************************************************
15961             * SCROLLING
15962             ************************************************/
15963
15964            var que = [];
15965            var pending = false;
15966            var lastScroll = Date.now();
15967
15968            /**
15969             * Pushes scroll actions to the scrolling queue.
15970             */
15971            function scrollArray(elem, left, top) {
15972
15973                directionCheck(left, top);
15974
15975                if (options.accelerationMax != 1) {
15976                    var now = Date.now();
15977                    var elapsed = now - lastScroll;
15978                    if (elapsed < options.accelerationDelta) {
15979                        var factor = (1 + (50 / elapsed)) / 2;
15980                        if (factor > 1) {
15981                            factor = Math.min(factor, options.accelerationMax);
15982                            left *= factor;
15983                            top *= factor;
15984                        }
15985                    }
15986                    lastScroll = Date.now();
15987                }
15988
15989                // push a scroll command
15990                que.push({
15991                    x: left,
15992                    y: top,
15993                    lastX: (left < 0) ? 0.99 : -0.99,
15994                    lastY: (top < 0) ? 0.99 : -0.99,
15995                    start: Date.now()
15996                });
15997
15998                // don't act if there's a pending queue
15999                if (pending) {
16000                    return;
16001                }
16002
16003                var scrollWindow = (elem === document.body);
16004
16005                var step = function (time) {
16006
16007                    var now = Date.now();
16008                    var scrollX = 0;
16009                    var scrollY = 0;
16010
16011                    for (var i = 0; i < que.length; i++) {
16012
16013                        var item = que[i];
16014                        var elapsed = now - item.start;
16015                        var finished = (elapsed >= options.animationTime);
16016
16017                        // scroll position: [0, 1]
16018                        var position = (finished) ? 1 : elapsed / options.animationTime;
16019
16020                        // easing [optional]
16021                        if (options.pulseAlgorithm) {
16022                            position = pulse(position);
16023                        }
16024
16025                        // only need the difference
16026                        var x = (item.x * position - item.lastX) >> 0;
16027                        var y = (item.y * position - item.lastY) >> 0;
16028
16029                        // add this to the total scrolling
16030                        scrollX += x;
16031                        scrollY += y;
16032
16033                        // update last values
16034                        item.lastX += x;
16035                        item.lastY += y;
16036
16037                        // delete and step back if it's over
16038                        if (finished) {
16039                            que.splice(i, 1);
16040                            i--;
16041                        }
16042                    }
16043
16044                    // scroll left and top
16045                    if (scrollWindow) {
16046                        window.scrollBy(scrollX, scrollY);
16047                    } else {
16048                        if (scrollX) elem.scrollLeft += scrollX;
16049                        if (scrollY) elem.scrollTop += scrollY;
16050                    }
16051
16052                    // clean up if there's nothing left to do
16053                    if (!left && !top) {
16054                        que = [];
16055                    }
16056
16057                    if (que.length) {
16058                        requestFrame(step, elem, (1000 / options.frameRate + 1));
16059                    } else {
16060                        pending = false;
16061                    }
16062                };
16063
16064                // start a new queue of actions
16065                requestFrame(step, elem, 0);
16066                pending = true;
16067            }
16068
16069
16070            /***********************************************
16071             * EVENTS
16072             ***********************************************/
16073
16074            /**
16075             * Mouse wheel handler.
16076             * @param {Object} event
16077             */
16078            function wheel(event) {
16079
16080                if (!initDone) {
16081                    init();
16082                }
16083
16084                var target = event.target;
16085
16086                // leave early if default action is prevented
16087                // or it's a zooming event with CTRL
16088                if (event.defaultPrevented || event.ctrlKey) {
16089                    return true;
16090                }
16091
16092                // leave embedded content alone (flash & pdf)
16093                if (isNodeName(activeElement, 'embed') ||
16094                    (isNodeName(target, 'embed') && /\.pdf/i.test(target.src)) ||
16095                    isNodeName(activeElement, 'object') ||
16096                    target.shadowRoot) {
16097                    return true;
16098                }
16099
16100                var deltaX = -event.wheelDeltaX || event.deltaX || 0;
16101                var deltaY = -event.wheelDeltaY || event.deltaY || 0;
16102
16103                if (isMac) {
16104                    if (event.wheelDeltaX && isDivisible(event.wheelDeltaX, 120)) {
16105                        deltaX = -120 * (event.wheelDeltaX / Math.abs(event.wheelDeltaX));
16106                    }
16107                    if (event.wheelDeltaY && isDivisible(event.wheelDeltaY, 120)) {
16108                        deltaY = -120 * (event.wheelDeltaY / Math.abs(event.wheelDeltaY));
16109                    }
16110                }
16111
16112                // use wheelDelta if deltaX/Y is not available
16113                if (!deltaX && !deltaY) {
16114                    deltaY = -event.wheelDelta || 0;
16115                }
16116
16117                // line based scrolling (Firefox mostly)
16118                if (event.deltaMode === 1) {
16119                    deltaX *= 40;
16120                    deltaY *= 40;
16121                }
16122
16123                var overflowing = overflowingAncestor(target);
16124
16125                // nothing to do if there's no element that's scrollable
16126                if (!overflowing) {
16127                    // except Chrome iframes seem to eat wheel events, which we need to
16128                    // propagate up, if the iframe has nothing overflowing to scroll
16129                    if (isFrame && isChrome) {
16130                        // change target to iframe element itself for the parent frame
16131                        Object.defineProperty(event, "target", {value: window.frameElement});
16132                        return parent.wheel(event);
16133                    }
16134                    return true;
16135                }
16136
16137                // check if it's a touchpad scroll that should be ignored
16138                if (isTouchpad(deltaY)) {
16139                    return true;
16140                }
16141
16142                // scale by step size
16143                // delta is 120 most of the time
16144                // synaptics seems to send 1 sometimes
16145                if (Math.abs(deltaX) > 1.2) {
16146                    deltaX *= options.stepSize / 120;
16147                }
16148                if (Math.abs(deltaY) > 1.2) {
16149                    deltaY *= options.stepSize / 120;
16150                }
16151
16152                scrollArray(overflowing, deltaX, deltaY);
16153                //event.preventDefault();
16154                scheduleClearCache();
16155            }
16156
16157            /**
16158             * Keydown event handler.
16159             * @param {Object} event
16160             */
16161            function keydown(event) {
16162
16163                var target = event.target;
16164                var modifier = event.ctrlKey || event.altKey || event.metaKey ||
16165                    (event.shiftKey && event.keyCode !== key.spacebar);
16166
16167                // our own tracked active element could've been removed from the DOM
16168                if (!document.body.contains(activeElement)) {
16169                    activeElement = document.activeElement;
16170                }
16171
16172                // do nothing if user is editing text
16173                // or using a modifier key (except shift)
16174                // or in a dropdown
16175                // or inside interactive elements
16176                var inputNodeNames = /^(textarea|select|embed|object)$/i;
16177                var buttonTypes = /^(button|submit|radio|checkbox|file|color|image)$/i;
16178                if (event.defaultPrevented ||
16179                    inputNodeNames.test(target.nodeName) ||
16180                    isNodeName(target, 'input') && !buttonTypes.test(target.type) ||
16181                    isNodeName(activeElement, 'video') ||
16182                    isInsideYoutubeVideo(event) ||
16183                    target.isContentEditable ||
16184                    modifier) {
16185                    return true;
16186                }
16187
16188                // [spacebar] should trigger button press, leave it alone
16189                if ((isNodeName(target, 'button') ||
16190                        isNodeName(target, 'input') && buttonTypes.test(target.type)) &&
16191                    event.keyCode === key.spacebar) {
16192                    return true;
16193                }
16194
16195                // [arrwow keys] on radio buttons should be left alone
16196                if (isNodeName(target, 'input') && target.type == 'radio' &&
16197                    arrowKeys[event.keyCode]) {
16198                    return true;
16199                }
16200
16201                var shift, x = 0, y = 0;
16202                var overflowing = overflowingAncestor(activeElement);
16203
16204                if (!overflowing) {
16205                    // Chrome iframes seem to eat key events, which we need to
16206                    // propagate up, if the iframe has nothing overflowing to scroll
16207                    return (isFrame && isChrome) ? parent.keydown(event) : true;
16208                }
16209
16210                var clientHeight = overflowing.clientHeight;
16211
16212                if (overflowing == document.body) {
16213                    clientHeight = window.innerHeight;
16214                }
16215
16216                switch (event.keyCode) {
16217                    case key.up:
16218                        y = -options.arrowScroll;
16219                        break;
16220                    case key.down:
16221                        y = options.arrowScroll;
16222                        break;
16223                    case key.spacebar: // (+ shift)
16224                        shift = event.shiftKey ? 1 : -1;
16225                        y = -shift * clientHeight * 0.9;
16226                        break;
16227                    case key.pageup:
16228                        y = -clientHeight * 0.9;
16229                        break;
16230                    case key.pagedown:
16231                        y = clientHeight * 0.9;
16232                        break;
16233                    case key.home:
16234                        y = -overflowing.scrollTop;
16235                        break;
16236                    case key.end:
16237                        var scroll = overflowing.scrollHeight - overflowing.scrollTop;
16238                        var scrollRemaining = scroll - clientHeight;
16239                        y = (scrollRemaining > 0) ? scrollRemaining + 10 : 0;
16240                        break;
16241                    case key.left:
16242                        x = -options.arrowScroll;
16243                        break;
16244                    case key.right:
16245                        x = options.arrowScroll;
16246                        break;
16247                    default:
16248                        return true; // a key we don't care about
16249                }
16250
16251                scrollArray(overflowing, x, y);
16252                event.preventDefault();
16253                scheduleClearCache();
16254            }
16255
16256            /**
16257             * Mousedown event only for updating activeElement
16258             */
16259            function mousedown(event) {
16260                activeElement = event.target;
16261            }
16262
16263
16264            /***********************************************
16265             * OVERFLOW
16266             ***********************************************/
16267
16268            var uniqueID = (function () {
16269                var i = 0;
16270                return function (el) {
16271                    return el.uniqueID || (el.uniqueID = i++);
16272                };
16273            })();
16274
16275            var cache = {}; // cleared out after a scrolling session
16276            var clearCacheTimer;
16277
16278//setInterval(function () { cache = {}; }, 10 * 1000);
16279
16280            function scheduleClearCache() {
16281                clearTimeout(clearCacheTimer);
16282                clearCacheTimer = setInterval(function () {
16283                    cache = {};
16284                }, 1 * 1000);
16285            }
16286
16287            function setCache(elems, overflowing) {
16288                for (var i = elems.length; i--;)
16289                    cache[uniqueID(elems[i])] = overflowing;
16290                return overflowing;
16291            }
16292
16293//  (body)                (root)
16294//         | hidden | visible | scroll |  auto  |
16295// hidden  |   no   |    no   |   YES  |   YES  |
16296// visible |   no   |   YES   |   YES  |   YES  |
16297// scroll  |   no   |   YES   |   YES  |   YES  |
16298// auto    |   no   |   YES   |   YES  |   YES  |
16299
16300            function overflowingAncestor(el) {
16301                var elems = [];
16302                var body = document.body;
16303                var rootScrollHeight = root.scrollHeight;
16304                do {
16305                    var cached = cache[uniqueID(el)];
16306                    if (cached) {
16307                        return setCache(elems, cached);
16308                    }
16309                    elems.push(el);
16310                    if (rootScrollHeight === el.scrollHeight) {
16311                        var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);
16312                        var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);
16313                        if (isFrame && isContentOverflowing(root) ||
16314                            !isFrame && isOverflowCSS) {
16315                            return setCache(elems, getScrollRoot());
16316                        }
16317                    } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {
16318                        return setCache(elems, el);
16319                    }
16320                } while (el = el.parentElement);
16321            }
16322
16323            function isContentOverflowing(el) {
16324                return (el.clientHeight + 10 < el.scrollHeight);
16325            }
16326
16327// typically for <body> and <html>
16328            function overflowNotHidden(el) {
16329                var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
16330                return (overflow !== 'hidden');
16331            }
16332
16333// for all other elements
16334            function overflowAutoOrScroll(el) {
16335                var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
16336                return (overflow === 'scroll' || overflow === 'auto');
16337            }
16338
16339
16340            /***********************************************
16341             * HELPERS
16342             ***********************************************/
16343
16344            function addEvent(type, fn) {
16345                window.addEventListener(type, fn, false);
16346            }
16347
16348            function removeEvent(type, fn) {
16349                window.removeEventListener(type, fn, false);
16350            }
16351
16352            function isNodeName(el, tag) {
16353                return (el.nodeName || '').toLowerCase() === tag.toLowerCase();
16354            }
16355
16356            function directionCheck(x, y) {
16357                x = (x > 0) ? 1 : -1;
16358                y = (y > 0) ? 1 : -1;
16359                if (direction.x !== x || direction.y !== y) {
16360                    direction.x = x;
16361                    direction.y = y;
16362                    que = [];
16363                    lastScroll = 0;
16364                }
16365            }
16366
16367            var deltaBufferTimer;
16368
16369            if (window.localStorage && localStorage.SS_deltaBuffer) {
16370                try { // #46 Safari throws in private browsing for localStorage
16371                    deltaBuffer = localStorage.SS_deltaBuffer.split(',');
16372                } catch (e) {
16373                }
16374            }
16375
16376            function isTouchpad(deltaY) {
16377                if (!deltaY) return;
16378                if (!deltaBuffer.length) {
16379                    deltaBuffer = [deltaY, deltaY, deltaY];
16380                }
16381                deltaY = Math.abs(deltaY);
16382                deltaBuffer.push(deltaY);
16383                deltaBuffer.shift();
16384                clearTimeout(deltaBufferTimer);
16385                deltaBufferTimer = setTimeout(function () {
16386                    try { // #46 Safari throws in private browsing for localStorage
16387                        localStorage.SS_deltaBuffer = deltaBuffer.join(',');
16388                    } catch (e) {
16389                    }
16390                }, 1000);
16391                return !allDeltasDivisableBy(120) && !allDeltasDivisableBy(100);
16392            }
16393
16394            function isDivisible(n, divisor) {
16395                return (Math.floor(n / divisor) == n / divisor);
16396            }
16397
16398            function allDeltasDivisableBy(divisor) {
16399                return (isDivisible(deltaBuffer[0], divisor) &&
16400                    isDivisible(deltaBuffer[1], divisor) &&
16401                    isDivisible(deltaBuffer[2], divisor));
16402            }
16403
16404            function isInsideYoutubeVideo(event) {
16405                var elem = event.target;
16406                var isControl = false;
vendor: 4,123 bytes, lines 16407-16503
16407                if (document.URL.indexOf('www.youtube.com/watch') != -1) {
16408                    do {
16409                        isControl = (elem.classList &&
16410                            elem.classList.contains('html5-video-controls'));
16411                        if (isControl) break;
16412                    } while (elem = elem.parentNode);
16413                }
16414                return isControl;
16415            }
16416
16417            var requestFrame = (function () {
16418                return (window.requestAnimationFrame ||
16419                    window.webkitRequestAnimationFrame ||
16420                    window.mozRequestAnimationFrame ||
16421                    function (callback, element, delay) {
16422                        window.setTimeout(callback, delay || (1000 / 60));
16423                    });
16424            })();
16425
16426            var MutationObserver = (window.MutationObserver ||
16427                window.WebKitMutationObserver ||
16428                window.MozMutationObserver);
16429
16430            var getScrollRoot = (function () {
16431                var SCROLL_ROOT;
16432                return function () {
16433                    if (!SCROLL_ROOT) {
16434                        var dummy = document.createElement('div');
16435                        dummy.style.cssText = 'height:10000px;width:1px;';
16436                        document.body.appendChild(dummy);
16437                        var bodyScrollTop = document.body.scrollTop;
16438                        var docElScrollTop = document.documentElement.scrollTop;
16439                        window.scrollBy(0, 3);
16440                        if (document.body.scrollTop != bodyScrollTop)
16441                            (SCROLL_ROOT = document.body);
16442                        else
16443                            (SCROLL_ROOT = document.documentElement);
16444                        window.scrollBy(0, -3);
16445                        document.body.removeChild(dummy);
16446                    }
16447                    return SCROLL_ROOT;
16448                };
16449            })();
16450
16451
16452            /***********************************************
16453             * PULSE (by Michael Herf)
16454             ***********************************************/
16455
16456            /**
16457             * Viscous fluid with a pulse for part and decay for the rest.
16458             * - Applies a fixed force over an interval (a damped acceleration), and
16459             * - Lets the exponential bleed away the velocity over a longer interval
16460             * - Michael Herf, http://stereopsis.com/stopping/
16461             */
16462            function pulse_(x) {
16463                var val, start, expx;
16464                // test
16465                x = x * options.pulseScale;
16466                if (x < 1) { // acceleartion
16467                    val = x - (1 - Math.exp(-x));
16468                } else {     // tail
16469                    // the previous animation ended here:
16470                    start = Math.exp(-1);
16471                    // simple viscous drag
16472                    x -= 1;
16473                    expx = 1 - Math.exp(-x);
16474                    val = start + (expx * (1 - start));
16475                }
16476                return val * options.pulseNormalize;
16477            }
16478
16479            function pulse(x) {
16480                if (x >= 1) return 1;
16481                if (x <= 0) return 0;
16482
16483                if (options.pulseNormalize == 1) {
16484                    options.pulseNormalize /= pulse_(1);
16485                }
16486                return pulse_(x);
16487            }
16488
16489
16490            /***********************************************
16491             * FIRST RUN
16492             ***********************************************/
16493
16494            var userAgent = window.navigator.userAgent;
16495            var isEdge = /Edge/.test(userAgent); // thank you MS
16496            var isChrome = /chrome/i.test(userAgent) && !isEdge;
16497            var isSafari = /safari/i.test(userAgent) && !isEdge;
16498            var isMobile = /mobile/i.test(userAgent);
16499            var isIEWin7 = /Windows NT 6.1/i.test(userAgent) && /rv:11/i.test(userAgent);
16500            var isOldSafari = isSafari && (/Version\/8/i.test(userAgent) || /Version\/9/i.test(userAgent));
16501            var isEnabledForBrowser = (isChrome || isSafari || isIEWin7) && !isMobile;
16502
16503            var wheelEvent;
16504            if ('onwheel' in document.createElement('div'))
16505                wheelEvent = 'wheel';
16506            else if ('onmousewheel' in document.createElement('div'))
16507                wheelEvent = 'mousewheel';
16508
16509            if (wheelEvent && isEnabledForBrowser) {
16510                addEvent(wheelEvent, wheel);
16511                addEvent('mousedown', mousedown);
16512                addEvent('load', init);
16513            }
16514
16515
16516            /***********************************************
16517             * PUBLIC INTERFACE
16518             ***********************************************/
16519
16520            function SmoothScroll(optionsToSet) {
16521                for (var key in optionsToSet)
16522                    if (defaultOptions.hasOwnProperty(key))
16523                        options[key] = optionsToSet[key];
16524            }
16525
16526            SmoothScroll.destroy = cleanup;
16527
16528            if (window.SmoothScrollOptions) // async API
16529                SmoothScroll(window.SmoothScrollOptions);
16530
16531            if (true)
16532                !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
16533                    return SmoothScroll;
16534                }).call(exports, __webpack_require__, exports, module),
16535                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
16536            else {
16537            }
16538
16539        })();
16540
16541
16542        /***/
16543    }),
16544    /* 9 */
16545    /***/ (function (module, exports) {
16546
16547        !function () {
16548            "use strict";
16549            if ("undefined" != typeof window) {
16550                var t = window.navigator.userAgent.match(/Edge\/(\d{2})\./), e = !!t && parseInt(t[1], 10) >= 16;
16551                if ("objectFit" in document.documentElement.style != !1 && !e) return void (window.objectFitPolyfill = function () {
16552                    return !1
16553                });
16554                var i = function (t) {
16555                    var e = window.getComputedStyle(t, null), i = e.getPropertyValue("position"),
16556                        n = e.getPropertyValue("overflow"), o = e.getPropertyValue("display");
16557                    i && "static" !== i || (t.style.position = "relative"), "hidden" !== n && (t.style.overflow = "hidden"), o && "inline" !== o || (t.style.display = "block"), 0 === t.clientHeight && (t.style.height = "100%"), -1 === t.className.indexOf("object-fit-polyfill") && (t.className = t.className + " object-fit-polyfill")
16558                }, n = function (t) {
16559                    var e = window.getComputedStyle(t, null), i = {
16560                        "max-width": "none",
16561                        "max-height": "none",
16562                        "min-width": "0px",
16563                        "min-height": "0px",
16564                        top: "auto",
16565                        right: "auto",
16566                        bottom: "auto",
16567                        left: "auto",
16568                        "margin-top": "0px",
16569                        "margin-right": "0px",
16570                        "margin-bottom": "0px",
16571                        "margin-left": "0px"
16572                    };
16573                    for (var n in i) {
16574                        e.getPropertyValue(n) !== i[n] && (t.style[n] = i[n])
16575                    }
16576                }, o = function (t, e, i) {
16577                    var n, o, l, a, d;
16578                    if (i = i.split(" "), i.length < 2 && (i[1] = i[0]), "x" === t) n = i[0], o = i[1], l = "left", a = "right", d = e.clientWidth; else {
16579                        if ("y" !== t) return;
16580                        n = i[1], o = i[0], l = "top", a = "bottom", d = e.clientHeight
16581                    }
16582                    return n === l || o === l ? void (e.style[l] = "0") : n === a || o === a ? void (e.style[a] = "0") : "center" === n || "50%" === n ? (e.style[l] = "50%", void (e.style["margin-" + l] = d / -2 + "px")) : n.indexOf("%") >= 0 ? (n = parseInt(n), void (n < 50 ? (e.style[l] = n + "%", e.style["margin-" + l] = d * (n / -100) + "px") : (n = 100 - n, e.style[a] = n + "%", e.style["margin-" + a] = d * (n / -100) + "px"))) : void (e.style[l] = n)
16583                }, l = function (t) {
16584                    var e = t.dataset ? t.dataset.objectFit : t.getAttribute("data-object-fit"),
16585                        l = t.dataset ? t.dataset.objectPosition : t.getAttribute("data-object-position");
16586                    e = e || "cover", l = l || "50% 50%";
16587                    var a = t.parentNode;
16588                    i(a), n(t), t.style.position = "absolute", t.style.height = "100%", t.style.width = "auto", "scale-down" === e && (t.style.height = "auto", t.clientWidth < a.clientWidth && t.clientHeight < a.clientHeight ? (o("x", t, l), o("y", t, l)) : (e = "contain", t.style.height = "100%")), "none" === e ? (t.style.width = "auto", t.style.height = "auto", o("x", t, l), o("y", t, l)) : "cover" === e && t.clientWidth > a.clientWidth || "contain" === e && t.clientWidth < a.clientWidth ? (t.style.top = "0", t.style.marginTop = "0", o("x", t, l)) : "scale-down" !== e && (t.style.width = "100%", t.style.height = "auto", t.style.left = "0", t.style.marginLeft = "0", o("y", t, l))
16589                }, a = function (t) {
16590                    if (void 0 === t) t = document.querySelectorAll("[data-object-fit]"); else if (t && t.nodeName) t = [t]; else {
16591                        if ("object" != typeof t || !t.length || !t[0].nodeName) return !1;
16592                        t = t
16593                    }
16594                    for (var i = 0; i < t.length; i++) if (t[i].nodeName) {
16595                        var n = t[i].nodeName.toLowerCase();
16596                        "img" !== n || e ? "video" === n && (t[i].readyState > 0 ? l(t[i]) : t[i].addEventListener("loadedmetadata", function () {
16597                            l(this)
16598                        })) : t[i].complete ? l(t[i]) : t[i].addEventListener("load", function () {
16599                            l(this)
16600                        })
16601                    }
16602                    return !0
16603                };
16604                document.addEventListener("DOMContentLoaded", function () {
16605                    a()
16606                }), window.addEventListener("resize", function () {
16607                    a()
16608                }), window.objectFitPolyfill = a
16609            }
16610        }();
16611
16612        /***/
16613    }),
16614    /* 10 */
16615    /***/ (function (module, exports) {
16616
16617
16618        /**
16619         * Configure the plugin.
16620         */
16621
16622        +function ($) {
16623            page.registerVendor('Jquery');
16624
16625            page.initJquery = function () {
16626
16627                /**
16628                 * We will register the CSRF Token as a common header with jQuery so that
16629                 * all outgoing HTTP requests automatically have it attached. This is just
16630                 * a simple convenience so we don't have to attach every token manually.
16631                 */
16632
16633                var token = document.head.querySelector('meta[name="csrf-token"]');
16634
16635                if (token) {
16636                    $.ajaxSetup({
16637                        headers: {'X-CSRF-TOKEN': token.content}
16638                    });
16639                }
16640
16641            }
16642
16643        }(jQuery);
16644
16645
16646// Check if an element has a specific data attribute
16647//
16648        jQuery.fn.hasDataAttr = function (name) {
16649            return $(this)[0].hasAttribute('data-' + name);
16650        };
16651
16652
16653// Get data attribute. If element doesn't have the attribute, return default value
16654//
16655        jQuery.fn.dataAttr = function (name, def) {
16656            if ($(this)[0] == undefined) {
16657                return def;
16658            }
16659            return $(this)[0].getAttribute('data-' + name) || def;
16660        };
16661
16662
16663// Instance search
16664//
16665//$.expr[':'] -> $.expr.pseudos
16666        jQuery.expr[':'].search = function (a, i, m) {
16667            return $(a).html().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
16668        };
16669
16670
16671// Return outerHTML (inclusing the element) code
16672//
16673        jQuery.fn.outerHTML = function () {
16674            var html = '';
16675            this.each(function () {
16676                html += $(this).prop("outerHTML");
16677            })
16678            return html;
16679        };
16680
16681
16682// Return HTML code of all the selected elements
16683//
16684        jQuery.fn.fullHTML = function () {
16685            var html = '';
16686            $(this).each(function () {
16687                html += $(this).outerHTML();
16688            });
16689            return html;
16690        };
16691
16692// Scroll to end
16693//
16694        jQuery.fn.scrollToEnd = function () {
16695            $(this).scrollTop($(this).prop("scrollHeight"));
16696            return this;
16697        };
16698
16699
16700        /***/
16701    }),
16702    /* 11 */
16703    /***/ (function (module, exports) {
16704
16705
16706        /***/
16707    }),
16708    /* 12 */
16709    /***/ (function (module, exports, __webpack_require__) {
16710
16711
16712        /**
16713         * Load required plugin.
16714         */
16715        window.AOS = __webpack_require__(13);
16716
16717
16718        /**
16719         * Configure the plugin.
16720         */
16721
16722        +function ($) {
16723            page.registerVendor('AOS');
16724
16725            page.initAOS = function () {
16726                var options = {
16727                    offset: 220,
16728                    duration: 1500,
16729                }
16730
16731                if (page.defaults.disableAOSonMobile) {
16732                    options.disable = 'mobile';
16733                }
16734
16735                AOS.init(options);
16736            }
16737
16738        }(jQuery);
16739
16740
16741        /***/
16742    }),
16743    /* 13 */
16744    /***/ (function (module, exports, __webpack_require__) {
16745
16746        !function (e, t) {
16747            true ? module.exports = t() : undefined
16748        }(this, function () {
16749            return function (e) {
16750                function t(o) {
16751                    if (n[o]) return n[o].exports;
16752                    var i = n[o] = {exports: {}, id: o, loaded: !1};
16753                    return e[o].call(i.exports, i, i.exports, t), i.loaded = !0, i.exports
16754                }
16755
16756                var n = {};
16757                return t.m = e, t.c = n, t.p = "dist/", t(0)
16758            }([function (e, t, n) {
16759                "use strict";
16760
16761                function o(e) {
16762                    return e && e.__esModule ? e : {default: e}
16763                }
16764
16765                var i = Object.assign || function (e) {
16766                        for (var t = 1; t < arguments.length; t++) {
16767                            var n = arguments[t];
16768                            for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o])
16769                        }
16770                        return e
16771                    }, r = n(1), a = (o(r), n(6)), u = o(a), c = n(7), f = o(c), s = n(8), d = o(s), l = n(9), p = o(l),
16772                    m = n(10), b = o(m), v = n(11), y = o(v), g = n(14), h = o(g), w = [], k = !1, x = {
16773                        offset: 120,
16774                        delay: 0,
16775                        easing: "ease",
16776                        duration: 400,
16777                        disable: !1,
16778                        once: !1,
16779                        startEvent: "DOMContentLoaded",
16780                        throttleDelay: 99,
16781                        debounceDelay: 50,
16782                        disableMutationObserver: !1
16783                    }, j = function () {
16784                        var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
16785                        if (e && (k = !0), k) return w = (0, y.default)(w, x), (0, b.default)(w, x.once), w
16786                    }, O = function () {
16787                        w = (0, h.default)(), j()
16788                    }, _ = function () {
vendor: 10,831 bytes, lines 16789-16999
16789                        w.forEach(function (e, t) {
16790                            e.node.removeAttribute("data-aos"), e.node.removeAttribute("data-aos-easing"), e.node.removeAttribute("data-aos-duration"), e.node.removeAttribute("data-aos-delay")
16791                        })
16792                    }, S = function (e) {
16793                        return e === !0 || "mobile" === e && p.default.mobile() || "phone" === e && p.default.phone() || "tablet" === e && p.default.tablet() || "function" == typeof e && e() === !0
16794                    }, z = function (e) {
16795                        x = i(x, e), w = (0, h.default)();
16796                        var t = document.all && !window.atob;
16797                        return S(x.disable) || t ? _() : (document.querySelector("body").setAttribute("data-aos-easing", x.easing), document.querySelector("body").setAttribute("data-aos-duration", x.duration), document.querySelector("body").setAttribute("data-aos-delay", x.delay), "DOMContentLoaded" === x.startEvent && ["complete", "interactive"].indexOf(document.readyState) > -1 ? j(!0) : "load" === x.startEvent ? window.addEventListener(x.startEvent, function () {
16798                            j(!0)
16799                        }) : document.addEventListener(x.startEvent, function () {
16800                            j(!0)
16801                        }), window.addEventListener("resize", (0, f.default)(j, x.debounceDelay, !0)), window.addEventListener("orientationchange", (0, f.default)(j, x.debounceDelay, !0)), window.addEventListener("scroll", (0, u.default)(function () {
16802                            (0, b.default)(w, x.once)
16803                        }, x.throttleDelay)), x.disableMutationObserver || (0, d.default)("[data-aos]", O), w)
16804                    };
16805                e.exports = {init: z, refresh: j, refreshHard: O}
16806            }, function (e, t) {
16807            }, , , , , function (e, t) {
16808                (function (t) {
16809                    "use strict";
16810
16811                    function n(e, t, n) {
16812                        function o(t) {
16813                            var n = b, o = v;
16814                            return b = v = void 0, k = t, g = e.apply(o, n)
16815                        }
16816
16817                        function r(e) {
16818                            return k = e, h = setTimeout(s, t), _ ? o(e) : g
16819                        }
16820
16821                        function a(e) {
16822                            var n = e - w, o = e - k, i = t - n;
16823                            return S ? j(i, y - o) : i
16824                        }
16825
16826                        function c(e) {
16827                            var n = e - w, o = e - k;
16828                            return void 0 === w || n >= t || n < 0 || S && o >= y
16829                        }
16830
16831                        function s() {
16832                            var e = O();
16833                            return c(e) ? d(e) : void (h = setTimeout(s, a(e)))
16834                        }
16835
16836                        function d(e) {
16837                            return h = void 0, z && b ? o(e) : (b = v = void 0, g)
16838                        }
16839
16840                        function l() {
16841                            void 0 !== h && clearTimeout(h), k = 0, b = w = v = h = void 0
16842                        }
16843
16844                        function p() {
16845                            return void 0 === h ? g : d(O())
16846                        }
16847
16848                        function m() {
16849                            var e = O(), n = c(e);
16850                            if (b = arguments, v = this, w = e, n) {
16851                                if (void 0 === h) return r(w);
16852                                if (S) return h = setTimeout(s, t), o(w)
16853                            }
16854                            return void 0 === h && (h = setTimeout(s, t)), g
16855                        }
16856
16857                        var b, v, y, g, h, w, k = 0, _ = !1, S = !1, z = !0;
16858                        if ("function" != typeof e) throw new TypeError(f);
16859                        return t = u(t) || 0, i(n) && (_ = !!n.leading, S = "maxWait" in n, y = S ? x(u(n.maxWait) || 0, t) : y, z = "trailing" in n ? !!n.trailing : z), m.cancel = l, m.flush = p, m
16860                    }
16861
16862                    function o(e, t, o) {
16863                        var r = !0, a = !0;
16864                        if ("function" != typeof e) throw new TypeError(f);
16865                        return i(o) && (r = "leading" in o ? !!o.leading : r, a = "trailing" in o ? !!o.trailing : a), n(e, t, {
16866                            leading: r,
16867                            maxWait: t,
16868                            trailing: a
16869                        })
16870                    }
16871
16872                    function i(e) {
16873                        var t = "undefined" == typeof e ? "undefined" : c(e);
16874                        return !!e && ("object" == t || "function" == t)
16875                    }
16876
16877                    function r(e) {
16878                        return !!e && "object" == ("undefined" == typeof e ? "undefined" : c(e))
16879                    }
16880
16881                    function a(e) {
16882                        return "symbol" == ("undefined" == typeof e ? "undefined" : c(e)) || r(e) && k.call(e) == d
16883                    }
16884
16885                    function u(e) {
16886                        if ("number" == typeof e) return e;
16887                        if (a(e)) return s;
16888                        if (i(e)) {
16889                            var t = "function" == typeof e.valueOf ? e.valueOf() : e;
16890                            e = i(t) ? t + "" : t
16891                        }
16892                        if ("string" != typeof e) return 0 === e ? e : +e;
16893                        e = e.replace(l, "");
16894                        var n = m.test(e);
16895                        return n || b.test(e) ? v(e.slice(2), n ? 2 : 8) : p.test(e) ? s : +e
16896                    }
16897
16898                    var c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
16899                            return typeof e
16900                        } : function (e) {
16901                            return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
16902                        }, f = "Expected a function", s = NaN, d = "[object Symbol]", l = /^\s+|\s+$/g,
16903                        p = /^[-+]0x[0-9a-f]+$/i, m = /^0b[01]+$/i, b = /^0o[0-7]+$/i, v = parseInt,
16904                        y = "object" == ("undefined" == typeof t ? "undefined" : c(t)) && t && t.Object === Object && t,
16905                        g = "object" == ("undefined" == typeof self ? "undefined" : c(self)) && self && self.Object === Object && self,
16906                        h = y || g || Function("return this")(), w = Object.prototype, k = w.toString, x = Math.max,
16907                        j = Math.min, O = function () {
16908                            return h.Date.now()
16909                        };
16910                    e.exports = o
16911                }).call(t, function () {
16912                    return this
16913                }())
16914            }, function (e, t) {
16915                (function (t) {
16916                    "use strict";
16917
16918                    function n(e, t, n) {
16919                        function i(t) {
16920                            var n = b, o = v;
16921                            return b = v = void 0, O = t, g = e.apply(o, n)
16922                        }
16923
16924                        function r(e) {
16925                            return O = e, h = setTimeout(s, t), _ ? i(e) : g
16926                        }
16927
16928                        function u(e) {
16929                            var n = e - w, o = e - O, i = t - n;
16930                            return S ? x(i, y - o) : i
16931                        }
16932
16933                        function f(e) {
16934                            var n = e - w, o = e - O;
16935                            return void 0 === w || n >= t || n < 0 || S && o >= y
16936                        }
16937
16938                        function s() {
16939                            var e = j();
16940                            return f(e) ? d(e) : void (h = setTimeout(s, u(e)))
16941                        }
16942
16943                        function d(e) {
16944                            return h = void 0, z && b ? i(e) : (b = v = void 0, g)
16945                        }
16946
16947                        function l() {
16948                            void 0 !== h && clearTimeout(h), O = 0, b = w = v = h = void 0
16949                        }
16950
16951                        function p() {
16952                            return void 0 === h ? g : d(j())
16953                        }
16954
16955                        function m() {
16956                            var e = j(), n = f(e);
16957                            if (b = arguments, v = this, w = e, n) {
16958                                if (void 0 === h) return r(w);
16959                                if (S) return h = setTimeout(s, t), i(w)
16960                            }
16961                            return void 0 === h && (h = setTimeout(s, t)), g
16962                        }
16963
16964                        var b, v, y, g, h, w, O = 0, _ = !1, S = !1, z = !0;
16965                        if ("function" != typeof e) throw new TypeError(c);
16966                        return t = a(t) || 0, o(n) && (_ = !!n.leading, S = "maxWait" in n, y = S ? k(a(n.maxWait) || 0, t) : y, z = "trailing" in n ? !!n.trailing : z), m.cancel = l, m.flush = p, m
16967                    }
16968
16969                    function o(e) {
16970                        var t = "undefined" == typeof e ? "undefined" : u(e);
16971                        return !!e && ("object" == t || "function" == t)
16972                    }
16973
16974                    function i(e) {
16975                        return !!e && "object" == ("undefined" == typeof e ? "undefined" : u(e))
16976                    }
16977
16978                    function r(e) {
16979                        return "symbol" == ("undefined" == typeof e ? "undefined" : u(e)) || i(e) && w.call(e) == s
16980                    }
16981
16982                    function a(e) {
16983                        if ("number" == typeof e) return e;
16984                        if (r(e)) return f;
16985                        if (o(e)) {
16986                            var t = "function" == typeof e.valueOf ? e.valueOf() : e;
16987                            e = o(t) ? t + "" : t
16988                        }
16989                        if ("string" != typeof e) return 0 === e ? e : +e;
16990                        e = e.replace(d, "");
16991                        var n = p.test(e);
16992                        return n || m.test(e) ? b(e.slice(2), n ? 2 : 8) : l.test(e) ? f : +e
16993                    }
16994
16995                    var u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
16996                            return typeof e
16997                        } : function (e) {
16998                            return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
16999                        }, c = "Expected a function", f = NaN, s = "[object Symbol]", d = /^\s+|\s+$/g,
17000                        l = /^[-+]0x[0-9a-f]+$/i, p = /^0b[01]+$/i, m = /^0o[0-7]+$/i, b = parseInt,
17001                        v = "object" == ("undefined" == typeof t ? "undefined" : u(t)) && t && t.Object === Object && t,
17002                        y = "object" == ("undefined" == typeof self ? "undefined" : u(self)) && self && self.Object === Object && self,
17003                        g = v || y || Function("return this")(), h = Object.prototype, w = h.toString, k = Math.max,
17004                        x = Math.min, j = function () {
17005                            return g.Date.now()
17006                        };
17007                    e.exports = n
17008                }).call(t, function () {
17009                    return this
17010                }())
17011            }, function (e, t) {
17012                "use strict";
17013
17014                function n(e) {
17015                    var t = void 0, o = void 0, i = void 0;
17016                    for (t = 0; t < e.length; t += 1) {
17017                        if (o = e[t], o.dataset && o.dataset.aos) return !0;
17018                        if (i = o.children && n(o.children)) return !0
17019                    }
17020                    return !1
17021                }
17022
17023                function o(e, t) {
17024                    var n = window.document,
17025                        o = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
17026                        a = new o(i);
17027                    r = t, a.observe(n.documentElement, {childList: !0, subtree: !0, removedNodes: !0})
17028                }
17029
17030                function i(e) {
17031                    e && e.forEach(function (e) {
17032                        var t = Array.prototype.slice.call(e.addedNodes),
17033                            o = Array.prototype.slice.call(e.removedNodes), i = t.concat(o);
17034                        if (n(i)) return r()
17035                    })
17036                }
17037
17038                Object.defineProperty(t, "__esModule", {value: !0});
17039                var r = function () {
17040                };
17041                t.default = o
17042            }, function (e, t) {
17043                "use strict";
17044
17045                function n(e, t) {
17046                    if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
17047                }
17048
17049                function o() {
17050                    return navigator.userAgent || navigator.vendor || window.opera || ""
17051                }
17052
17053                Object.defineProperty(t, "__esModule", {value: !0});
17054                var i = function () {
17055                        function e(e, t) {
17056                            for (var n = 0; n < t.length; n++) {
17057                                var o = t[n];
17058                                o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o)
17059                            }
17060                        }
17061
17062                        return function (t, n, o) {
17063                            return n && e(t.prototype, n), o && e(t, o), t
17064                        }
17065                    }(),
17066                    r = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,
17067                    a = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
17067sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
17068                    u = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,
17069                    c = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
17070                    f = function () {
17071                        function e() {
17072                            n(this, e)
17073                        }
17074
17075                        return i(e, [{
17076                            key: "phone", value: function () {
17077                                var e = o();
17078                                return !(!r.test(e) && !a.test(e.substr(0, 4)))
17079                            }
17080                        }, {
17081                            key: "mobile", value: function () {
17082                                var e = o();
17083                                return !(!u.test(e) && !c.test(e.substr(0, 4)))
17084                            }
17085                        }, {
17086                            key: "tablet", value: function () {
17087                                return this.mobile() && !this.phone()
17088                            }
17089                        }]), e
17090                    }();
17091                t.default = new f
17092            }, function (e, t) {
17093                "use strict";
17094                Object.defineProperty(t, "__esModule", {value: !0});
17095                var n = function (e, t, n) {
17096                    var o = e.node.getAttribute("data-aos-once");
17097                    t > e.position ? e.node.classList.add("aos-animate") : "undefined" != typeof o && ("false" === o || !n && "true" !== o) && e.node.classList.remove("aos-animate")
17098                }, o = function (e, t) {
17099                    var o = window.pageYOffset, i = window.innerHeight;
17100                    e.forEach(function (e, r) {
17101                        n(e, i + o, t)
17102                    })
17103                };
17104                t.default = o
17105            }, function (e, t, n) {
17106                "use strict";
17107
17108                function o(e) {
17109                    return e && e.__esModule ? e : {default: e}
17110                }
17111
17112                Object.defineProperty(t, "__esModule", {value: !0});
17113                var i = n(12), r = o(i), a = function (e, t) {
17114                    return e.forEach(function (e, n) {
17115                        e.node.classList.add("aos-init"), e.position = (0, r.default)(e.node, t.offset)
17116                    }), e
17117                };
17118                t.default = a
17119            }, function (e, t, n) {
17120                "use strict";
17121
17122                function o(e) {
17123                    return e && e.__esModule ? e : {default: e}
17124                }
17125
17126                Object.defineProperty(t, "__esModule", {value: !0});
17127                var i = n(13), r = o(i), a = function (e, t) {
17128                    var n = 0, o = 0, i = window.innerHeight, a = {
17129                        offset: e.getAttribute("data-aos-offset"),
17130                        anchor: e.getAttribute("data-aos-anchor"),
17131                        anchorPlacement: e.getAttribute("data-aos-anchor-placement")
17132                    };
17133                    switch (a.offset && !isNaN(a.offset) && (o = parseInt(a.offset)), a.anchor && document.querySelectorAll(a.anchor) && (e = document.querySelectorAll(a.anchor)[0]), n = (0, r.default)(e).top, a.anchorPlacement) {
17134                        case"top-bottom":
17135                            break;
17136                        case"center-bottom":
17137                            n += e.offsetHeight / 2;
17138                            break;
17139                        case"bottom-bottom":
17140                            n += e.offsetHeight;
17141                            break;
17142                        case"top-center":
17143                            n += i / 2;
17144                            break;
17145                        case"bottom-center":
17146                            n += i / 2 + e.offsetHeight;
17147                            break;
17148                        case"center-center":
17149                            n += i / 2 + e.offsetHeight / 2;
17150                            break;
17151                        case"top-top":
17152                            n += i;
17153                            break;
17154                        case"bottom-top":
17155                            n += e.offsetHeight + i;
17156                            break;
17157                        case"center-top":
17158                            n += e.offsetHeight / 2 + i
17159                    }
17160                    return a.anchorPlacement || a.offset || isNaN(t) || (o = t), n + o
17161                };
17162                t.default = a
17163            }, function (e, t) {
17164                "use strict";
17165                Object.defineProperty(t, "__esModule", {value: !0});
17166                var n = function (e) {
17167                    for (var t = 0, n = 0; e && !isNaN(e.offsetLeft) && !isNaN(e.offsetTop);) t += e.offsetLeft - ("BODY" != e.tagName ? e.scrollLeft : 0), n += e.offsetTop - ("BODY" != e.tagName ? e.scrollTop : 0), e = e.offsetParent;
17168                    return {top: n, left: t}
17169                };
17170                t.default = n
17171            }, function (e, t) {
17172                "use strict";
17173                Object.defineProperty(t, "__esModule", {value: !0});
17174                var n = function (e) {
17175                    return e = e || document.querySelectorAll("[data-aos]"), Array.prototype.map.call(e, function (e) {
17176                        return {node: e}
17177                    })
17178                };
17179                t.default = n
17180            }])
17181        });
17182
17183        /***/
17184    }),
17185    /* 14 */
17186    /***/ (function (module, exports) {
17187
17188
17189        /**
17190         *
17191         */
17192
17193        +function ($) {
17194            page.registerVendor('Constellation');
17195
17196            page.initConstellation = function () {
17197                var distance = 120;
17198
17199                if ($(window).width() < 700) {
17200                    distance = 25;
17201                }
17202
17203                $('.constellation').each(function () {
17204                    var canvas = $(this),
17205                        color = canvas.dataAttr('color', 'rgba(255, 255, 255, .8)'),
17206                        length = canvas.dataAttr('length', 150),
17207                        radius = canvas.dataAttr('radius', 150);
17208
17209                    if (color == 'dark') {
17210                        color = 'rgba(0, 0, 0, .6)';
17211                    }
17212
17213                    canvas.constellation({
17214                        distance: distance,
17215                        length: length,
17216                        radius: radius,
17217                        star: {
17218                            color: color,
17219                            width: 1
17220                        },
17221                        line: {
17222                            color: color,
17223                            width: 0.2
17224                        }
17225                    });
17226                });
17227
17228            }
17229
17230        }(jQuery);
17231
17232
17233        /*!
17234 * Mantis.js / jQuery / Zepto.js plugin for Constellation
17235 * @version 1.2.2
17236 * @author Acauã Montiel <[email protected]>
17237 * @license http://acaua.mit-license.org/
17238 */
17239        (function ($, window) {
17240            /**
17241             * Makes a nice constellation on canvas
17242             * @constructor Constellation
17243             */
17244            function Constellation(canvas, options) {
17245                var $canvas = $(canvas),
17246                    context = canvas.getContext('2d'),
17247                    defaults = {
17248                        star: {
17249                            color: 'rgba(255, 255, 255, .5)',
17250                            width: 1
17251                        },
17252                        line: {
17253                            color: 'rgba(255, 255, 255, .5)',
17254                            width: 0.2
17255                        },
17256                        position: {
17257                            x: 0, // This value will be overwritten at startup
17258                            y: 0 // This value will be overwritten at startup
17259                        },
17260                        width: window.innerWidth,
17261                        height: window.innerHeight,
17262                        velocity: 0.1,
17263                        length: 100,
17264                        distance: 120,
17265                        radius: 150,
17266                        stars: []
17267                    },
17268                    config = $.extend(true, {}, defaults, options);
17269
17270                function Star() {
17271                    this.x = Math.random() * canvas.width;
17272                    this.y = Math.random() * canvas.height;
17273
17274                    this.vx = (config.velocity - (Math.random() * 0.5));
17275                    this.vy = (config.velocity - (Math.random() * 0.5));
17276
17277                    this.radius = Math.random() * config.star.width;
17278                }
17279
17280                Star.prototype = {
17281                    create: function () {
17282                        context.beginPath();
17283                        context.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false);
17284                        context.fill();
17285                    },
17286
17287                    animate: function () {
17288                        var i;
17289                        for (i = 0; i < config.length; i++) {
17290
17291                            var star = config.stars[i];
17292
17293                            if (star.y < 0 || star.y > canvas.height) {
17294                                star.vx = star.vx;
17295                                star.vy = -star.vy;
17296                            } else if (star.x < 0 || star.x > canvas.width) {
17297                                star.vx = -star.vx;
17298                                star.vy = star.vy;
17299                            }
17300
17301                            star.x += star.vx;
17302                            star.y += star.vy;
17303                        }
17304                    },
17305
17306                    line: function () {
17307                        var length = config.length,
17308                            iStar,
17309                            jStar,
17310                            i,
17311                            j;
17312
17313                        for (i = 0; i < length; i++) {
17314                            for (j = 0; j < length; j++) {
17315                                iStar = config.stars[i];
17316                                jStar = config.stars[j];
17317
17318                                if (
17319                                    (iStar.x - jStar.x) < config.distance &&
17320                                    (iStar.y - jStar.y) < config.distance &&
17321                                    (iStar.x - jStar.x) > -config.distance &&
17322                                    (iStar.y - jStar.y) > -config.distance
17323                                ) {
17324                                    if (
17325                                        (iStar.x - config.position.x) < config.radius &&
17326                                        (iStar.y - config.position.y) < config.radius &&
17327                                        (iStar.x - config.position.x) > -config.radius &&
17328                                        (iStar.y - config.position.y) > -config.radius
17329                                    ) {
17330                                        context.beginPath();
17331                                        context.moveTo(iStar.x, iStar.y
17331);
17332                                        context.lineTo(jStar.x, jStar.y);
17333                                        context.stroke();
17334                                        context.closePath();
17335                                    }
17336                                }
17337                            }
17338                        }
17339                    }
17340                };
17341
17342                this.createStars = function () {
17343                    var length = config.length,
17344                        star,
17345                        i;
17346
17347                    context.clearRect(0, 0, canvas.width, canvas.height);
17348
17349                    for (i = 0; i < length; i++) {
17350                        config.stars.push(new Star());
17351                        star = config.stars[i];
17352
17353                        star.create();
17354                    }
17355
17356                    star.line();
17357                    star.animate();
17358                };
17359
17360                this.setCanvas = function () {
17361                    canvas.width = config.width;
17362                    canvas.height = config.height;
17363                };
17364
17365                this.setContext = function () {
17366                    context.fillStyle = config.star.color;
17367                    context.strokeStyle = config.line.color;
17368                    context.lineWidth = config.line.width;
17369                };
17370
17371                this.setInitialPosition = function () {
17372                    if (!options || !options.hasOwnProperty('position')) {
17373                        config.position = {
17374                            x: canvas.width * 0.5,
17375                            y: canvas.height * 0.5
17376                        };
17377                    }
17378                };
17379
17380                this.loop = function (callback) {
17381                    callback();
17382
17383                    window.requestAnimationFrame(function () {
17384                        //stats.begin(); // Only for Stats
17385                        this.loop(callback);
17386                        //stats.end(); // Only for Stats
17387                    }.bind(this));
17388                };
17389
17390                this.bind = function () {
17391                    $canvas.on('mousemove', function (e) {
17392                        config.position.x = e.pageX - $canvas.offset().left;
17393                        config.position.y = e.pageY - $canvas.offset().top;
17394                    });
17395                };
17396
17397                this.init = function () {
17398                    this.setCanvas();
17399                    this.setContext();
17400                    this.setInitialPosition();
17401                    this.loop(this.createStars);
17402                    this.bind();
17403                };
17404            }
17405
17406            $.fn.constellation = function (options) {
17407                return this.each(function () {
17408                    var c = new Constellation(this, options);
17409                    c.init();
17410                });
17411            };
17412        })($, window);
17413
17414
17415        /***/
17416    }),
17417    /* 15 */
17418    /***/ (function (module, exports, __webpack_require__) {
17419
17420
17421        /**
17422         * Load required plugin.
17423         */
17424        __webpack_require__(16);
17425
17426
17427        /**
17428         * Configure the plugin.
17429         */
17430
17431        +function ($) {
17432            page.registerVendor('Countdown');
17433
17434            page.initCountdown = function () {
17435
17436                $('[data-countdown]').each(function () {
17437                    var tag = $(this),
17438                        format = '',
17439                        options = {
17440                            textDay: 'Day',
17441                            textHour: 'Hour',
17442                            textMinute: 'Minute',
17443                            textSecond: 'Second',
17444                        };
17445
17446                    options = $.extend(options, page.getDataOptions(tag));
17447
17448
17449                    format += '<div class="row gap-x-4">';
17450                    format += '<div class="col"><h5>%D</h5><small>' + options.textDay + '%!D</small></div>';
17451                    format += '<div class="col"><h5>%H</h5><small>' + options.textHour + '%!H</small></div>';
17452                    format += '<div class="col"><h5>%M</h5><small>' + options.textMinute + '%!M</small></div>';
17453                    format += '<div class="col"><h5>%S</h5><small>' + options.textSecond + '%!S</small></div>';
17454                    format += '</div>';
17455
17456                    if (tag.hasDataAttr('format')) {
17457                        format = tag.data('format');
17458                    }
17459
17460                    tag.countdown(tag.data('countdown'), function (event) {
17461                        $(this).html(event.strftime(format));
17462                    })
17463
17464                });
17465
17466            }
17467
17468        }(jQuery);
17469
17470
17471        /***/
17472    }),
17473    /* 16 */
17474    /***/ (function (module, exports, __webpack_require__) {
17475
17476        var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
17477 * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
17478 * Copyright (c) 2016 Edson Hilios
17479 *
17480 * Permission is hereby granted, free of charge, to any person obtaining a copy of
17481 * this software and associated documentation files (the "Software"), to deal in
17482 * the Software without restriction, including without limitation the rights to
17483 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
17484 * the Software, and to permit persons to whom the Software is furnished to do so,
17485 * subject to the following conditions:
17486 *
17487 * The above copyright notice and this permission notice shall be included in all
17488 * copies or substantial portions of the Software.
17489 *
17490 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17491 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17492 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17493 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17494 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17495 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17496 */
17497        (function (factory) {
17498            "use strict";
17499            if (true) {
17500                !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
17501                    __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
17502                        (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
vendor: 9,259 bytes, lines 17503-17706
17503                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
17504            } else {
17505            }
17506        })(function ($) {
17507            "use strict";
17508            var instances = [], matchers = [], defaultOptions = {
17509                precision: 100,
17510                elapse: false,
17511                defer: false
17512            };
17513            matchers.push(/^[0-9]*$/.source);
17514            matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
17515            matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
17516            matchers = new RegExp(matchers.join("|"));
17517
17518            function parseDateString(dateString) {
17519                if (dateString instanceof Date) {
17520                    return dateString;
17521                }
17522                if (String(dateString).match(matchers)) {
17523                    if (String(dateString).match(/^[0-9]*$/)) {
17524                        dateString = Number(dateString);
17525                    }
17526                    if (String(dateString).match(/\-/)) {
17527                        dateString = String(dateString).replace(/\-/g, "/");
17528                    }
17529                    return new Date(dateString);
17530                } else {
17531                    throw new Error("Couldn't cast `" + dateString + "` to a date object.");
17532                }
17533            }
17534
17535            var DIRECTIVE_KEY_MAP = {
17536                Y: "years",
17537                m: "months",
17538                n: "daysToMonth",
17539                d: "daysToWeek",
17540                w: "weeks",
17541                W: "weeksToMonth",
17542                H: "hours",
17543                M: "minutes",
17544                S: "seconds",
17545                D: "totalDays",
17546                I: "totalHours",
17547                N: "totalMinutes",
17548                T: "totalSeconds"
17549            };
17550
17551            function escapedRegExp(str) {
17552                var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
17553                return new RegExp(sanitize);
17554            }
17555
17556            function strftime(offsetObject) {
17557                return function (format) {
17558                    var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
17559                    if (directives) {
17560                        for (var i = 0, len = directives.length; i < len; ++i) {
17561                            var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),
17562                                regexp = escapedRegExp(directive[0]), modifier = directive[1] || "",
17563                                plural = directive[3] || "", value = null;
17564                            directive = directive[2];
17565                            if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) {
17566                                value = DIRECTIVE_KEY_MAP[directive];
17567                                value = Number(offsetObject[value]);
17568                            }
17569                            if (value !== null) {
17570                                if (modifier === "!") {
17571                                    value = pluralize(plural, value);
17572                                }
17573                                if (modifier === "") {
17574                                    if (value < 10) {
17575                                        value = "0" + value.toString();
17576                                    }
17577                                }
17578                                format = format.replace(regexp, value.toString());
17579                            }
17580                        }
17581                    }
17582                    format = format.replace(/%%/, "%");
17583                    return format;
17584                };
17585            }
17586
17587            function pluralize(format, count) {
17588                var plural = "s", singular = "";
17589                if (format) {
17590                    format = format.replace(/(:|;|\s)/gi, "").split(/\,/);
17591                    if (format.length === 1) {
17592                        plural = format[0];
17593                    } else {
17594                        singular = format[0];
17595                        plural = format[1];
17596                    }
17597                }
17598                if (Math.abs(count) > 1) {
17599                    return plural;
17600                } else {
17601                    return singular;
17602                }
17603            }
17604
17605            var Countdown = function (el, finalDate, options) {
17606                this.el = el;
17607                this.$el = $(el);
17608                this.interval = null;
17609                this.offset = {};
17610                this.options = $.extend({}, defaultOptions);
17611                this.instanceNumber = instances.length;
17612                instances.push(this);
17613                this.$el.data("countdown-instance", this.instanceNumber);
17614                if (options) {
17615                    if (typeof options === "function") {
17616                        this.$el.on("update.countdown", options);
17617                        this.$el.on("stoped.countdown", options);
17618                        this.$el.on("finish.countdown", options);
17619                    } else {
17620                        this.options = $.extend({}, defaultOptions, options);
17621                    }
17622                }
17623                this.setFinalDate(finalDate);
17624                if (this.options.defer === false) {
17625                    this.start();
17626                }
17627            };
17628            $.extend(Countdown.prototype, {
17629                start: function () {
17630                    if (this.interval !== null) {
17631                        clearInterval(this.interval);
17632                    }
17633                    var self = this;
17634                    this.update();
17635                    this.interval = setInterval(function () {
17636                        self.update.call(self);
17637                    }, this.options.precision);
17638                },
17639                stop: function () {
17640                    clearInterval(this.interval);
17641                    this.interval = null;
17642                    this.dispatchEvent("stoped");
17643                },
17644                toggle: function () {
17645                    if (this.interval) {
17646                        this.stop();
17647                    } else {
17648                        this.start();
17649                    }
17650                },
17651                pause: function () {
17652                    this.stop();
17653                },
17654                resume: function () {
17655                    this.start();
17656                },
17657                remove: function () {
17658                    this.stop.call(this);
17659                    instances[this.instanceNumber] = null;
17660                    delete this.$el.data().countdownInstance;
17661                },
17662                setFinalDate: function (value) {
17663                    this.finalDate = parseDateString(value);
17664                },
17665                update: function () {
17666                    if (this.$el.closest("html").length === 0) {
17667                        this.remove();
17668                        return;
17669                    }
17670                    var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(),
17671                        newTotalSecsLeft;
17672                    newTotalSecsLeft = this.finalDate.getTime() - now.getTime();
17673                    newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3);
17674                    newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft);
17675                    if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) {
17676                        return;
17677                    } else {
17678                        this.totalSecsLeft = newTotalSecsLeft;
17679                    }
17680                    this.elapsed = now >= this.finalDate;
17681                    this.offset = {
17682                        seconds: this.totalSecsLeft % 60,
17683                        minutes: Math.floor(this.totalSecsLeft / 60) % 60,
17684                        hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
17685                        days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
17686                        daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
17687                        daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),
17688                        weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
17689                        weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4,
17690                        months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
17691                        years: Math.abs(this.finalDate.getFullYear() - now.getFullYear()),
17692                        totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
17693                        totalHours: Math.floor(this.totalSecsLeft / 60 / 60),
17694                        totalMinutes: Math.floor(this.totalSecsLeft / 60),
17695                        totalSeconds: this.totalSecsLeft
17696                    };
17697                    if (!this.options.elapse && this.totalSecsLeft === 0) {
17698                        this.stop();
17699                        this.dispatchEvent("finish");
17700                    } else {
17701                        this.dispatchEvent("update");
17702                    }
17703                },
17704                dispatchEvent: function (eventName) {
17705                    var event = $.Event(eventName + ".countdown");
17706                    event.finalDate = this.finalDate;
17707                    event.elapsed = this.elapsed;
17708                    event.offset = $.extend({}, this.offset);
17709                    event.strftime = strftime(this.offset);
17710                    this.$el.trigger(event);
17711                }
17712            });
17713            $.fn.countdown = function () {
17714                var argumentsArray = Array.prototype.slice.call(arguments, 0);
17715                return this.each(function () {
17716                    var instanceNumber = $(this).data("countdown-instance");
17717                    if (instanceNumber !== undefined) {
17718                        var instance = instances[instanceNumber], method = argumentsArray[0];
17719                        if (Countdown.prototype.hasOwnProperty(method)) {
17720                            instance[method].apply(instance, argumentsArray.slice(1));
17721                        } else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) {
17722                            instance.setFinalDate.call(instance, method);
17723                            instance.start();
17724                        } else {
17725                            $.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method));
17726                        }
17727                    } else {
17728                        new Countdown(this, argumentsArray[0], argumentsArray[1]);
17729                    }
17730                });
17731            };
17732        });
17733
17734        /***/
17735    }),
17736    /* 17 */
17737    /***/ (function (module, exports, __webpack_require__) {
17738
17739
17740        /**
17741         * Load required plugins.
17742         */
17743        __webpack_require__(18);
17744        window.CountUp = __webpack_require__(19);
17745
17746
17747        /**
17748         * Configure the plugin.
17749         */
17750
17751        +function ($) {
17752            page.registerVendor('Countup');
17753
17754            page.initCountup = function () {
17755
17756                $('[data-provide~="countup"]:not(.counted)').each(function () {
17757                    var tag = $(this);
17758                    var extraOptions = {};
17759                    extraOptions = $.extend(extraOptions, page.getDataOptions(tag));
17760
17761                    var options = {
17762                        startVal: tag.dataAttr('from', 0),
17763                        endVal: tag.dataAttr('to', 0),
17764                        options: extraOptions,
17765                    };
17766                    options = $.extend(options, page.getDataOptions(tag));
17767
17768                    tag.waypoint({
17769                        handler: function ($direction) {
17770                            tag.countup(options).addClass('counted');
17771                        },
17772                        offset: '100%'
17773                    });
17774
17775                });
17776
17777            }
17778
17779        }(jQuery);
17780
17781
17782        $.fn.countup = function (params) {
17783            if (typeof CountUp !== 'function') {
17784                console.error('countUp.js is a required dependency of countUp-jquery.js.');
17785                return;
17786            }
17787
17788            var defaults = {
17789                startVal: 0,
17790                decimals: 0,
17791                duration: 4,
17792            };
17793
17794            if (typeof params === 'number') {
17795                defaults.endVal = params;
17796            } else if (typeof params === 'object') {
17797                $.extend(defaults, params);
17798            } else {
17799                console.error('countUp-jquery requires its argument to be either an object or number');
17800                return;
17801            }
17802
17803            this.each(function (i, elem) {
17804                var countUp = new CountUp(elem, defaults.startVal, defaults.endVal, defaults.decimals, defaults.duration, defaults.options);
17805
17806                countUp.start();
17807            });
17808
17809            return this;
17810        };
17811
17812
17813        /***/
17814    }),
17815    /* 18 */
17816    /***/ (function (module, exports) {
17817
17818        /*!
17819Waypoints - 4.0.1
17820Copyright © 2011-2016 Caleb Troughton
17821Licensed under the MIT license.
17822https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
17823*/
17824        (function () {
17825            'use strict'
17826
17827            var keyCounter = 0
17828            var allWaypoints = {}
17829
17830            /* http://imakewebthings.com/waypoints/api/waypoint */
17831            function Waypoint(options) {
17832                if (!options) {
17833                    throw new Error('No options passed to Waypoint constructor')
17834                }
17835                if (!options.element) {
17836                    throw new Error('No element option passed to Waypoint constructor')
17837                }
17838                if (!options.handler) {
17839                    throw new Error('No handler option passed to Waypoint constructor')
17840                }
17841
17842                this.key = 'waypoint-' + keyCounter
17843                this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
17844                this.element = this.options.element
17845                this.adapter = new Waypoint.Adapter(this.element)
17846                this.callback = options.handler
17847                this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
17848                this.enabled = this.options.enabled
17849                this.triggerPoint = null
17850                this.group = Waypoint.Group.findOrCreate({
17851                    name: this.options.group,
17852                    axis: this.axis
17853                })
17854                this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
17855
17856                if (Waypoint.offsetAliases[this.options.offset]) {
17857                    this.options.offset = Waypoint.offsetAliases[this.options.offset]
17858                }
17859                this.group.add(this)
17860                this.context.add(this)
17861                allWaypoints[this.key] = this
17862                keyCounter += 1
17863            }
17864
17865            /* Private */
17866            Waypoint.prototype.queueTrigger = function (direction) {
17867                this.group.queueTrigger(this, direction)
17868            }
17869
17870            /* Private */
17871            Waypoint.prototype.trigger = function (args) {
17872                if (!this.enabled) {
17873                    return
17874                }
17875                if (this.callback) {
17876                    this.callback.apply(this, args)
17877                }
17878            }
17879
17880            /* Public */
17881            /* http://imakewebthings.com/waypoints/api/destroy */
17882            Waypoint.prototype.destroy = function () {
17883                this.context.remove(this)
17884                this.group.remove(this)
17885                delete allWaypoints[this.key]
17886            }
17887
17888            /* Public */
17889            /* http://imakewebthings.com/waypoints/api/disable */
17890            Waypoint.prototype.disable = function () {
17891                this.enabled = false
17892                return this
17893            }
17894
17895            /* Public */
17896            /* http://imakewebthings.com/waypoints/api/enable */
17897            Waypoint.prototype.enable = function () {
17898                this.context.refresh()
17899                this.enabled = true
17900                return this
17901            }
17902
17903            /* Public */
17904            /* http://imakewebthings.com/waypoints/api/next */
17905            Waypoint.prototype.next = function () {
17906                return this.group.next(this)
17907            }
17908
17909            /* Public */
17910            /* http://imakewebthings.com/waypoints/api/previous */
17911            Waypoint.prototype.previous = function () {
17912                return this.group.previous(this)
17913            }
17914
17915            /* Private */
17916            Waypoint.invokeAll = function (method) {
17917                var allWaypointsArray = []
17918                for (var waypointKey in allWaypoints) {
17919                    allWaypointsArray.push(allWaypoints[waypointKey])
17920                }
17921                for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
17922                    allWaypointsArray[i][method]()
17923                }
17924            }
17925
17926            /* Public */
17927            /* http://imakewebthings.com/waypoints/api/destroy-all */
17928            Waypoint.destroyAll = function () {
17929                Waypoint.invokeAll('destroy')
17930            }
17931
17932            /* Public */
17933            /* http://imakewebthings.com/waypoints/api/disable-all */
17934            Waypoint.disableAll = function () {
17935                Waypoint.invokeAll('disable')
17936            }
17937
17938            /* Public */
17939            /* http://imakewebthings.com/waypoints/api/enable-all */
17940            Waypoint.enableAll = function () {
17941                Waypoint.Context.refreshAll()
17942                for (var waypointKey in allWaypoints) {
17943                    allWaypoints[waypointKey].enabled = true
17944                }
17945                return this
17946            }
17947
17948            /* Public */
17949            /* http://imakewebthings.com/waypoints/api/refresh-all */
17950            Waypoint.refreshAll = function () {
17951                Waypoint.Context.refreshAll()
17952            }
17953
17954            /* Public */
17955            /* http://imakewebthings.com/waypoints/api/viewport-height */
17956            Waypoint.viewportHeight = function () {
17957                return window.innerHeight || document.documentElement.clientHeight
17958            }
17959
17960            /* Public */
17961            /* http://imakewebthings.com/waypoints/api/viewport-width */
17962            Waypoint.viewportWidth = function () {
17963                return document.documentElement.clientWidth
17964            }
17965
17966            Waypoint.adapters = []
17967
17968            Waypoint.defaults = {
17969                context: window,
17970                continuous: true,
17971                enabled: true,
17972                group: 'default',
17973                horizontal: false,
17974                offset: 0
17975            }
17976
17977            Waypoint.offsetAliases = {
17978                'bottom-in-view': function () {
17979                    return this.context.innerHeight() - this.adapter.outerHeight()
17980                },
17981                'right-in-view': function () {
17982                    return this.context.innerWidth() - this.adapter.outerWidth()
17983                }
17984            }
17985
17986            window.Waypoint = Waypoint
17987        }())
17988        ;(function () {
17989            'use strict'
17990
17991            function requestAnimationFrameShim(callback) {
17992                window.setTimeout(callback, 1000 / 60)
17993            }
17994
17995            var keyCounter = 0
17996            var contexts = {}
17997            var Waypoint = window.Waypoint
17998            var oldWindowLoad = window.onload
17999
18000            /* http://imakewebthings.com/waypoints/api/context */
18001            function Context(element) {
18002                this.element = element
18003                this.Adapter = Waypoint.Adapter
18004                this.adapter = new this.Adapter(element)
18005                this.key = 'waypoint-context-' + keyCounter
18006                this.didScroll = false
18007                this.didResize = false
18008                this.oldScroll = {
18009                    x: this.adapter.scrollLeft(),
18010                    y: this.adapter.scrollTop()
18011                }
18012                this.waypoints = {
18013                    vertical: {},
18014                    horizontal: {}
18015                }
18016
18017                element.waypointContextKey = this.key
18018                contexts[element.waypointContextKey] = this
18019                keyCounter += 1
18020                if (!Waypoint.windowContext) {
18021                    Waypoint.windowContext = true
18022                    Waypoint.windowContext = new Context(window)
18023                }
18024
18025                this.createThrottledScrollHandler()
18026                this.createThrottledResizeHandler()
18027            }
18028
18029            /* Private */
18030            Context.prototype.add = function (waypoint) {
18031                var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
18032                this.waypoints[axis][waypoint.key] = waypoint
18033                this.refresh()
18034            }
18035
18036            /* Private */
18037            Context.prototype.checkEmpty = function () {
18038                var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
18039                var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
18040                var isWindow = this.element == this.element.window
18041                if (horizontalEmpty && verticalEmpty && !isWindow) {
18042                    this.adapter.off('.waypoints')
18043                    delete contexts[this.key]
18044                }
18045            }
18046
18047            /* Private */
18048            Context.prototype.createThrottledResizeHandler = function () {
18049                var self = this
18050
18051                function resizeHandler() {
18052                    self.handleResize()
18053                    self.didResize = false
18054                }
18055
18056                this.adapter.on('resize.waypoints', function () {
18057                    if (!self.didResize) {
18058                        self.didResize = true
18059                        Waypoint.requestAnimationFrame(resizeHandler)
18060                    }
18061                })
18062            }
18063
18064            /* Private */
18065            Context.prototype.createThrottledScrollHandler = function () {
18066                var self = this
18067
18068                function scrollHandler() {
18069                    self.handleScroll()
18070                    self.didScroll = false
18071                }
18072
18073                this.adapter.on('scroll.waypoints', function () {
18074                    if (!self.didScroll || Waypoint.isTouch) {
18075                        self.didScroll = true
18076                        Waypoint.requestAnimationFrame(scrollHandler)
18077                    }
18078                })
18079            }
18080
18081            /* Private */
18082            Context.prototype.handleResize = function () {
18083                Waypoint.Context.refreshAll()
18084            }
18085
18086            /* Private */
18087            Context.prototype.handleScroll = function () {
18088                var triggeredGroups = {}
18089                var axes = {
18090                    horizontal: {
18091                        newScroll: this.adapter.scrollLeft(),
18092                        oldScroll: this.oldScroll.x,
18093                        forward: 'right',
18094                        backward: 'left'
18095                    },
18096                    vertical: {
18097                        newScroll: this.adapter.scrollTop(),
18098                        oldScroll: this.oldScroll.y,
18099                        forward: 'down',
18100                        backward: 'up'
18101                    }
18102                }
18103
18104                for (var axisKey in axes) {
18105                    var axis = axes[axisKey]
18106                    var isForward = axis.newScroll > axis.oldScroll
18107                    var direction = isForward ? axis.forward : axis.backward
18108
18109                    for (var waypointKey in this.waypoints[axisKey]) {
18110                        var waypoint = this.waypoints[axisKey][waypointKey]
18111                        if (waypoint.triggerPoint === null) {
18112                            continue
18113                        }
18114                        var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
18115                        var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
18116                        var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
18117                        var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
18118                        if (crossedForward || crossedBackward) {
18119                            waypoint.queueTrigger(direction)
18120                            triggeredGroups[waypoint.group.id] = waypoint.group
18121                        }
18122                    }
18123                }
18124
18125                for (var groupKey in triggeredGroups) {
18126                    triggeredGroups[groupKey].flushTriggers()
18127                }
18128
18129                this.oldScroll = {
18130                    x: axes.horizontal.newScroll,
18131                    y: axes.vertical.newScroll
18132                }
18133            }
18134
18135            /* Private */
18136            Context.prototype.innerHeight = function () {
18137                /*eslint-disable eqeqeq */
18138                if (this.element == this.element.window) {
18139                    return Waypoint.viewportHeight()
18140                }
18141                /*eslint-enable eqeqeq */
18142                return this.adapter.innerHeight()
18143            }
18144
18145            /* Private */
18146            Context.prototype.remove = function (waypoint) {
18147                delete this.waypoints[waypoint.axis][waypoint.key]
18148                this.checkEmpty()
18149            }
18150
18151            /* Private */
18152            Context.prototype.innerWidth = function () {
18153                /*eslint-disable eqeqeq */
18154                if (this.element == this.element.window) {
18155                    return Waypoint.viewportWidth()
18156                }
18157                /*eslint-enable eqeqeq */
18158                return this.adapter.innerWidth()
18159            }
18160
18161            /* Public */
18162            /* http://imakewebthings.com/waypoints/api/context-destroy */
18163            Context.prototype.destroy = function () {
18164                var allWaypoints = []
18165                for (var axis in this.waypoints) {
18166                    for (var waypointKey in this.waypoints[axis]) {
18167                        allWaypoints.push(this.waypoints[axis][waypointKey])
18168                    }
18169                }
18170                for (var i = 0, end = allWaypoints.length; i < end; i++) {
18171                    allWaypoints[i].destroy()
18172                }
18173            }
18174
18175            /* Public */
18176            /* http://imakewebthings.com/waypoints/api/context-refresh */
18177            Context.prototype.refresh = function () {
18178                /*eslint-disable eqeqeq */
18179                var isWindow = this.element == this.element.window
18180                /*eslint-enable eqeqeq */
18181                var contextOffset = isWindow ? undefined : this.adapter.offset()
18182                var triggeredGroups = {}
18183                var axes
18184
18185                this.handleScroll()
18186                axes = {
18187                    horizontal: {
18188                        contextOffset: isWindow ? 0 : contextOffset.left,
18189                        contextScroll: isWindow ? 0 : this.oldScroll.x,
18190                        contextDimension: this.innerWidth(),
18191                        oldScroll: this.oldScroll.x,
18192                        forward: 'right',
18193                        backward: 'left',
18194                        offsetProp: 'left'
18195                    },
18196                    vertical: {
18197                        contextOffset: isWindow ? 0 : contextOffset.top,
18198                        contextScroll: isWindow ? 0 : this.oldScroll.y,
18199                        contextDimension: this.innerHeight(),
18200                        oldScroll: this.oldScroll.y,
18201                        forward: 'down',
18202                        backward: 'up',
18203                        offsetProp: 'top'
18204                    }
18205                }
18206
18207                for (var axisKey in axes) {
18208                    var axis = axes[axisKey]
18209                    for (var waypointKey in this.waypoints[axisKey]) {
18210                        var waypoint = this.waypoints[axisKey][waypointKey]
18211                        var adjustment = waypoint.options.offset
18212                        var oldTriggerPoint = waypoint.triggerPoint
18213                        var elementOffset = 0
18214                        var freshWaypoint = oldTriggerPoint == null
18215                        var contextModifier, wasBeforeScroll, nowAfterScroll
18216                        var triggeredBackward, triggeredForward
18217
18218                        if (waypoint.element !== waypoint.element.window) {
18219                            elementOffset = waypoint.adapter.offset()[axis.offsetProp]
18220                        }
18221
18222                        if (typeof adjustment === 'function') {
18223                            adjustment = adjustment.apply(waypoint)
18224                        } else if (typeof adjustment === 'string') {
18225                            adjustment = parseFloat(adjustment)
18226                            if (waypoint.options.offset.indexOf('%') > -1) {
18227                                adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
18228                            }
18229                        }
18230
18231                        contextModifier = axis.contextScroll - axis.contextOffset
18232                        waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)
18233                        wasBeforeScroll = oldTriggerPoint < axis.oldScroll
18234                        nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
18235                        triggeredBackward = wasBeforeScroll && nowAfterScroll
18236                        triggeredForward = !wasBeforeScroll && !nowAfterScroll
18237
18238                        if (!freshWaypoint && triggeredBackward) {
18239                            waypoint.queueTrigger(axis.backward)
18240                            triggeredGroups[waypoint.group.id] = waypoint.group
18241                        } else if (!freshWaypoint && triggeredForward) {
18242                            waypoint.queueTrigger(axis.forward)
18243                            triggeredGroups[waypoint.group.id] = waypoint.group
18244                        } else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
18245                            waypoint.queueTrigger(axis.forward)
18246                            triggeredGroups[waypoint.group.id] = waypoint.group
18247                        }
18248                    }
18249                }
18250
18251                Waypoint.requestAnimationFrame(function () {
18252                    for (var groupKey in triggeredGroups) {
18253                        triggeredGroups[groupKey].flushTriggers()
18254                    }
18255                })
18256
18257                return this
18258            }
18259
18260            /* Private */
18261            Context.findOrCreateByElement = function (element) {
18262                return Context.findByElement(element) || new Context(element)
18263            }
18264
18265            /* Private */
18266            Context.refreshAll = function () {
18267                for (var contextId in contexts) {
18268                    contexts[contextId].refresh()
18269                }
18270            }
18271
18272            /* Public */
18273            /* http://imakewebthings.com/waypoints/api/context-find-by-element */
18274            Context.findByElement = function (element) {
18275                return contexts[element.waypointContextKey]
18276            }
18277
18278            window.onload = function () {
18279                if (oldWindowLoad) {
18280                    oldWindowLoad()
18281                }
18282                Context.refreshAll()
18283            }
18284
18285
18286            Waypoint.requestAnimationFrame = function (callback) {
18287                var requestFn = window.requestAnimationFrame ||
18288                    window.mozRequestAnimationFrame ||
18289                    window.webkitRequestAnimationFrame ||
18290                    requestAnimationFrameShim
18291                requestFn.call(window, callback)
18292            }
18293            Waypoint.Context = Context
18294        }())
18295        ;(function () {
18296            'use strict'
18297
18298            function byTriggerPoint(a, b) {
18299                return a.triggerPoint - b.triggerPoint
18300            }
18301
18302            function byReverseTriggerPoint(a, b) {
18303                return b.triggerPoint - a.triggerPoint
18304            }
18305
18306            var groups = {
18307                vertical: {},
18308                horizontal: {}
18309            }
18310            var Waypoint = window.Waypoint
18311
18312            /* http://imakewebthings.com/waypoints/api/group */
18313            function Group(options) {
18314                this.name = options.name
18315                this.axis = options.axis
18316                this.id = this.name + '-' + this.axis
18317                this.waypoints = []
18318                this.clearTriggerQueues()
18319                groups[this.axis][this.name] = this
18320            }
18321
18322            /* Private */
18323            Group.prototype.add = function (waypoint) {
18324                this.waypoints.push(waypoint)
18325            }
18326
18327            /* Private */
18328            Group.prototype.clearTriggerQueues = function () {
18329                this.triggerQueues = {
18330                    up: [],
18331                    down: [],
18332                    left: [],
18333                    right: []
18334                }
18335            }
18336
18337            /* Private */
18338            Group.prototype.flushTriggers = function () {
18339                for (var direction in this.triggerQueues) {
18340                    var waypoints = this.triggerQueues[direction]
18341                    var reverse = direction === 'up' || direction === 'left'
18342                    waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
18343                    for (var i = 0, end = waypoints.length; i < end; i += 1) {
18344                        var waypoint = waypoints[i]
18345                        if (waypoint.options.continuous || i === waypoints.length - 1) {
18346                            waypoint.trigger([direction])
18347                        }
18348                    }
18349                }
18350                this.clearTriggerQueues()
18351            }
18352
18353            /* Private */
18354            Group.prototype.next = function (waypoint) {
18355                this.waypoints.sort(byTriggerPoint)
18356                var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
18357                var isLast = index === this.waypoints.length - 1
18358                return isLast ? null : this.waypoints[index + 1]
18359            }
18360
18361            /* Private */
18362            Group.prototype.previous = function (waypoint) {
18363                this.waypoints.sort(byTriggerPoint)
18364                var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
18365                return index ? this.waypoints[index - 1] : null
18366            }
18367
18368            /* Private */
18369            Group.prototype.queueTrigger = function (waypoint, direction) {
18370                this.triggerQueues[direction].push(waypoint)
18371            }
18372
18373            /* Private */
18374            Group.prototype.remove = function (waypoint) {
18375                var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
18376                if (index > -1) {
18377                    this.waypoints.splice(index, 1)
18378                }
18379            }
18380
18381            /* Public */
18382            /* http://imakewebthings.com/waypoints/api/first */
18383            Group.prototype.first = function () {
18384                return this.waypoints[0]
18385            }
18386
18387            /* Public */
18388            /* http://imakewebthings.com/waypoints/api/last */
18389            Group.prototype.last = function () {
18390                return this.waypoints[this.waypoints.length - 1]
18391            }
18392
18393            /* Private */
18394            Group.findOrCreate = function (options) {
18395                return groups[options.axis][options.name] || new Group(options)
18396            }
18397
18398            Waypoint.Group = Group
18399        }())
18400        ;(function () {
18401            'use strict'
18402
18403            var $ = window.jQuery
18404            var Waypoint = window.Waypoint
18405
18406            function JQueryAdapter(element) {
18407                this.$element = $(element)
18408            }
18409
18410            $.each([
18411                'innerHeight',
18412                'innerWidth',
18413                'off',
18414                'offset',
18415                'on',
18416                'outerHeight',
18417                'outerWidth',
18418                'scrollLeft',
18419                'scrollTop'
18420            ], function (i, method) {
18421                JQueryAdapter.prototype[method] = function () {
18422                    var args = Array.prototype.slice.call(arguments)
18423                    return this.$element[method].apply(this.$element, args)
18424                }
18425            })
18426
18427            $.each([
18428                'extend',
18429                'inArray',
18430                'isEmptyObject'
18431            ], function (i, method) {
18432                JQueryAdapter[method] = $[method]
18433            })
18434
18435            Waypoint.adapters.push({
18436                name: 'jquery',
18437                Adapter: JQueryAdapter
18438            })
18439            Waypoint.Adapter = JQueryAdapter
18440        }())
18441        ;(function () {
18442            'use strict'
18443
18444            var Waypoint = window.Waypoint
18445
18446            function createExtension(framework) {
18447                return function () {
18448                    var waypoints = []
18449                    var overrides = arguments[0]
18450
18451                    if (framework.isFunction(arguments[0])) {
18452                        overrides = framework.extend({}, arguments[1])
18453                        overrides.handler = arguments[0]
18454                    }
18455
18456                    this.each(function () {
18457                        var options = framework.extend({}, overrides, {
18458                            element: this
18459                        })
18460                        if (typeof options.context === 'string') {
18461                            options.context = framework(this).closest(options.context)[0]
18462                        }
18463                        waypoints.push(new Waypoint(options))
18464                    })
18465
18466                    return waypoints
18467                }
18468            }
18469
18470            if (window.jQuery) {
18471                window.jQuery.fn.waypoint = createExtension(window.jQuery)
18472            }
18473            if (window.Zepto) {
18474                window.Zepto.fn.waypoint = createExtension(window.Zepto)
18475            }
18476        }())
18477        ;
18478
18479        /***/
18480    }),
18481    /* 19 */
18482    /***/ (function (module, exports, __webpack_require__) {
18483
18484        var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
18485        !function (a, n) {
18486            true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (n),
18487                __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
18488                    (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
18489                    __WEBPACK_AMD_DEFINE_FACTORY__),
18490            __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined
18491        }(this, function (a, n, t) {
18492            var e = function (a, n, t, e, i, r) {
18493                function o(a) {
18494                    var n, t, e, i, r, o, s = a < 0;
18495                    if (a = Math.abs(a).toFixed(l.decimals), a += "", n = a.split("."), t = n[0], e = n.length > 1 ? l.options.decimal + n[1] : "", l.options.useGrouping) {
18496                        for (i = "", r = 0, o = t.length; r < o; ++r) 0 !== r && r % 3 === 0 && (i = l.options.separator + i), i = t[o - r - 1] + i;
18497                        t = i
18498                    }
18499                    return l.options.numerals.length && (t = t.replace(/[0-9]/g, function (a) {
18500                        return l.options.numerals[+a]
18501                    }), e = e.replace(/[0-9]/g, function (a) {
18502                        return l.options.numerals[+a]
18503                    })), (s ? "-" : "") + l.options.prefix + t + e + l.options.suffix
18504                }
18505
18506                function s(a, n, t, e) {
18507                    return t * (-Math.pow(2, -10 * a / e) + 1) * 1024 / 1023 + n
18508                }
18509
18510                function u(a) {
18511                    return "number" == typeof a && !isNaN(a)
18512                }
18513
18514                var l = this;
18515                if (l.version = function () {
18516                    return "1.9.3"
18517                }, l.options = {
18518                    useEasing: !0,
18519                    useGrouping: !0,
18520                    separator: ",",
18521                    decimal: ".",
18522                    easingFn: s,
18523                    formattingFn: o,
18524                    prefix: "",
18525                    suffix: "",
18526                    numerals: []
18527                }, r && "object" == typeof r) for (var m in l.options) r.hasOwnProperty(m) && null !== r[m] && (l.options[m] = r[m]);
18528                "" === l.options.separator ? l.options.useGrouping = !1 : l.options.separator = "" + l.options.separator;
18529                for (var d = 0, c = ["webkit", "moz", "ms", "o"], f = 0; f < c.length && !window.requestAnimationFrame; ++f) window.requestAnimationFrame = window[c[f] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[c[f] + "CancelAnimationFrame"] || window[c[f] + "CancelRequestAnimationFrame"];
18530                window.requestAnimationFrame || (window.requestAnimationFrame = function (a, n) {
18531                    var t = (new Date).getTime(), e = Math.max(0, 16 - (t - d)), i = window.setTimeout(function () {
18532                        a(t + e)
18533                    }, e);
18534                    return d = t + e, i
18535                }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function (a) {
18536                    clearTimeout(a)
18537                }), l.initialize = function () {
18538                    return !!l.initialized || (l.error = "", l.d = "string" == typeof a ? document.getElementById(a) : a, l.d ? (l.startVal = Number(n), l.endVal = Number(t), u(l.startVal) && u(l.endVal) ? (l.decimals = Math.max(0, e || 0), l.dec = Math.pow(10, l.decimals), l.duration = 1e3 * Number(i) || 2e3, l.countDown = l.startVal > l.endVal, l.frameVal = l.startVal, l.initialized = !0, !0) : (l.error = "[CountUp] startVal (" + n + ") or endVal (" + t + ") is not a number", !1)) : (l.error = "[CountUp] target is null or undefined", !1))
18539                }, l.printValue = function (a) {
18540                    var n = l.options.formattingFn(a);
18541                    "INPUT" === l.d.tagName ? this.d.value = n : "text" === l.d.tagName || "tspan" === l.d.tagName ? this.d.textContent = n : this.d.innerHTML = n
18542                }, l.count = function (a) {
18543                    l.startTime || (l.startTime = a), l.timestamp = a;
18544                    var n = a - l.startTime;
18545                    l.remaining = l.duration - n, l.options.useEasing ? l.countDown ? l.frameVal = l.startVal - l.options.easingFn(n, 0, l.startVal - l.endVal, l.duration) : l.frameVal = l.options.easingFn(n, l.startVal, l.endVal - l.startVal, l.duration) : l.countDown ? l.frameVal = l.startVal - (l.startVal - l.endVal) * (n / l.duration) : l.frameVal = l.startVal + (l.endVal - l.startVal) * (n / l.duration), l.countDown ? l.frameVal = l.frameVal < l.endVal ? l.endVal : l.frameVal : l.frameVal = l.frameVal > l.endVal ? l.endVal : l.frameVal, l.frameVal = Math.round(l.frameVal * l.dec) / l.dec, l.printValue(l.frameVal), n < l.duration ? l.rAF = requestAnimationFrame(l.count) : l.callback && l.callback()
18546                }, l.start = function (a) {
18547                    l.initialize() && (l.callback = a, l.rAF = requestAnimationFrame(l.count))
18548                }, l.pauseResume = function () {
18549                    l.paused ? (l.paused = !1, delete l.startTime, l.duration = l.remaining, l.startVal = l.frameVal, requestAnimationFrame(l.count)) : (l.paused = !0, cancelAnimationFrame(l.rAF))
18550                }, l.reset = function () {
18551                    l.paused = !1, delete l.startTime, l.initialized = !1, l.initialize() && (cancelAnimationFrame(l.rAF), l.printValue(l.startVal))
18552                }, l.update = function (a) {
18553                    if (l.initialize()) {
18554                        if (a = Number(a), !u(a)) return void (l.error = "[CountUp] update() - new endVal is not a number: " + a);
18555                        l.error = "", a !== l.frameVal && (cancelAnimationFrame(l.rAF), l.paused = !1, delete l.startTime, l.startVal = l.frameVal, l.endVal = a, l.countDown = l.startVal > l.endVal, l.rAF = requestAnimationFrame(l.count))
18556                    }
18557                }, l.initialize() && l.printValue(l.startVal)
18558            };
18559            return e
18560        });
18561
18562        /***/
18563    }),
18564    /* 20 */
18565    /***/ (function (module, exports, __webpack_require__) {
18566
18567
18568        /**
18569         * Load required plugin.
18570         */
18571        window.Granim = __webpack_require__(21);
18572
18573
18574        /**
18575         * Configure the plugin.
18576         */
18577
18578        +function ($) {
18579            page.registerVendor('Granim');
18580
18581            page.initGranim = function () {
18582                $('[data-granim]').each(function () {
18583                    var tag = $(this),
18584                        granim = tag.data('granim').split(','),
18585                        gradients = [],
18586                        opacity = [1, 1];
18587
18588                    var len = granim.length;
18589                    if (len > 0) {
18590                        if (granim[0].indexOf('-') > -1) {
18591                            for (var i = 0; i < len; i++) {
18592                                gradients[i] = granim[i].split('-');
18593                            }
18594
18595                            for (var i = 0; i < gradients[0].length; i++) {
18596                                opacity[i] = 1;
18597                            }
18598                        } else {
18599                            for (var i = 0; i < len / 2; i++) {
18600                                gradients[i] = [granim[i * 2], granim[i * 2 + 1]];
18601                            }
18602                        }
18603                    }
18604
18605                    var options = {
18606                        element: tag[0],
18607                        name: 'granim',
18608                        direction: tag.dataAttr('direction', 'left-right'),
18609                        isPausedWhenNotInView: true,
18610                        opacity: opacity,
18611                        states: {
18612                            "default-state": {
18613                                gradients: gradients,
18614                                transitionSpeed: 5000,
18615                                loop: true
18616                            }
18617                        }
18618                    };
18619
18620                    if (tag.hasDataAttr('opacity')) {
18621                        options.opacity = tag.data('opacity').split(',');
18622                    }
18623
18624                    if (tag.hasDataAttr('image')) {
18625                        options.image = {
18626                            source: tag.dataAttr('image', ''),
18627                            position: ['center', 'center'],
18628                            stretchMode: ['stretch-if-bigger', 'stretch-if-bigger'],
18629                            blendingMode: 'multiply',
18630                        }
18631                    }
18632
18633                    var granimInstance = new Granim(options);
18634
18635                });
18636            }
18637
18638        }(jQuery);
18639
18640
18641        /***/
18642    }),
18643    /* 21 */
18644    /***/ (function (module, exports, __webpack_require__) {
18645
18646        module.exports = __webpack_require__(22);
18647
18648
18649        /***/
18650    }),
18651    /* 22 */
18652    /***/ (function (module, exports, __webpack_require__) {
18653
18654        "use strict";
18655
18656
18657        /**
18658         * Constructs a new Granim gradient animation instance.
18659         *
18660         * @param {Object} options
18661         * @returns {void}
18662         */
18663        function Granim(options) {
18664            var doesGradientUseOpacity;
18665            this.getElement(options.element);
18666            this.x1 = 0;
18667            this.y1 = 0;
18668            this.name = options.name || false;
18669            this.elToSetClassOn = options.elToSetClassOn || 'body';
18670            this.direction = options.direction || 'diagonal';
18671            this.isPausedWhenNotInView = options.isPausedWhenNotInView || false;
18672            this.opacity = options.opacity;
18673            this.states = options.states;
18674            this.stateTransitionSpeed = options.stateTransitionSpeed || 1000;
18675            this.previousTimeStamp = null;
18676            this.progress = 0;
18677            this.isPaused = false;
18678            this.isCleared = false;
18679            this.isPausedBecauseNotInView = false;
18680            this.iscurrentColorsSet = false;
18681            this.context = this.canvas.getContext('2d');
18682            this.channels = {};
18683            this.channelsIndex = 0;
18684            this.activeState = options.defaultStateName || 'default-state';
18685            this.isChangingState = false;
18686            this.activeColors = [];
18687            this.activeColorDiff = [];
18688            this.activetransitionSpeed = null;
18689            this.currentColors = [];
18690            this.eventPolyfill();
18691            this.scrollDebounceThreshold = options.scrollDebounceThreshold || 300;
18692            this.scrollDebounceTimeout = null;
18693            this.isImgLoaded = false;
18694            this.isCanvasInWindowView = false;
18695            this.firstScrollInit = true;
18696            this.animating = false;
18697            if (options.image && options.image.source) {
18698                this.image = {
18699                    source: options.image.source,
18700                    position: options.image.position || ['center', 'center'],
18701                    stretchMode: options.image.stretchMode || false,
18702                    blendingMode: options.image.blendingMode || false
18703                };
18704            }
18705            doesGradientUseOpacity = this.opacity.map(function (el) {
18706                return el !== 1
18707            })
18708                .indexOf(true) !== -1;
18709            this.shouldClearCanvasOnEachFrame = !!this.image || doesGradientUseOpacity;
18710            this.events = {
18711                start: new CustomEvent('granim:start'),
18712                end: new CustomEvent('granim:end'),
18713                gradientChange: function (details) {
18714                    return new CustomEvent('granim:gradientChange', {
18715                        detail: {
18716                            isLooping: details.isLooping,
18717                            colorsFrom: details.colorsFrom,
18718                            colorsTo: details.colorsTo,
18719                            activeState: details.activeState
18720                        },
18721                        bubbles: false,
18722                        cancelable: false
18723                    })
18724                }
18725            };
18726            this.callbacks = {
18727                onStart: typeof options.onStart === 'function' ? options.onStart : false,
18728                onGradientChange: typeof options.onGradientChange === 'function' ?
18729                    options.onGradientChange :
18730                    false,
18731                onEnd: typeof options.onEnd === 'function' ? options.onEnd : false
18732            };
18733            this.getDimensions();
18734            this.canvas.setAttribute('width', this.x1);
18735            this.canvas.setAttribute('height', this.y1);
18736            this.setColors();
18737
18738            if (this.image) {
18739                this.validateInput('image');
18740                this.prepareImage();
18741            }
18742
18743            this.pauseWhenNotInViewNameSpace = this.pauseWhenNotInView.bind(this);
18744            this.setSizeAttributesNameSpace = this.setSizeAttributes.bind(this);
18745            this.onResize();
18746
18747            if (this.isPausedWhenNotInView) {
18748                this.onScroll();
18749            } else {
18750                if (!this.image) {
18751                    this.refreshColors();
18752                    this.animation = requestAnimationFrame(this.animateColors.bind(this));
18753                    this.animating = true;
18754                }
18755            }
18756
18757            // Callback and Event
18758            if (this.callbacks.onStart) this.callbacks.onStart();
18759            this.canvas.dispatchEvent(this.events.start);
18760        }
18761
18762        Granim.prototype.onResize = __webpack_require__(23);
18763
18764        Granim.prototype.onScroll = __webpack_require__(24);
18765
18766        Granim.prototype.validateInput = __webpack_require__(25);
18767
18768        Granim.prototype.triggerError = __webpack_require__(26);
18769
18770        Granim.prototype.prepareImage = __webpack_require__(27);
18771
18772        Granim.prototype.eventPolyfill = __webpack_require__(28);
18773
18774        Granim.prototype.colorDiff = __webpack_require__(29);
18775
18776        Granim.prototype.hexToRgb = __webpack_require__(30);
18777
18778        Granim.prototype.setDirection = __webpack_require__(31);
18779
18780        Granim.prototype.setColors = __webpack_require__(32);
18781
18782        Granim.prototype.getElement = __webpack_require__(33);
18783
18784        Granim.prototype.getDimensions = __webpack_require__(34);
18785
18786        Granim.prototype.getLightness = __webpack_require__(35);
18787
18788        Granim.prototype.getCurrentColors = __webpack_require__(36);
18789
18790        Granim.prototype.animateColors = __webpack_require__(37);
18791
18792        Granim.prototype.refreshColors = __webpack_require__(38);
18793
18794        Granim.prototype.makeGradient = __webpack_require__(39);
18795
18796        Granim.prototype.pause = __webpack_require__(40);
18797
18798        Granim.prototype.play = __webpack_require__(41);
18799
18800        Granim.prototype.clear = __webpack_require__(42);
18801
18802        Granim.prototype.destroy = __webpack_require__(43);
18803
18804        Granim.prototype.pauseWhenNotInView = __webpack_require__(44);
18805
18806        Granim.prototype.setSizeAttributes = __webpack_require__(45);
18807
18808        Granim.prototype.changeDirection = __webpack_require__(46);
18809
18810        Granim.prototype.changeBlendingMode = __webpack_require__(47);
18811
18812        Granim.prototype.changeState = __webpack_require__(48);
18813
18814        module.exports = Granim;
18815
18816
18817        /***/
18818    }),
18819    /* 23 */
18820    /***/ (function (module, exports, __webpack_require__) {
18821
18822        "use strict";
18823
18824
18825        module.exports = function (type) {
18826            if (type === 'removeListeners') {
18827                window.removeEventListener('resize', this.setSizeAttributesNameSpace);
18828                return;
18829            }
18830
18831            window.addEventListener('resize', this.setSizeAttributesNameSpace);
18832        };
18833
18834
18835        /***/
18836    }),
18837    /* 24 */
18838    /***/ (function (module, exports, __webpack_require__) {
18839
18840        "use strict";
18841
18842
18843        module.exports = function (type) {
18844            if (type === 'removeListeners') {
18845                window.removeEventListener('scroll', this.pauseWhenNotInViewNameSpace);
18846                return;
18847            }
18848
18849            window.addEventListener('scroll', this.pauseWhenNotInViewNameSpace);
18850            this.pauseWhenNotInViewNameSpace();
18851        };
18852
18853
18854        /***/
18855    }),
18856    /* 25 */
18857    /***/ (function (module, exports, __webpack_require__) {
18858
18859        "use strict";
18860
18861
18862        module.exports = function (inputType) {
18863            var xPositionValues = ['left', 'center', 'right'];
18864            var yPositionValues = ['top', 'center', 'bottom'];
vendor: 17,209 bytes, lines 18865-19332
18865            var stretchModeValues = ['stretch', 'stretch-if-smaller', 'stretch-if-bigger'];
18866            var blendingModeValues = ['multiply', 'screen', 'normal', 'overlay', 'darken',
18867                'lighten', 'lighter', 'color-dodge', 'color-burn', 'hard-light', 'soft-light',
18868                'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
18869
18870            switch (inputType) {
18871                case 'image':
18872                    // Validate image.position
18873                    if ((!Array.isArray(this.image.position) || this.image.position.length !== 2) ||
18874                        xPositionValues.indexOf(this.image.position[0]) === -1 ||
18875                        yPositionValues.indexOf(this.image.position[1]) === -1
18876                    ) {
18877                        this.triggerError('image.position')
18878                    }
18879                    // Validate image.stretchMode
18880                    if (this.image.stretchMode) {
18881                        if ((!Array.isArray(this.image.stretchMode) || this.image.stretchMode.length !== 2) ||
18882                            stretchModeValues.indexOf(this.image.stretchMode[0]) === -1 ||
18883                            stretchModeValues.indexOf(this.image.stretchMode[1]) === -1
18884                        ) {
18885                            this.triggerError('image.stretchMode')
18886                        }
18887                    }
18888                    break;
18889                case 'blendingMode':
18890                    if (blendingModeValues.indexOf(this.image.blendingMode) === -1) {
18891                        this.clear();
18892                        this.triggerError('blendingMode');
18893                    }
18894            }
18895        };
18896
18897
18898        /***/
18899    }),
18900    /* 26 */
18901    /***/ (function (module, exports, __webpack_require__) {
18902
18903        "use strict";
18904
18905
18906        module.exports = function (element) {
18907            var siteURL = 'https://sarcadass.github.io/granim.js/api.html';
18908            throw new Error('Granim: Input error on "' + element + '" option.\nCheck the API ' + siteURL + '.');
18909        };
18910
18911
18912        /***/
18913    }),
18914    /* 27 */
18915    /***/ (function (module, exports, __webpack_require__) {
18916
18917        "use strict";
18918
18919
18920        module.exports = function () {
18921            var _this = this;
18922
18923            if (!this.imagePosition) {
18924                this.imagePosition = {x: 0, y: 0, width: 0, height: 0};
18925            }
18926
18927            if (this.image.blendingMode) {
18928                this.context.globalCompositeOperation = this.image.blendingMode;
18929            }
18930
18931            if (this.imageNode) {
18932                setImagePosition();
18933                return;
18934            }
18935
18936            this.imageNode = new Image();
18937            this.imageNode.onerror = function () {
18938                throw new Error('Granim: The image source is invalid.');
18939            };
18940            this.imageNode.onload = function () {
18941                _this.imgOriginalWidth = _this.imageNode.width;
18942                _this.imgOriginalHeight = _this.imageNode.height;
18943                setImagePosition();
18944                _this.refreshColors();
18945                if (!_this.isPausedWhenNotInView || _this.isCanvasInWindowView) {
18946                    _this.animation = requestAnimationFrame(_this.animateColors.bind(_this));
18947                }
18948                _this.isImgLoaded = true;
18949            };
18950            this.imageNode.src = this.image.source;
18951
18952            function setImagePosition() {
18953                var i, currentAxis;
18954
18955                for (i = 0; i < 2; i++) {
18956                    currentAxis = !i ? 'x' : 'y';
18957                    setImageAxisPosition(currentAxis);
18958                }
18959
18960                function setImageAxisPosition(axis) {
18961                    var canvasWidthOrHeight = _this[axis + '1'];
18962                    var imgOriginalWidthOrHeight = _this[axis === 'x' ? 'imgOriginalWidth' : 'imgOriginalHeight'];
18963                    var imageAlignIndex = axis === 'x' ? _this.image.position[0] : _this.image.position[1];
18964                    var imageAxisPosition;
18965                    switch (imageAlignIndex) {
18966                        case 'center':
18967                            imageAxisPosition = imgOriginalWidthOrHeight > canvasWidthOrHeight ?
18968                                -(imgOriginalWidthOrHeight - canvasWidthOrHeight) / 2 :
18969                                (canvasWidthOrHeight - imgOriginalWidthOrHeight) / 2;
18970                            _this.imagePosition[axis] = imageAxisPosition;
18971                            _this.imagePosition[axis === 'x' ? 'width' : 'height'] = imgOriginalWidthOrHeight;
18972                            break;
18973
18974                        case 'top':
18975                            _this.imagePosition['y'] = 0;
18976                            _this.imagePosition['height'] = imgOriginalWidthOrHeight;
18977                            break;
18978
18979                        case 'bottom':
18980                            _this.imagePosition['y'] = canvasWidthOrHeight - imgOriginalWidthOrHeight;
18981                            _this.imagePosition['height'] = imgOriginalWidthOrHeight;
18982                            break;
18983
18984                        case 'right':
18985                            _this.imagePosition['x'] = canvasWidthOrHeight - imgOriginalWidthOrHeight;
18986                            _this.imagePosition['width'] = imgOriginalWidthOrHeight;
18987                            break;
18988
18989                        case 'left':
18990                            _this.imagePosition['x'] = 0;
18991                            _this.imagePosition['width'] = imgOriginalWidthOrHeight;
18992                            break;
18993                    }
18994
18995                    if (_this.image.stretchMode) {
18996                        imageAlignIndex = axis === 'x' ? _this.image.stretchMode[0] : _this.image.stretchMode[1];
18997                        switch (imageAlignIndex) {
18998                            case 'stretch':
18999                                _this.imagePosition[axis] = 0;
19000                                _this.imagePosition[axis === 'x' ? 'width' : 'height'] = canvasWidthOrHeight;
19001                                break;
19002
19003                            case 'stretch-if-bigger':
19004                                if (imgOriginalWidthOrHeight < canvasWidthOrHeight) break;
19005                                _this.imagePosition[axis] = 0;
19006                                _this.imagePosition[axis === 'x' ? 'width' : 'height'] = canvasWidthOrHeight;
19007                                break;
19008
19009                            case 'stretch-if-smaller':
19010                                if (imgOriginalWidthOrHeight > canvasWidthOrHeight) break;
19011                                _this.imagePosition[axis] = 0;
19012                                _this.imagePosition[axis === 'x' ? 'width' : 'height'] = canvasWidthOrHeight;
19013                                break;
19014                        }
19015                    }
19016                }
19017            }
19018        };
19019
19020
19021        /***/
19022    }),
19023    /* 28 */
19024    /***/ (function (module, exports, __webpack_require__) {
19025
19026        "use strict";
19027
19028
19029        module.exports = function () {
19030            if (typeof window.CustomEvent === "function") return;
19031
19032            function CustomEvent(event, params) {
19033                params = params || {bubbles: false, cancelable: false, detail: undefined};
19034                var evt = document.createEvent('CustomEvent');
19035                evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
19036                return evt;
19037            }
19038
19039            CustomEvent.prototype = window.Event.prototype;
19040
19041            window.CustomEvent = CustomEvent;
19042        };
19043
19044
19045        /***/
19046    }),
19047    /* 29 */
19048    /***/ (function (module, exports, __webpack_require__) {
19049
19050        "use strict";
19051
19052
19053        module.exports = function (colorA, colorB) {
19054            var i;
19055            var colorDiff = [];
19056
19057            for (i = 0; i < 3; i++) {
19058                colorDiff.push(colorB[i] - colorA[i])
19059            }
19060
19061            return colorDiff;
19062        };
19063
19064
19065        /***/
19066    }),
19067    /* 30 */
19068    /***/ (function (module, exports, __webpack_require__) {
19069
19070        "use strict";
19071
19072
19073        module.exports = function (hex) {
19074            // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
19075            var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
19076            hex = hex.replace(shorthandRegex, function (m, r, g, b) {
19077                return r + r + g + g + b + b;
19078            });
19079
19080            var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
19081            return result ? [
19082                parseInt(result[1], 16),
19083                parseInt(result[2], 16),
19084                parseInt(result[3], 16)
19085            ] : null;
19086        };
19087
19088
19089        /***/
19090    }),
19091    /* 31 */
19092    /***/ (function (module, exports, __webpack_require__) {
19093
19094        "use strict";
19095
19096
19097        module.exports = function () {
19098            var ctx = this.context;
19099
19100            switch (this.direction) {
19101                default:
19102                    this.triggerError('direction');
19103                    break;
19104
19105                case 'diagonal':
19106                    return ctx.createLinearGradient(0, 0, this.x1, this.y1);
19107                    break;
19108
19109                case 'left-right':
19110                    return ctx.createLinearGradient(0, 0, this.x1, 0);
19111                    break;
19112
19113                case 'top-bottom':
19114                    return ctx.createLinearGradient(this.x1 / 2, 0, this.x1 / 2, this.y1);
19115                    break;
19116
19117                case 'radial':
19118                    return ctx.createRadialGradient(this.x1 / 2, this.y1 / 2, this.x1 / 2, this.x1 / 2, this.y1 / 2, 0);
19119                    break;
19120            }
19121        };
19122
19123
19124        /***/
19125    }),
19126    /* 32 */
19127    /***/ (function (module, exports, __webpack_require__) {
19128
19129        "use strict";
19130
19131
19132        module.exports = function () {
19133            var _this = this;
19134            var colorDiff, nextColors;
19135
19136            if (!this.channels[this.activeState]) this.channels[this.activeState] = [];
19137
19138            // If the actual channel exist, reassign properties and exit
19139            // (each channel is saved to prevent recomputing it each time)
19140            if (this.channels[this.activeState][this.channelsIndex] !== undefined) {
19141                this.activeColors = this.channels[this.activeState][this.channelsIndex].colors;
19142                this.activeColorDiff = this.channels[this.activeState][this.channelsIndex].colorsDiff;
19143                return;
19144            }
19145
19146            // Set blank properties
19147            this.channels[this.activeState].push([{}]);
19148            this.channels[this.activeState][this.channelsIndex].colors = [];
19149            this.channels[this.activeState][this.channelsIndex].colorsDiff = [];
19150            this.activeColors = [];
19151            this.activeColorDiff = [];
19152
19153            // Go on each gradient of the current state
19154            this.states[this.activeState].gradients[this.channelsIndex].forEach(function (color, i) {
19155                // Push the hex color converted to rgb on the channel and the active color properties
19156                var rgbColor = _this.hexToRgb(color);
19157                var activeChannel = _this.channels[_this.activeState];
19158
19159                activeChannel[_this.channelsIndex].colors.push(rgbColor);
19160                _this.activeColors.push(rgbColor);
19161
19162                // If it's the first channel to be set, set the currentColors
19163                if (!_this.iscurrentColorsSet) {
19164                    _this.currentColors.push(_this.hexToRgb(color));
19165                }
19166
19167                // If it's the last gradient, compute the color diff between the last gradient and the first one,
19168                // else between the penultimate one and the last one
19169                if (_this.channelsIndex === _this.states[_this.activeState].gradients.length - 1) {
19170                    colorDiff = _this.colorDiff(
19171                        activeChannel[_this.channelsIndex].colors[i],
19172                        activeChannel[0].colors[i]
19173                    );
19174                } else {
19175                    nextColors = _this.hexToRgb(_this.states[_this.activeState].gradients[_this.channelsIndex + 1][i]);
19176                    colorDiff = _this.colorDiff(
19177                        activeChannel[_this.channelsIndex].colors[i], nextColors
19178                    );
19179                }
19180
19181                activeChannel[_this.channelsIndex].colorsDiff.push(colorDiff);
19182                _this.activeColorDiff.push(colorDiff);
19183            });
19184
19185            this.activetransitionSpeed = this.states[this.activeState].transitionSpeed || 5000;
19186            this.iscurrentColorsSet = true;
19187        };
19188
19189
19190        /***/
19191    }),
19192    /* 33 */
19193    /***/ (function (module, exports, __webpack_require__) {
19194
19195        "use strict";
19196
19197
19198        module.exports = function (element) {
19199            if (element instanceof HTMLCanvasElement) {
19200                this.canvas = element;
19201
19202            } else if (typeof element === "string") {
19203                this.canvas = document.querySelector(element);
19204
19205            } else {
19206                throw new Error('The element you used is neither a String, nor a HTMLCanvasElement');
19207            }
19208
19209            if (!this.canvas) {
19210                throw new Error('`' + element + '` could not be found in the DOM');
19211            }
19212        };
19213
19214
19215        /***/
19216    }),
19217    /* 34 */
19218    /***/ (function (module, exports, __webpack_require__) {
19219
19220        "use strict";
19221
19222
19223        module.exports = function () {
19224            this.x1 = this.canvas.offsetWidth;
19225            this.y1 = this.canvas.offsetHeight;
19226        };
19227
19228
19229        /***/
19230    }),
19231    /* 35 */
19232    /***/ (function (module, exports, __webpack_require__) {
19233
19234        "use strict";
19235
19236
19237        module.exports = function () {
19238            var currentColors = this.getCurrentColors();
19239            var gradientAverage = null;
19240            var lightnessAverage, i;
19241            var colorsAverage = currentColors.map(function (el) {
19242                // Compute the average lightness of each color
19243                // in the current gradient
19244                return Math.max(el[0], el[1], el[2]);
19245            });
19246
19247            for (i = 0; i < colorsAverage.length; i++) {
19248                // Add all the average lightness of each color
19249                gradientAverage = gradientAverage === null ?
19250                    colorsAverage[i] : gradientAverage + colorsAverage[i];
19251
19252                if (i === colorsAverage.length - 1) {
19253                    // if it's the last lightness average
19254                    // divide it by the total length to
19255                    // have the global average lightness
19256                    lightnessAverage = Math.round(gradientAverage / (i + 1));
19257                }
19258            }
19259
19260            return lightnessAverage >= 128 ? 'light' : 'dark';
19261        };
19262
19263
19264        /***/
19265    }),
19266    /* 36 */
19267    /***/ (function (module, exports, __webpack_require__) {
19268
19269        "use strict";
19270
19271
19272        module.exports = function () {
19273            var i, j;
19274            var currentColors = [];
19275
19276            for (i = 0; i < this.currentColors.length; i++) {
19277                currentColors.push([]);
19278                for (j = 0; j < 3; j++) {
19279                    currentColors[i].push(this.currentColors[i][j])
19280                }
19281            }
19282
19283            // Return a deep copy of the current colors
19284            return currentColors;
19285        };
19286
19287
19288        /***/
19289    }),
19290    /* 37 */
19291    /***/ (function (module, exports, __webpack_require__) {
19292
19293        "use strict";
19294
19295
19296        module.exports = function (timestamp) {
19297            var wasWindowIdled = timestamp - this.previousTimeStamp > 100;
19298            var isLoop = this.states[this.activeState].loop !== undefined ? this.states[this.activeState].loop : true;
19299            var progressPercent, isLooping, nextGradient;
19300
19301            // If tab was inactive then resumed, reset the previous timestamp
19302            if (this.previousTimeStamp === null || wasWindowIdled) {
19303                this.previousTimeStamp = timestamp;
19304            }
19305
19306            // Compute progress and save the timestamp
19307            this.progress = this.progress + (timestamp - this.previousTimeStamp);
19308            progressPercent = (this.progress / this.activetransitionSpeed * 100).toFixed(2);
19309            this.previousTimeStamp = timestamp;
19310
19311            // Set the new gradient colors in a property
19312            this.refreshColors(progressPercent);
19313
19314            // Continue the animation or prepare for the next one
19315            if (progressPercent < 100) {
19316                this.animation = requestAnimationFrame(this.animateColors.bind(this));
19317
19318            } else {
19319                // if the current animation index is inferior to the penultimate gradient
19320                // or to the last gradient with the loop mode activated
19321                if (this.channelsIndex < this.states[this.activeState].gradients.length - 2 || isLoop) {
19322
19323                    // Set the active transition speed to the active state one after changing state
19324                    if (this.isChangingState) {
19325                        this.activetransitionSpeed = this.states[this.activeState].transitionSpeed || 5000;
19326                    }
19327
19328                    // Resetting properties
19329                    this.previousTimeStamp = null;
19330                    this.progress = 0;
19331                    this.channelsIndex++;
19332                    isLooping = false;
19333
19334                    // If it's going to loop or if it's the transition after the loop
19335                    if (this.channelsIndex === this.states[this.activeState].gradients.length - 1) {
19336                        isLooping = true;
19337
19338                    } else if (this.channelsIndex === this.states[this.activeState].gradients.length) {
19339                        this.channelsIndex = 0;
19340                    }
19341
19342                    // Checking the next gradient to send in args of an event and a callback
19343                    nextGradient = this.states[this.activeState].gradients[this.channelsIndex + 1] === undefined ?
19344                        this.states[this.activeState].gradients[0] :
19345                        this.states[this.activeState].gradients[this.channelsIndex + 1];
19346
19347                    // Compute the colors for the transition and render a new frame
19348                    this.setColors();
19349                    this.animation = requestAnimationFrame(this.animateColors.bind(this));
19350
19351                    // Callback and Event
19352                    if (this.callbacks.onGradientChange) this.callbacks.onGradientChange({
19353                        isLooping: isLooping,
19354                        colorsFrom: this.states[this.activeState].gradients[this.channelsIndex],
19355                        colorsTo: nextGradient,
19356                        activeState: this.activeState
19357                    });
19358
19359                    this.canvas.dispatchEvent(this.events.gradientChange({
19360                            isLooping: isLooping,
19361                            colorsFrom: this.states[this.activeState].gradients[this.channelsIndex],
19362                            colorsTo: nextGradient,
19363                            activeState: this.activeState
19364                        })
19365                    );
19366
19367                    // Else if it was the last gradient on the list and the loop mode is off
19368                } else {
19369                    cancelAnimationFrame(this.animation);
19370
19371                    // Callback and Event
19372                    if (this.callbacks.onEnd) this.callbacks.onEnd();
19373                    this.canvas.dispatchEvent(new CustomEvent('granim:end'));
19374                }
19375            }
19376        };
19377
19378
19379        /***/
19380    }),
19381    /* 38 */
19382    /***/ (function (module, exports, __webpack_require__) {
19383
19384        "use strict";
19385
19386
19387        module.exports = function (progressPercent) {
19388            var _this = this;
19389            var activeChannel, i, j;
19390
19391            // Loop through each colors of the active gradient
19392            for (i = 0; i < this.activeColors.length; i++) {
19393
19394                // Generate RGB colors
19395                for (j = 0; j < 3; j++) {
19396                    activeChannel = _this.activeColors[i][j] +
19397                        Math.ceil(_this.activeColorDiff[i][j] / 100 * progressPercent);
19398
19399                    // Prevent colors values from going < 0 & > 255
19400                    if (activeChannel <= 255 && activeChannel >= 0) {
19401                        _this.currentColors[i][j] = activeChannel;
19402                    }
19403                }
19404            }
19405
19406            this.makeGradient();
19407        };
19408
19409
19410        /***/
19411    }),
19412    /* 39 */
19413    /***/ (function (module, exports, __webpack_require__) {
19414
19415        "use strict";
19416
19417
19418        module.exports = function () {
19419            var i, colorPosition;
19420            var gradient = this.setDirection();
19421            var elToSetClassOnClass = document.querySelector(this.elToSetClassOn).classList;
19422
19423            if (this.shouldClearCanvasOnEachFrame) this.context.clearRect(0, 0, this.x1, this.y1);
19424
19425            if (this.image) {
19426                this.context.drawImage(
19427                    this.imageNode,
19428                    this.imagePosition.x,
19429                    this.imagePosition.y,
19430                    this.imagePosition.width,
19431                    this.imagePosition.height
19432                );
19433            }
19434
19435            for (i = 0; i < this.currentColors.length; i++) {
19436                // Ensure first and last position to be 0 and 100
19437                colorPosition = !i ? 0 : ((1 / (this.currentColors.length - 1)) * i).toFixed(2);
19438
19439                gradient.addColorStop(colorPosition, 'rgba(' +
19440                    this.currentColors[i][0] + ', ' +
19441                    this.currentColors[i][1] + ', ' +
19442                    this.currentColors[i][2] + ', ' +
19443                    this.opacity[i] + ')'
19444                );
19445            }
19446
19447            if (this.name) {
19448                if (this.getLightness() === 'light') {
19449                    elToSetClassOnClass.remove(this.name + '-dark');
19450                    elToSetClassOnClass.add(this.name + '-light');
19451
19452                } else {
19453                    elToSetClassOnClass.remove(this.name + '-light');
19454                    elToSetClassOnClass.add(this.name + '-dark');
19455                }
19456            }
19457
19458            this.context.fillStyle = gradient;
19459            this.context.fillRect(0, 0, this.x1, this.y1);
19460        };
19461
19462
19463        /***/
19464    }),
19465    /* 40 */
19466    /***/ (function (module, exports, __webpack_require__) {
19467
19468        "use strict";
19469
19470
19471        module.exports = function (state) {
vendor: 5,327 bytes, lines 19472-19658
19472            var isPausedBecauseNotInView = state === 'isPausedBecauseNotInView';
19473            if (this.isCleared) return;
19474            if (!isPausedBecauseNotInView) this.isPaused = true;
19475            cancelAnimationFrame(this.animation);
19476            this.animating = false;
19477        };
19478
19479
19480        /***/
19481    }),
19482    /* 41 */
19483    /***/ (function (module, exports, __webpack_require__) {
19484
19485        "use strict";
19486
19487
19488        module.exports = function (state) {
19489            var isPlayedBecauseInView = state === 'isPlayedBecauseInView';
19490            if (!isPlayedBecauseInView) this.isPaused = false;
19491            this.isCleared = false;
19492            if (!this.animating) {
19493                this.animation = requestAnimationFrame(this.animateColors.bind(this));
19494                this.animating = true;
19495            }
19496        };
19497
19498
19499        /***/
19500    }),
19501    /* 42 */
19502    /***/ (function (module, exports, __webpack_require__) {
19503
19504        "use strict";
19505
19506
19507        module.exports = function () {
19508            if (!this.isPaused) {
19509                cancelAnimationFrame(this.animation);
19510
19511            } else {
19512                this.isPaused = false;
19513            }
19514            this.isCleared = true;
19515            this.context.clearRect(0, 0, this.x1, this.y1);
19516        };
19517
19518
19519        /***/
19520    }),
19521    /* 43 */
19522    /***/ (function (module, exports, __webpack_require__) {
19523
19524        "use strict";
19525
19526
19527        module.exports = function () {
19528            this.onResize('removeListeners');
19529            this.onScroll('removeListeners');
19530            this.clear();
19531        };
19532
19533
19534        /***/
19535    }),
19536    /* 44 */
19537    /***/ (function (module, exports, __webpack_require__) {
19538
19539        "use strict";
19540
19541
19542        module.exports = function () {
19543            var _this = this;
19544            if (this.scrollDebounceTimeout) clearTimeout(this.scrollDebounceTimeout);
19545
19546            this.scrollDebounceTimeout = setTimeout(function () {
19547                var elPos = _this.canvas.getBoundingClientRect();
19548                _this.isCanvasInWindowView = !(elPos.bottom < 0 || elPos.right < 0 ||
19549                    elPos.left > window.innerWidth || elPos.top > window.innerHeight);
19550
19551                if (_this.isCanvasInWindowView) {
19552                    if (!_this.isPaused || _this.firstScrollInit) {
19553                        if (_this.image && !_this.isImgLoaded) {
19554                            return
19555                        }
19556                        _this.isPausedBecauseNotInView = false;
19557                        _this.play('isPlayedBecauseInView');
19558                        _this.firstScrollInit = false;
19559                    }
19560
19561                } else {
19562                    if (!_this.image && _this.firstScrollInit) {
19563                        _this.refreshColors();
19564                        _this.firstScrollInit = false;
19565                    }
19566
19567                    if (!_this.isPaused && !_this.isPausedBecauseNotInView) {
19568                        _this.isPausedBecauseNotInView = true;
19569                        _this.pause('isPausedBecauseNotInView');
19570                    }
19571                }
19572            }, this.scrollDebounceThreshold);
19573        };
19574
19575
19576        /***/
19577    }),
19578    /* 45 */
19579    /***/ (function (module, exports, __webpack_require__) {
19580
19581        "use strict";
19582
19583
19584        module.exports = function () {
19585            this.getDimensions();
19586            this.canvas.setAttribute('width', this.x1);
19587            this.canvas.setAttribute('height', this.y1);
19588            if (this.image) this.prepareImage();
19589            this.refreshColors();
19590        };
19591
19592
19593        /***/
19594    }),
19595    /* 46 */
19596    /***/ (function (module, exports, __webpack_require__) {
19597
19598        "use strict";
19599
19600
19601        module.exports = function (newDirection) {
19602            this.context.clearRect(0, 0, this.x1, this.y1);
19603            this.direction = newDirection;
19604            this.validateInput('direction');
19605            if (this.isPaused) this.refreshColors();
19606        };
19607
19608
19609        /***/
19610    }),
19611    /* 47 */
19612    /***/ (function (module, exports, __webpack_require__) {
19613
19614        "use strict";
19615
19616
19617        module.exports = function (newBlendingMode) {
19618            this.context.clearRect(0, 0, this.x1, this.y1);
19619            this.context.globalCompositeOperation =
19620                this.image.blendingMode = newBlendingMode;
19621            this.validateInput('blendingMode');
19622            if (this.isPaused) this.refreshColors();
19623        };
19624
19625
19626        /***/
19627    }),
19628    /* 48 */
19629    /***/ (function (module, exports, __webpack_require__) {
19630
19631        "use strict";
19632
19633
19634        module.exports = function (state) {
19635            var _this = this;
19636            var nextColors, colorDiff;
19637
19638            // Prevent transitioning to the same state
19639            if (this.activeState === state) {
19640                return;
19641            }
19642
19643            // Setting the good properties for the transition
19644            if (!this.isPaused) {
19645                this.isPaused = true;
19646                this.pause();
19647            }
19648
19649            this.channelsIndex = -1;
19650            this.activetransitionSpeed = this.stateTransitionSpeed;
19651            this.activeColorDiff = [];
19652            this.activeColors = this.getCurrentColors();
19653            this.progress = 0;
19654            this.previousTimeStamp = null;
19655            this.isChangingState = true;
19656
19657            // Compute the gradient diff between the last frame gradient
19658            // and the first one of the new state
19659            this.states[state].gradients[0].forEach(function (color, i, arr) {
19660                nextColors = _this.hexToRgb(_this.states[state].gradients[0][i]);
19661                colorDiff = _this.colorDiff(_this.activeColors[i], nextColors);
19662                _this.activeColorDiff.push(colorDiff);
19663            });
19664
19665            // Start the animation
19666            this.activeState = state;
19667            this.play();
19668        };
19669
19670
19671        /***/
19672    }),
19673    /* 49 */
19674    /***/ (function (module, exports, __webpack_require__) {
19675
19676
19677        /**
19678         * Load required plugin.
19679         */
19680        __webpack_require__(50);
19681        __webpack_require__(51);
19682
19683
19684        /**
19685         * Configure the plugin.
19686         */
19687
19688        +function ($) {
19689            page.registerVendor('Jarallax');
19690
19691            page.initJarallax = function () {
19692
19693                // Parallax image
19694                //
19695                $('[data-parallax]').each(function () {
19696                    var tag = $(this);
19697                    var options = {
19698                        imgSrc: tag.data('parallax'),
19699                        speed: 0.3,
19700                    };
19701
19702                    if (tag.hasClass('header')) {
19703                        options.speed = 0.6;
19704                    }
19705
19706                    options = $.extend(options, page.getDataOptions(tag));
19707
19708                    tag.jarallax(options);
19709
19710                });
19711
19712
19713                // Video backgrounds
19714                $('[data-video]').each(function () {
19715                    var tag = $(this);
19716                    var videoSrc = tag.data('video');
19717
19718                    var options = {
19719                        videoSrc: videoSrc,
19720                        muted: true,          // Required for iOS autoplay
19721                        autoplay: true,       // Attempt autoplay
19722                        playsinline: true,    // Required for iOS to allow inline playback
19723                        mobileNativeVideo: true,  // Let iOS try using its native video
19724                        disableVideo: false,  // Force-enable video on mobile
19725                        onInit: function () {
19726                            tag.addClass('video-loaded');
19727                        },
19728                    };
19729
19730                    tag.jarallax(options);
19731                });
19732
19733            }
19734
19735        }(jQuery);
19736
19737
19738        /***/
19739    }),
19740    /* 50 */
19741    /***/ (function (module, exports) {
19742
19743        /*!
19744 * Name    : Just Another Parallax [Jarallax]
19745 * Version : 1.10.5
19746 * Author  : nK <https://nkdev.info>
19747 * GitHub  : https://github.com/nk-o/jarallax
19748 */
19749        !function (o) {
19750            var n = {};
19751
19752            function i(e) {
19753                if (n[e]) return n[e].exports;
19754                var t = n[e] = {i: e, l: !1, exports: {}};
19755                return o[e].call(t.exports, t, t.exports, i), t.l = !0, t.exports
19756            }
19757
19758            i.m = o, i.c = n, i.d = function (e, t, o) {
19759                i.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: o})
19760            }, i.r = function (e) {
19761                "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
19762            }, i.t = function (t, e) {
19763                if (1 & e && (t = i(t)), 8 & e) return t;
19764                if (4 & e && "object" == typeof t && t && t.__esModule) return t;
19765                var o = Object.create(null);
19766                if (i.r(o), Object.defineProperty(o, "default", {
19767                    enumerable: !0,
19768                    value: t
19769                }), 2 & e && "string" != typeof t) for (var n in t) i.d(o, n, function (e) {
19770                    return t[e]
19771                }.bind(null, n));
19772                return o
19773            }, i.n = function (e) {
19774                var t = e && e.__esModule ? function () {
19775                    return e.default
19776                } : function () {
19777                    return e
19778                };
19779                return i.d(t, "a", t), t
19780            }, i.o = function (e, t) {
19781                return Object.prototype.hasOwnProperty.call(e, t)
19782            }
19782, i.p = "", i(i.s = 11)
19783        }([, , function (e, t, o) {
19784            "use strict";
19785            e.exports = function (e) {
19786                "complete" === document.readyState || "interactive" === document.readyState ? e.call() : document.attachEvent ? document.attachEvent("onreadystatechange", function () {
19787                    "interactive" === document.readyState && e.call()
19788                }) : document.addEventListener && document.addEventListener("DOMContentLoaded", e)
19789            }
19790        }, , function (o, e, t) {
19791            "use strict";
19792            (function (e) {
19793                var t;
19794                t = "undefined" != typeof window ? window : void 0 !== e ? e : "undefined" != typeof self ? self : {}, o.exports = t
19795            }).call(this, t(5))
19796        }, function (e, t, o) {
19797            "use strict";
19798            var n, i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
19799                return typeof e
19800            } : function (e) {
19801                return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
19802            };
19803            n = function () {
19804                return this
19805            }();
19806            try {
19807                n = n || Function("return this")() || (0, eval)("this")
19808            } catch (e) {
19809                "object" === ("undefined" == typeof window ? "undefined" : i(window)) && (n = window)
19810            }
19811            e.exports = n
19812        }, , , , , , function (e, t, o) {
19813            e.exports = o(12)
19814        }, function (e, t, o) {
19815            "use strict";
19816            var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
19817                return typeof e
19818            } : function (e) {
19819                return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
19820            }, i = l(o(2)), a = o(4), r = l(o(13));
19821
19822            function l(e) {
19823                return e && e.__esModule ? e : {default: e}
19824            }
19825
19826            var s = a.window.jarallax;
19827            if (a.window.jarallax = r.default, a.window.jarallax.noConflict = function () {
19828                return a.window.jarallax = s, this
19829            }, void 0 !== a.jQuery) {
19830                var c = function () {
19831                    var e = arguments || [];
19832                    Array.prototype.unshift.call(e, this);
19833                    var t = r.default.apply(a.window, e);
19834                    return "object" !== (void 0 === t ? "undefined" : n(t)) ? t : this
19835                };
19836                c.constructor = r.default.constructor;
19837                var u = a.jQuery.fn.jarallax;
19838                a.jQuery.fn.jarallax = c, a.jQuery.fn.jarallax.noConflict = function () {
19839                    return a.jQuery.fn.jarallax = u, this
19840                }
19841            }
19842            (0, i.default)(function () {
19843                (0, r.default)(document.querySelectorAll("[data-jarallax]"))
19844            })
19845        }, function (e, j, S) {
19846            "use strict";
19847            (function (e) {
19848                Object.defineProperty(j, "__esModule", {value: !0});
19849                var d = function (e, t) {
19850                    if (Array.isArray(e)) return e;
19851                    if (Symbol.iterator in Object(e)) return function (e, t) {
19852                        var o = [], n = !0, i = !1, a = void 0;
19853                        try {
19854                            for (var r, l = e[Symbol.iterator](); !(n = (r = l.next()).done) && (o.push(r.value), !t || o.length !== t); n = !0) ;
19855                        } catch (e) {
19856                            i = !0, a = e
19857                        } finally {
19858                            try {
19859                                !n && l.return && l.return()
19860                            } finally {
19861                                if (i) throw a
19862                            }
19863                        }
19864                        return o
19865                    }(e, t);
19866                    throw new TypeError("Invalid attempt to destructure non-iterable instance")
19867                }, t = function () {
19868                    function n(e, t) {
19869                        for (var o = 0; o < t.length; o++) {
19870                            var n = t[o];
19871                            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
19872                        }
19873                    }
19874
19875                    return function (e, t, o) {
19876                        return t && n(e.prototype, t), o && n(e, o), e
19877                    }
19878                }(), p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
19879                    return typeof e
19880                } : function (e) {
19881                    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
19882                }, o = a(S(2)), n = a(S(14)), i = S(4);
19883
19884                function a(e) {
19885                    return e && e.__esModule ? e : {default: e}
19886                }
19887
19888                var s = -1 < navigator.userAgent.indexOf("MSIE ") || -1 < navigator.userAgent.indexOf("Trident/") || -1 < navigator.userAgent.indexOf("Edge/"),
19889                    r = function () {
19890                        for (var e = "transform WebkitTransform MozTransform".split(" "), t = document.createElement("div"), o = 0; o < e.length; o++) if (t && void 0 !== t.style[e[o]]) return e[o];
19891                        return !1
19892                    }(), b = void 0, v = void 0, l = void 0, c = !1, u = !1;
19893
19894                function m(e) {
19895                    b = i.window.innerWidth || document.documentElement.clientWidth, v = i.window.innerHeight || document.documentElement.clientHeight, "object" !== (void 0 === e ? "undefined" : p(e)) || "load" !== e.type && "dom-loaded" !== e.type || (c = !0)
19896                }
19897
19898                m(), i.window.addEventListener("resize", m), i.window.addEventListener("orientationchange", m), i.window.addEventListener("load", m), (0, o.default)(function () {
19899                    m({type: "dom-loaded"})
19900                });
19901                var f = [], y = !1;
19902
19903                function g() {
19904                    if (f.length) {
19905                        l = void 0 !== i.window.pageYOffset ? i.window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
19906                        var t = c || !y || y.width !== b || y.height !== v, o = u || t || !y || y.y !== l;
19907                        u = c = !1, (t || o) && (f.forEach(function (e) {
19908                            t && e.onResize(), o && e.onScroll()
19909                        }), y = {width: b, height: v, y: l}), (0, n.default)(g)
19910                    }
19911                }
19912
19913                var h = !!e.ResizeObserver && new e.ResizeObserver(function (e) {
19914                    e && e.length && (0, n.default)(function () {
19915                        e.forEach(function (e) {
19916                            e.target && e.target.jarallax && (c || e.target.jarallax.onResize(), u = !0)
19917                        })
19918                    })
19919                }), x = 0, w = function () {
19920                    function u(e, t) {
19921                        !function (e, t) {
19922                            if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
19923                        }(this, u);
19924                        var o = this;
19925                        o.instanceID = x++, o.$item = e, o.defaults = {
19926                            type: "scroll",
19927                            speed: .5,
19928                            imgSrc: null,
19929                            imgElement: ".jarallax-img",
19930                            imgSize: "cover",
19931                            imgPosition: "50% 50%",
19932                            imgRepeat: "no-repeat",
19933                            keepImg: !1,
19934                            elementInViewport: null,
19935                            zIndex: -100,
19936                            disableParallax: !1,
19937                            disableVideo: !1,
19938                            automaticResize: !0,
19939                            videoSrc: null,
19940                            videoStartTime: 0,
19941                            videoEndTime: 0,
19942                            videoVolume: 0,
19943                            videoPlayOnlyVisible: !0,
19944                            onScroll: null,
19945                            onInit: null,
19946                            onDestroy: null,
19947                            onCoverImage: null
19948                        };
19949                        var n = o.$item.getAttribute("data-jarallax"), i = JSON.parse(n || "{}");
19950                        n && console.warn("Detected usage of deprecated data-jarallax JSON options, you should use pure data-attribute options. See info here - https://github.com/nk-o/jarallax/issues/53");
19951                        var a = o.$item.dataset || {}, r = {};
19952                        if (Object.keys(a).forEach(function (e) {
19953                            var t = e.substr(0, 1).toLowerCase() + e.substr(1);
19954                            t && void 0 !== o.defaults[t] && (r[t] = a[e])
19955                        }), o.options = o.extend({}, o.defaults, i, r, t), o.pureOptions = o.extend({}
19955, o.options), Object.keys(o.options).forEach(function (e) {
19956                            "true" === o.options[e] ? o.options[e] = !0 : "false" === o.options[e] && (o.options[e] = !1)
19957                        }), o.options.speed = Math.min(2, Math.max(-1, parseFloat(o.options.speed))), (o.options.noAndroid || o.options.noIos) && (console.warn("Detected usage of deprecated noAndroid or noIos options, you should use disableParallax option. See info here - https://github.com/nk-o/jarallax/#disable-on-mobile-devices"), o.options.disableParallax || (o.options.noIos && o.options.noAndroid ? o.options.disableParallax = /iPad|iPhone|iPod|Android/ : o.options.noIos ? o.options.disableParallax = /iPad|iPhone|iPod/ : o.options.noAndroid && (o.options.disableParallax = /Android/))), "string" == typeof o.options.disableParallax && (o.options.disableParallax = new RegExp(o.options.disableParallax)), o.options.disableParallax instanceof RegExp) {
19958                            var l = o.options.disableParallax;
19959                            o.options.disableParallax = function () {
19960                                return l.test(navigator.userAgent)
19961                            }
19962                        }
19963                        if ("function" != typeof o.options.disableParallax && (o.options.disableParallax = function () {
19964                            return !1
19965                        }), "string" == typeof o.options.disableVideo && (o.options.disableVideo = new RegExp(o.options.disableVideo)), o.options.disableVideo instanceof RegExp) {
19966                            var s = o.options.disableVideo;
19967                            o.options.disableVideo = function () {
19968                                return s.test(navigator.userAgent)
19969                            }
19970                        }
19971                        "function" != typeof o.options.disableVideo && (o.options.disableVideo = function () {
19972                            return !1
19973                        });
19974                        var c = o.options.elementInViewport;
19975                        c && "object" === (void 0 === c ? "undefined" : p(c)) && void 0 !== c.length && (c = d(c, 1)[0]);
19976                        c instanceof Element || (c = null), o.options.elementInViewport = c, o.image = {
19977                            src: o.options.imgSrc || null,
19978                            $container: null,
19979                            useImgTag: !1,
19980                            position: /iPad|iPhone|iPod|Android/.test(navigator.userAgent) ? "absolute" : "fixed"
19981                        }, o.initImg() && o.canInitParallax() && o.init()
19982                    }
19983
19984                    return t(u, [{
19985                        key: "css", value: function (t, o) {
19986                            return "string" == typeof o ? i.window.getComputedStyle(t).getPropertyValue(o) : (o.transform && r && (o[r] = o.transform), Object.keys(o).forEach(function (e) {
19987                                t.style[e] = o[e]
19988                            }), t)
19989                        }
19990                    }, {
19991                        key: "extend", value: function (o) {
19992                            var n = arguments;
19993                            return o = o || {}, Object.keys(arguments).forEach(function (t) {
19994                                n[t] && Object.keys(n[t]).forEach(function (e) {
19995                                    o[e] = n[t][e]
19996                                })
19997                            }), o
19998                        }
19999                    }, {
20000                        key: "getWindowData", value: function () {
20001                            return {width: b, height: v, y: l}
20002                        }
20003                    }, {
20004                        key: "initImg", value: function () {
20005                            var e = this, t = e.options.imgElement;
20006                            return t && "string" == typeof t && (t = e.$item.querySelector(t)), t instanceof Element || (t = null), t && (e.options.keepImg ? e.image.$item = t.cloneNode(!0) : (e.image.$item = t, e.image.$itemParent = t.parentNode), e.image.useImgTag = !0), !!e.image.$item || (null === e.image.src && (e.image.src = e.css(e.$item, "background-image").replace(/^url\(['"]?/g, "").replace(/['"]?\)$/g, "")), !(!e.image.src || "none" === e.image.src))
20007                        }
20008                    }, {
20009                        key: "canInitParallax", value: function () {
20010                            return r && !this.options.disableParallax()
20011                        }
20012                    }, {
20013                        key: "init", value: function () {
20014                            var e = this, t = {
20015                                position: "absolute",
20016                                top: 0,
20017                                left: 0,
20018                                width: "100%",
20019                                height: "100%",
20020                                overflow: "hidden",
20021                                pointerEvents: "none"
20022                            }, o = {};
20023                            if (!e.options.keepImg) {
20024                                var n = e.$item.getAttribute("style");
20025                                if (n && e.$item.setAttribute("data-jarallax-original-styles", n), e.image.useImgTag) {
20026                                    var i = e.image.$item.getAttribute("style");
20027                                    i && e.image.$item.setAttribute("data-jarallax-original-styles", i)
20028                                }
20029                            }
20030                            if ("static" === e.css(e.$item, "position") && e.css(e.$item, {position: "relative"}), "auto" === e.css(e.$item, "z-index") && e.css(e.$item, {zIndex: 0}), e.image.$container = document.createElement("div"), e.css(e.image.$container, t), e.css(e.image.$container, {"z-index": e.options.zIndex}), s && e.css(e.image.$container, {opacity: .9999}), e.image.$container.setAttribute("id", "jarallax-container-" + e.instanceID), e.$item.appendChild(e.image.$container), e.image.useImgTag ? o = e.extend({
20031                                "object-fit": e.options.imgSize,
20032                                "object-position": e.options.imgPosition,
20033                                "font-family": "object-fit: " + e.options.imgSize + "; object-position: " + e.options.imgPosition + ";",
20034                                "max-width": "none"
20035                            }
20035, t, o) : (e.image.$item = document.createElement("div"), e.image.src && (o = e.extend({
20036                                "background-position": e.options.imgPosition,
20037                                "background-size": e.options.imgSize,
20038                                "background-repeat": e.options.imgRepeat,
20039                                "background-image": 'url("' + e.image.src + '")'
20040                            }, t, o))), "opacity" !== e.options.type && "scale" !== e.options.type && "scale-opacity" !== e.options.type && 1 !== e.options.speed || (e.image.position = "absolute"), "fixed" === e.image.position) for (var a = 0, r = e.$item; null !== r && r !== document && 0 === a;) {
20041                                var l = e.css(r, "-webkit-transform") || e.css(r, "-moz-transform") || e.css(r, "transform");
20042                                l && "none" !== l && (a = 1, e.image.position = "absolute"), r = r.parentNode
20043                            }
20044                            o.position = e.image.position, e.css(e.image.$item, o), e.image.$container.appendChild(e.image.$item), e.onResize(), e.onScroll(!0), e.options.automaticResize && h && h.observe(e.$item), e.options.onInit && e.options.onInit.call(e), "none" !== e.css(e.$item, "background-image") && e.css(e.$item, {"background-image": "none"}), e.addToParallaxList()
20045                        }
20046                    }, {
20047                        key: "addToParallaxList", value: function () {
20048                            f.push(this), 1 === f.length && g()
20049                        }
20050                    }, {
20051                        key: "removeFromParallaxList", value: function () {
20052                            var o = this;
20053                            f.forEach(function (e, t) {
20054                                e.instanceID === o.instanceID && f.splice(t, 1)
20055                            })
20056                        }
20057                    }, {
20058                        key: "destroy", value: function () {
20059                            var e = this;
20060                            e.removeFromParallaxList();
20061                            var t = e.$item.getAttribute("data-jarallax-original-styles");
20062                            if (e.$item.removeAttribute("data-jarallax-original-styles"), t ? e.$item.setAttribute("style", t) : e.$item.removeAttribute("style"), e.image.useImgTag) {
20063                                var o = e.image.$item.getAttribute("data-jarallax-original-styles");
20064                                e.image.$item.removeAttribute("data-jarallax-original-styles"), o ? e.image.$item.setAttribute("style", t) : e.image.$item.removeAttribute("style"), e.image.$itemParent && e.image.$itemParent.appendChild(e.image.$item)
20065                            }
20066                            e.$clipStyles && e.$clipStyles.parentNode.removeChild(e.$clipStyles), e.image.$container && e.image.$container.parentNode.removeChild(e.image.$container), e.options.onDestroy && e.options.onDestroy.call(e), delete e.$item.jarallax
20067                        }
20068                    }, {
20069                        key: "clipContainer", value: function () {
20070                            if ("fixed" === this.image.position) {
20071                                var e = this, t = e.image.$container.getBoundingClientRect(), o = t.width, n = t.height;
20072                                if (!e.$clipStyles) e.$clipStyles = document.createElement("style"), e.$clipStyles.setAttribute("type", "text/css"), e.$clipStyles.setAttribute("id", "jarallax-clip-" + e.instanceID), (document.head || document.getElementsByTagName("head")[0]).appendChild(e.$clipStyles);
20073                                var i = "#jarallax-container-" + e.instanceID + " {\n           clip: rect(0 " + o + "px " + n + "px 0);\n           clip: rect(0, " + o + "px, " + n + "px, 0);\n        }";
20074                                e.$clipStyles.styleSheet ? e.$clipStyles.styleSheet.cssText = i : e.$clipStyles.innerHTML = i
20075                            }
20076                        }
20077                    }, {
20078                        key: "coverImage", value: function () {
20079                            var e = this, t = e.image.$container.getBoundingClientRect(), o = t.height,
20080                                n = e.options.speed,
20081                                i = "scroll" === e.options.type || "scroll-opacity" === e.options.type, a = 0, r = o,
20082                                l = 0;
20083                            return i && (a = n < 0 ? n * Math.max(o, v) : n * (o + v), 1 < n ? r = Math.abs(a - v) : n < 0 ? r = a / n + Math.abs(a) : r += Math.abs(v - o) * (1 - n), a /= 2), e.parallaxScrollDistance = a, l = i ? (v - r) / 2 : (o - r) / 2, e.css(e.image.$item, {
20084                                height: r + "px",
20085                                marginTop: l + "px",
20086                                left: "fixed" === e.image.position ? t.left + "px" : "0",
20087                                width: t.width + "px"
20088                            }
20088), e.options.onCoverImage && e.options.onCoverImage.call(e), {
20089                                image: {
20090                                    height: r,
20091                                    marginTop: l
20092                                }, container: t
20093                            }
20094                        }
20095                    }, {
20096                        key: "isVisible", value: function () {
20097                            return this.isElementInViewport || !1
20098                        }
20099                    }, {
20100                        key: "onScroll", value: function (e) {
20101                            var t = this, o = t.$item.getBoundingClientRect(), n = o.top, i = o.height, a = {}, r = o;
20102                            if (t.options.elementInViewport && (r = t.options.elementInViewport.getBoundingClientRect()), t.isElementInViewport = 0 <= r.bottom && 0 <= r.right && r.top <= v && r.left <= b, e || t.isElementInViewport) {
20103                                var l = Math.max(0, n), s = Math.max(0, i + n), c = Math.max(0, -n),
20104                                    u = Math.max(0, n + i - v), d = Math.max(0, i - (n + i - v)),
20105                                    p = Math.max(0, -n + v - i), m = 1 - 2 * (v - n) / (v + i), f = 1;
20106                                if (i < v ? f = 1 - (c || u) / i : s <= v ? f = s / v : d <= v && (f = d / v), "opacity" !== t.options.type && "scale-opacity" !== t.options.type && "scroll-opacity" !== t.options.type || (a.transform = "translate3d(0,0,0)", a.opacity = f), "scale" === t.options.type || "scale-opacity" === t.options.type) {
20107                                    var y = 1;
20108                                    t.options.speed < 0 ? y -= t.options.speed * f : y += t.options.speed * (1 - f), a.transform = "scale(" + y + ") translate3d(0,0,0)"
20109                                }
20110                                if ("scroll" === t.options.type || "scroll-opacity" === t.options.type) {
20111                                    var g = t.parallaxScrollDistance * m;
20112                                    "absolute" === t.image.position && (g -= n), a.transform = "translate3d(0," + g + "px,0)"
20113                                }
20114                                t.css(t.image.$item, a), t.options.onScroll && t.options.onScroll.call(t, {
20115                                    section: o,
20116                                    beforeTop: l,
20117                                    beforeTopEnd: s,
20118                                    afterTop: c,
20119                                    beforeBottom: u,
20120                                    beforeBottomEnd: d,
20121                                    afterBottom: p,
20122                                    visiblePercent: f,
20123                                    fromViewportCenter: m
20124                                })
20125                            }
20126                        }
20127                    }, {
20128                        key: "onResize", value: function () {
20129                            this.coverImage(), this.clipContainer()
20130                        }
20131                    }]), u
20132                }(), $ = function (e) {
20133                    ("object" === ("undefined" == typeof HTMLElement ? "undefined" : p(HTMLElement)) ? e instanceof HTMLElement : e && "object" === (void 0 === e ? "undefined" : p(e)) && null !== e && 1 === e.nodeType && "string" == typeof e.nodeName) && (e = [e]);
20134                    for (var t = arguments[1], o = Array.prototype.slice.call(arguments, 2), n = e.length, i = 0, a = void 0; i < n; i++) if ("object" === (void 0 === t ? "undefined" : p(t)) || void 0 === t ? e[i].jarallax || (e[i].jarallax = new w(e[i], t)) : e[i].jarallax && (a = e[i].jarallax[t].apply(e[i].jarallax, o)), void 0 !== a) return a;
20135                    return e
20136                };
20137                $.constructor = w, j.default = $
20138            }).call(this, S(5))
20139        }, function (e, t, o) {
20140            "use strict";
20141            var n = o(4),
20142                i = n.requestAnimationFrame || n.webkitRequestAnimationFrame || n.mozRequestAnimationFrame || function (e) {
20143                    var t = +new Date, o = Math.max(0, 16 - (t - a)), n = setTimeout(e, o);
20144                    return a = t, n
20145                }, a = +new Date;
20146            var r = n.cancelAnimationFrame || n.webkitCancelAnimationFrame || n.mozCancelAnimationFrame || clearTimeout;
20147            Function.prototype.bind && (i = i.bind(n), r = r.bind(n)), (e.exports = i).cancel = r
20148        }]);
20149//# sourceMappingURL=jarallax.min.js.map
20150
20151
20152        /***/
20153    }),
20154    /* 51 */
20155    /***/ (function (module, exports) {
20156
20157        /*!
20158 * Name    : Video Background Extension for Jarallax
20159 * Version : 1.0.1
20160 * Author  : nK <https://nkdev.info>
20161 * GitHub  : https://github.com/nk-o/jarallax
20162 */
20163        !function (o) {
20164            var i = {};
20165
20166            function n(e) {
20167                if (i[e]) return i[e].exports;
20168                var t = i[e] = {i: e, l: !1, exports: {}};
20169                return o[e].call(t.exports, t, t.exports, n), t.l = !0, t.exports
20170            }
20171
20172            n.m = o, n.c = i, n.d = function (e, t, o) {
20173                n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: o})
20174            }, n.r = function (e) {
20175                "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
20176            }, n.t = function (t, e) {
20177                if (1 & e && (t = n(t)), 8 & e) return t;
20178                if (4 & e && "object" == typeof t && t && t.__esModule) return t;
20179                var o = Object.create(null);
20180                if (n.r(o), Object.defineProperty(o, "default", {
20181                    enumerable: !0,
20182                    value: t
20183                }), 2 & e && "string" != typeof t) for (var i in t) n.d(o, i, function (e) {
20184                    return t[e]
20185                }.bind(null, i));
20186                return o
20187            }, n.n = function (e) {
20188                var t = e && e.__esModule ? function () {
20189                    return e.default
20190                } : function () {
20191                    return e
20192                };
20193                return n.d(t, "a", t), t
20194            }, n.o = function (e, t) {
20195                return Object.prototype.hasOwnProperty.call(e, t)
20196            }, n.p = "", n(n.s = 6)
20197        }([, , function (e, t, o) {
20198            "use strict";
20199            e.exports = function (e) {
20200                "complete" === document.readyState || "interactive" === document.readyState ? e.call() : document.attachEvent ? document.attachEvent("onreadystatechange", function () {
20201                    "interactive" === document.readyState && e.call()
20202                }) : document.addEventListener && document.addEventListener("DOMContentLoaded", e)
20203            }
20204        }, , function (o, e, t) {
20205            "use strict";
20206            (function (e) {
20207                var t;
20208                t = "undefined" != typeof window ? window : void 0 !== e ? e : "undefined" != typeof self ? self : {}, o.exports = t
20209            }).call(this, t(5))
20210        }, function (e, t, o) {
20211            "use strict";
20212            var i, n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
20213                return typeof e
20214            } : function (e) {
20215                return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
20216            };
20217            i = function () {
20218                return this
20219            }();
20220            try {
20221                i = i || Function("return this")() || (0, eval)("this")
20222            } catch (e) {
20223                "object" === ("undefined" == typeof window ? "undefined" : n(window)) && (i = window)
20224            }
20225            e.exports = i
20226        }, function (e, t, o) {
20227            e.exports = o(7)
20228        }, function (e, t, o) {
20229            "use strict";
20230            var i = l(o(8)), n = l(o(4)), a = l(o(2)), r = l(o(10));
20231
20232            function l(e) {
20233                return e && e.__esModule ? e : {default: e}
20234            }
20235
20236            n.default.VideoWorker = n.default.VideoWorker || i.default, (0, r.default)(), (0, a.default)(function () {
20237                "undefined" != typeof jarallax && jarallax(document.querySelectorAll("[data-jarallax-video]"))
20238            })
20239        }, function (e, t, o) {
20240            "use strict";
20241            e.exports = o(9)
20242        }, function (e, t, o) {
20243            "use strict";
20244            Object.defineProperty(t, "__esModule", {value: !0});
20245            var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
20246                return typeof e
20247            } : function (e) {
20248                return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
20249            }, a = function () {
20250                function i(e, t) {
20251                    for (var o = 0; o < t.length; o++) {
20252                        var i = t[o];
20253                        i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i)
20254                    }
20255                }
20256
20257                return function (e, t, o) {
20258                    return t && i(e.prototype, t), o && i(e, o), e
20259                }
20260            }();
20261
20262            function i() {
20263                this._done = [], this._fail = []
20264            }
20265
20266            i.prototype = {
20267                execute: function (e, t) {
20268                    var o = e.length;
20269                    for (t = Array.prototype.slice.call(t); o--;) e[o].apply(null, t)
20270                }, resolve: function () {
20271                    this.execute(this._done, arguments)
20272                }, reject: function () {
20273                    this.execute(this._fail, arguments)
20274                }, done: function (e) {
20275                    this._done.push(e)
20276                }, fail: function (e) {
20277                    this._fail.push(e)
20278                }
20279            };
20280            var r = 0, l = 0, u = 0, p = 0, s = 0, d = new i, y = new i, c = function () {
20281                function i(e, t) {
20282                    !function (e, t) {
20283                        if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
20284                    }(this, i);
20285                    var o = this;
20286                    o.url = e, o.options_default = {
20287                        autoplay: !1,
20288                        loop: !1,
20289                        mute: !1,
20290                        volume: 100,
20291                        showContols: !0,
20292                        startTime: 0,
20293                        endTime: 0
20294                    }, o.options = o.extend({}, o.options_default, t), o.videoID = o.parseURL(e), o.videoID && (o.ID = r++, o.loadAPI(), o.init())
20295                }
20296
20297                return a(i, [{
20298                    key: "extend", value: function (o) {
20299                        var i = arguments;
20300                        return o = o || {}
20300, Object.keys(arguments).forEach(function (t) {
20301                            i[t] && Object.keys(i[t]).forEach(function (e) {
20302                                o[e] = i[t][e]
20303                            })
20304                        }), o
20305                    }
20306                }, {
20307                    key: "parseURL", value: function (e) {
20308                        var t, o, i, n, a,
20309                            r = !(!(t = e.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/)) || 11 !== t[1].length) && t[1],
20310                            l = !(!(o = e.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/)) || !o[3]) && o[3],
20311                            u = (i = e.split(/,(?=mp4\:|webm\:|ogv\:|ogg\:)/), n = {}, a = 0, i.forEach(function (e) {
20312                                var t = e.match(/^(mp4|webm|ogv|ogg)\:(.*)/);
20313                                t && t[1] && t[2] && (n["ogv" === t[1] ? "ogg" : t[1]] = t[2], a = 1)
20314                            }), !!a && n);
20315                        return r ? (this.type = "youtube", r) : l ? (this.type = "vimeo", l) : !!u && (this.type = "local", u)
20316                    }
20317                }, {
20318                    key: "isValid", value: function () {
20319                        return !!this.videoID
20320                    }
20321                }, {
20322                    key: "on", value: function (e, t) {
20323                        this.userEventsList = this.userEventsList || [], (this.userEventsList[e] || (this.userEventsList[e] = [])).push(t)
20324                    }
20325                }, {
20326                    key: "off", value: function (o, i) {
20327                        var n = this;
20328                        this.userEventsList && this.userEventsList[o] && (i ? this.userEventsList[o].forEach(function (e, t) {
20329                            e === i && (n.userEventsList[o][t] = !1)
20330                        }) : delete this.userEventsList[o])
20331                    }
20332                }, {
20333                    key: "fire", value: function (e) {
20334                        var t = this, o = [].slice.call(arguments, 1);
20335                        this.userEventsList && void 0 !== this.userEventsList[e] && this.userEventsList[e].forEach(function (e) {
20336                            e && e.apply(t, o)
20337                        })
20338                    }
20339                }, {
20340                    key: "play", value: function (e) {
20341                        var t = this;
20342                        t.player && ("youtube" === t.type && t.player.playVideo && (void 0 !== e && t.player.seekTo(e || 0), YT.PlayerState.PLAYING !== t.player.getPlayerState() && t.player.playVideo()), "vimeo" === t.type && (void 0 !== e && t.player.setCurrentTime(e), t.player.getPaused().then(function (e) {
20343                            e && t.player.play()
20344                        })), "local" === t.type && (void 0 !== e && (t.player.currentTime = e), t.player.paused && t.player.play()))
20345                    }
20346                }, {
20347                    key: "pause", value: function () {
20348                        var t = this;
20349                        t.player && ("youtube" === t.type && t.player.pauseVideo && YT.PlayerState.PLAYING === t.player.getPlayerState() && t.player.pauseVideo(), "vimeo" === t.type && t.player.getPaused().then(function (e) {
20350                            e || t.player.pause()
20351                        }), "local" === t.type && (t.player.paused || t.player.pause()))
20352                    }
20353                }, {
20354                    key: "mute", value: function () {
20355                        var e = this;
20356                        e.player && ("youtube" === e.type && e.player.mute && e.player.mute(), "vimeo" === e.type && e.player.setVolume && e.player.setVolume(0), "local" === e.type && (e.$video.muted = !0))
20357                    }
20358                }, {
20359                    key: "unmute", value: function () {
20360                        var e = this;
20361                        e.player && ("youtube" === e.type && e.player.mute && e.player.unMute(), "vimeo" === e.type && e.player.setVolume && e.player.setVolume(e.options.volume), "local" === e.type && (e.$video.muted = !1))
20362                    }
20363                }, {
20364                    key: "setVolume", value: function () {
20365                        var e = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t = this;
20366                        t.player && e && ("youtube" === t.type && t.player.setVolume && t.player.setVolume(e), "vimeo" === t.type && t.player.setVolume && t.player.setVolume(e), "local" === t.type && (t.$video.volume = e / 100))
20367                    }
20368                }, {
20369                    key: "getVolume", value: function (t) {
20370                        var e = this;
20371                        e.player ? ("youtube" === e.type && e.player.getVolume && t(e.player.getVolume()), "vimeo" === e.type && e.player.getVolume && e.player.getVolume().then(function (e) {
20372                            t(e)
20373                        }), "local" === e.type && t(100 * e.$video.volume)) : t(!1)
20374                    }
20375                }, {
20376                    key: "getMuted", value: function (t) {
20377                        var e = this;
20378                        e.player ? ("youtube" === e.type && e.player.isMuted && t(e.player.isMuted()), "vimeo" === e.type && e.player.getVolume && e.player.getVolume().then(function (e) {
20379                            t(!!e)
20380                        }), "local" === e.type && t(e.$video.muted)) : t(null)
20381                    }
20382                }, {
20383                    key: "getImageURL", value: function (t) {
20384                        var o = this;
20385                        if (o.videoImage) t(o.videoImage); else {
20386                            if ("youtube" === o.type) {
20387                                var e = ["maxresdefault", "sddefault", "hqdefault", "0"], i = 0, n = new Image;
20388                                n.onload = function () {
20389                                    120 !== (this.naturalWidth || this.width) || i === e.length - 1 ? (o.videoImage = "https://img.youtube.com/vi/" + o.videoID + "/" + e[i] + ".jpg", t(o.videoImage)) : (i++, this.src = "https://img.youtube.com/vi/" + o.videoID + "/" + e[i] + ".jpg")
20390                                }, n.src = "https://img.youtube.com/vi/" + o.videoID + "/" + e[i] + ".jpg"
20391                            }
20392                            if ("vimeo" === o.type) {
20393                                var a = new XMLHttpRequest;
20394                                a.open("GET", "https://vimeo.com/api/v2/video/" + o.videoID + ".json", !0), a.onreadystatechange = function () {
20395                                    if (4 === this.readyState && 200 <= this.status && this.status < 400) {
20396                                        var e = JSON.parse(this.responseText);
20397                                        o.videoImage = e[0].thumbnail_large, t(o.videoImage)
20398                                    }
20399                                }, a.send(), a = null
20400                            }
20401                        }
20402                    }
20403                }, {
20404                    key: "getIframe", value: function (e) {
20405                        this.getVideo(e)
20406                    }
20407                }, {
20408                    key: "getVideo", value: function (u) {
20409                        var p = this;
20410                        p.$video ? u(p.$video) : p.onAPIready(function () {
20411                            var e = void 0;
20412                            if (p.$video || ((e = document.createElement("div")).style.display = "none"), "youtube" === p.type) {
20413                                p.playerOptions = {}, p.playerOptions.videoId = p.videoID, p.playerOptions.playerVars = {
20414                                    autohide: 1,
20415                                    rel: 0,
20416                                    autoplay: 0,
20417                                    playsinline: 1
20418                                }, p.options.showContols || (p.playerOptions.playerVars.iv_load_policy = 3, p.playerOptions.playerVars.modestbranding = 1, p.playerOptions.playerVars.controls = 0, p.playerOptions.playerVars.showinfo = 0, p.playerOptions.playerVars.disablekb = 1);
20419                                var t = void 0, o = void 0;
20420                                p.playerOptions.events = {
20421                                    onReady: function (t) {
20422                                        p.options.mute ? t.target.mute() : p.options.volume && t.target.setVolume(p.options.volume), p.options.autoplay && p.play(p.options.startTime), p.fire("ready", t), setInterval(function () {
20423                                            p.getVolume(function (e) {
20424                                                p.options.volume !== e && (p.options.volume = e, p.fire("volumechange", t))
20425                                            })
20426                                        }, 150)
20427                                    }, onStateChange: function (e) {
20428                                        p.options.loop && e.data === YT.PlayerState.ENDED && p.play(p.options.startTime), t || e.data !== YT.PlayerState.PLAYING || (t = 1, p.fire("started", e)), e.data === YT.PlayerState.PLAYING && p.fire("play", e), e.data === YT.PlayerState.PAUSED && p.fire("pause", e), e.data === YT.PlayerState.ENDED && p.fire("ended", e), e.data === YT.PlayerState.PLAYING ? o = setInterval(function () {
20429                                            p.fire("timeupdate", e), p.options.endTime && p.player.getCurrentTime() >= p.options.endTime && (p.options.loop ? p.play(p.options.startTime) : p.pause())
20430                                        }, 150) : clearInterval(o)
20431                                    }
20432                                };
20433                                var i = !p.$video;
20434                                if (i) {
20435                                    var n = document.createElement("div");
20436                                    n.setAttribute("id", p.playerID), e.appendChild(n), document.body.appendChild(e)
20437                                }
20438                                p.player = p.player || new window.YT.Player(p.playerID, p.playerOptions), i && (p.$video = document.getElementById(p.playerID), p.videoWidth = parseInt(p.$video.getAttribute("width"), 10) || 1280, p.videoHeight = parseInt(p.$video.getAttribute("height"), 10) || 720)
20439                            }
20440                            if ("vimeo" === p.type) {
20441                                if (p.playerOptions = {
20442                                    id: p.videoID,
20443                                    autopause: 0,
20444                                    transparent: 0,
20445                                    autoplay: p.options.autoplay ? 1 : 0,
20446                                    loop: p.options.loop ? 1 : 0,
20447                                    muted: p.options.mute ? 1 : 0
20448                                }, p.options.volume && (p.playerOptions.volume = p.options.volume), p.options.showContols || (p.playerOptions.badge = 0, p.playerOptions.byline = 0, p.playerOptions.portrait = 0, p.playerOptions.title = 0), !p.$video) {
20449                                    var a = "";
20450                                    Object.keys(p.playerOptions).forEac
20450h(function (e) {
20451                                        "" !== a && (a += "&"), a += e + "=" + encodeURIComponent(p.playerOptions[e])
20452                                    }), p.$video = document.createElement("iframe"), p.$video.setAttribute("id", p.playerID), p.$video.setAttribute("src", "https://player.vimeo.com/video/" + p.videoID + "?" + a), p.$video.setAttribute("frameborder", "0"), p.$video.setAttribute("mozallowfullscreen", ""), p.$video.setAttribute("allowfullscreen", ""), e.appendChild(p.$video), document.body.appendChild(e)
20453                                }
20454                                p.player = p.player || new Vimeo.Player(p.$video, p.playerOptions), p.options.startTime && p.options.autoplay && p.player.setCurrentTime(p.options.startTime), p.player.getVideoWidth().then(function (e) {
20455                                    p.videoWidth = e || 1280
20456                                }), p.player.getVideoHeight().then(function (e) {
20457                                    p.videoHeight = e || 720
20458                                });
20459                                var r = void 0;
20460                                p.player.on("timeupdate", function (e) {
20461                                    r || (p.fire("started", e), r = 1), p.fire("timeupdate", e), p.options.endTime && p.options.endTime && e.seconds >= p.options.endTime && (p.options.loop ? p.play(p.options.startTime) : p.pause())
20462                                }), p.player.on("play", function (e) {
20463                                    p.fire("play", e), p.options.startTime && 0 === e.seconds && p.play(p.options.startTime)
20464                                }), p.player.on("pause", function (e) {
20465                                    p.fire("pause", e)
20466                                }), p.player.on("ended", function (e) {
20467                                    p.fire("ended", e)
20468                                }), p.player.on("loaded", function (e) {
20469                                    p.fire("ready", e)
20470                                }), p.player.on("volumechange", function (e) {
20471                                    p.fire("volumechange", e)
20472                                })
20473                            }
20474                            if ("local" === p.type) {
20475                                p.$video || (p.$video = document.createElement("video"), p.options.showContols && (p.$video.controls = !0), p.options.mute ? p.$video.muted = !0 : p.$video.volume && (p.$video.volume = p.options.volume / 100), p.options.loop && (p.$video.loop = !0), p.$video.setAttribute("playsinline", ""), p.$video.setAttribute("webkit-playsinline", ""), p.$video.setAttribute("id", p.playerID), e.appendChild(p.$video), document.body.appendChild(e), Object.keys(p.videoID).forEach(function (e) {
20476                                    var t, o, i, n;
20477                                    t = p.$video, o = p.videoID[e], i = "video/" + e, (n = document.createElement("source")).src = o, n.type = i, t.appendChild(n)
20478                                })), p.player = p.player || p.$video;
20479                                var l = void 0;
20480                                p.player.addEventListener("playing", function (e) {
20481                                    l || p.fire("started", e), l = 1
20482                                }), p.player.addEventListener("timeupdate", function (e) {
20483                                    p.fire("timeupdate", e), p.options.endTime && p.options.endTime && this.currentTime >= p.options.endTime && (p.options.loop ? p.play(p.options.startTime) : p.pause())
20484                                }), p.player.addEventListener("play", function (e) {
20485                                    p.fire("play", e)
20486                                }), p.player.addEventListener("pause", function (e) {
20487                                    p.fire("pause", e)
20488                                }), p.player.addEventListener("ended", function (e) {
20489                                    p.fire("ended", e)
20490                                }), p.player.addEventListener("loadedmetadata", function () {
20491                                    p.videoWidth = this.videoWidth || 1280, p.videoHeight = this.videoHeight || 720, p.fire("ready"), p.options.autoplay && p.play(p.options.startTime)
20492                                }), p.player.addEventListener("volumechange", function (e) {
20493                                    p.getVolume(function (e) {
20494                                        p.options.volume = e
20495                                    }), p.fire("volumechange", e)
20496                                })
20497                            }
20498                            u(p.$video)
20499                        })
20500                    }
20501                }, {
20502                    key: "init", value: function () {
20503                        this.playerID = "VideoWorker-" + this.ID
20504                    }
20505                }, {
20506                    key: "loadAPI", value: function () {
20507                        if (!l || !u) {
20508                            var e = "";
20509                            if ("youtube" !== this.type || l || (l = 1, e = "https://www.youtube.com/iframe_api"), "vimeo" !== this.type || u || (u = 1, e = "https://player.vimeo.com/api/player.js"), e) {
20510                                var t = document.createElement("script"), o = document.getElementsByTagName("head")[0];
20511                                t.src = e, o.appendChild(t), t = o = null
20512                            }
20513                        }
20514                    }
20515                }, {
20516                    key: "onAPIready", value: function (e) {
20517                        if ("youtube" === this.type && ("undefined" != typeof YT && 0 !== YT.loaded || p ? "object" === ("undefined" == typeof YT ? "undefined" : n(YT)) && 1 === YT.loaded ? e() : d.done(function () {
20518                            e()
20519                        }) : (p = 1, window.onYouTubeIframeAPIReady = function () {
20520                            window.onYouTubeIframeAPIReady = null, d.resolve("done"), e()
20521                        })), "vimeo" === this.type) if ("undefined" != typeof Vimeo || s) "undefined" != typeof Vimeo ? e() : y.done(function () {
20522                            e()
20523                        }); else {
20524                            s = 1;
20525                            var t = setInterval(function () {
20526                                "undefined" != typeof Vimeo && (clearInterval(t), y.resolve("done"), e())
20527                            }, 20)
20528                        }
20529                        "local" === this.type && e()
20530                    }
20531                }]), i
20532            }();
20533            t.default = c
20534        }, function (e, t, o) {
20535            "use strict";
20536            Object.defineProperty(t, "__esModule", {value: !0}), t.default = function () {
20537                var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : u.default.jarallax;
20538                if (void 0 === e) return;
20539                var t = e.constructor, i = t.prototype.init;
20540                t.prototype.init = function () {
20541                    var o = this;
20542                    i.apply(o), o.video && !o.options.disableVideo() && o.video.getVideo(function (e) {
20543                        var t = e.parentNode;
20544                        o.css(e, {
20545                            position: o.image.position,
20546                            top: "0px",
20547                            left: "0px",
20548                            right: "0px",
20549                            bottom: "0px",
20550                            width: "100%",
20551                            height: "100%",
20552                            maxWidth: "none",
20553                            maxHeight: "none",
20554                            margin: 0,
20555                            zIndex: -1
20556                        }), o.$video = e, o.image.$container.appendChild(e), t.parentNode.removeChild(t)
20557                    })
20558                };
20559                var l = t.prototype.coverImage;
20560                t.prototype.coverImage = function () {
20561                    var e = this, t = l.apply(e), o = !!e.image.$item && e.image.$item.nodeName;
20562                    if (t && e.video && o && ("IFRAME" === o || "VIDEO" === o)) {
20563                        var i = t.image.height, n = i * e.image.width / e.image.height, a = (t.container.width - n) / 2,
20564                            r = t.image.marginTop;
20565                        t.container.width > n && (n = t.container.width, i = n * e.image.height / e.image.width, a = 0, r += (t.image.height - i) / 2), "IFRAME" === o && (i += 400, r -= 200), e.css(e.$video, {
20566                            width: n + "px",
20567                            marginLeft: a + "px",
20568                            height: i + "px",
20569                            marginTop: r + "px"
20570                        })
20571                    }
20572                    return t
20573                };
20574                var o = t.prototype.initImg;
20575                t.prototype.initImg = function () {
20576                    var e = this, t = o.apply(e);
20577                    return e.options.videoSrc || (e.options.videoSrc = e.$item.getAttribute("data-jarallax-video") || null), e.options.videoSrc ? (e.defaultInitImgResult = t, !0) : t
20578                };
20579                var n = t.prototype.canInitParallax;
20580                t.prototype.canInitParallax = function () {
20581                    var o = this, e = n.apply(o);
20582                    if (!o.options.videoSrc) return e;
20583                    var t = new r.default(o.options.videoSrc, {
20584                        autoplay: !0,
20585                        loop: !0,
20586                        showContols: !1,
20587                        startTime: o.options.videoStartTime || 0,
20588                        endTime: o.options.videoEndTime || 0,
20589                        mute: o.options.videoVolume ? 0 : 1,
20590                        volume: o.options.videoVolume || 0
20591                    });
20592                    if (t.isValid()) if (e) {
20593                        if (t.on("ready", function () {
20594                            if (o.options.videoPlayOnlyVisible) {
20595                                var e = o.onScroll;
20596                                o.onScroll = function () {
20597                                    e.apply(o), o.isVisible() ? t.play() : t.pause()
20598                                }
20599                            } else t.play()
20600                        }), t.on("started", function () {
20601                            o.image.$default_item = o.image.$item, o.image.$item = o.$video, o.image.width = o.video.videoWidth || 1280, o.image.height = o.video.videoHeight || 720, o.options.imgWidth = o.image.width, o.options.imgHeight = o.image.height, o.coverImage(), o.clipContainer(), o.onScroll(), o.image.$default_item && (o.image.$default_item.style.display = "none")
20602                        }), o.video = t, !o.defaultInitImgResult) return "local" !== t.type ? (t.getImageURL(function (e) {
20603                            o.image.src = e, o.init()
20604                        }), !1) : (o.image.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", !0)
20605                    } else o.defaultInitImgResult || t.getImageURL(function (e) {
20606                        var t = o.$item.getAttribute("style");
20607                        t && o.$item.setAttribute("data-jarallax-original-styles", t), o.css(o.$item, {
20608                            "background-image": 'url("' + e + '")',
20609                            "background-position": "center",
20610                            "background-size": "cover"
20611                        })
20612                    });
20613                    return e
20614                };
20615                var a = t.prototype.destroy;
20616                t.prototype.destroy = function () {
20617                    var e = this;
20618                    e.image.$default_item && (e.image.$item = e.image.$default_item, delete e.image.$default_item), a.apply(e)
20619                }
20620            };
20621            var r = i(o(8)), u = i(o(4));
20622
20623            function i(e) {
vendor: 24,617 bytes, lines 20624-21362
20624                return e && e.__esModule ? e : {default: e}
20625            }
20626        }]);
20627//# sourceMappingURL=jarallax-video.min.js.map
20628
20629
20630        /***/
20631    }),
20632    /* 52 */
20633    /***/ (function (module, exports, __webpack_require__) {
20634
20635
20636        /**
20637         * Load required plugin.
20638         */
20639        window.Lity = __webpack_require__(53);
20640
20641        /**
20642         * Configure the plugin.
20643         */
20644
20645        +function ($) {
20646            page.registerVendor('Lity');
20647
20648            page.initLity = function () {
20649
20650                $(document).on('click', '[data-provide~="lightbox"]', Lity);
20651
20652            }
20653
20654        }(jQuery);
20655
20656
20657        /***/
20658    }),
20659    /* 53 */
20660    /***/ (function (module, exports, __webpack_require__) {
20661
20662        var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Lity - v2.3.1 - 2018-04-20
20663* http://sorgalla.com/lity/
20664* Copyright (c) 2015-2018 Jan Sorgalla; Licensed MIT */
20665        (function (window, factory) {
20666            if (true) {
20667                !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($) {
20668                    return factory(window, $);
20669                }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
20670                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
20671            } else {
20672            }
20673        }(typeof window !== "undefined" ? window : this, function (window, $) {
20674            'use strict';
20675
20676            var document = window.document;
20677
20678            var _win = $(window);
20679            var _deferred = $.Deferred;
20680            var _html = $('html');
20681            var _instances = [];
20682
20683            var _attrAriaHidden = 'aria-hidden';
20684            var _dataAriaHidden = 'lity-' + _attrAriaHidden;
20685
20686            var _focusableElementsSelector = 'a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])';
20687
20688            var _defaultOptions = {
20689                esc: true,
20690                handler: null,
20691                handlers: {
20692                    image: imageHandler,
20693                    inline: inlineHandler,
20694                    youtube: youtubeHandler,
20695                    vimeo: vimeoHandler,
20696                    googlemaps: googlemapsHandler,
20697                    facebookvideo: facebookvideoHandler,
20698                    iframe: iframeHandler
20699                },
20700                template: '<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'
20701            };
20702
20703            var _imageRegexp = /(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
20704            var _youtubeRegex = /(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i;
20705            var _vimeoRegex = /(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/;
20706            var _googlemapsRegex = /((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i;
20707            var _facebookvideoRegex = /(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i;
20708
20709            var _transitionEndEvent = (function () {
20710                var el = document.createElement('div');
20711
20712                var transEndEventNames = {
20713                    WebkitTransition: 'webkitTransitionEnd',
20714                    MozTransition: 'transitionend',
20715                    OTransition: 'oTransitionEnd otransitionend',
20716                    transition: 'transitionend'
20717                };
20718
20719                for (var name in transEndEventNames) {
20720                    if (el.style[name] !== undefined) {
20721                        return transEndEventNames[name];
20722                    }
20723                }
20724
20725                return false;
20726            })();
20727
20728            function transitionEnd(element) {
20729                var deferred = _deferred();
20730
20731                if (!_transitionEndEvent || !element.length) {
20732                    deferred.resolve();
20733                } else {
20734                    element.one(_transitionEndEvent, deferred.resolve);
20735                    setTimeout(deferred.resolve, 500);
20736                }
20737
20738                return deferred.promise();
20739            }
20740
20741            function settings(currSettings, key, value) {
20742                if (arguments.length === 1) {
20743                    return $.extend({}, currSettings);
20744                }
20745
20746                if (typeof key === 'string') {
20747                    if (typeof value === 'undefined') {
20748                        return typeof currSettings[key] === 'undefined'
20749                            ? null
20750                            : currSettings[key];
20751                    }
20752
20753                    currSettings[key] = value;
20754                } else {
20755                    $.extend(currSettings, key);
20756                }
20757
20758                return this;
20759            }
20760
20761            function parseQueryParams(params) {
20762                var pairs = decodeURI(params.split('#')[0]).split('&');
20763                var obj = {}, p;
20764
20765                for (var i = 0, n = pairs.length; i < n; i++) {
20766                    if (!pairs[i]) {
20767                        continue;
20768                    }
20769
20770                    p = pairs[i].split('=');
20771                    obj[p[0]] = p[1];
20772                }
20773
20774                return obj;
20775            }
20776
20777            function appendQueryParams(url, params) {
20778                return url + (url.indexOf('?') > -1 ? '&' : '?') + $.param(params);
20779            }
20780
20781            function transferHash(originalUrl, newUrl) {
20782                var pos = originalUrl.indexOf('#');
20783
20784                if (-1 === pos) {
20785                    return newUrl;
20786                }
20787
20788                if (pos > 0) {
20789                    originalUrl = originalUrl.substr(pos);
20790                }
20791
20792                return newUrl + originalUrl;
20793            }
20794
20795            function error(msg) {
20796                return $('<span class="lity-error"/>').append(msg);
20797            }
20798
20799            function imageHandler(target, instance) {
20800                var desc = (instance.opener() && instance.opener().data('lity-desc')) || 'Image with no description';
20801                var img = $('<img src="' + target + '" alt="' + desc + '"/>');
20802                var deferred = _deferred();
20803                var failed = function () {
20804                    deferred.reject(error('Failed loading image'));
20805                };
20806
20807                img
20808                    .on('load', function () {
20809                        if (this.naturalWidth === 0) {
20810                            return failed();
20811                        }
20812
20813                        deferred.resolve(img);
20814                    })
20815                    .on('error', failed)
20816                ;
20817
20818                return deferred.promise();
20819            }
20820
20821            imageHandler.test = function (target) {
20822                return _imageRegexp.test(target);
20823            };
20824
20825            function inlineHandler(target, instance) {
20826                var el, placeholder, hasHideClass;
20827
20828                try {
20829                    el = $(target);
20830                } catch (e) {
20831                    return false;
20832                }
20833
20834                if (!el.length) {
20835                    return false;
20836                }
20837
20838                placeholder = $('<i style="display:none !important"/>');
20839                hasHideClass = el.hasClass('lity-hide');
20840
20841                instance
20842                    .element()
20843                    .one('lity:remove', function () {
20844                        placeholder
20845                            .before(el)
20846                            .remove()
20847                        ;
20848
20849                        if (hasHideClass && !el.closest('.lity-content').length) {
20850                            el.addClass('lity-hide');
20851                        }
20852                    })
20853                ;
20854
20855                return el
20856                    .removeClass('lity-hide')
20857                    .after(placeholder)
20858                    ;
20859            }
20860
20861            function youtubeHandler(target) {
20862                var matches = _youtubeRegex.exec(target);
20863
20864                if (!matches) {
20865                    return false;
20866                }
20867
20868                return iframeHandler(
20869                    transferHash(
20870                        target,
20871                        appendQueryParams(
20872                            'https://www.youtube' + (matches[2] || '') + '.com/embed/' + matches[4],
20873                            $.extend(
20874                                {
20875                                    autoplay: 1
20876                                },
20877                                parseQueryParams(matches[5] || '')
20878                            )
20879                        )
20880                    )
20881                );
20882            }
20883
20884            function vimeoHandler(target) {
20885                var matches = _vimeoRegex.exec(target);
20886
20887                if (!matches) {
20888                    return false;
20889                }
20890
20891                return iframeHandler(
20892                    transferHash(
20893                        target,
20894                        appendQueryParams(
20895                            'https://player.vimeo.com/video/' + matches[3],
20896                            $.extend(
20897                                {
20898                                    autoplay: 1
20899                                },
20900                                parseQueryParams(matches[4] || '')
20901                            )
20902                        )
20903                    )
20904                );
20905            }
20906
20907            function facebookvideoHandler(target) {
20908                var matches = _facebookvideoRegex.exec(target);
20909
20910                if (!matches) {
20911                    return false;
20912                }
20913
20914                if (0 !== target.indexOf('http')) {
20915                    target = 'https:' + target;
20916                }
20917
20918                return iframeHandler(
20919                    transferHash(
20920                        target,
20921                        appendQueryParams(
20922                            'https://www.facebook.com/plugins/video.php?href=' + target,
20923                            $.extend(
20924                                {
20925                                    autoplay: 1
20926                                },
20927                                parseQueryParams(matches[4] || '')
20928                            )
20929                        )
20930                    )
20931                );
20932            }
20933
20934            function googlemapsHandler(target) {
20935                var matches = _googlemapsRegex.exec(target);
20936
20937                if (!matches) {
20938                    return false;
20939                }
20940
20941                return iframeHandler(
20942                    transferHash(
20943                        target,
20944                        appendQueryParams(
20945                            'https://www.google.' + matches[3] + '/maps?' + matches[6],
20946                            {
20947                                output: matches[6].indexOf('layer=c') > 0 ? 'svembed' : 'embed'
20948                            }
20949                        )
20950                    )
20951                );
20952            }
20953
20954            function iframeHandler(target) {
20955                return '<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="' + target + '"/></div>';
20956            }
20957
20958            function winHeight() {
20959                return document.documentElement.clientHeight
20960                    ? document.documentElement.clientHeight
20961                    : Math.round(_win.height());
20962            }
20963
20964            function keydown(e) {
20965                var current = currentInstance();
20966
20967                if (!current) {
20968                    return;
20969                }
20970
20971                // ESC key
20972                if (e.keyCode === 27 && !!current.options('esc')) {
20973                    current.close();
20974                }
20975
20976                // TAB key
20977                if (e.keyCode === 9) {
20978                    handleTabKey(e, current);
20979                }
20980            }
20981
20982            function handleTabKey(e, instance) {
20983                var focusableElements = instance.element().find(_focusableElementsSelector);
20984                var focusedIndex = focusableElements.index(document.activeElement);
20985
20986                if (e.shiftKey && focusedIndex <= 0) {
20987                    focusableElements.get(focusableElements.length - 1).focus();
20988                    e.preventDefault();
20989                } else if (!e.shiftKey && focusedIndex === focusableElements.length - 1) {
20990                    focusableElements.get(0).focus();
20991                    e.preventDefault();
20992                }
20993            }
20994
20995            function resize() {
20996                $.each(_instances, function (i, instance) {
20997                    instance.resize();
20998                });
20999            }
21000
21001            function registerInstance(instanceToRegister) {
21002                if (1 === _instances.unshift(instanceToRegister)) {
21003                    _html.addClass('lity-active');
21004
21005                    _win
21006                        .on({
21007                            resize: resize,
21008                            keydown: keydown
21009                        })
21010                    ;
21011                }
21012
21013                $('body > *').not(instanceToRegister.element())
21014                    .addClass('lity-hidden')
21015                    .each(function () {
21016                        var el = $(this);
21017
21018                        if (undefined !== el.data(_dataAriaHidden)) {
21019                            return;
21020                        }
21021
21022                        el.data(_dataAriaHidden, el.attr(_attrAriaHidden) || null);
21023                    })
21024                    .attr(_attrAriaHidden, 'true')
21025                ;
21026            }
21027
21028            function removeInstance(instanceToRemove) {
21029                var show;
21030
21031                instanceToRemove
21032                    .element()
21033                    .attr(_attrAriaHidden, 'true')
21034                ;
21035
21036                if (1 === _instances.length) {
21037                    _html.removeClass('lity-active');
21038
21039                    _win
21040                        .off({
21041                            resize: resize,
21042                            keydown: keydown
21043                        })
21044                    ;
21045                }
21046
21047                _instances = $.grep(_instances, function (instance) {
21048                    return instanceToRemove !== instance;
21049                });
21050
21051                if (!!_instances.length) {
21052                    show = _instances[0].element();
21053                } else {
21054                    show = $('.lity-hidden');
21055                }
21056
21057                show
21058                    .removeClass('lity-hidden')
21059                    .each(function () {
21060                        var el = $(this), oldAttr = el.data(_dataAriaHidden);
21061
21062                        if (!oldAttr) {
21063                            el.removeAttr(_attrAriaHidden);
21064                        } else {
21065                            el.attr(_attrAriaHidden, oldAttr);
21066                        }
21067
21068                        el.removeData(_dataAriaHidden);
21069                    })
21070                ;
21071            }
21072
21073            function currentInstance() {
21074                if (0 === _instances.length) {
21075                    return null;
21076                }
21077
21078                return _instances[0];
21079            }
21080
21081            function factory(target, instance, handlers, preferredHandler) {
21082                var handler = 'inline', content;
21083
21084                var currentHandlers = $.extend({}, handlers);
21085
21086                if (preferredHandler && currentHandlers[preferredHandler]) {
21087                    content = currentHandlers[preferredHandler](target, instance);
21088                    handler = preferredHandler;
21089                } else {
21090                    // Run inline and iframe handlers after all other handlers
21091                    $.each(['inline', 'iframe'], function (i, name) {
21092                        delete currentHandlers[name];
21093
21094                        currentHandlers[name] = handlers[name];
21095                    });
21096
21097                    $.each(currentHandlers, function (name, currentHandler) {
21098                        // Handler might be "removed" by setting callback to null
21099                        if (!currentHandler) {
21100                            return true;
21101                        }
21102
21103                        if (
21104                            currentHandler.test &&
21105                            !currentHandler.test(target, instance)
21106                        ) {
21107                            return true;
21108                        }
21109
21110                        content = currentHandler(target, instance);
21111
21112                        if (false !== content) {
21113                            handler = name;
21114                            return false;
21115                        }
21116                    });
21117                }
21118
21119                return {handler: handler, content: content || ''};
21120            }
21121
21122            function Lity(target, options, opener, activeElement) {
21123                var self = this;
21124                var result;
21125                var isReady = false;
21126                var isClosed = false;
21127                var element;
21128                var content;
21129
21130                options = $.extend(
21131                    {},
21132                    _defaultOptions,
21133                    options
21134                );
21135
21136                element = $(options.template);
21137
21138                // -- API --
21139
21140                self.element = function () {
21141                    return element;
21142                };
21143
21144                self.opener = function () {
21145                    return opener;
21146                };
21147
21148                self.options = $.proxy(settings, self, options);
21149                self.handlers = $.proxy(settings, self, options.handlers);
21150
21151                self.resize = function () {
21152                    if (!isReady || isClosed) {
21153                        return;
21154                    }
21155
21156                    content
21157                        .css('max-height', winHeight() + 'px')
21158                        .trigger('lity:resize', [self])
21159                    ;
21160                };
21161
21162                self.close = function () {
21163                    if (!isReady || isClosed) {
21164                        return;
21165                    }
21166
21167                    isClosed = true;
21168
21169                    removeInstance(self);
21170
21171                    var deferred = _deferred();
21172
21173                    // We return focus only if the current focus is inside this instance
21174                    if (
21175                        activeElement &&
21176                        (
21177                            document.activeElement === element[0] ||
21178                            $.contains(element[0], document.activeElement)
21179                        )
21180                    ) {
21181                        try {
21182                            activeElement.focus();
21183                        } catch (e) {
21184                            // Ignore exceptions, eg. for SVG elements which can't be
21185                            // focused in IE11
21186                        }
21187                    }
21188
21189                    content.trigger('lity:close', [self]);
21190
21191                    element
21192                        .removeClass('lity-opened')
21193                        .addClass('lity-closed')
21194                    ;
21195
21196                    transitionEnd(content.add(element))
21197                        .always(function () {
21198                            content.trigger('lity:remove', [self]);
21199                            element.remove();
21200                            element = undefined;
21201                            deferred.resolve();
21202                        })
21203                    ;
21204
21205                    return deferred.promise();
21206                };
21207
21208                // -- Initialization --
21209
21210                result = factory(target, self, options.handlers, options.handler);
21211
21212                element
21213                    .attr(_attrAriaHidden, 'false')
21214                    .addClass('lity-loading lity-opened lity-' + result.handler)
21215                    .appendTo('body')
21216                    .focus()
21217                    .on('click', '[data-lity-close]', function (e) {
21218                        if ($(e.target).is('[data-lity-close]')) {
21219                            self.close();
21220                        }
21221                    })
21222                    .trigger('lity:open', [self])
21223                ;
21224
21225                registerInstance(self);
21226
21227                $.when(result.content)
21228                    .always(ready)
21229                ;
21230
21231                function ready(result) {
21232                    content = $(result)
21233                        .css('max-height', winHeight() + 'px')
21234                    ;
21235
21236                    element
21237                        .find('.lity-loader')
21238                        .each(function () {
21239                            var loader = $(this);
21240
21241                            transitionEnd(loader)
21242                                .always(function () {
21243                                    loader.remove();
21244                                })
21245                            ;
21246                        })
21247                    ;
21248
21249                    element
21250                        .removeClass('lity-loading')
21251                        .find('.lity-content')
21252                        .empty()
21253                        .append(content)
21254                    ;
21255
21256                    isReady = true;
21257
21258                    content
21259                        .trigger('lity:ready', [self])
21260                    ;
21261                }
21262            }
21263
21264            function lity(target, options, opener) {
21265                if (!target.preventDefault) {
21266                    opener = $(opener);
21267                } else {
21268                    target.preventDefault();
21269                    opener = $(this);
21270                    target = opener.data('lity-target') || opener.attr('href') || opener.attr('src');
21271                }
21272
21273                var instance = new Lity(
21274                    target,
21275                    $.extend(
21276                        {},
21277                        opener.data('lity-options') || opener.data('lity'),
21278                        options
21279                    ),
21280                    opener,
21281                    document.activeElement
21282                );
21283
21284                if (!target.preventDefault) {
21285                    return instance;
21286                }
21287            }
21288
21289            lity.version = '2.3.1';
21290            lity.options = $.proxy(settings, lity, _defaultOptions);
21291            lity.handlers = $.proxy(settings, lity, _defaultOptions.handlers);
21292            lity.current = currentInstance;
21293
21294            $(document).on('click.lity', '[data-lity]', lity);
21295
21296            return lity;
21297        }));
21298
21299
21300        /***/
21301    }),
21302    /* 54 */
21303    /***/ (function (module, exports, __webpack_require__) {
21304
21305
21306        /**
21307         * Load required plugin.
21308         */
21309        __webpack_require__(55);
21310
21311
21312        /**
21313         * Configure the plugin.
21314         */
21315
21316        +function ($) {
21317            page.registerVendor('PhotoSwipe');
21318
21319            page.initPhotoSwipe = function () {
21320                $('[data-provide="photoswipe"]').each(function () {
21321                    var tag = $(this),
21322                        selector = tag.dataAttr('photoswipe-selector', '.gallery-item');
21323
21324                    $(tag).photoSwipe(selector);
21325                });
21326            }
21327
21328        }(jQuery);
21329
21330
21331        /***/
21332    }),
21333    /* 55 */
21334    /***/ (function (module, exports, __webpack_require__) {
21335
21336        var require;
21337        var require;
21338        var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
21339        var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
21340        (function e(t, n, r) {
21341            function s(o, u) {
21342                if (!n[o]) {
21343                    if (!t[o]) {
21344                        var a = typeof require == "function" && require;
21345                        if (!u && a) return require(o, !0);
21346                        if (i) return i(o, !0);
21347                        var f = new Error("Cannot find module '" + o + "'");
21348                        throw f.code = "MODULE_NOT_FOUND", f
21349                    }
21350                    var l = n[o] = {exports: {}};
21351                    t[o][0].call(l.exports, function (e) {
21352                        var n = t[o][1][e];
21353                        return s(n ? n : e)
21354                    }, l, l.exports, e, t, n, r)
21355                }
21356                return n[o].exports
21357            }
21358
21359            var i = typeof require == "function" && require;
21360            for (var o = 0; o < r.length; o++) s(r[o]);
21361            return s
21362        })({
21363            1: [function (require, module, exports) {
21364                /*! PhotoSwipe - v4.1.1 - 2015-12-24
21365* http://photoswipe.com
21366* Copyright (c) 2015 Dmitry Semenov; */
21367                (function (root, factory) {
21368                    if (true) {
21369                        !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
21370                            __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
21371                                (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
21372                                __WEBPACK_AMD_DEFINE_FACTORY__),
21373                        __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
21374                    } else {
21375                    }
21376                })(this, function () {
21377
21378                    'use strict';
21379                    var PhotoSwipe = function (template, UiClass, items, options) {
21380
21381                        /*>>framework-bridge*/
21382                        /**
21383                         *
21384                         * Set of generic functions used by gallery.
21385                         *
21386                         * You're free to modify anything here as long as functionality is kept.
21387                         *
21388                         */
21389                        var framework = {
21390                            features: null,
21391                            bind: function (target, type, listener, unbind) {
21392                                var methodName = (unbind ? 'remove' : 'add') + 'EventListener';
21393                                type = type.split(' ');
21394                                for (var i = 0; i < type.length; i++) {
21395                                    if (type[i]) {
21396                                        target[methodName](type[i], listener, false);
21397                                    }
21398                                }
21399                            },
21400                            isArray: function (obj) {
21401                                return (obj instanceof Array);
21402                            },
21403                            createEl: function (classes, tag) {
21404                                var el = document.createElement(tag || 'div');
21405                                if (classes) {
21406                                    el.className = classes;
21407                                }
21408                                return el;
21409                            },
21410                            getScrollY: function () {
21411                                var yOffset = window.pageYOffset;
21412                                return yOffset !== undefined ? yOffset : document.documentElement.scrollTop;
21413                            },
21414                            unbind: function (target, type, listener) {
21415                                framework.bind(target, type, listener, true);
21416                            },
21417                            removeClass: function (el, className) {
21418                                var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
21419                                el.className = el.className.replace(reg, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
21420                            },
21421                            addClass: function (el, className) {
21422                                if (!framework.hasClass(el, className)) {
21423                                    el.className += (el.className ? ' ' : '') + className;
21424                                }
21425                            },
21426                            hasClass: function (el, className) {
21427                                return el.className && new RegExp('(^|\\s)' + className + '(\\s|$)').test(el.className);
21428                            },
21429                            getChildByClass: function (parentEl, childClassName) {
21430                                var node = parentEl.firstChild;
21431                                while (node) {
21432                                    if (framework.hasClass(node, childClassName)) {
21433                                        return node;
21434                                    }
21435                                    node = node.nextSibling;
21436                                }
21437                            },
21438                            arraySearch: function (array, value, key) {
21439                                var i = array.length;
21440                                while (i--) {
21441                                    if (array[i][key] === value) {
21442                                        return i;
21443                                    }
21444                                }
21445                                return -1;
21446                            },
21447                            extend: function (o1, o2, preventOverwrite) {
21448                                for (var prop in o2) {
21449                                    if (o2.hasOwnProperty(prop)) {
21450                                        if (preventOverwrite && o1.hasOwnProperty(prop)) {
21451                                            continue;
21452                                        }
21453                                        o1[prop] = o2[prop];
21454                                    }
21455                                }
21456                            },
21457                            easing: {
21458                                sine: {
21459                                    out: function (k) {
21460                                        return Math.sin(k * (Math.PI / 2));
21461                                    },
21462                                    inOut: function (k) {
21463                                        return -(Math.cos(Math.PI * k) - 1) / 2;
21464                                    }
21465                                },
21466                                cubic: {
21467                                    out: function (k) {
21468                                        return --k * k * k + 1;
21469                                    }
21470                                }
21471                            },
21472
21473                            /**
21474                             *
21475                             * @return {object}
21476                             *
21477                             * {
21478                             *  raf : request animation frame function
21479                             *  caf : cancel animation frame function
21480                             *  transfrom : transform property key (with vendor), or null if not supported
21481                             *  oldIE : IE8 or below
21482                             * }
21483                             *
21484                             */
21485                            detectFeatures: function () {
21486                                if (framework.features) {
21487                                    return framework.features;
21488                                }
21489                                var helperEl = framework.createEl(),
21490                                    helperStyle = helperEl.style,
21491                                    vendor = '',
21492                                    features = {};
21493
21494                                // IE8 and below
21495                                features.oldIE = document.all && !document.addEventListener;
21496
21497                                features.touch = 'ontouchstart' in window;
21498
21499                                if (window.requestAnimationFrame) {
21500                                    features.raf = window.requestAnimationFrame;
21501                                    features.caf = window.cancelAnimationFrame;
21502                                }
21503
21504                                features.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled;
21505
21506                                // fix false-positive detection of old Android in new IE
21507                                // (IE11 ua string contains "Android 4.0")
21508
21509                                if (!features.pointerEvent) {
21510
21511                                    var ua = navigator.userAgent;
21512
21513                                    // Detect if device is iPhone or iPod and if it's older than 
21513iOS 8
21514                                    // http://stackoverflow.com/a/14223920
21515                                    //
21516                                    // This detection is made because of buggy top/bottom toolbars
21517                                    // that don't trigger window.resize event.
21518                                    // For more info refer to _isFixedPosition variable in core.js
21519
21520                                    if (/iP(hone|od)/.test(navigator.platform)) {
21521                                        var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
21522                                        if (v && v.length > 0) {
21523                                            v = parseInt(v[1], 10);
21524                                            if (v >= 1 && v < 8) {
21525                                                features.isOldIOSPhone = true;
21526                                            }
21527                                        }
21528                                    }
21529
21530                                    // Detect old Android (before KitKat)
21531                                    // due to bugs related to position:fixed
21532                                    // http://stackoverflow.com/questions/7184573/pick-up-the-android-version-in-the-browser-by-javascript
21533
21534                                    var match = ua.match(/Android\s([0-9\.]*)/);
21535                                    var androidversion = match ? match[1] : 0;
21536                                    androidversion = parseFloat(androidversion);
21537                                    if (androidversion >= 1) {
21538                                        if (androidversion < 4.4) {
21539                                            features.isOldAndroid = true; // for fixed position bug & performance
21540                                        }
21541                                        features.androidVersion = androidversion; // for touchend bug
21542                                    }
21543                                    features.isMobileOpera = /opera mini|o
21543pera mobi/i.test(ua);
21544
21545                                    // p.s. yes, yes, UA sniffing is bad, propose your solution for above bugs.
21546                                }
21547
21548                                var styleChecks = ['transform', 'perspective', 'animationName'],
21549                                    vendors = ['', 'webkit', 'Moz', 'ms', 'O'],
21550                                    styleCheckItem,
21551                                    styleName;
21552
21553                                for (var i = 0; i < 4; i++) {
21554                                    vendor = vendors[i];
21555
21556                                    for (var a = 0; a < 3; a++) {
21557                                        styleCheckItem = styleChecks[a];
21558
21559                                        // uppercase first letter of property name, if vendor is present
21560                                        styleName = vendor + (vendor ?
21561                                            styleCheckItem.charAt(0).toUpperCase() + styleCheckItem.slice(1) :
21562                                            styleCheckItem);
21563
21564                                        if (!features[styleCheckItem] && styleName in helperStyle) {
21565                                            features[styleCheckItem] = styleName;
21566                                        }
21567                                    }
21568
21569                                    if (vendor && !features.raf) {
21570                                        vendor = vendor.toLowerCase();
21571                                        features.raf = window[vendor + 'RequestAnimationFrame'];
21572                                        if (features.raf) {
21573                                            features.caf = window[vendor + 'CancelAnimationFrame'] ||
21574                                                window[vendor + 'CancelRequestAnimationFrame'];
21575                                        }
21576                                    }
21577                                }
21578
21579                                if (!features.raf) {
21580                                    var lastTime = 0;
21581                                    features.raf = function (fn) {
21582                                        var currTime = new Date().getTime();
21583                                        var timeToCall = Math.max(0, 16 - (currTime - lastTime));
21584                                        var id = window.setTimeout(function () {
21585                                            fn(currTime + timeToCall);
21586                                        }, timeToCall);
21587                                        lastTime = currTime + timeToCall;
21588                                        return id;
21589                                    };
21590                                    features.caf = function (id) {
21591                                        clearTimeout(id);
21592                                    };
21593                                }
21594
21595                                // Detect SVG support
21596                                features.svg = !!document.createElementNS &&
21597                                    !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect;
21598
21599                                framework.features = features;
21600
21601                                return features;
21602                            }
21603                        };
21604
21605                        framework.detectFeatures();
21606
21607// Override addEventListener for old versions of IE
21608                        if (framework.features.oldIE) {
21609
21610                            framework.bind = function (target, type, listener, unbind) {
21611
21612                                type = type.split(' ');
21613
21614                                var methodName = (unbind ? 'detach' : 'attach') + 'Event',
21615                                    evName,
21616                                    _handleEv = function () {
21617                                        listener.handleEvent.call(listener);
21618                                    };
21619
21620                                for (var i = 0; i < type.length; i++) {
21621                                    evName = type[i];
21622                                    if (evName) {
21623
21624                                        if (typeof listener === 'object' && listener.handleEvent) {
21625                                            if (!unbind) {
21626                                                listener['oldIE' + evName] = _handleEv;
21627                                            } else {
21628                                                if (!listener['oldIE' + evName]) {
21629                                                    return false;
21630                                                }
21631                                            }
21632
21633                                            target[methodName]('on' + evName, listener['oldIE' + evName]);
21634                                        } else {
21635                                            target[methodName]('on' + evName, listener);
21636                                        }
21637
21638                                    }
21639                                }
21640                            };
21641
21642                        }
21643
21644                        /*>>framework-bridge*/
21645
21646                        /*>>core*/
21647//function(template, UiClass, items, options)
21648
21649                        var self = this;
21650
21651                        /**
21652                         * Static vars, don't change unless you know what you're doing.
21653                         */
21654                        var DOUBLE_TAP_RADIUS = 25,
21655                            NUM_HOLDERS = 3;
21656
21657                        /**
21658                         * Options
21659                         */
21660                        var _options = {
21661                            allowPanToNext: true,
21662                            spacing: 0.12,
21663                            bgOpacity: 1,
21664                            mouseUsed: false,
21665                            loop: true,
21666                            pinchToClose: true,
21667                            closeOnScroll: true,
21668                            closeOnVerticalDrag: true,
21669                            verticalDragRange: 0.75,
21670                            hideAnimationDuration: 333,
21671                            showAnimationDuration: 333,
21672                            showHideOpacity: false,
21673                            focus: true,
21674                            escKey: true,
21675                            arrowKeys: true,
21676                            mainScrollEndFriction: 0.35,
21677                            panEndFriction: 0.35,
21678                            isClickableElement: function (el) {
21679                                return el.tagName === 'A';
21680                            },
21681                            getDoubleTapZoom: function (isMouseClick, item) {
21682                                if (isMouseClick) {
21683                                    return 1;
21684                                } else {
21685                                    return item.initialZoomLevel < 0.7 ? 1 : 1.33;
21686                                }
21687                            },
21688                            maxSpreadZoom: 1.33,
21689                            modal: true,
21690
21691                            // not fully implemented yet
21692                            scaleMode: 'fit' // TODO
21693                        };
21694                        framework.extend(_options, options);
21695
21696
21697                        /**
21698                         * Private helper variables & functions
21699                         */
21700
21701                        var _getEmptyPoint = function () {
21702                            return {x: 0, y: 0};
21703                        };
21704
21705                        var _isOpen,
21706                            _isDestroying,
21707                            _closedByScroll,
21708                            _currentItemIndex,
21709                            _containerStyle,
21710                            _containerShiftIndex,
21711                            _currPanDist = _getEmptyPoint(),
21712                            _startPanOffset = _getEmptyPoint(),
21713                            _panOffset = _getEmptyPoint(),
21714                            _upMoveEvents, // drag move, drag end & drag cancel events array
21715                            _downEvents, // drag start events array
21716                            _globalEventHandlers,
21717                            _viewportSize = {},
21718                            _currZoomLevel,
21719                            _startZoomLevel,
21720                            _translatePrefix,
21721                            _translateSufix,
21722                            _updateSizeInterval,
21723                            _itemsNeedUpdate,
21724                            _currPositionIndex = 0,
21725                            _offset = {},
21726                            _slideSize = _getEmptyPoint(), // size of slide area, including spacing
21727                            _itemHolders,
21728                            _prevItemIndex,
21729                            _indexDiff = 0, // difference of indexes since last content update
21730                            _dragStartEvent,
21731                            _dragMoveEvent,
21732                            _dragEndEvent,
21733                            _dragCancelEvent,
21734                            _transformKey,
21735                            _pointerEventEnabled,
21736                            _isFixedPosition = true,
21737                            _likelyTouchDevice,
21738                            _modules = [],
21739                            _requestAF,
21740                            _cancelAF,
21741                            _initalClassName,
21742                            _initalWindowScrollY,
21743                            _oldIE,
21744                            _currentWindowScrollY,
21745                            _features,
21746                            _windowVisibleSize = {},
21747                            _renderMaxResolution = false,
21748
21749                            // Registers PhotoSWipe module (History, Controller ...)
21750                            _registerModule = function (name, module) {
21751                                framework.extend(self, module.publicMethods);
21752                                _modules.push(name);
21753                            },
21754
21755                            _getLoopedId = function (index) {
21756                                var numSlides = _getNumItems();
21757                                if (index > numSlides - 1) {
21758                                    return index - numSlides;
21759                                } else if (index < 0) {
21760                                    return numSlides + index;
21761                                }
21762                                return index;
21763                            },
21764
21765                            // Micro bind/trigger
21766                            _listeners = {},
21767                            _listen = function (name, fn) {
21768                                if (!_listeners[name]) {
21769                                    _listeners[name] = [];
21770                                }
21771                                return _listeners[name].push(fn);
21772                            },
21773                            _shout = function (name) {
21774                                var listeners = _listeners[name];
21775
21776                                if (listeners) {
21777                                    var args = Array.prototype.slice.call(arguments);
21778                                    args.shift();
21779
21780                                    for (var i = 0; i < listeners.length; i++) {
21781                                        listeners[i].apply(self, args);
21782                                    }
21783                                }
21784                            },
21785
21786                            _getCurrentTime = function () {
21787                                return new Date().getTime();
21788                            },
21789                            _applyBgOpacity = function (opacity) {
21790                                _bgOpacity = opacity;
21791                                self.bg.style.opacity = opacity * _options.bgOpacity;
21792                            },
21793
21794                            _applyZoomTransform = function (styleObj, x, y, zoom, item) {
21795                                if (!_renderMaxResolution || (item && item !== self.currItem)) {
21796                                    zoom = zoom / (item ? item.fitRatio : self.currItem.fitRatio);
21797                                }
21798
21799                                styleObj[_transformKey] = _translatePrefix + x + 'px, ' + y + 'px' + _translateSufix + ' scale(' + zoom + ')';
21800                            },
21801                            _applyCurrentZoomPan = function (allowRenderResolution) {
21802                                if (_currZoomElementStyle) {
21803
21804                                    if (allowRenderResolution) {
21805                                        if (_currZoomLevel > self.currItem.fitRatio) {
21806                                            if (!_renderMaxResolution) {
21807                                                _setImageSize(self.currItem, false, true);
21808                                                _renderMaxResolution = true;
21809                                            }
21810                                        } else {
21811                                            if (_renderMaxResolution) {
21812                                                _setImageSize(self.currItem);
21813                                                _renderMaxResolution = false;
21814                                            }
21815                                        }
21816                                    }
21817
21818
21819                                    _applyZoomTransform(_currZoomElementStyle, _panOffset.x, _panOffset.y, _currZoomLevel);
21820                                }
21821                            },
21822                            _applyZoomPanToItem = function (item) {
21823                                if (item.container) {
21824
21825                                    _applyZoomTransform(item.container.style,
21826                                        item.initialPosition.x,
21827                                        item.initialPosition.y,
21828                                        item.initialZoomLevel,
21829                                        item);
21830                                }
21831                            },
21832                            _setTranslateX = function (x, elStyle) {
21833                                elStyle[_transformKey] = _translatePrefix + x + 'px, 0px' + _translateSufix;
21834                            },
21835                            _moveMainScroll = function (x, dragging) {
21836
21837                                if (!_options.loop && dragging) {
21838                                    var newSlideIndexOffset = _currentItemIndex + (_slideSize.x * _currPositionIndex - x) / _slideSize.x,
21839                                        delta = Math.round(x - _mainScrollPos.x);
21840
21841                                    if ((newSlideIndexOffset < 0 && delta > 0) ||
21842                                        (newSlideIndexOffset >= _getNumItems() - 1 && delta < 0)) {
21843                                        x = _mainScrollPos.x + delta * _options.mainScrollEndFriction;
21844                                    }
21845                                }
21846
21847                                _mainScrollPos.x = x;
21848                                _setTranslateX(x, _containerStyle);
21849                            },
21850                            _calculatePanOffset = function (axis, zoomLevel) {
21851                                var m = _midZoomPoint[axis] - _offset[axis];
21852                                return _startPanOffset[axis] + _currPanDist[axis] + m - m * (zoomLevel / _startZoomLevel);
21853                            },
21854
21855                            _equalizePoints = function (p1, p2) {
21856                                p1.x = p2.x;
21857                                p1.y = p2.y;
21858                                if (p2.id) {
21859                                    p1.id = p2.id;
21860                                }
21861                            },
21862                            _roundPoint = function (p) {
21863                                p.x = Math.round(p.x);
21864                                p.y = Math.round(p.y);
21865                            },
21866
21867                            _mouseMoveTimeout = null,
21868                            _onFirstMouseMove = function () {
21869                                // Wait until mouse move event is fired at least twice during 100ms
21870                                // We do this, because some mobile browsers trigger it on touchstart
21871                                if (_mouseMoveTimeout) {
21872                                    framework.unbind(document, 'mousemove', _onFirstMouseMove);
21873                                    framework.addClass(template, 'pswp--has_mouse');
21874                                    _options.mouseUsed = true;
21875                                    _shout('mouseUsed');
21876                                }
21877                                _mouseMoveTimeout = setTimeout(function () {
21878                                    _mouseMoveTimeout = null;
21879                                }, 100);
21880                            },
21881
21882                            _bindEvents = function () {
21883                                framework.bind(document, 'keydown', self);
21884
21885                                if (_features.transform) {
21886                                    // don't bind click event in browsers that don't support transform (mostly IE8)
21887                                    framework.bind(self.scrollWrap, 'click', self);
21888                                }
21889
21890
21891                                if (!_options.mouseUsed) {
21892                                    framework.bind(document, 'mousemove', _onFirstMouseMove);
21893                                }
21894
21895                                framework.bind(window, 'resize scroll', self);
21896
21897                                _shout('bindEvents');
21898                            },
21899
21900                            _unbindEvents = function () {
21901                                framework.unbind(window, 'resize', self);
21902                                framework.unbind(window, 'scroll', _globalEventHandlers.scroll);
21903                                framework.unbind(document, 'keydown', self);
21904                                framework.unbind(document, 'mousemove', _onFirstMouseMove);
21905
21906                                if (_features.transform) {
21907                                    framework.unbind(self.scrollWrap, 'click', self);
21908                                }
21909
21910                                if (_isDragging) {
21911                                    framework.unbind(window, _upMoveEvents, self);
21912                                }
21913
21914                                _shout('unbindEvents');
21915                            },
21916
21917                            _calculatePanBounds = function (zoomLevel, update) {
21918                                var bounds = _calculateItemSize(self.currItem, _viewportSize, zoomLevel);
21919                                if (update) {
21920                                    _currPanBounds = bounds;
21921                                }
21922                                return bounds;
21923                            },
21924
21925                            _getMinZoomLevel = function (item) {
21926                                if (!item) {
21927                                    item = self.currItem;
21928                                }
21929                                return item.initialZoomLevel;
21930                            },
21931                            _getMaxZoomLevel = function (item) {
21932                                if (!item) {
21933                                    item = self.currItem;
21934                                }
21935                                return item.w > 0 ? _options.maxSpreadZoom : 1;
21936                            },
21937
21938                            // Return true if offset is out of the bounds
21939                            _modifyDestPanOffset = function (axis, destPanBounds, destPanOffset, destZoomLevel) {
21940                                if (destZoomLevel === self.currItem.initialZoomLevel) {
21941                                    destPanOffset[axis] = self.currItem.initialPosition[axis];
21942                                    return true;
21943                                } else {
21944                                    destPanOffset[axis] = _calculatePanOffset(axis, destZoomLevel);
21945
21946                                    if (destPanOffset[axis] > destPanBounds.min[axis]) {
21947                                        destPanOffset[axis] = destPanBounds.min[axis];
21948                                        return true;
21949                                    } else if (destPanOffset[axis] < destPanBounds.max[axis]) {
21950                                        destPanOffset[axis] = destPanBounds.max[axis];
21951                                        return true;
21952                                    }
21953                                }
21954                                return false;
21955                            },
21956
21957                            _setupTransforms = function () {
21958
21959                                if (_transformKey) {
21960                                    // setup 3d transforms
21961                                    var allow3dTransform = _features.perspective && !_likelyTouchDevice;
21962                                    _translatePrefix = 'translate' + (allow3dTransform ? '3d(' : '(');
21963                                    _translateSufix = _features.perspective ? ', 0px)' : ')';
21964                                    return;
21965                                }
21966
21967                                // Override zoom/pan/move functions in case old browser is used (most likely IE)
21968                                // (so they use left/top/width/height, instead of CSS transform)
21969
21970                                _transformKey = 'left';
21971                                framework.addClass(template, 'pswp--ie');
21972
21973                                _setTranslateX = function (x, elStyle) {
21974                                    elStyle.left = x + 'px';
21975                                };
21976                                _applyZoomPanToItem = function (item) {
21977
21978                                    var zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio,
21979                                        s = item.container.style,
21980                                        w = zoomRatio * item.w,
21981                                        h = zoomRatio * item.h;
21982
21983                                    s.width = w + 'px';
21984                                    s.height = h + 'px';
21985                                    s.left = item.initialPosition.x + 'px';
21986                                    s.top = item.initialPosition.y + 'px';
21987
21988                                };
21989                                _applyCurrentZoomPan = function () {
21990                                    if (_currZoomElementStyle) {
21991
21992                                        var s = _currZoomElementStyle,
21993                                            item = self.currItem,
21994                                            zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio,
21995                                            w = zoomRatio * item.w,
21996                                            h = zoomRatio * item.h;
21997
21998                                        s.width = w + 'px';
21999                                        s.height = h + 'px';
22000
22001
22002                                        s.left = _panOffset.x + 'px';
22003                                        s.top = _panOffset.y + 'px';
22004                                    }
22005
22006                                };
22007                            },
22008
22009                            _onKeyDown = function (e) {
22010                                var keydownAction = '';
22011                                if (_options.escKey && e.keyCode === 27) {
22012                                    keydownAction = 'close';
22013                                } else if (_options.arrowKeys) {
22014                                    if (e.keyCode === 37) {
22015                                        keydownAction = 'prev';
22016                                    } else if (e.keyCode === 39) {
22017                                        keydownAction = 'next';
22018                                    }
22019                                }
22020
22021                                if (keydownAction) {
22022                                    // don't do anything if special key pressed to prevent from overriding default browser actions
22023                                    // e.g. in Chrome on Mac cmd+arrow-left returns to previous page
22024                                    if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) {
22025                                        if (e.preventDefault) {
22026                                            e.preventDefault();
22027                                        } else {
22028                                            e.returnValue = false;
22029                                        }
22030                                        self[keydownAction]();
22031                                    }
22032                                }
22033                            },
22034
22035                            _onGlobalClick = function (e) {
22036                                if (!e) {
22037                                    return;
22038                                }
22039
22040                                // don't allow click event to pass through when triggering after drag or some other gesture
22041                                if (_moved || _zoomStarted || _mainScrollAnimating || _verticalDragInitiated) {
22042                                    e.preventDefault();
22043                                    e.stopPropagation();
22044                                }
22045                            },
22046
22047                            _updatePageScrollOffset = function () {
22048                                self.setScrollOffset(0, framework.getScrollY());
22049                            };
22050
22051
22052// Micro animation engine
22053                        var _animations = {},
22054                            _numAnimations = 0,
22055                            _stopAnimation = function (name) {
22056                                if (_animations[name]) {
22057                                    if (_animations[name].raf) {
22058                                        _cancelAF(_animations[name].raf);
22059                                    }
22060                                    _numAnimations--;
22061                                    delete _animations[name];
22062                                }
22063                            },
22064                            _registerStartAnimation = function (name) {
22065                                if (_animations[name]) {
22066                                    _stopAnimation(name);
22067                                }
22068                                if (!_animations[name]) {
22069                                    _numAnimations++;
22070                                    _animations[name] = {};
22071                                }
22072                            },
22073                            _stopAllAnimations = function () {
22074                                for (var prop in _animations) {
22075
22076                                    if (_animations.hasOwnProperty(prop)) {
22077                                        _stopAnimation(prop);
22078                                    }
22079
22080                                }
22081                            },
22082                            _animateProp = function (name, b, endProp, d, easingFn, onUp
22082date, onComplete) {
22083                                var startAnimTime = _getCurrentTime(), t;
22084                                _registerStartAnimation(name);
22085
22086                                var animloop = function () {
22087                                    if (_animations[name]) {
22088
22089                                        t = _getCurrentTime() - startAnimTime; // time diff
22090                                        //b - beginning (start prop)
22091                                        //d - anim duration
22092
22093                                        if (t >= d) {
22094                                            _stopAnimation(name);
22095                                            onUpdate(endProp);
22096                                            if (onComplete) {
22097                                                onComplete();
22098                                            }
22099                                            return;
22100                                        }
22101                                        onUpdate((endProp - b) * easingFn(t / d) + b);
22102
22103                                        _animations[name].raf = _requestAF(animloop);
22104                                    }
22105                                };
22106                                animloop();
22107                            };
22108
22109
22110                        var publicMethods = {
22111
22112                            // make a few local variables and functions public
22113                            shout: _shout,
22114                            listen: _listen,
22115                            viewportSize: _viewportSize,
22116                            options: _options,
22117
22118                            isMainScrollAnimating: function () {
22119                                return _mainScrollAnimating;
22120                            },
22121                            getZoomLevel: function () {
22122                                return _currZoomLevel;
22123                            },
22124                            getCurrentIndex: function () {
22125                                return _currentItemIndex;
22126                            },
22127                            isDragging: function () {
22128                                return _isDragging;
22129                            },
22130                            isZooming: function () {
22131                                return _isZooming;
22132                            },
22133                            setScrollOffset: function (x, y) {
22134                                _offset.x = x;
22135                                _currentWindowScrollY = _offset.y = y;
22136                                _shout('updateScrollOffset', _offset);
22137                            },
22138                            applyZoomPan: function (zoomLevel, panX, panY, allowRenderResolution) {
22139                                _panOffset.x = panX;
22140                                _panOffset.y = panY;
22141                                _currZoomLevel = zoomLevel;
22142                                _applyCurrentZoomPan(allowRenderResolution);
22143                            },
22144
22145                            init: function () {
22146
22147                                if (_isOpen || _isDestroying) {
22148                                    return;
22149                                }
22150
22151                                var i;
22152
22153                                self.framework = framework; // basic functionality
22154                                self.template = template; // root DOM element of PhotoSwipe
22155                                self.bg = framework.getChildByClass(template, 'pswp__bg');
22156
22157                                _initalClassName = template.className;
22158                                _isOpen = true;
22159
22160                                _features = framework.detectFeatures();
22161                                _requestAF = _features.raf;
22162                                _cancelAF = _features.caf;
22163                                _transformKey = _features.transform;
22164                                _oldIE = _features.oldIE;
22165
22166                                self.scrollWrap = framework.getChildByClass(template, 'pswp__scroll-wrap');
22167                                self.container = framework.getChildByClass(self.scrollWrap, 'pswp__container');
22168
22169                                _containerStyle = self.container.style; // for fast access
22170
22171                                // Objects that hold slides (there are only 3 in DOM)
22172                                self.itemHolders = _itemHolders = [
22173                                    {el: self.container.children[0], wrap: 0, index: -1},
22174                                    {el: self.container.children[1], wrap: 0, index: -1},
22175                                    {el: self.container.children[2], wrap: 0, index: -1}
22176                                ];
22177
22178                                // hide nearby item holders until initial zoom animation finishes (to avoid extra Paints)
22179                                _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'none';
22180
22181                                _setupTransforms();
22182
22183                                // Setup global events
22184                                _globalEventHandlers = {
22185                                    resize: self.updateSize,
22186                                    scroll: _updatePageScrollOffset,
22187                                    keydown: _onKeyDown,
22188                                    click: _onGlobalClick
22189                                };
22190
22191                                // disable show/hide effects on old browsers that don't support CSS animations or transforms,
22192                                // old IOS, Android and Opera mobile. Blackberry seems to work fine, even older models.
22193                                var oldPhone = _features.isOldIOSPhone || _features.isOldAndroid || _features.isMobileOpera;
22194                                if (!_features.animationName || !_features.transform || oldPhone) {
22195                                    _options.showAnimationDuration = _options.hideAnimationDuration = 0;
22196                                }
22197
22198                                // init modules
22199                                for (i = 0; i < _modules.length; i++) {
22200                                    self['init' + _modules[i]]();
22201                                }
22202
22203                                // init
22204                                if (UiClass) {
22205                                    var ui = self.ui = new UiClass(self, framework);
22206                                    ui.init();
22207                                }
22208
22209                                _shout('firstUpdate');
22210                                _currentItemIndex = _currentItemIndex || _options.index || 0;
22211                                // validate index
22212                                if (isNaN(_currentItemIndex) || _currentItemIndex < 0 || _currentItemIndex >= _getNumItems()) {
22213                                    _currentItemIndex = 0;
22214                                }
22215                                self.currItem = _getItemAt(_currentItemIndex);
22216
22217
22218                                if (_features.isOldIOSPhone || _features.isOldAndroid) {
22219                                    _isFixedPosition = false;
22220                                }
22221
22222                                template.setAttribute('aria-hidden', 'false');
22223                                if (_options.modal) {
22224                                    if (!_isFixedPosition) {
22225                                        template.style.position = 'absolute';
22226                                        template.style.top = framework.getScrollY() + 'px';
22227                                    } else {
22228                                        template.style.position = 'fixed';
22229                                    }
22230                                }
22231
22232                                if (_currentWindowScrollY === undefined) {
22233                                    _shout('initialLayout');
22234                                    _currentWindowScrollY = _initalWindowScrollY = framework.getScrollY();
22235                                }
22236
22237                                // add classes to root element of PhotoSwipe
22238                                var rootClasses = 'pswp--open ';
22239                                if (_options.mainClass) {
22240                                    rootClasses += _options.mainClass + ' ';
22241                                }
22242                                if (_options.showHideOpacity) {
22243                                    rootClasses += 'pswp--animate_opacity ';
22244                                }
22245                                rootClasses += _likelyTouchDevice ? 'pswp--touch' : 'pswp--notouch';
22246                                rootClasses += _features.animationName ? ' pswp--css_animation' : '';
22247                                rootClasses += _features.svg ? ' pswp--svg' : '';
22248                                framework.addClass(template, rootClasses);
22249
22250                                self.updateSize();
22251
22252                                // initial update
22253                                _containerShiftIndex = -1;
22254                                _indexDiff = null;
22255                                for (i = 0; i < NUM_HOLDERS; i++) {
22256                                    _setTranslateX((i + _containerShiftIndex) * _slideSize.x, _itemHolders[i].el.style);
22257                                }
22258
22259                                if (!_oldIE) {
22260                                    framework.bind(self.scrollWrap, _downEvents, self); // no dragging for old IE
22261                                }
22262
22263                                _listen('initialZoomInEnd', function () {
22264                                    self.setContent(_itemHolders[0], _currentItemIndex - 1);
22265                                    self.setContent(_itemHolders[2], _currentItemIndex + 1);
22266
22267                                    _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'block';
22268
22269                                    if (_options.focus) {
22270                                        // focus causes layout,
22271                                        // which causes lag during the animation,
22272                                        // that's why we delay it untill the initial zoom transition ends
22273                                        template.focus();
22274                                    }
22275
22276
22277                                    _bindEvents();
22278                                });
22279
22280                                // set content for center slide (first time)
22281                                self.setContent(_itemHolders[1], _currentItemIndex);
22282
22283                                self.updateCurrItem();
22284
22285                                _shout('afterInit');
22286
22287                                if (!_isFixedPosition) {
22288
22289                                    // On all versions of iOS lower than 8.0, we check size of viewport every second.
22290                                    //
22291                                    // This is done to detect when Safari top & bottom bars appear,
22292                                    // as this action doesn't trigger any events (like resize).
22293                                    //
22294                                    // On iOS8 they fixed this.
22295                                    //
22296                                    // 10 Nov 2014: iOS 7 usage ~40%. iOS 8 usage 56%.
22297
22298                                    _updateSizeInterval = setInterval(function () {
22299                                        if (!_numAnimations && !_isDragging && !_isZooming && (_currZoomLevel === self.currItem.initialZoomLevel)) {
22300                                            self.updateSize();
22301                                        }
22302                                    }, 1000);
22303                                }
22304
22305                                framework.addClass(template, 'psw
22305p--visible');
22306                            },
22307
22308                            // Close the gallery, then destroy it
22309                            close: function () {
22310                                if (!_isOpen) {
22311                                    return;
22312                                }
22313
22314                                _isOpen = false;
22315                                _isDestroying = true;
22316                                _shout('close');
22317                                _unbindEvents();
22318
22319                                _showOrHide(self.currItem, null, true, self.destroy);
22320                            },
22321
22322                            // destroys the gallery (unbinds events, cleans up intervals and timeouts to avoid memory leaks)
22323                            destroy: function () {
22324                                _shout('destroy');
22325
22326                                if (_showOrHideTimeout) {
22327                                    clearTimeout(_showOrHideTimeout);
22328                                }
22329
22330                                template.setAttribute('aria-hidden', 'true');
22331                                template.className = _initalClassName;
22332
22333                                if (_updateSizeInterval) {
22334                                    clearInterval(_updateSizeInterval);
22335                                }
22336
22337                                framework.unbind(self.scrollWrap, _downEvents, self);
22338
22339                                // we unbind scroll event at the end, as closing animation may depend on it
22340                                framework.unbind(window, 'scroll', self);
22341
22342                                _stopDragUpdateLoop();
22343
22344                                _stopAllAnimations();
22345
22346                                _listeners = null;
22347                            },
22348
22349                            /**
22350                             * Pan image to position
22351                             * @param {Number} x
22352                             * @param {Number} y
22353                             * @param {Boolean} force Will ignore bounds if set to true.
22354                             */
22355                            panTo: function (x, y, force) {
22356                                if (!force) {
22357                                    if (x > _currPanBounds.min.x) {
22358                                        x = _currPanBounds.min.x;
22359                                    } else if (x < _currPanBounds.max.x) {
22360                                        x = _currPanBounds.max.x;
22361                                    }
22362
22363                                    if (y > _currPanBounds.min.y) {
22364                                        y = _currPanBounds.min.y;
22365                                    } else if (y < _currPanBounds.max.y) {
22366                                        y = _currPanBounds.max.y;
22367                                    }
22368                                }
22369
22370                                _panOffset.x = x;
22371                                _panOffset.y = y;
22372                                _applyCurrentZoomPan();
22373                            },
22374
22375                            handleEvent: function (e) {
22376                                e = e || window.event;
22377                                if (_globalEventHandlers[e.type]) {
22378                                    _globalEventHandlers[e.type](e);
22379                                }
22380                            },
22381
22382
22383                            goTo: function (index) {
22384
22385                                index = _getLoopedId(index);
22386
22387                                var diff = index - _currentItemIndex;
22388                                _indexDiff = diff;
22389
22390                                _currentItemIndex = index;
22391                                self.currItem = _getItemAt(_currentItemIndex);
22392                                _currPositionIndex -= diff;
22393
22394                                _moveMainScroll(_slideSize.x * _currPositionIndex);
22395
22396
22397                                _stopAllAnimations();
22398                                _mainScrollAnimating = false;
22399
22400                                self.updateCurrItem();
22401                            },
22402                            next: function () {
22403                                self.goTo(_currentItemIndex + 1);
22404                            },
22405                            prev: function () {
22406                                self.goTo(_currentItemIndex - 1);
22407                            },
22408
22409                            // update current zoom/pan objects
22410                            updateCurrZoomItem: function (emulateSetContent) {
22411                                if (emulateSetContent) {
22412                                    _shout('beforeChange', 0);
22413                                }
22414
22415                                // itemHolder[1] is middle (current) item
22416                                if (_itemHolders[1].el.children.length) {
22417                                    var zoomElement = _itemHolders[1].el.children[0];
22418                                    if (framework.hasClass(zoomElement, 'pswp__zoom-wrap')) {
22419                                        _currZoomElementStyle = zoomElement.style;
22420                                    } else {
22421                                        _currZoomElementStyle = null;
22422                                    }
22423                                } else {
22424                                    _currZoomElementStyle = null;
22425                                }
22426
22427                                _currPanBounds = self.currItem.bounds;
22428                                _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel;
22429
22430                                _panOffset.x = _currPanBounds.center.x;
22431                                _panOffset.y = _currPanBounds.center.y;
22432
22433                                if (emulateSetContent) {
22434                                    _shout('afterChange');
22435                                }
22436                            },
22437
22438
22439                            invalidateCurrItems: function () {
22440                                _itemsNeedUpdate = true;
22441                                for (var i = 0; i < NUM_HOLDERS; i++) {
22442                                    if (_itemHolders[i].item) {
22443                                        _itemHolders[i].item.needsUpdate = true;
22444                                    }
22445                                }
22446                            },
22447
22448                            updateCurrItem: function (beforeAnimation) {
22449
22450                                if (_indexDiff === 0) {
22451                                    return;
22452                                }
22453
22454                                var diffAbs = Math.abs(_indexDiff),
22455                                    tempHolder;
22456
22457                                if (beforeAnimation && diffAbs < 2) {
22458                                    return;
22459                                }
22460
22461
22462                                self.currItem = _getItemAt(_currentItemIndex);
22463                                _renderMaxResolution = false;
22464
22465                                _shout('beforeChange', _indexDiff);
22466
22467                                if (diffAbs >= NUM_HOLDERS) {
22468                                    _containerShiftIndex += _indexDiff + (_indexDiff > 0 ? -NUM_HOLDERS : NUM_HOLDERS);
22469                                    diffAbs = NUM_HOLDERS;
22470                                }
22471                                for (var i = 0; i < diffAbs; i++) {
22472                                    if (_indexDiff > 0) {
22473                                        tempHolder = _itemHolders.shift();
22474                                        _itemHolders[NUM_HOLDERS - 1] = tempHolder; // move first to last
22475
22476                                        _containerShiftIndex++;
22477                                        _setTranslateX((_containerShiftIndex + 2) * _slideSize.x, tempHolder.el.style);
22478                                        self.setContent(tempHolder, _currentItemIndex - diffAbs + i + 1 + 1);
22479                                    } else {
22480                                        tempHolder = _itemHolders.pop();
22481                                        _itemHolders.unshift(tempHolder); // move last to first
22482
22483                                        _containerShiftIndex--;
22484                                        _setTranslateX(_containerShiftIndex * _slideSize.x, tempHolder.el.style);
22485                                        self.setContent(tempHolder, _currentItemIndex + diffAbs - i - 1 - 1);
22486                                    }
22487
22488                                }
22489
22490                                // reset zoom/pan on previous item
22491                                if (_currZoomElementStyle && Math.abs(_indexDiff) === 1) {
22492
22493                                    var prevItem = _getItemAt(_prevItemIndex);
22494                                    if (prevItem.initialZoomLevel !== _currZoomLevel) {
22495                                        _calculateItemSize(prevItem, _viewportSize);
22496                                        _setImageSize(prevItem);
22497                                        _applyZoomPanToItem(prevItem);
22498                                    }
22499
22500                                }
22501
22502                                // reset diff after update
22503                                _indexDiff = 0;
22504
22505                                self.updateCurrZoomItem();
22506
22507                                _prevItemIndex = _currentItemIndex;
22508
22509                                _shout('afterChange');
22510
22511                            },
22512
22513
22514                            updateSize: function (force) {
22515
22516                                if (!_isFixedPosition && _options.modal) {
22517                                    var windowScrollY = framework.getScrollY();
22518                                    if (_currentWindowScrollY !== windowScrollY) {
22519                                        template.style.top = windowScrollY + 'px';
22520                                        _currentWindowScrollY = windowScrollY;
22521                                    }
22522                                    if (!force && _windowVisibleSize.x === window.innerWidth && _windowVisibleSize.y === window.innerHeight) {
22523                                        return;
22524                                    }
22525                                    _windowVisibleSize.x = window.innerWidth;
22526                                    _windowVisibleSize.y = window.innerHeight;
22527
22528                                    //template.style.width = _windowVisibleSize.x + 'px';
22529                                    template.style.height = _windowVisibleSize.y + 'px';
22530                                }
22531
22532
22533                                _viewportSize.x = self.scrollWrap.clientWidth;
22534                                _viewportSize.y = self.scrollWrap.clientHeight;
22535
22536                                _updatePageScrollOffset();
22537
22538                                _slideSize.x = _viewportSize.x + Math.round(_viewportSize.x * _options.spacing);
22539                                _slideSize.y = _viewportSize.y;
22540
22541                                _moveMainScroll(_slideSize.x * _currPositionIndex);
22542
22543                                _shout('beforeResize'); // even may be used for example to switch image sources
22544
22545
22546                                // don't re-calculate size on inital size update
22547                                if (_containerShiftIndex !== undefined) {
22548
22549                                    var holder,
22550                                        item,
22551                                        hIndex;
22552
22553                                    for (var i = 0; i < NUM_HOLDERS; i++) {
22554                                        holder = _itemHolders[i];
22555                                        _setTranslateX((i + _containerShiftIndex) * _slideSize.x, holder.el.style);
22556
22557                                        hIndex = _currentItemIndex + i - 1;
22558
22559                                        if (_options.loop && _getNumItems() > 2) {
22560                                            hIndex = _getLoopedId(hIndex);
22561                                        }
22562
22563                                        // update zoom level on items and refresh source (if needsUpdate)
22564                                        item = _getItemAt(hIndex);
22565
22566                                        // re-render gallery item if `needsUpdate`,
22567                                        // or doesn't have `bounds` (entirely new slide object)
22568                                        if (item && (_itemsNeedUpdate || item.needsUpdate || !item.bounds)) {
22569
22570                                            self.cleanSlide(item);
22571
22572                                            self.setContent(holder, hIndex);
22573
22574                                            // if "center" slide
22575                                            if (i === 1) {
22576                                                self.currItem = item;
22577                                                self.updateCurrZoomItem(true);
22578                                            }
22579
22580                                            item.needsUpdate = false;
22581
22582                                        } else if (holder.index === -1 && hIndex >= 0) {
22583                                            // add content first time
22584                                            self.setContent(holder, hIndex);
22585                                        }
22586                                        if (item && item.container) {
22587                                            _calculateItemSize(item, _viewportSize);
22588                                            _setImageSize(item);
22589                                            _applyZoomPanToItem(item);
22590                                        }
22591
22592                                    }
22593                                    _itemsNeedUpdate = false;
22594                                }
22595
22596                                _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel;
22597                                _currPanBounds = self.currItem.bounds;
22598
22599                                if (_currPanBounds) {
22600                                    _panOffset.x = _currPanBounds.center.x;
22601                                    _panOffset.y = _currPanBounds.center.y;
22602                                    _applyCurrentZoomPan(true);
22603                                }
22604
22605                                _shout('resize');
22606                            },
22607
22608                            // Zoom current item to
22609                            zoomTo: function (destZoomLevel, centerPoint, speed, easingFn, updateFn) {
22610                                /*
22611			if(destZoomLevel === 'fit') {
22612				destZoomLevel = self.currItem.fitRatio;
22613			} else if(destZoomLevel === 'fill') {
22614				destZoomLevel = self.currItem.fillRatio;
22615			}
22616		*/
22617
22618                                if (centerPoint) {
22619                                    _startZoomLevel = _currZoomLevel;
22620                                    _midZoomPoint.x = Math.abs(centerPoint.x) - _panOffset.x;
22621                                    _midZoomPoint.y = Math.abs(centerPoint.y) - _panOffset.y;
22622                                    _equalizePoints(_startPanOffset, _panOffset);
22623                                }
22624
22625                                var destPanBounds = _calculatePanBounds(destZoomLevel, false),
22626                                    destPanOffset = {};
22627
22628                                _modifyDestPanOffset('x', destPanBounds, destPanOffset, destZoomLevel);
22629                                _modifyDestPanOffset('y', destPanBounds, destPanOffset, destZoomLevel);
22630
22631                                var initialZoomLevel = _currZoomLevel;
22632                                var initialPanOffset = {
22633                                    x: _panOffset.x,
22634                                    y: _panOffset.y
22635                                };
22636
22637                                _roundPoint(destPanOffset);
22638
22639                                var onUpdate = function (now) {
22640                                    if (now === 1) {
22641                                        _currZoomLevel = destZoomLevel;
22642                                        _panOffset.x = destPanOffset.x;
22643                                        _panOffset.y = destPanOffset.y;
22644                                    } else {
22645                                        _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel;
22646                                        _panOffset.x = (destPanOffset.x - initialPanOffset.x) * now + initialPanOffset.x;
22647                                        _panOffset.y = (destPanOffset.y - initialPanOffset.
22647y) * now + initialPanOffset.y;
22648                                    }
22649
22650                                    if (updateFn) {
22651                                        updateFn(now);
22652                                    }
22653
22654                                    _applyCurrentZoomPan(now === 1);
22655                                };
22656
22657                                if (speed) {
22658                                    _animateProp('customZoomTo', 0, 1, speed, easingFn || framework.easing.sine.inOut, onUpdate);
22659                                } else {
22660                                    onUpdate(1);
22661                                }
22662                            }
22663
22664
22665                        };
22666
22667
22668                        /*>>core*/
22669
22670                        /*>>gestures*/
22671                        /**
22672                         * Mouse/touch/pointer event handlers.
22673                         *
22674                         * separated from @core.js for readability
22675                         */
22676
22677                        var MIN_SWIPE_DISTANCE = 30,
22678                            DIRECTION_CHECK_OFFSET = 10; // amount of pixels to drag to determine direction of swipe
22679
22680                        var _gestureStartTime,
22681                            _gestureCheckSpeedTime,
22682
22683                            // pool of objects that are used during dragging of zooming
22684                            p = {}, // first point
22685                            p2 = {}, // second point (for zoom gesture)
22686                            delta = {},
22687                            _currPoint = {},
22688                            _startPoint = {},
22689                            _currPointers = [],
22690                            _startMainScrollPos = {},
22691                            _releaseAnimData,
22692                            _posPoints = [], // array of points during dragging, used to determine type of gesture
22693                            _tempPoint = {},
22694
22695                            _isZoomingIn,
22696                            _verticalDragInitiated,
22697                            _oldAndroidTouchEndTimeout,
22698                            _currZoomedItemIndex = 0,
22699                            _centerPoint = _getEmptyPoint(),
22700                            _lastReleaseTime = 0,
22701                            _isDragging, // at least one pointer is down
22702                            _isMultitouch, // at least two _pointers are down
22703                            _zoomStarted, // zoom level changed during zoom gesture
22704                            _moved,
22705                            _dragAnimFrame,
22706                            _mainScrollShifted,
22707                            _currentPoints, // array of current touch points
22708                            _isZooming,
22709                            _currPointsDistance,
22710                            _startPointsDistance,
22711                            _currPanBounds,
22712                            _mainScrollPos = _getEmptyPoint(),
22713                            _currZoomElementStyle,
22714                            _mainScrollAnimating, // true, if animation after swipe gesture is running
22715                            _midZoomPoint = _getEmptyPoint(),
22716                            _currCenterPoint = _getEmptyPoint(),
22717                            _direction,
22718                            _isFirstMove,
22719                            _opacityChanged,
22720                            _bgOpacity,
22721                            _wasOverInitialZoom,
22722
22723                            _isEqualPoints = function (p1, p2) {
22724                                return p1.x === p2.x && p1.y === p2.y;
22725                            },
22726                            _isNearbyPoints = function (touch0, touch1) {
22727                                return Math.abs(touch0.x - touch1.x) < DOUBLE_TAP_RADIUS && Math.abs(touch0.y - touch1.y) < DOUBLE_TAP_RADIUS;
22728                            },
22729                            _calculatePointsDistance = function (p1, p2) {
22730                                _tempPoint.x = Math.abs(p1.x - p2.x);
22731                                _tempPoint.y = Math.abs(p1.y - p2.y);
22732                                return Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y);
22733                            },
22734                            _stopDragUpdateLoop = function () {
22735                                if (_dragAnimFrame) {
22736                                    _cancelAF(_dragAnimFrame);
22737                                    _dragAnimFrame = null;
22738                                }
22739                            },
22740                            _dragUpdateLoop = function () {
22741                                if (_isDragging) {
22742                                    _dragAnimFrame = _requestAF(_dragUpdateLoop);
22743                                    _renderMovement();
22744                                }
22745                            },
22746                            _canPan = function () {
22747                                return !(_options.scaleMode === 'fit' && _currZoomLevel === self.currItem.initialZoomLevel);
22748                            },
22749
22750                            // find the closest parent DOM element
22751                            _closestElement = function (el, fn) {
22752                                if (!el || el === document) {
22753                                    return false;
22754                                }
22755
22756                                // don't search elements above pswp__scroll-wrap
22757                                if (el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1) {
22758                                    return false;
22759                                }
22760
22761                                if (fn(el)) {
22762                                    return el;
22763                                }
22764
22765                                return _closestElement(el.parentNode, fn);
22766                            },
22767
22768                            _preventObj = {},
22769                            _preventDefaultEventBehaviour = function (e, isDown) {
22770                                _preventObj.prevent = !_closestElement(e.target, _options.isClickableElement);
22771
22772                                _shout('preventDragEvent', e, isDown, _preventObj);
22773                                return _preventObj.prevent;
22774
22775                            },
22776                            _convertTouchToPoint = function (touch, p) {
22777                                p.x = touch.pageX;
22778                                p.y = touch.pageY;
22779                                p.id = touch.identifier;
22780                                return p;
22781                            },
22782                            _findCenterOfPoints = function (p1, p2, pCenter) {
22783                                pCenter.x = (p1.x + p2.x) * 0.5;
22784                                pCenter.y = (p1.y + p2.y) * 0.5;
22785                            },
22786                            _pushPosPoint = function (time, x, y) {
22787                                if (time - _gestureCheckSpeedTime > 50) {
22788                                    var o = _posPoints.length > 2 ? _posPoints.shift() : {};
22789                                    o.x = x;
22790                                    o.y = y;
22791                                    _posPoints.push(o);
22792                                    _gestureCheckSpeedTime = time;
22793                                }
22794                            },
22795
22796                            _calculateVerticalDragOpacityRatio = function () {
22797                                var yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position
22798                                return 1 - Math.abs(yOffset / (_viewportSize.y / 2));
22799                            },
22800
22801
22802                            // points pool, reused during touch events
22803                            _ePoint1 = {},
22804                            _ePoint2 = {},
22805                            _tempPointsArr = [],
22806                            _tempCounter,
22807                            _getTouchPoints = function (e) {
22808                                // clean up previous points, without recreating array
22809                                while (_tempPointsArr.length > 0) {
22810                                    _tempPointsArr.pop();
22811                                }
22812
22813                                if (!_pointerEventEnabled) {
22814                                    if (e.type.indexOf('touch') > -1) {
22815
22816                                        if (e.touches && e.touches.length > 0) {
22817                                            _tempPointsArr[0] = _convertTouchToPoint(e.touches[0], _ePoint1);
22818                                            if (e.touches.length > 1) {
22819                                                _tempPointsArr[1] = _convertTouchToPoint(e.touches[1], _ePoint2);
22820                                            }
22821                                        }
22822
22823                                    } else {
22824                                        _ePoint1.x = e.pageX;
22825                                        _ePoint1.y = e.pageY;
22826                                        _ePoint1.id = '';
22827                                        _tempPointsArr[0] = _ePoint1;//_ePoint1;
22828                                    }
22829                                } else {
22830                                    _tempCounter = 0;
22831                                    // we can use forEach, as pointer events are supported only in modern browsers
22832                                    _currPointers.forEach(function (p) {
22833                                        if (_tempCounter === 0) {
22834                                            _tempPointsArr[0] = p;
22835                                        } else if (_tempCounter === 1) {
22836                                            _tempPointsArr[1] = p;
22837                                        }
22838                                        _tempCounter++;
22839
22840                                    });
22841                                }
22842                                return _tempPointsArr;
22843                            },
22844
22845                            _panOrMoveMainScroll = function (axis, delta) {
22846
22847                                var panFriction,
22848                                    overDiff = 0,
22849                                    newOffset = _panOffset[axis] + delta[axis],
22850                                    startOverDiff,
22851                                    dir = delta[axis] > 0,
22852                                    newMainScrollPosition = _mainScrollPos.x + delta.x,
22853                                    mainScrollDiff = _mainScrollPos.x - _startMainScrollPos.x,
22854                                    newPanPos,
22855                                    newMainScrollPos;
22856
22857                                // calculate fdistance over the bounds and friction
22858                                if (newOffset > _currPanBounds.min[axis] || newOffset < _currPanBounds.max[axis]) {
22859                                    panFriction = _options.panEndFriction;
22860                                    // Linear increasing of friction, so at 1/4 of viewport it's at max value.
22861                                    // Looks not as nice as was expected. Left for history.
22862                                    // panFriction = (1 - (_panOffset[axis] + delta[axis] + panBounds.min[axis]) / (_viewportSize[axis] / 4) );
22863                                } else {
22864                                    panFriction = 1;
22865                                }
22866
22867                                newOffset = _panOffset[axis] + delta[axis] * panFriction;
22868
22869                                // move main scroll or start panning
22870                                if (_options.allowPanToNext || _currZoomLevel === self.currItem.initialZoomLevel) {
22871
22872
22873                                    if (!_currZoomElementStyle) {
22874
22875                                        newMainScrollPos = newMainScrollPosition;
22876
22877                                    } else if (_direction === 'h' && axis === 'x' && !_zoomStarted) {
22878
22879                                        if (dir) {
22880                                            if (newOffset > _currPanBounds.min[axis]) {
22881                                                panFriction = _options.panEndFriction;
22882                                                overDiff = _currPanBounds.min[axis] - newOffset;
22883                                                startOverDiff = _currPanBounds.min[axis] - _startPanOffset[axis];
22884                                            }
22885
22886                                            // drag right
22887                                            if ((startOverDiff <= 0 || mainScrollDiff < 0) && _getNumItems() > 1) {
22888                                                newMainScrollPos = newMainScrollPosition;
22889                                                if (mainScrollDiff < 0 && newMainScrollPosition > _startMainScrollPos.x) {
22890                                                    newMainScrollPos = _startMainScrollPos.x;
22891                                                }
22892                                            } else {
22893                                                if (_currPanBounds.min.x !== _currPanBounds.max.x) {
22894                                                    newPanPos = newOffset;
22895                                                }
22896
22897                                            }
22898
22899                                        } else {
22900
22901                                            if (newOffset < _currPanBounds.max[axis]) {
22902                                                panFriction = _options.panEndFriction;
22903                                                overDiff = newOffset - _currPanBounds.max[axis];
22904                                                startOverDiff = _startPanOffset[axis] - _currPanBounds.max[axis];
22905                                            }
22906
22907                                            if ((startOverDiff <= 0 || mainScrollDiff > 0) && _getNumItems() > 1) {
22908                                                newMainScrollPos = newMainScrollPosition;
22909
22910                                                if (mainScrollDiff > 0 && newMainScrollPosition < _startMainScrollPos.x) {
22911                                                    newMainScrollPos = _startMainScrollPos.x;
22912                                                }
22913
22914                                            } else {
22915                                                if (_currPanBounds.min.x !== _currPanBounds.max.x) {
22916                                                    newPanPos = newOffset;
22917                                                }
22918                                            }
22919
22920                                        }
22921
22922
22923                                        //
22924                                    }
22925
22926                                    if (axis === 'x') {
22927
22928                                        if (newMainScrollPos !== undefined) {
22929                                            _moveMainScroll(newMainScrollPos, true);
22930                                            if (newMainScrollPos === _startMainScrollPos.x) {
22931                                                _mainScrollShifted = false;
22932                                            } else {
22933                                                _mainScrollShifted = true;
22934                                            }
22935                                        }
22936
22937                                        if (_currPanBounds.min.x !== _currPanBounds.max.x) {
22938                                            if (newPanPos !== undefined) {
22939                                                _panOffset.x = newPanPos;
22940                                            } else if (!_mainScrollShifted) {
22941                                                _panOffset.x += delta.x * panFriction;
22942                                            }
22943                                        }
22944
22945                                        return newMainScrollPos !== undefined;
22946                                    }
22947
22948                                }
22949
22950                                if (!_mainScrollAnimating) {
22951
22952                                    if (!_mainScrollShifted) {
22953                                        if (_currZoomLevel > self.currItem.fitRatio) {
22954                                            _panOffset[axis] += delta[axis] * panFriction;
22955
22956                                        }
22957                                    }
22958
22959
22960                                }
22961
22962                            },
22963
22964                            // Pointerdown/touchstart/mousedown handler
22965                            _onDragStart = function (e) {
22966
22967                                // Allow dragging only via left mouse button.
22968                                // As this handler is not added in IE8 - we ignore e.which
22969                                //
22970                                // http://www.quirksmode.org/js/events_properties.html
22971                                // https://developer.mozilla.org/en-US/docs/Web/API/event.button
22972                                if (e.type === 'mousedown' && e.button > 0) {
22973                                    return;
22974                                }
22975
22976                                if (_initialZoomRunning) {
22977                                    e.preventDefault();
22978                                    return;
22979                                }
22980
22981                                if (_oldAndroidTouchEndTimeout && e.type === 'mousedown') {
22982                                    return;
22983                                }
22984
22985                                if (_preventDefaultEventBehaviour(e, true)) {
22986                                    e.preventDefault();
22987                                }
22988
22989
22990                                _shout('pointerDown');
22991
22992                                if (_pointerEventEnabled) {
22993                                    var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');
22994                                    if (pointerIndex < 0) {
22995                                        pointerIndex = _currPointers.length;
22996                                    }
22997                                    _currPointers[pointerIndex] = {x: e.pageX, y: e.pageY, id: e.pointerId};
22998                                }
22999
23000
23001                                var startPointsList = _getTouchPoints(e),
23002                                    numPoints = startPointsList.length;
23003
23004                                _currentPoints = null;
23005
23006                                _stopAllAnimations();
23007
23008                                // init drag
23009                                if (!_isDragging || numPoints === 1) {
23010
23011
23012                                    _isDragging = _isFirstMove = true;
23013                                    framework.bind(window, _upMoveEvents, self);
23014
23015                                    _isZoomingIn =
23016                                        _wasOverInitialZoom =
23017                                            _opacityChanged =
23018                                                _verticalDragInitiated =
23019                                                    _mainScrollShifted =
23020                                                        _moved =
23021                                                            _isMultitouch =
23022                                                                _zoomStarted = false;
23023
23024                                    _direction = null;
23025
23026                                    _shout('firstTouchStart', startPointsList);
23027
23028                                    _equalizePoints(_startPanOffset, _panOffset);
23029
23030                                    _currPanDist.x = _currPanDist.y = 0;
23031                                    _equalizePoints(_currPoint, startPointsList[0]);
23032                                    _equalizePoints(_startPoint, _currPoint);
23033
23034                                    //_equalizePoints(_startMainScrollPos, _mainScrollPos);
23035                                    _startMainScrollPos.x = _slideSize.x * _currPositionIndex;
23036
23037                                    _posPoints = [{
23038                                        x: _currPoint.x,
23039                                        y: _currPoint.y
23040                                    }];
23041
23042                                    _gestureCheckSpeedTime = _gestureStartTime = _getCurrentTime();
23043
23044                                    //_mainScrollAnimationEnd(true);
23045                                    _calculatePanBounds(_currZoomLevel, true);
23046
23047                                    // Start rendering
23048                                    _stopDragUpdateLoop();
23049                                    _dragUpdateLoop();
23050
23051                                }
23052
23053                                // init zoom
23054                                if (!_isZooming && numPoints > 1 && !_mainScrollAnimating && !_mainScrollShifted) {
23055                                    _startZoomLevel = _currZoomLevel;
23056                                    _zoomStarted = false; // true if zoom changed at least once
23057
23058                                    _isZooming = _isMultitouch = true;
23059                                    _currPanDist.y = _currPanDist.x = 0;
23060
23061                                    _equalizePoints(_startPanOffset, _panOffset);
23062
23063                                    _equalizePoints(p, startPointsList[0]);
23064                                    _equalizePoints(p2, startPointsList[1]);
23065
23066                                    _findCenterOfPoints(p, p2, _currCenterPoint);
23067
23068                                    _midZoomPoint.x = Math.abs(_currCenterPoint.x) - _panOffset.x;
23069                                    _midZoomPoint.y = Math.abs(_currCenterPoint.y) - _panOffset.y;
23070                                    _currPointsDistance = _startPointsDistance = _calculatePointsDistance(p, p2);
23071                                }
23072
23073
23074                            },
23075
23076                            // Pointermove/touchmove/mousemove handler
23077                            _onDragMove = function (e) {
23078
23079                                e.preventDefault();
23080
23081                                if (_pointerEventEnabled) {
23082                                    var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');
23083                                    if (pointerIndex > -1) {
23084                                        var p = _currPointers[pointerIndex];
23085                                        p.x = e.pageX;
23086                                        p.y = e.pageY;
23087                                    }
23088                                }
23089
23090                                if (_isDragging) {
23091                                    var touchesList = _getTouchPoints(e);
23092                                    if (!_direction && !_moved && !_isZooming) {
23093
23094                                        if (_mainScrollPos.x !== _slideSize.x * _currPositionIndex) {
23095                                            // if main scroll position is shifted – direction is always horizontal
23096                                            _direction = 'h';
23097                                        } else {
23098                                            var diff = Math.abs(touchesList[0].x - _currPoint.x) - Math.abs(touchesList[0].y - _currPoint.y);
23099                                            // check the direction of movement
23100                                            if (Math.abs(diff) >= DIRECTION_CHECK_OFFSET) {
23101                                                _direction = diff > 0 ? 'h' : 'v';
23102                                                _currentPoints = touchesList;
23103                                            }
23104                                        }
23105
23106                                    } else {
23107                                        _currentPoints = touchesList;
23108                                    }
23109                                }
23110                            },
23111                            //
23112                            _renderMovement = function () {
23113
23114                                if (!_currentPoints) {
23115                                    return;
23116                                }
23117
23118                                var numPoints = _currentPoints.length;
23119
23120                                if (numPoints === 0) {
23121                                    return;
23122                                }
23123
23124                                _equalizePoints(p, _currentPoints[0]);
23125
23126                                delta.x = p.x - _currPoint.x;
23127                                delta.y = p.y - _currPoint.y;
23128
23129                                if (_isZooming && numPoints > 1) {
23130                                    // Handle behaviour for more than 1 point
23131
23132                                    _currPoint.x = p.x;
23133                                    _currPoint.y = p.y;
23134
23135                                    // check if one of two points changed
23136                                    if (!delta.x && !delta.y && _isEqualPoints(_currentPoints[1], p2)) {
23137                                        return;
23138                                    }
23139
23140                                    _equalizePoints(p2, _currentPoints[1]);
23141
23142
23143                                    if (!_zoomStarted) {
23144                                        _zoomStarted = true;
23145                                        _shout('zoomGestureStarted');
23146                                    }
23147
23148                                    // Distance between two points
23149                                    var pointsDistance = _calculatePointsDistance(p, p2);
23150
23151                                    var zoomLevel = _calculateZoomLevel(pointsDistance);
23152
23153                                    // slightly over the of initial zoom level
23154                                    if (zoomLevel > self.currItem.initialZoomLevel + self.currItem.initialZoomLevel / 15) {
23155                                        _wasOverInitialZoom = true;
23156                                    }
23157
23158                                    // Apply the friction if zoom level is out of the bounds
23159                                    var zoomFriction = 1,
23160                                        minZoomLevel = _getMinZoomLevel(),
23161                                        maxZoomLevel = _getMaxZoomLevel();
23162
23163                                    if (zoomLevel < minZoomLevel) {
23164
23165                                        if (_options.pinchToClose && !_wasOverInitialZoom && _startZoomLevel <= self.currItem.initialZoomLevel) {
23166                                            // fade out background if zooming out
23167                                            var minusDiff = minZoomLevel - zoomLevel;
23168                                            var percent = 1 - minu
23168sDiff / (minZoomLevel / 1.2);
23169
23170                                            _applyBgOpacity(percent);
23171                                            _shout('onPinchClose', percent);
23172                                            _opacityChanged = true;
23173                                        } else {
23174                                            zoomFriction = (minZoomLevel - zoomLevel) / minZoomLevel;
23175                                            if (zoomFriction > 1) {
23176                                                zoomFriction = 1;
23177                                            }
23178                                            zoomLevel = minZoomLevel - zoomFriction * (minZoomLevel / 3);
23179                                        }
23180
23181                                    } else if (zoomLevel > maxZoomLevel) {
23182                                        // 1.5 - extra zoom level above the max. E.g. if max is x6, real max 6 + 1.5 = 7.5
23183                                        zoomFriction = (zoomLevel - maxZoomLevel) / (minZoomLevel * 6);
23184                                        if (zoomFriction > 1) {
23185                                            zoomFriction = 1;
23186                                        }
23187                                        zoomLevel = maxZoomLevel + zoomFriction * minZoomLevel;
23188                                    }
23189
23190                                    if (zoomFriction < 0) {
23191                                        zoomFriction = 0;
23192                                    }
23193
23194                                    // distance between touch points after friction is applied
23195                                    _currPointsDistance = pointsDistance;
23196
23197                                    // _centerPoint - The point in the middle of two pointers
23198                                    _findCenterOfPoints(p, p2, _centerPoint);
23199
23200                                    // paning with two pointers pressed
23201                                    _currPanDist.x += _centerPoint.x - _currCenterPoint.x;
23202                                    _currPanDist.y += _centerPoint.y - _currCenterPoint.y;
23203                                    _equalizePoints(_currCenterPoint, _centerPoint);
23204
23205                                    _panOffset.x = _calculatePanOffset('x', zoomLevel);
23206                                    _panOffset.y = _calculatePanOffset('y', zoomLevel);
23207
23208                                    _isZoomingIn = zoomLevel > _currZoomLevel;
23209                                    _currZoomLevel = zoomLevel;
23210                                    _applyCurrentZoomPan();
23211
23212                                } else {
23213
23214                                    // handle behaviour for one point (dragging or panning)
23215
23216                                    if (!_direction) {
23217                                        return;
23218                                    }
23219
23220                                    if (_isFirstMove) {
23221                                        _isFirstMove = false;
23222
23223                                        // subtract drag distance that was used during the detection direction
23224
23225                                        if (Math.abs(delta.x) >= DIRECTION_CHECK_OFFSET) {
23226                                            delta.x -= _currentPoints[0].x - _startPoint.x;
23227                                        }
23228
23229                                        if (Math.abs(delta.y) >= DIRECTION_CHECK_OFFSET) {
23230                                            delta.y -= _currentPoints[0].y - _startPoint.y;
23231                                        }
23232                                    }
23233
23234                                    _currPoint.x = p.x;
23235                                    _currPoint.y = p.y;
23236
23237                                    // do nothing if pointers position hasn't changed
23238                                    if (delta.x === 0 && delta.y === 0) {
23239                                        return;
23240                                    }
23241
23242                                    if (_direction === 'v' && _options.closeOnVerticalDrag) {
23243                                        if (!_canPan()) {
23244                                            _currPanDist.y += delta.y;
23245                                            _panOffset.y += delta.y;
23246
23247                                            var opacityRatio = _calculateVerticalDragOpacityRatio();
23248
23249                                            _verticalDragInitiated = true;
23250                                            _shout('onVerticalDrag', opacityRatio);
23251
23252                                            _applyBgOpacity(opacityRatio);
23253                                            _applyCurrentZoomPan();
23254                                            return;
23255                                        }
23256                                    }
23257
23258                                    _pushPosPoint(_getCurrentTime(), p.x, p.y);
23259
23260                                    _moved = true;
23261                                    _currPanBounds = self.currItem.bounds;
23262
23263                                    var mainScrollChanged = _panOrMoveMainScroll('x', delta);
23264                                    if (!mainScrollChanged) {
23265                                        _panOrMoveMainScroll('y', delta);
23266
23267                                        _roundPoint(_panOffset);
23268                                        _applyCurrentZoomPan();
23269                                    }
23270
23271                                }
23272
23273                            },
23274
23275                            // Pointerup/pointercancel/touchend/touchcancel/mouseup event handler
23276                            _onDragRelease = function (e) {
23277
23278                                if (_features.isOldAndroid) {
23279
23280                                    if (_oldAndroidTouchEndTimeout && e.type === 'mouseup') {
23281                                        return;
23282                                    }
23283
23284                                    // on Android (v4.1, 4.2, 4.3 & possibly older)
23285                                    // ghost mousedown/up event isn't preventable via e.preventDefault,
23286                                    // which causes fake mousedown event
23287                                    // so we block mousedown/up for 600ms
23288                                    if (e.type.indexOf('touch') > -1) {
23289                                        clearTimeout(_oldAndroidTouchEndTimeout);
23290                                        _oldAndroidTouchEndTimeout = setTimeout(function () {
23291                                            _oldAndroidTouchEndTimeout = 0;
23292                                        }, 600);
23293                                    }
23294
23295                                }
23296
23297                                _shout('pointerUp');
23298
23299                                if (_preventDefaultEventBehaviour(e, false)) {
23300                                    e.preventDefault();
23301                                }
23302
23303                                var releasePoint;
23304
23305                                if (_pointerEventEnabled) {
23306                                    var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id');
23307
23308                                    if (pointerIndex > -1) {
23309                                        releasePoint = _currPointers.splice(pointerIndex, 1)[0];
23310
23311                                        if (navigator.pointerEnabled) {
23312                                            releasePoint.type = e.pointerType || 'mouse';
23313                                        } else {
23314                                            var MSPOINTER_TYPES = {
23315                                                4: 'mouse', // event.MSPOINTER_TYPE_MOUSE
23316                                                2: 'touch', // event.MSPOINTER_TYPE_TOUCH
23317                                                3: 'pen' // event.MSPOINTER_TYPE_PEN
23318                                            };
23319                                            releasePoint.type = MSPOINTER_TYPES[e.pointerType];
23320
23321                                            if (!releasePoint.type) {
23322                                                releasePoint.type = e.pointerType || 'mouse';
23323                                            }
23324                                        }
23325
23326                                    }
23327                                }
23328
23329                                var touchList = _getTouchPoints(e),
23330                                    gestureType,
23331                                    numPoints = touchList.length;
23332
23333                                if (e.type === 'mouseup') {
23334                                    numPoints = 0;
23335                                }
23336
23337                                // Do nothing if there were 3 touch points or more
23338                                if (numPoints === 2) {
23339                                    _currentPoints = null;
23340                                    return true;
23341                                }
23342
23343                                // if second pointer released
23344                                if (numPoints === 1) {
23345                                    _equalizePoints(_startPoint, touchList[0]);
23346                                }
23347
23348
23349                                // pointer hasn't moved, send "tap release" point
23350                                if (numPoints === 0 && !_direction && !_mainScrollAnimating) {
23351                                    if (!releasePoint) {
23352                                        if (e.type === 'mouseup') {
23353                                            releasePoint = {x: e.pageX, y: e.pageY, type: 'mouse'};
23354                                        } else if (e.changedTouches && e.changedTouches[0]) {
23355                                            releasePoint = {
23356                                                x: e.changedTouches[0].pageX,
23357                                                y: e.changedTouches[0].pageY,
23358                                                type: 'touch'
23359                                            };
23360                                        }
23361                                    }
23362
23363                                    _shout('touchRelease', e, releasePoint);
23364                                }
23365
23366                                // Difference in time between releasing of two last touch points (zoom gesture)
23367                                var releaseTimeDiff = -1;
23368
23369                                // Gesture completed, no pointers left
23370                                if (numPoints === 0) {
23371                                    _isDragging = false;
23372                                    framework.unbind(window, _upMoveEvents, self);
23373
23374                                    _stopDragUpdateLoop();
23375
23376                                    if (_isZooming) {
23377                                        // Two points released at the same time
23378                                        releaseTimeDiff = 0;
23379                                    } else if (_lastReleaseTime !== -1) {
23380                                        releaseTimeDiff = _getCurrentTime() - _lastReleaseTime;
23381                                    }
23382                                }
23383                                _lastReleaseTime = numPoints === 1 ? _getCurrentTime() : -1;
23384
23385                                if (releaseTimeDiff !== -1 && releaseTimeDiff < 150) {
23386                                    gestureType = 'zoom';
23387                                } else {
23388                                    gestureType = 'swipe';
23389                                }
23390
23391                                if (_isZooming && numPoints < 2) {
23392                                    _isZooming = false;
23393
23394                                    // Only second point released
23395                                    if (numPoints === 1) {
23396                                        gestureType = 'zoomPointerUp';
23397                                    }
23398                                    _shout('zoomGestureEnded');
23399                                }
23400
23401                                _currentPoints = null;
23402                                if (!_moved && !_zoomStarted && !_mainScrollAnimating && !_verticalDragInitiated) {
23403                                    // nothing to animate
23404                                    return;
23405                                }
23406
23407                                _stopAllAnimations();
23408
23409
23410                                if (!_releaseAnimData) {
23411                                    _releaseAnimData = _initDragReleaseAnimationData();
23412                                }
23413
23414                                _releaseAnimData.calculateSwipeSpeed('x');
23415
23416
23417                                if (_verticalDragInitiated) {
23418
23419                                    var opacityRatio = _calculateVerticalDragOpacityRatio();
23420
23421                                    if (opacityRatio < _options.verticalDragRange) {
23422                                        self.close();
23423                                    } else {
23424                                        var initalPanY = _panOffset.
23424y,
23425                                            initialBgOpacity = _bgOpacity;
23426
23427                                        _animateProp('verticalDrag', 0, 1, 300, framework.easing.cubic.out, function (now) {
23428
23429                                            _panOffset.y = (self.currItem.initialPosition.y - initalPanY) * now + initalPanY;
23430
23431                                            _applyBgOpacity((1 - initialBgOpacity) * now + initialBgOpacity);
23432                                            _applyCurrentZoomPan();
23433                                        });
23434
23435                                        _shout('onVerticalDrag', 1);
23436                                    }
23437
23438                                    return;
23439                                }
23440
23441
23442                                // main scroll
23443                                if ((_mainScrollShifted || _mainScrollAnimating) && numPoints === 0) {
23444                                    var itemChanged = _finishSwipeMainScrollGesture(gestureType, _releaseAnimData);
23445                                    if (itemChanged) {
23446                                        return;
23447                                    }
23448                                    gestureType = 'zoomPointerUp';
23449                                }
23450
23451                                // prevent zoom/pan animation when main scroll animation runs
23452                                if (_mainScrollAnimating) {
23453                                    return;
23454                                }
23455
23456                                // Complete simple zoom gesture (reset zoom level if it's out of the bounds)
23457                                if (gestureType !== 'swipe') {
23458                                    _completeZoomGesture();
23459                                    return;
23460                                }
23461
23462                                // Complete pan gesture if main scroll is not shifted, and it's possible to pan current image
23463                                if (!_mainScrollShifted && _currZoomLevel > self.currItem.fitRatio) {
23464                                    _completePanGesture(_releaseAnimData);
23465                                }
23466                            },
23467
23468
23469                            // Returns object with data about gesture
23470                            // It's created only once and then reused
23471                            _initDragReleaseAnimationData = function () {
23472                                // temp local vars
23473                                var lastFlickDuration,
23474                                    tempReleasePos;
23475
23476                                // s = this
23477                                var s = {
23478                                    lastFlickOffset: {},
23479                                    lastFlickDist: {},
23480                                    lastFlickSpeed: {},
23481                                    slowDownRatio: {},
23482                                    slowDownRatioReverse: {},
23483                                    speedDecelerationRatio: {},
23484                                    speedDecelerationRatioAbs: {},
23485                                    distanceOffset: {},
23486                                    backAnimDestination: {},
23487                                    backAnimStarted: {},
23488                                    calculateSwipeSpeed: function (axis) {
23489
23490
23491                                        if (_posPoints.length > 1) {
23492                                            lastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50;
23493                                            tempReleasePos = _posPoints[_posPoints.length - 2][axis];
23494                                        } else {
23495                                            lastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration
23496                                            tempReleasePos = _startPoint[axis];
23497                                        }
23498                                        s.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos;
23499                                        s.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]);
23500                                        if (s.lastFlickDist[axis] > 20) {
23501                                            s.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration;
23502                                        } else {
23503                                            s.lastFlickSpeed[axis] = 0;
23504                                        }
23505                                        if (Math.abs(s.lastFlickSpeed[axis]) < 0.1) {
23506                                            s.lastFlickSpeed[axis] = 0;
23507                                        }
23508
23509                                        s.slowDownRatio[axis] = 0.95;
23510                                        s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
23511                                        s.speedDecelerationRatio[axis] = 1;
23512                                    },
23513
23514                                    calculateOverBoundsAnimOffset: function (axis, speed) {
23515                                        if (!s.backAnimStarted[axis]) {
23516
23517                                            if (_panOffset[axis] > _currPanBounds.min[axis]) {
23518                                                s.backAnimDestination[axis] = _currPanBounds.min[axis];
23519
23520                                            } else if (_panOffset[axis] < _currPanBounds.max[axis]) {
23521                                                s.backAnimDestination[axis] = _currPanBounds.max[axis];
23522                                            }
23523
23524                                            if (s.backAnimDestination[axis] !== undefined) {
23525                                                s.slowDownRatio[axis] = 0.7;
23526                                                s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis];
23527                                                if (s.speedDecelerationRatioAbs[axis] < 0.05) {
23528
23529                                                    s.lastFlickSpeed[axis] = 0;
23530                                                    s.backAnimStarted[axis] = true;
23531
23532                                                    _animateProp('bounceZoomPan' + axis, _panOffset[axis],
23533                                                        s.backAnimDestination[axis],
23534                                                        speed || 300,
23535                                                        framework.easing.sine.out,
23536                                                        function (pos) {
23537                                                            _panOffset[axis] = pos;
23538                                                            _applyCurrentZoomPan();
23539                                                        }
23540                                                    );
23541
23542                                                }
23543                                            }
23544                                        }
23545                                    },
23546
23547                                    // Reduces the speed by slowDownRatio (per 10ms)
23548                                    calculateAnimOffset: function (axis) {
23549                                        if (!s.backAnimStarted[axis]) {
23550                                            s.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] +
23551                                                s.slowDownRatioReverse[axis] -
23552                                                s.slowDownRatioReverse[axis] * s.timeDiff / 10);
23553
23554                                            s.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]);
23555                                            s.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff;
23556                                            _panOffset[axis] += s.distanceOffset[axis];
23557
23558                                        }
23559                                    },
23560
23561                                    panAnimLoop: function () {
23562                                        if (_animations.zoomPan) {
23563                                            _animations.zoomPan.raf = _requestAF(s.panAnimLoop);
23564
23565                                            s.now = _getCurrentTime();
23566                                            s.timeDiff = s.now - s.lastNow;
23567                                            s.lastNow = s.now;
23568
23569                                            s.calculateAnimOffset('x');
23570                                            s.calculateAnimOffset('y');
23571
23572                                            _applyCurrentZoomPan();
23573
23574                                            s.calculateOverBoundsAnimOffset('x');
23575                                            s.calculateOverBoundsAnimOffset('y');
23576
23577
23578                                            if (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) {
23579
23580                                                // round pan position
23581                                                _panOffset.x = Math.round(_panOffset.x);
23582                                                _panOffset.y = Math.round(_panOffset.y);
23583                                                _applyCurrentZoomPan();
23584
23585                                                _stopAnimation('zoomPan');
23586                                                return;
23587                                            }
23588                                        }
23589
23590                                    }
23591                                };
23592                                return s;
23593                            },
23594
23595                            _completePanGesture = function (animData) {
23596                                // calculate swipe speed for Y axis (paanning)
23597                                animData.calculateSwipeSpeed('y');
23598
23599                                _currPanBounds = self.currItem.bounds;
23600
23601                                animData.backAnimDestination = {};
23602                                animData.backAnimStarted = {};
23603
23604                                // Avoid acceleration animation if speed is too low
23605                                if (Math.abs(animData.lastFlickSpeed.x) <= 0.05 && Math.abs(animData.lastFlickSpeed.y) <= 0.05) {
23606                                    animData.speedDecelerationRatioAbs.x = animData.speedDecelerationRatioAbs.y = 0;
23607
23608                                    // Run pan drag release animation. E.g. if you drag image and release finger without momentum.
23609                                    animData.calculateOverBoundsAnimOffset('x');
23610                                    animData.calculateOverBoundsAnimOffset('y');
23611                                    return true;
23612                                }
23613
23614                                // Animation loop that controls the acceleration after pan gesture ends
23615                                _registerStartAnimation('zoomPan');
23616                                animData.lastNow = _getCurrentTime();
23617                                animData.panAnimLoop();
23618                            },
23619
23620
23621                            _finishSwipeMainScrollGesture = function (gestureType, _releaseAnimData) {
23622                                var itemChanged;
23623                                if (!_mainScrollAnimating) {
23624                                    _currZoomedItemIndex = _currentItemIndex;
23625                                }
23626
23627
23628                                var itemsDiff;
23629
23630                                if (gestureType === 'swipe') {
23631                                    var totalShiftDist = _currPoint.x - _startPoint.x,
23632                                        isFastLastFlick = _releaseAnimData.lastFlickDist.x < 10;
23633
23634                                    // if container is shifted for more than MIN_SWIPE_DISTANCE,
23635                                    // and last flick gesture was in right direction
23636                                    if (totalShiftDist > MIN_SWIPE_DISTANCE &&
23637                                        (isFastLastFlick || _releaseAnimData.lastFlickOffset.x > 20)) {
23638                                        // go to prev item
23639                                        itemsDiff = -1;
23640                                    } else if (totalShiftDist < -MIN_SWIPE_DISTANCE &&
23641                                        (isFastLastFlick || _releaseAnimData.lastFlickOffset.x < -20)) {
23642                                        // go to next item
23643                                        itemsDiff = 1;
23644                                    }
23645                                }
23646
23647                                var nextCircle;
23648
23649                                if (itemsDiff) {
23650
23651                                    _currentItemIndex += itemsDiff;
23652
23653                                    if (_currentItemIndex < 0) {
23654                                        _currentItemIndex = _options.loop ? _getNumItems() - 1 : 0;
23655                                        nextCircle = true;
23656                                    } else if (_currentItemIndex >= _getNumItems()) {
23657                                        _currentItemIndex = _options.loop ? 0 : _getNumItems() - 1;
23658                                        nextCircle = true;
23659                                    }
23660
23661                                    if (!nextCircle || _options.loop) {
23662                                        _indexDiff += itemsDiff;
23663                                        _currPositionIndex -= itemsDiff;
23664                                        itemChanged = true;
23665                                    }
23666
23667
23668                                }
23669
23670                                var animateToX = _slideSize.x * _currPositionIndex;
23671                                var animateToDist = Math.abs(animateToX - _mainScrollPos.x);
23672                                var finishAnimDuration;
23673
23674
23675                                if (!itemChanged && animateToX > _mainScrollPos.x !== _releaseAnimData.lastFlickSpeed.x > 0) {
23676                                    // "return to current" duration, e.g. when dragging from slide 0 to -1
23677                                    finishAnimDuration = 333;
23678                                } else {
23679                                    finishAnimDuration = Math.abs(_releaseAnimData.lastFlickSpeed.x) > 0 ?
23680                                        animateToDist / Math.abs(_releaseAnimData.lastFlickSpeed.x) :
23681                                        333;
23682
23683                                    finishAnimDuration = Math.min(finishAnimDuration, 400);
23684                                    finishAnimDuration = Math.max(finishAnimDuration, 250);
23685                                }
23686
23687                                if (_currZoomedItemIndex === _currentItemIndex) {
23688                                    itemChanged = false;
23689                                }
23690
23691                                _mainScrollAnimating = true;
23692
23693                                _shout('mainScrollAnimStart');
23694
23695                                _animateProp('mainScroll', _mainScrollPos.x, animateToX, finishAnimDuration, framework.easing.cubic.out,
23696                                    _moveMainScroll,
23697                                    function () {
23698                                        _stopAllAnimations();
23699                                        _mainScrollAnimating = false;
23700                                        _currZoomedItemIndex = -1;
23701
23702                                        if (itemChanged || _currZoomedItemIndex !== _currentItemIndex) {
23703                                            self.updateCurrItem();
23704                                        }
23705
23706                                        _shout('mainScrollAnimComplete');
23707                                    }
23708                                );
23709
23710                                if (itemChanged) {
23711                                    self.updateCurrItem(true);
23712                                }
23713
23714                                return itemChanged;
23715                            },
23716
23717                            _calculateZoomLevel = function (touchesDistance) {
23718                                return 1 / _startPointsDistance * touchesDistance * _startZoomLevel;
23719                            },
23720
23721                            // Resets zoom if it's out of bounds
23722                            _completeZoomGesture = function () {
23723                                var destZoomLevel = _currZoomLevel,
23724                                    minZoomLevel = _getMinZoomLevel(),
23725                                    maxZoomLevel = _getMaxZoomLevel();
23726
23727                                if (_currZoomLevel < minZoomLevel) {
23728                                    destZoomLevel = minZoomLevel;
23729                                } else if (_currZoomLevel > maxZoomLevel) {
23730                                    destZoomLevel = maxZoomLevel;
23731                                }
23732
23733                                var destOpacity = 1,
23734                                    onUpdate,
23735                                    initialOpacity = _bgOpacity;
23736
23737                                if (_opacityChanged && !_isZoomingIn && !_wasOverInitialZoom && _currZoomLevel < minZoomLevel) {
23738                                    //_closedByScroll = true;
23739                                    self.close();
23740                                    return true;
23741                                }
23742
23743                                if (_opacityChanged) {
23744                                    onUpdate = function (now) {
23745                                        _applyBgOpacity((destOpacity - initialOpacity) * now + initialOpacity);
23746                                    };
23747                                }
23748
23749                                self.zoomTo(destZoomLevel, 0, 200, framework.easing.cubic.out, onUpdate);
23750                                return true;
23751                            };
23752
23753
23754                        _registerModule('Gestures', {
23755                            publicMethods: {
23756
23757                                initGestures: function () {
23758
23759                                    // helper function that builds touch/pointer/mouse events
23760                                    var addEventNames = function (pref, down, move, up, cancel) {
23761                                        _dragStartEvent = pref + down;
23762                                        _dragMoveEvent = pref + move;
23763                                        _dragEndEvent = pref + up;
23764                                        if (cancel) {
23765                                            _dragCancelEvent = pref + cancel;
23766                                        } else {
23767                                            _dragCancelEvent = '';
23768                                        }
23769                                    };
23770
23771                                    _pointerEventEnabled = _features.pointerEvent;
23772                                    if (_pointerEventEnabled && _features.touch) {
23773                                        // we don't need touch events, if browser supports pointer events
23774                                        _features.touch = false;
23775                                    }
23776
23777                                    if (_pointerEventEnabled) {
23778                                        if (navigator.pointerEnabled) {
23779                                            addEventNames('pointer', 'down', 'move', 'up', 'cancel');
23780                                        } else {
23781                                            // IE10 pointer events are case-sensitive
23782                                            addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
23783                                        }
23784                                    } else if (_features.touch) {
23785                                        addEventNames('touch', 'start', 'move', 'end', 'cancel');
23786                                        _likelyTouchDevice = true;
23787                                    } else {
23788                                        addEventNames('mouse', 'down', 'move', 'up');
23789                                    }
23790
23791                                    _upMoveEvents = _dragMoveEvent + ' ' + _dragEndEvent + ' ' + _dragCancelEvent;
23792                                    _downEvents = _dragStartEvent;
23793
23794                                    if (_pointerEventEnabled && !_likelyTouchDevice) {
23795                                        _likelyTouchDevice = (navigator.maxTouchPoints > 1) || (navigator.msMaxTouchPoints > 1);
23796                                    }
23797                                    // make variable public
23798                                    self.likelyTouchDevice = _likelyTouchDevice;
23799
23800                                    _globalEventHandlers[_dragStartEvent] = _onDragStart;
23801                                    _globalEventHandlers[_dragMoveEvent] = _onDragMove;
23802                                    _globalEventHandlers[_dragEndEvent] = _onDragRelease; // the Kraken
23803
23804                                    if (_dragCancelEvent) {
23805                                        _globalEventHandlers[_dragCancelEvent] = _globalEventHandlers[_dragEndEvent];
23806                                    }
23807
23808                                    // Bind mouse events on device with detected hardware touch support, in case it supports multiple types of input.
23809                                    if (_features.touch) {
23810                                        _downEvents += ' mousedown';
23811                                        _upMoveEvents += ' mousemove mouseup';
23812                                        _globalEventHandlers.mousedown = _globalEventHandlers[_dragStartEvent];
23813                                        _globalEventHandlers.mousemove = _globalEventHandlers[_dragMoveEvent];
23814                                        _globalEventHandlers.mouseup = _globalEventHandlers[_dragEndEvent];
23815                                    }
23816
23817                                    if (!_likelyTouchDevice) {
23818                                        // don't allow pan to next slide from zoomed state on Desktop
23819                                        _options.allowPanToNext = false;
23820                                    }
23821                                }
23822
23823                            }
23824                        });
23825
23826
23827                        /*>>gestures*/
23828
23829                        /*>>show-hide-transition*/
23830                        /**
23831                         * show-hide-transition.js:
23832                         *
23833                         * Manages initial opening or closing transition.
23834                         *
23835                         * If you're not planning to use transition for gallery at all,
23836                         * you may set options hideAnimationDuration and showAnimationDuration to 0,
23837                         * and just delete startAnimation function.
23838                         *
23839                         */
23840
23841
23842                        var _showOrHideTimeout,
23843                            _showOrHide = function (item, img, out, completeFn) {
23844
23845                                if (_showOrHideTimeout) {
23846                                    clearTimeout(_showOrHideTimeout);
23847                                }
23848
23849                                _initialZoomRunning = true;
23850                                _initialContentSet = true;
23851
23852                                // dimensions of small thumbnail {x:,y:,w:}.
23853                                // Height is optional, as calculated based on large image.
23854                                var thumbBounds;
23855                                if (item.initialLayout) {
23856                                    thumbBounds = item.initialLayout;
23857                                    item.initialLayout = null;
23858                                } else {
23859                                    thumbBounds = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex);
23860                                }
23861
23862                                var duration = out ? _options.hideAnimationDuration : _options.showAnimationDuration;
23863
23864                                var onComplete = function () {
23865                                    _stopAnimation('initialZoom');
23866                                    if (!out) {
23867                                        _applyBgOpacity(1);
23868                                        if (img) {
23869                                            img.style.display = 'block';
23870                                        }
23871                                        framework.addClass(template, 'psw
23871p--animated-in');
23872                                        _shout('initialZoom' + (out ? 'OutEnd' : 'InEnd'));
23873                                    } else {
23874                                        self.template.removeAttribute('style');
23875                                        self.bg.removeAttribute('style');
23876                                    }
23877
23878                                    if (completeFn) {
23879                                        completeFn();
23880                                    }
23881                                    _initialZoomRunning = false;
23882                                };
23883
23884                                // if bounds aren't provided, just open gallery without animation
23885                                if (!duration || !thumbBounds || thumbBounds.x === undefined) {
23886
23887                                    _shout('initialZoom' + (out ? 'Out' : 'In'));
23888
23889                                    _currZoomLevel = item.initialZoomLevel;
23890                                    _equalizePoints(_panOffset, item.initialPosition);
23891                                    _applyCurrentZoomPan();
23892
23893                                    template.style.opacity = out ? 0 : 1;
23894                                    _applyBgOpacity(1);
23895
23896                                    if (duration) {
23897                                        setTimeout(function () {
23898                                            onComplete();
23899                                        }, duration);
23900                                    } else {
23901                                        onComplete();
23902                                    }
23903
23904                                    return;
23905                                }
23906
23907                                var startAnimation = function () {
23908                                    var closeWithRaf = _closedByScroll,
23909                                        fadeEverything = !self.currItem.src || self.currItem.loadError || _options.showHideOpacity;
23910
23911                                    // apply hw-acceleration to image
23912                                    if (item.miniImg) {
23913                                        item.miniImg.style.webkitBackfaceVisibility = 'hidden';
23914                                    }
23915
23916                                    if (!out) {
23917                                        _currZoomLevel = thumbBounds.w / item.w;
23918                                        _panOffset.x = thumbBounds.x;
23919                                        _panOffset.y = thumbBounds.y - _initalWindowScrollY;
23920
23921                                        self[fadeEverything ? 'template' : 'bg'].style.opacity = 0.001;
23922                                        _applyCurrentZoomPan();
23923                                    }
23924
23925                                    _registerStartAnimation('initialZoom');
23926
23927                                    if (out && !closeWithRaf) {
23928                                        framework.removeClass(template, 'pswp--animated-in');
23929                                    }
23930
23931                                    if (fadeEverything) {
23932                                        if (out) {
23933                                            framework[(closeWithRaf ? 'remove' : 'add') + 'Class'](template, 'pswp--animate_opacity');
23934                                        } else {
23935                                            setTimeout(function () {
23936                                                framework.addClass(template, 'pswp--animate_opacity');
23937                                            }, 30);
23938                                        }
23939                                    }
23940
23941                                    _showOrHideTimeout = setTimeout(function () {
23942
23943                                        _shout('initialZoom' + (out ? 'Out' : 'In'));
23944
23945
23946                                        if (!out) {
23947
23948                                            // "in" animation always uses CSS transitions (instead of rAF).
23949                                            // CSS transition work faster here,
23950                                            // as developer may also want to animate other things,
23951                                            // like ui on top of sliding area, which can be animated just via CSS
23952
23953                                            _currZoomLevel = item.initialZoomLevel;
23954                                            _equalizePoints(_panOffset, item.initialPosition);
23955                                            _applyCurrentZoomPan();
23956                                            _applyBgOpacity(1);
23957
23958                                            if (fadeEverything) {
23959                                                template.style.opacity = 1;
23960                                            } else {
23961                                                _applyBgOpacity(1);
23962                                            }
23963
23964                                            _showOrHideTimeout = setTimeout(onComplete, duration + 20);
23965                                        } else {
23966
23967                                            // "out" animation uses rAF only when PhotoSwipe is closed by browser scroll, to recalculate position
23968                                            var destZoomLevel = thumbBounds.w / item.w,
23969                                                initialPanOffset = {
23970                                                    x: _panOffset.x,
23971                                                    y: _panOffset.
23971y
23972                                                },
23973                                                initialZoomLevel = _currZoomLevel,
23974                                                initalBgOpacity = _bgOpacity,
23975                                                onUpdate = function (now) {
23976
23977                                                    if (now === 1) {
23978                                                        _currZoomLevel = destZoomLevel;
23979                                                        _panOffset.x = thumbBounds.x;
23980                                                        _panOffset.y = thumbBounds.y - _currentWindowScrollY;
23981                                                    } else {
23982                                                        _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel;
23983                                                        _panOffset.x = (thumbBounds.x - initialPanOffset.x) * now + initialPanOffset.x;
23984                                                        _panOffset.y = (thumbBounds.y - _currentWindowScrollY - initialPanOffset.
23984y) * now + initialPanOffset.y;
23985                                                    }
23986
23987                                                    _applyCurrentZoomPan();
23988                                                    if (fadeEverything) {
23989                                                        template.style.opacity = 1 - now;
23990                                                    } else {
23991                                                        _applyBgOpacity(initalBgOpacity - now * initalBgOpacity);
23992                                                    }
23993                                                };
23994
23995                                            if (closeWithRaf) {
23996                                                _animateProp('initialZoom', 0, 1, duration, framework.easing.cubic.out, onUpdate, onComplete);
23997                                            } else {
23998                                                onUpdate(1);
23999                                                _showOrHideTimeout = setTimeout(onComplete, duration + 20);
24000                                            }
24001                                        }
24002
24003                                    }, out ? 25 : 90); // Main purpose of this delay is to give browser time to paint and
24004                                    // create composite layers of PhotoSwipe UI parts (background, controls, caption, arrows).
24005                                    // Which avoids lag at the beginning of scale transition.
24006                                };
24007                                startAnimation();
24008
24009
24010                            };
24011
24012                        /*>>show-hide-transition*/
24013
24014                        /*>>items-controller*/
24015                        /**
24016                         *
24017                         * Controller manages gallery items, their dimensions, and their content.
24018                         *
24019                         */
24020
24021                        var _items,
24022                            _tempPanAreaSize = {},
24023                            _imagesToAppendPool = [],
24024                            _initialContentSet,
24025                            _initialZoomRunning,
24026                            _controllerDefaultOptions = {
24027                                index: 0,
24028                                errorMsg: '<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',
24029                                forceProgressiveLoading: false, // TODO
24030                                preload: [1, 1],
24031                                getNumItemsFn: function () {
24032                                    return _items.length;
24033                                }
24034                            };
24035
24036
24037                        var _getItemAt,
24038                            _getNumItems,
24039                            _initialIsLoop,
24040                            _getZeroBounds = function () {
24041                                return {
24042                                    center: {x: 0, y: 0},
24043                                    max: {x: 0, y: 0},
24044                                    min: {x: 0, y: 0}
24045                                };
24046                            },
24047                            _calculateSingleItemPanBounds = function (item, realPanElementW, realPanElementH) {
24048                                var bounds = item.bounds;
24049
24050                                // position of element when it's centered
24051                                bounds.center.x = Math.round((_tempPanAreaSize.x - realPanElementW) / 2);
24052                                bounds.center.y = Math.round((_tempPanAreaSize.y - realPanElementH) / 2) + item.vGap.top;
24053
24054                                // maximum pan position
24055                                bounds.max.x = (realPanElementW > _tempPanAreaSize.x) ?
24056                                    Math.round(_tempPanAreaSize.x - realPanElementW) :
24057                                    bounds.center.x;
24058
24059                                bounds.max.y = (realPanElementH > _tempPanAreaSize.y) ?
24060                                    Math.round(_tempPanAreaSize.y - realPanElementH) + item.vGap.top :
24061                                    bounds.center.y;
24062
24063                                // minimum pan position
24064                                bounds.min.x = (realPanElementW > _tempPanAreaSize.x) ? 0 : bounds.center.x;
24065                                bounds.min.y = (realPanElementH > _tempPanAreaSize.y) ? item.vGap.top : bounds.center.y;
24066                            },
24067                            _calculateItemSize = function (item, viewportSize, zoomLevel) {
24068
24069                                if (item.src && !item.loadError) {
24070                                    var isInitial = !zoomLevel;
24071
24072                                    if (isInitial) {
24073                                        if (!item.vGap) {
24074                                            item.vGap = {top: 0, bottom: 0};
24075                                        }
24076                                        // allows overriding vertical margin for individual items
24077                                        _shout('parseVerticalMargin', item);
24078                                    }
24079
24080
24081                                    _tempPanAreaSize.x = viewportSize.x;
24082                                    _tempPanAreaSize.y = viewportSize.y - item.vGap.top - item.vGap.bottom;
24083
24084                                    if (isInitial) {
24085                                        var hRatio = _tempPanAreaSize.x / item.w;
24086                                        var vRatio = _tempPanAreaSize.y / item.h;
24087
24088                                        item.fitRatio = hRatio < vRatio ? hRatio : vRatio;
24089                                        //item.fillRatio = hRatio > vRatio ? hRatio : vRatio;
24090
24091                                        var scaleMode = _options.scaleMode;
24092
24093                                        if (scaleMode === 'orig') {
24094                                            zoomLevel = 1;
24095                                        } else if (scaleMode === 'fit') {
24096                                            zoomLevel = item.fitRatio;
24097                                        }
24098
24099                                        if (zoomLevel > 1) {
24100                                            zoomLevel = 1;
24101                                        }
24102
24103                                        item.initialZoomLevel = zoomLevel;
24104
24105                                        if (!item.bounds) {
24106                                            // reuse bounds object
24107                                            item.bounds = _getZeroBounds();
24108                                        }
24109                                    }
24110
24111                                    if (!zoomLevel) {
24112                                        return;
24113                                    }
24114
24115                                    _calculateSingleItemPanBounds(item, item.w * zoomLevel, item.h * zoomLevel);
24116
24117                                    if (isInitial && zoomLevel === item.initialZoomLevel) {
24118                                        item.initialPosition = item.bounds.center;
24119                                    }
24120
24121                                    return item.bounds;
24122                                } else {
24123                                    item.w = item.h = 0;
24124                                    item.initialZoomLevel = item.fitRatio = 1;
24125                                    item.bounds = _getZeroBounds();
24126                                    item.initialPosition = item.bounds.center;
24127
24128                                    // if it's not image, we return zero bounds (content is not zoomable)
24129                                    return item.bounds;
24130                                }
24131
24132                            },
24133
24134
24135                            _appendImage = function (index, item, baseDiv, img, preventAnimation, keepPlaceholder) {
24136
24137
24138                                if (item.loadError) {
24139                                    return;
24140                                }
24141
24142                                if (img) {
24143
24144                                    item.imageAppended = true;
24145                                    _setImageSize(item, img, (item === self.currItem && _renderMaxResolution));
24146
24147                                    baseDiv.appendChild(img);
24148
24149                                    if (keepPlaceholder) {
24150                                        setTimeout(function () {
24151                                            if (item && item.loaded && item.placeholder) {
24152                                                item.placeholder.style.display = 'none';
24153                                                item.placeholder = null;
24154                                            }
24155                                        }, 500);
24156                                    }
24157                                }
24158                            },
24159
24160
24161                            _preloadImage = function (item) {
24162                                item.loading = true;
24163                                item.loaded = false;
24164                                var img = item.img = framework.createEl('pswp__img', 'img');
24165                                var onComplete = function () {
24166                                    item.loading = false;
24167                                    item.loaded = true;
24168
24169                                    if (item.loadComplete) {
24170                                        item.loadComplete(item);
24171                                    } else {
24172                                        item.img = null; // no need to store image object
24173                                    }
24174                                    img.onload = img.onerror = null;
24175                                    img = null;
24176                                };
24177                                img.onload = onComplete;
24178                                img.onerror = function () {
24179                                    item.loadError = true;
24180                                    onComplete();
24181                                };
24182
24183                                img.src = item.src;// + '?a=' + Math.random();
24184
24185                                return img;
24186                            },
24187                            _checkForError = function (item, cleanUp) {
24188                                if (item.src && item.loadError && item.container) {
24189
24190                                    if (cleanUp) {
24191                                        item.container.innerHTML = '';
24192                                    }
24193
24194                                    item.container.innerHTML = _options.errorMsg.replace('%url%', item.src);
24195                                    return true;
24196
24197                                }
24198                            },
24199                            _setImageSize = function (item, img, maxRes) {
24200                                if (!item.src) {
24201                                    return;
24202                                }
24203
24204                                if (!img) {
24205                                    img = item.container.lastChild;
24206                                }
24207
24208                                var w = maxRes ? item.w : Math.round(item.w * item.fitRatio),
24209                                    h = maxRes ? item.h : Math.round(item.h * item.fitRatio);
24210
24211                                if (item.placeholder && !item.loaded) {
24212                                    item.placeholder.style.width = w + 'px';
24213                                    item.placeholder.style.height = h + 'px';
24214                                }
24215
24216                                img.style.width = w + 'px';
24217                                img.style.height = h + 'px';
24218                            },
24219                            _appendImagesPool = function () {
24220
24221                                if (_imagesToAppendPool.length) {
24222                                    var poolItem;
24223
24224                                    for (var i = 0; i < _imagesToAppendPool.length; i++) {
24225                                        poolItem = _imagesToAppendPool[i];
24226                                        if (poolItem.holder.index === poolItem.index) {
24227                                            _appendImage(poolItem.index, poolItem.item, poolItem.baseDiv, poolItem.img, false, poolItem.clearPlaceholder);
24228                                        }
24229                                    }
24230                                    _imagesToAppendPool = [];
24231                                }
24232                            };
24233
24234
24235                        _registerModule('Controller', {
24236
24237                            publicMethods: {
24238
24239                                lazyLoadItem: function (index) {
24240                                    index = _getLoopedId(index);
24241                                    var item = _getItemAt(index);
24242
24243                                    if (!item || ((item.loaded || item.loading) && !_itemsNeedUpdate)) {
24244                                        return;
24245                                    }
24246
24247                                    _shout('gettingData', index, item);
24248
24249                                    if (!item.src) {
24250                                        return;
24251                                    }
24252
24253                                    _preloadImage(item);
24254                                },
24255                                initController: function () {
24256                                    framework.extend(_options, _controllerDefaultOptions, true);
24257                                    self.items = _items = items;
24258                                    _getItemAt = self.getItemAt;
24259                                    _getNumItems = _options.getNumItemsFn; //self.getNumItems;
24260
24261
24262                                    _initialIsLoop = _options.loop;
24263                                    if (_getNumItems() < 3) {
24264                                        _options.loop = false; // disable loop if less then 3 items
24265                                    }
24266
24267                                    _listen('beforeChange', function (diff) {
24268
24269                                        var p = _options.preload,
24270                                            isNext = diff === null ? true : (diff >= 0),
24271                                            preloadBefore = Math.min(p[0], _getNumItems()),
24272                                            preloadAfter = Math.min(p[
242721], _getNumItems()),
24273                                            i;
24274
24275
24276                                        for (i = 1; i <= (isNext ? preloadAfter : preloadBefore); i++) {
24277                                            self.lazyLoadItem(_currentItemIndex + i);
24278                                        }
24279                                        for (i = 1; i <= (isNext ? preloadBefore : preloadAfter); i++) {
24280                                            self.lazyLoadItem(_currentItemIndex - i);
24281                                        }
24282                                    });
24283
24284                                    _listen('initialLayout', function () {
24285                                        self.currItem.initialLayout = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex);
24286                                    });
24287
24288                                    _listen('mainScrollAnimComplete', _appendImagesPool);
24289                                    _listen('initialZoomInEnd', _appendImagesPool);
24290
24291
24292                                    _listen('destroy', function () {
24293                                        var item;
24294                                        for (var i = 0; i < _items.length; i++) {
24295                                            item = _items[i];
24296                                            // remove reference to DOM elements, for GC
24297                                            if (item.container) {
24298                                                item.container = null;
24299                                            }
24300                                            if (item.placeholder) {
24301                                                item.placeholder = null;
24302                                            }
24303                                            if (item.img) {
24304                                                item.img = null;
24305                                            }
24306                                            if (item.preloader) {
24307                                                item.preloader = null;
24308                                            }
24309                                            if (item.loadError) {
24310                                                item.loaded = item.loadError = false;
24311                                            }
24312                                        }
24313                                        _imagesToAppendPool = null;
24314                                    });
24315                                },
24316
24317
24318                                getItemAt: function (index) {
24319                                    if (index >= 0) {
24320                                        return _items[index] !== undefined ? _items[index] : false;
24321                                    }
24322                                    return false;
24323                                },
24324
24325                                allowProgressiveImg: function () {
24326                                    // 1. Progressive image loading isn't working on webkit/blink
24327                                    //    when hw-acceleration (e.g. translateZ) is applied to IMG element.
24328                                    //    That's why in PhotoSwipe parent element gets zoom transform, not image itself.
24329                                    //
24330                                    // 2. Progressive image loading sometimes blinks in webkit/blink when applying animation to parent element.
24331                                    //    That's why it's disabled on touch devices (mainly because of swipe transition)
24332                                    //
24333                                    // 3. Progressive image loading sometimes doesn't work in IE (up to 11).
24334
24335                                    // Don't allow progressive loading on non-large touch devices
24336                                    return _options.forceProgressiveLoading || !_likelyTouchDevice || _options.mouseUsed || screen.width > 1200;
24337                                    // 1200 - to eliminate touch devices with large screen (like Chromebook Pixel)
24338                                },
24339
24340                                setContent: function (holder, index) {
24341
24342                                    if (_options.loop) {
24343                                        index = _getLoopedId(index);
24344                                    }
24345
24346                                    var prevItem = self.getItemAt(holder.index);
24347                                    if (prevItem) {
24348                                        prevItem.container = null;
24349                                    }
24350
24351                                    var item = self.getItemAt(index),
24352                                        img;
24353
24354                                    if (!item) {
24355                                        holder.el.innerHTML = '';
24356                                        return;
24357                                    }
24358
24359                                    // allow to override data
24360                                    _shout('gettingData', index, item);
24361
24362                                    holder.index = index;
24363                                    holder.item = item;
24364
24365                                    // base container DIV is created only once for each of 3 holders
24366                                    var baseDiv = item.container = framework.createEl('pswp__zoom-wrap');
24367
24368
24369                                    if (!item.src && item.html) {
24370                                        if (item.html.tagName) {
24371                                            baseDiv.appendChild(item.html);
24372                                        } else {
24373                                            baseDiv.innerHTML = item.html;
24374                                        }
24375                                    }
24376
24377                                    _checkForError(item);
24378
24379                                    _calculateItemSize(item, _viewportSize);
24380
24381                                    if (item.src && !item.loadError && !item.loaded) {
24382
24383                                        item.loadComplete = function (item) {
24384
24385                                            // gallery closed before image finished loading
24386                                            if (!_isOpen) {
24387                                                return;
24388                                            }
24389
24390                                            // check if holder hasn't changed while image was loading
24391                                            if (holder && holder.index === index) {
24392                                                if (_checkForError(item, true)) {
24393                                                    item.loadComplete = item.img = null;
24394                                                    _calculateItemSize(item, _viewportSize);
24395                                                    _applyZoomPanToItem(item);
24396
24397                                                    if (holder.index === _currentItemIndex) {
24398                                                        // recalculate dimensions
24399                                                        self.updateCurrZoomItem();
24400                                                    }
24401                                                    return;
24402                                                }
24403                                                if (!item.imageAppended) {
24404                                                    if (_features.transform && (_mainScrollAnimating || _initialZoomRunning)) {
24405                                                        _imagesToAppendPool.pu
24405sh({
24406                                                            item: item,
24407                                                            baseDiv: baseDiv,
24408                                                            img: item.img,
24409                                                            index: index,
24410                                                            holder: holder,
24411                                                            clearPlaceholder: true
24412                                                        });
24413                                                    } else {
24414                                                        _appendImage(index, item, baseDiv, item.img, _mainScrollAnimating || _initialZoomRunning, true);
24415                                                    }
24416                                                } else {
24417                                                    // remove preloader & mini-img
24418                                                    if (!_initialZoomRunning && item.placeholder) {
24419                                                        item.placeholder.style.display = 'none';
24420                                                        item.placeholder = null;
24421                                                    }
24422                                                }
24423                                            }
24424
24425                                            item.loadComplete = null;
24426                                            item.img = null; // no need to store image element after it's added
24427
24428                                            _shout('imageLoadComplete', index, item);
24429                                        };
24430
24431                                        if (framework.features.transform) {
24432
24433                                            var placeholderClassName = 'pswp__img pswp__img--placeholder';
24434                                            placeholderClassName += (item.msrc ? '' : ' pswp__img--placeholder--blank');
24435
24436                                            var placeholder = framework.createEl(placeholderClassName, item.msrc ? 'img' : '');
24437                                            if (item.msrc) {
24438                                                placeholder.src = item.msrc;
24439                                            }
24440
24441                                            _setImageSize(item, placeholder);
24442
24443                                            baseDiv.appendChild(placeholder);
24444                                            item.placeholder = placeholder;
24445
24446                                        }
24447
24448
24449                                        if (!item.loading) {
24450                                            _preloadImage(item);
24451                                        }
24452
24453
24454                                        if (self.allowProgressiveImg()) {
24455                                            // just append image
24456                                            if (!_initialContentSet && _features.transform) {
24457                                                _imagesToAppendPool.push({
24458                                                    item: item,
24459                                                    baseDiv: baseDiv,
24460                                                    img: item.img,
24461                                                    index: index,
24462                                                    holder: holder
24463                                                });
24464                                            } else {
24465                                                _appendImage(index, item, baseDiv, item.img, true, true);
24466                                            }
24467                                        }
24468
24469                                    } else if (item.src && !item.loadError) {
24470                                        // image object is created every time, due to bugs of image loading & delay when switching images
24471                                        img = framework.createEl('pswp__img', 'img');
24472                                        img.style.opacity = 1;
24473                                        img.src = item.src;
24474                                        _setImageSize(item, img);
24475                                        _appendImage(index, item, baseDiv, img, true);
24476                                    }
24477
24478
24479                                    if (!_initialContentSet && index === _currentItemIndex) {
24480                                        _currZoomElementStyle = baseDiv.style;
24481                                        _showOrHide(item, (img || item.img));
24482                                    } else {
24483                                        _applyZoomPanToItem(item);
24484                                    }
24485
24486                                    holder.el.innerHTML = '';
24487                                    holder.el.appendChild(baseDiv);
24488                                },
24489
24490                                cleanSlide: function (item) {
24491                                    if (item.img) {
24492                                        item.img.onload = item.img.onerror = null;
24493                                    }
24494                                    item.loaded = item.loading = item.img = item.imageAppended = false;
24495                                }
24496
24497                            }
24498                        });
24499
24500                        /*>>items-controller*/
24501
24502                        /*>>tap*/
24503                        /**
24504                         * tap.js:
24505                         *
24506                         * Displatches tap and double-tap events.
24507                         *
24508                         */
24509
24510                        var tapTimer,
24511                            tapReleasePoint = {},
24512                            _dispatchTapEvent = function (origEvent, releasePoint, pointerType) {
24513                                var e = document.createEvent('CustomEvent'),
24514                                    eDetail = {
24515                                        origEvent: origEvent,
24516                                        target: origEvent.target,
24517                                        releasePoint: releasePoint,
24518                                        pointerType: pointerType || 'touch'
24519                                    };
24520
24521                                e.initCustomEvent('pswpTap', true, true, eDetail);
24522                                origEvent.target.dispatchEvent(e);
24523                            };
24524
24525                        _registerModule('Tap', {
24526                            publicMethods: {
24527                                initTap: function () {
24528                                    _listen('firstTouchStart', self.onTapStart);
24529                                    _listen('touchRelease', self.onTapRelease);
24530                                    _listen('destroy', function () {
24531                                        tapReleasePoint = {};
24532                                        tapTimer = null;
24533                                    });
24534                                },
24535                                onTapStart: function (touchList) {
24536                                    if (touchList.length > 1) {
24537                                        clearTimeout(tapTimer);
24538                                        tapTimer = null;
24539                                    }
24540                                },
24541                                onTapRelease: function (e, releasePoint) {
24542                                    if (!releasePoint) {
24543                                        return;
24544                                    }
24545
24546                                    if (!_moved && !_isMultitouch && !_numAnimations) {
24547                                        var p0 = releasePoint;
24548                                        if (tapTimer) {
24549                                            clearTimeout(tapTimer);
24550                                            tapTimer = null;
24551
24552                                            // Check if taped on the same place
24553                                            if (_isNearbyPoints(p0, tapReleasePoint)) {
24554                                                _shout('doubleTap', p0);
24555                                                return;
24556                                            }
24557                                        }
24558
24559                                        if (releasePoint.type === 'mouse') {
24560                                            _dispatchTapEvent(e, releasePoint, 'mouse');
24561                                            return;
24562                                        }
24563
24564                                        var clickedTagName = e.target.tagName.toUpperCase();
24565                                        // avoid double tap delay on buttons and elements that have class pswp__single-tap
24566                                        if (clickedTagName === 'BUTTON' || framework.hasClass(e.target, 'pswp__single-tap')) {
24567                                            _dispatchTapEvent(e, releasePoint);
24568                                            return;
24569                                        }
24570
24571                                        _equalizePoints(tapReleasePoint, p0);
24572
24573                                        tapTimer = setTimeout(function () {
24574                                            _dispatchTapEvent(e, releasePoint);
24575                                            tapTimer = null;
24576                                        }, 300);
24577                                    }
24578                                }
24579                            }
24580                        });
24581
24582                        /*>>tap*/
24583
24584                        /*>>desktop-zoom*/
24585                        /**
24586                         *
24587                         * desktop-zoom.js:
24588                         *
24589                         * - Binds mousewheel event for paning zoomed image.
24590                         * - Manages "dragging", "zoomed-in", "zoom-out" classes.
24591                         *   (which are used for cursors and zoom icon)
24592                         * - Adds toggleDesktopZoom function.
24593                         *
24594                         */
24595
24596                        var _wheelDelta;
24597
24598                        _registerModule('DesktopZoom', {
24599
24600                            publicMethods: {
24601
24602                                initDesktopZoom: function () {
24603
24604                                    if (_oldIE) {
24605                                        // no zoom for old IE (<=8)
24606                                        return;
24607                                    }
24608
24609                                    if (_likelyTouchDevice) {
24610                                        // if detected hardware touch support, we wait until mouse is used,
24611                                        // and only then apply desktop-zoom features
24612                                        _listen('mouseUsed', function () {
24613                                            self.setupDesktopZoom();
24614                                        });
24615                                    } else {
24616                                        self.setupDesktopZoom(true);
24617                                    }
24618
24619                                },
24620
24621                                setupDesktopZoom: function (onInit) {
24622
24623                                    _wheelDelta = {};
24624
24625                                    var events = 'wheel mousewheel DOMMouseScroll';
24626
24627                                    _listen('bindEvents', function () {
24628                                        framework.bind(template, events, self.handleMouseWheel);
24629                                    });
24630
24631                                    _listen('unbindEvents', function () {
24632                                        if (_wheelDelta) {
24633                                            framework.unbind(template, events, self.handleMouseWheel);
24634                                        }
24635                                    });
24636
24637                                    self.mouseZoomedIn = false;
24638
24639                                    var hasDraggingClass,
24640                                        updateZoomable = function () {
24641                                            if (self.mouseZoomedIn) {
24642                                                framework.removeClass(template, 'pswp--zoomed-in');
24643                                                self.mouseZoomedIn = false;
24644                                            }
24645                                            if (_currZoomLevel < 1) {
24646                                                framework.addClass(template, 'pswp--zoom-allowed');
24647                                            } else {
24648                                                framework.removeClass(template, 'pswp--zoom-allowed');
24649                                            }
24650                                            removeDraggingClass();
24651                                        },
24652                                        removeDraggingClass = function () {
24653                                            if (hasDraggingClass) {
24654                                                framework.removeClass(template, 'pswp--dragging');
24655                                                hasDraggingClass = false;
24656                                            }
24657                                        };
24658
24659                                    _listen('resize', updateZoomable);
24660                                    _listen('afterChange', updateZoomable);
24661                                    _listen('pointerDown', function () {
24662                                        if (self.mouseZoomedIn) {
24663                                            hasDraggingClass = true;
24664                                            framework.addClass(template, 'pswp--dragging');
24665                                        }
24666                                    });
24667                                    _listen('pointerUp', removeDraggingClass);
24668
24669                                    if (!onInit) {
24670                                        updateZoomable();
24671                                    }
24672
24673                                },
24674
24675                                handleMouseWheel: function (e) {
24676
24677                                    if (_currZoomLevel <= self.currItem.fitRatio) {
24678                                        if (_options.modal) {
24679
24680                                            if (!_options.closeOnScroll || _numAnimations || _isDragging) {
24681                                                e.preventDefault();
24682                                            } else if (_transformKey && Math.abs(e.deltaY) > 2) {
24683                                                // close PhotoSwipe
24684                                                // if browser supports transforms & scroll changed enough
24685                                                _closedByScroll = true;
24686                                                self.close();
24687                                            }
24688
24689                                        }
24690                                        return true;
24691                                    }
24692
24693                                    // allow just one event to fire
24694                                    e.stopPropagation();
24695
24696                                    // https://developer.mozilla.org/en-US/docs/Web/Events/wheel
24697                                    _wheelDelta.x = 0;
24698
24699                                    if ('deltaX' in e) {
24700                                        if (e.deltaMode === 1 /* DOM_DELTA_LINE */) {
24701                                            // 18 - average line height
24702                                            _wheelDelta.x = e.deltaX * 18;
24703                                            _wheelDelta.y = e.deltaY * 18;
24704                                        } else {
24705                                            _wheelDelta.x = e.deltaX;
24706                                            _wheelDelta.y = e.deltaY;
24707                                        }
24708                                    } else if ('wheelDelta' in e) {
24709                                        if (e.wheelDeltaX) {
24710                                            _wheelDelta.x = -0.16 * e.wheelDeltaX;
24711                                        }
24712                                        if (e.wheelDeltaY) {
24713                                            _wheelDelta.y = -0.16 * e.wheelDeltaY;
24714                                        } else {
24715                                            _wheelDelta.y = -0.16 * e.wheelDelta;
24716                                        }
24717                                    } else if ('detail' in e) {
24718                                        _wheelDelta.y = e.detail;
24719                                    } else {
24720                                        return;
24721                                    }
24722
24723                                    _calculatePanBounds(_currZoomLevel, true);
24724
24725                                    var newPanX = _panOffset.x - _wheelDelta.x,
24726                                        newPanY = _panOffset.y - _wheelDelta.y;
24727
24728                                    // only prevent scrolling in nonmodal mode when not at edges
24729                                    if (_options.modal ||
24730                                        (
24731                                            newPanX <= _currPanBounds.min.x && newPanX >= _currPanBounds.max.x &&
24732                                            newPanY <= _currPanBounds.min.y && newPanY >= _currPanBounds.max.y
24733                                        )) {
24734                                        e.preventDefault();
24735                                    }
24736
24737                                    // TODO: use rAF instead of mousewheel?
24738                                    self.panTo(newPanX, newPanY);
24739                                },
24740
24741                                toggleDesktopZoom: function (centerPoint) {
24742                                    centerPoint = centerPoint || {
24743                                        x: _viewportSize.x / 2 + _offset.x,
24744                                        y: _viewportSize.y / 2 + _offset.y
24745                                    };
24746
24747                                    var doubleTapZoomLevel = _options.getDoubleTapZoom(true, self.currItem);
24748                                    var zoomOut = _currZoomLevel === doubleTapZoomLevel;
24749
24750                                    self.mouseZoomedIn = !zoomOut;
24751
24752                                    self.zoomTo(zoomOut ? self.currItem.initialZoomLevel : doubleTapZoomLevel, centerPoint, 333);
24753                                    framework[(!zoomOut ? 'add' : 'remove') + 'Class'](template, 'pswp--zoomed-in');
24754                                }
24755
24756                            }
24757                        });
24758
24759
24760                        /*>>desktop-zoom*/
24761
24762                        /*>>history*/
24763                        /**
24764                         *
24765                         * history.js:
24766                         *
24767                         * - Back button to close gallery.
24768                         *
24769                         * - Unique URL for each slide: example.com/&pid=1&gid=3
24770                         *   (where PID is picture index, and GID and gallery index)
24771                         *
24772                         * - Switch URL when slides change.
24773                         *
24774                         */
24775
24776
24777                        var _historyDefaultOptions = {
24778                            history: true,
24779                            galleryUID: 1
24780                        };
24781
24782                        var _historyUpdateTimeout,
24783                            _hashChangeTimeout,
24784                            _hashAnimCheckTimeout,
24785                            _hashChangedByScript,
24786                            _hashChangedByHistory,
24787                            _hashReseted,
24788                            _initialHash,
24789                            _historyChanged,
24790                            _closedFromURL,
24791                            _urlChangedOnce,
24792                            _windowLoc,
24793
24794                            _supportsPushState,
24795
24796                            _getHash = function () {
24797                                return _windowLoc.hash.substring(1);
24798                            },
24799                            _cleanHistoryTimeouts = function () {
24800
24801                                if (_historyUpdateTimeout) {
24802                                    clearTimeout(_historyUpdateTimeout);
24803                                }
24804
24805                                if (_hashAnimCheckTimeout) {
24806                                    clearTimeout(_hashAnimCheckTimeout);
24807                                }
24808                            },
24809
24810                            // pid - Picture index
24811                            // gid - Gallery index
24812                            _parseItemIndexFromURL = function () {
24813                                var hash = _getHash(),
24814                                    params = {};
24815
24816                                if (hash.length < 5) { // pid=1
24817                                    return params;
24818                                }
24819
24820                                var i, vars = hash.split('&');
24821                                for (i = 0; i < vars.length; i++) {
24822                                    if (!vars[i]) {
24823                                        continue;
24824                                    }
24825                                    var pair = vars[i].split('=');
24826                                    if (pair.length < 2) {
24827                                        continue;
24828                                    }
24829                                    params[pair[0]] = pair[1];
24830                                }
24831                                if (_options.galleryPIDs) {
24832                                    // detect custom pid in hash and search for it among the items collection
24833                                    var searchfor = params.pid;
24834                                    params.pid = 0; // if custom pid cannot be found, fallback to the first item
24835                                    for (i = 0; i < _items.length; i++) {
24836                                        if (_items[i].pid === searchfor) {
24837                                            params.pid = i;
24838                                            break;
24839                                        }
24840                                    }
24841                                } else {
24842                                    params.pid = parseInt(params.pid, 10) - 1;
24843                                }
24844                                if (params.pid < 0) {
24845                                    params.pid = 0;
24846                                }
24847                                return params;
24848                            },
24849                            _updateHash = function () {
24850
24851                                if (_hashAnimCheckTimeout) {
24852                                    clearTimeout(_hashAnimCheckTimeout);
24853                                }
24854
24855
24856                                if (_numAnimations || _isDragging) {
24857                                    // changing browser URL forces layout/paint in some browsers, which causes noticable lag during animation
24858                                    // that's why we update hash only when no animations running
24859                                    _hashAnimCheckTimeout = setTimeout(_updateHash, 500);
24860                                    return;
24861                                }
24862
24863                                if (_hashChangedByScript) {
24864                                    clearTimeout(_hashChangeTimeout);
24865                                } else {
24866                                    _hashChangedByScript = true;
24867                                }
24868
24869
24870                                var pid = (_currentItemIndex + 1);
24871                                var item = _getItemAt(_currentItemIndex);
24872                                if (item.hasOwnProperty('pid')) {
24873                                    // carry forward any custom pid assigned to the item
24874                                    pid = item.pid;
24875                                }
24876                                var newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + pid;
24877
24878                                if (!_historyChanged) {
24879                                    if (_windowLoc.hash.indexOf(newHash) === -1) {
24880                                        _urlChangedOnce = true;
24881                                    }
24882                                    // first time - add new hisory record, then just replace
24883                                }
24884
24885                                var newURL = _windowLoc.href.split('#')[0] + '#' + newHash;
24886
24887                                if (_supportsPushState) {
24888
24889                                    if ('#' + newHash !== window.location.hash) {
24890                                        history[_historyChanged ? 'replaceState' : 'pushState']('', document.title, newURL);
24891                                    }
24892
24893                                } else {
24894                                    if (_historyChanged) {
24895                                        _windowLoc.replace(newURL);
24896                                    } else {
24897                                        _windowLoc.hash = newHash;
24898                                    }
24899                                }
24900
24901
24902                                _historyChanged = true;
24903                                _hashChangeTimeout = setTimeout(function () {
24904                                    _hashChangedByScript = false;
24905                                }, 60);
24906                            };
24907
24908
24909                        _registerModule('History', {
24910
24911
24912                            publicMethods: {
24913                                initHistory: function () {
24914
24915                                    framework.extend(_options, _historyDefaultOptions, true);
24916
24917                                    if (!_options.history) {
24918                                        return;
24919                                    }
24920
24921
24922                                    _windowLoc = window.location;
24923                                    _urlChangedOnce = false;
24924                                    _closedFromURL = false;
24925                                    _historyChanged = false;
24926                                    _initialHash = _getHash();
24927                                    _supportsPushState = ('pushState' in history);
24928
24929
24930                                    if (_initialHash.indexOf('gid=') > -1) {
24931                                        _initialHash = _initialHash.split('&gid=')[0];
24932                                        _initialHash = _initialHash.split('?gid=')[0];
24933                                    }
24934
24935
24936                                    _listen('afterChange', self.updateURL);
24937                                    _listen('unbindEvents', function () {
24938                                        framework.unbind(window, 'hashchange', self.onHashChange);
24939                                    });
24940
24941
24942                                    var returnToOriginal = function () {
24943                                        _hashReseted = true;
24944                                        if (!_closedFromURL) {
24945
24946                                            if (_urlChangedOnce) {
24947                                                history.back();
24948                                            } else {
24949
24950                                                if (_initialHash) {
24951                                                    _windowLoc.hash = _initialHash;
24952                                                } else {
24953                                                    if (_supportsPushState) {
24954
24955                                                        // remove hash from url without refreshing it or scrolling to top
24956                                                        history.pushState('', document.title, _windowLoc.pathname + _windowLoc.search);
24957                                                    } else {
24958                                                        _windowLoc.hash = '';
24959                                                    }
24960                                                }
24961                                            }
24962
24963                                        }
24964
24965                                        _cleanHistoryTimeouts();
24966                                    };
24967
24968
24969                                    _listen('unbindEvents', function () {
24970                                        if (_closedByScroll) {
24971                                            // if PhotoSwipe is closed by scroll, we go "back" before the closing animation starts
24972                                            // this is done to keep the scroll position
24973                                            returnToOriginal();
24974                                        }
24975                                    });
24976                                    _listen('destroy', function () {
24977                                        if (!_hashReseted) {
24978                                            returnToOriginal();
24979                                        }
24980                                    });
24981                                    _listen('firstUpdate', function () {
24982                                        _currentItemIndex = _parseItemIndexFromURL().pid;
24983                                    });
24984
24985
24986                                    var index = _initialHash.indexOf('pid=');
24987                                    if (index > -1) {
24988                                        _initialHash = _initialHash.substring(0, index);
24989                                        if (_initialHash.slice(-1) === '&') {
24990                                            _initialHash = _initialHash.slice(0, -1);
24991                                        }
24992                                    }
24993
24994
24995                                    setTimeout(function () {
24996                                        if (_isOpen) { // hasn't destroyed yet
24997                                            framework.bind(window, 'hashchange', self.onHashChange);
24998                                        }
24999                                    }, 40);
25000
25001                                },
25002                                onHashChange: function () {
25003
25004                                    if (_getHash() === _initialHash) {
25005
25006                                        _closedFromURL = true;
25007                                        self.close();
25008                                        return;
25009                                    }
25010                                    if (!_hashChangedByScript) {
25011
25012                                        _hashChangedByHistory = true;
25013                                        self.goTo(_parseItemIndexFromURL().pid);
25014                                        _hashChangedByHistory = false;
25015                                    }
25016
25017                                },
25018                                updateURL: function () {
25019
25020                                    // Delay the update of URL, to avoid lag during transition,
25021                                    // and to not to trigger actions like "refresh page sound" or "blinking favicon" to often
25022
25023                                    _cleanHistoryTimeouts();
25024
25025
25026                                    if (_hashChangedByHistory) {
25027                                        return;
25028                                    }
25029
25030                                    if (!_historyChanged) {
25031                                        _updateHash(); // first time
25032                                    } else {
25033                                        _historyUpdateTimeout = setTimeout(_updateHash, 800);
25034                                    }
25035                                }
25036
25037                            }
25038                        });
25039
25040
25041                        /*>>history*/
25042                        framework.extend(self, publicMethods);
25043                    };
25044                    return PhotoSwipe;
25045                });
25046            }, {}], 2: [function (require, module, exports) {
25047                'use strict';
25048
25049                Object.defineProperty(exports, "__esModule", {
25050                    value: true
25051                });
25052                exports.PhotoSwipe = exports.default = undefined;
25053
25054                var _photoswipe = require('photoswipe');
25055
25056                var _photoswipe2 = _interopRequireDefault(_photoswipe);
25057
25058                var _photoswipeUiDefault = require('./libs/photoswipe-ui-default');
25059
25060                var _photoswipeUiDefault2 = _interopRequireDefault(_photoswipeUiDefault);
25061
25062                function _interopRequireDefault(obj) {
25063                    return obj && obj.__esModule ? obj : {default: obj};
25064                }
25065
25066                function PhotoSwipeMounter($) {
25067                    var $defaultGallery = $('<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> <button class="pswp__button pswp__button--share" title="Share"></button> <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button> <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>').appendTo('body'),
25068                        uid = 1;
25069
25070                    function getImgs($gallery) {
25071                        var slideSelector = getOptions($gallery).slideSelector;
25072
25073                        return $gallery.find(slideSelector).map(function (index) {
25074                            var $img = $(this).data('index', index),
25075                                tagName = this.tagName.toUpperCase();
25076
25077                            if (tagName === 'A') {
25078                                if (this.hash) {
25079                                    $img = $(this.hash);
25080                                } else {
25081                                    $img = $img.find('img').eq(0);
25082                                    $img.data('original-src', this.href);
25083                                }
25084                            } else if (tagName !== 'IMG') {
25085                                $img = $img.find('img');
25086                            }
25087
25088                            return $img[0];
25089                        });
25090                    }
25091
25092                    function getThumbBoundsFn($imgs) {
25093                        return function _getThumbBoundsFn(index) {
25094                            var $img = $imgs.eq(index),
25095                                imgOffset = $img.offset(),
25096                                imgWidth = $img[0].width;
25097
25098                            return {x: imgOffset.left, y: imgOffset.top, w: imgWidth};
25099                        };
25100                    }
25101
25102                    function getWH(wh, $img) {
25103                        var d = $.Deferred(),
25104                            wh_value = $img.data('original-src-' + wh),
25105                            original_src = decodeURI($img.data('original-src') || $img.attr('src')),
25106                            matches = original_src.match(/(\d+)[*×x](\d+)/);
25107
25108                        if (wh_value) {
25109                            d.resolve(wh_value);
25110                        } else if (matches !== null) {
25111                            d.resolve(matches[wh === 'width' ? 1 : 2]);
25112                        } else {
25113                            $('<img>').on('load', function () {
25114                                d.resolve(this[wh]);
25115                            }).attr('src', $img.attr('src'));
25116                        }
25117
25118                        return d.promise();
25119                    }
25120
25121                    function getHeight($img) {
25122                        return getWH('height', $img);
25123                    }
25124
25125                    function getWidth($img) {
25126                        return getWH('width', $img);
25127                    }
25128
25129                    function getImgSize($img) {
25130                        return $.when(getWidth($img), getHeight($img));
25131                    }
25132
25133                    function getImgInfo() {
25134                        var $img = $(this),
25135                            original_src = $img.data('original-src') || $img.attr('src'),
25136                            d = $.Deferred();
25137
25138                        if (this.tagName !== 'IMG') {
25139                            d.resolve({
25140                                html: this.innerHTML
25141                            });
25142                        } else {
25143                            getImgSize($img).done(function (w, h) {
25144                                var src = $img.attr('src'),
25145                                    title,
25146                                    caption_classname,
25147                                    $figcaption;
25148
25149                                function get_caption($elem, selector) {
25150                                    var $parent = $elem.parent(),
25151                                        $caption_element;
25152
25153                                    if (!$parent.length) {
25154                                        return undefined;
25155                                    }
25156
25157                                    $caption_element = $parent.find(selector);
25158                                    if ($caption_element.length) {
25159                                        return $caption_element.html();
25160                                    }
25161
25162                                    return get_caption($parent, selector);
25163                                }
25164
25165                                // try to find the slide title from :
25166                                // (in order)
25167                                //
25168                                // 1. `data-caption-class` (a class-name that indicates the element containing the caption)
25169                                // 2. `figcaption` element (the `figcaption` that resides inside a `figure` which contains the slide `img` element)
25170                                // 3. `alt` attribute (the `alt` attribute of the slide `img` element)
25171
25172                                if (caption_classname = $img.data('caption-class')) {
25173                                    title = get_caption($img, '.' + caption_classname);
25174                                } else if (($figcaption = $img.closest('figure').find('figcaption')) && $figcaption.length) {
25175                                    title = $figcaption.html();
25176                                } else {
25177                                    title = $img.attr('alt');
25178                                }
25179
25180                                d.resolve({
25181                                    w: w,
25182                                    h: h,
25183                                    src: original_src,
25184                                    msrc: src,
25185                                    title: title
25186                                });
25187                            });
25188                        }
25189
25190                        return d.promise();
25191                    }
25192
25193                    function getImgInfoArray($imgs) {
25194                        var imgInfoArray = $imgs.map(getImgInfo).get(),
25195                            d = $.Deferred();
25196
25197                        $.when.apply($, imgInfoArray).done(function () {
25198                            var imgInfoArray = Array.prototype.slice.call(arguments);
25199                            d.resolve(imgInfoArray);
25200                        });
25201
25202                        return d.promise();
25203                    }
25204
25205                    function getOptions($gallery) {
25206                        return $gallery.data('photoswipeOptions');
25207                    }
25208
25209                    function addUID($gallery) {
25210                        if (!$gallery.data('pswp-uid')) {
25211                            $gallery.data('pswp-uid', uid++);
25212                        }
25213                    }
25214
25215                    function openPhotoSwipe(index, $gallery, $imgs, imgInfoArray) {
25216                        var options = $.extend(getOptions($gallery).globalOptions, {
25217                                index: index,
25218                                getThumbBoundsFn: getThumbBoundsFn($imgs),
25219                                galleryUID: $gallery.data('pswp-uid')
25220                            }),
25221                            photoSwipe = new _photoswipe2.default($defaultGallery[0], _photoswipeUiDefault2.default, imgInfoArray, options);
25222
25223                        $.each(getOptions($gallery).events, function (eventName, eventHandler) {
25224                            photoSwipe.listen(eventName, eventHandler);
25225                        });
25226
25227                        photoSwipe.init();
25228                    }
25229
25230                    // parse picture index and gallery index from URL (#&pid=1&gid=2)
25231                    function photoswipeParseHash() {
25232                        var hash = window.location.hash.substring(1),
25233                            params = {};
25234
25235                        if (hash.length < 5) {
25236                            return params;
25237                        }
25238
25239                        var vars = hash.split('&');
25240                        for (var i = 0; i < vars.length; i++) {
25241                            if (!vars[i]) {
25242                                continue;
25243                            }
25244                            var pair = vars[i].split('=');
25245                            if (pair.length < 2) {
25246                                continue;
25247                            }
25248                            params[pair[0]] = parseInt(pair[1], 10);
25249                        }
25250
25251                        return params;
25252                    }
25253
25254                    function openFromURL($galleries) {
25255                        // Parse URL and open gallery if it contains #&pid=3&gid=1
25256                        var hashData = photoswipeParseHash();
25257                        if (hashData.pid && hashData.gid) {
25258                            (function () {
25259                                var $gallery = $galleries[hashData.gid - 1],
25260                                    pid = hashData.pid - 1,
25261                                    $imgs = getImgs($gallery),
25262                                    imgInfoArrayPromise = getImgInfoArray($imgs);
25263
25264                                imgInfoArrayPromise.done(function (imgInfoArray) {
25265                                    openPhotoSwipe(pid, $gallery, $imgs, imgInfoArray);
25266                                });
25267                            })();
25268                        }
25269                    }
25270
25271                    function addClickHandler($gallery, $imgs, imgInfoArray) {
25272                        $gallery.on('click.photoswipe', getOptions($gallery).slideSelector, function (e) {
25273                            e.preventDefault();
25274                            openPhotoSwipe($(this).data('index'), $gallery, $imgs, imgInfoArray);
25275                        });
25276                    }
25277
25278                    function removeClickHandler($gallery) {
25279                        $gallery.off('click.photoswipe');
25280                    }
25281
25282                    function update($gallery) {
25283                        var $imgs = getImgs($gallery),
25284                            imgInfoArrayPromise = getImgInfoArray($imgs);
25285
25286                        imgInfoArrayPromise.done(function (imgInfoArray) {
25287                            removeClickHandler($gallery);
25288                            addClickHandler($gallery, $imgs, imgInfoArray);
25289                        });
25290                    }
25291
25292                    $.fn.photoSwipe = function () {
25293                        var slideSelector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'img';
25294                        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
25295                        var events = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
25296
25297                        var defaultOptions = {
25298                                bgOpacity: 0.973,
25299                                showHideOpacity: true
25300                            },
25301                            globalOptions = $.extend(defaultOptions, options);
25302
25303                        // Initialize each gallery
25304                        var $galleries = [],
25305                            isUpdate = slideSelector === 'update';
25306
25307                        this.each(function () {
25308                            if (isUpdate) {
25309                                update($(this));
25310                                return;
25311                            }
25312
25313                            var $gallery = $(this).data('photoswipeOptions', {
25314                                    slideSelector: slideSelector,
25315                                    globalOptions: globalOptions,
25316                                    events: events
25317                                }),
25318                                // save options
25319                                $imgs = getImgs($gallery),
25320                                imgInfoArrayPromise = getImgInfoArray($imgs);
25321
25322                            addUID($gallery);
25323                            $galleries.push($gallery);
25324
25325                            imgInfoArrayPromise.done(function (imgInfoArray) {
25326                                addClickHandler($gallery, $imgs, imgInfoArray);
25327                            });
25328                        });
25329
25330                        if (!isUpdate) {
25331                            openFromURL($galleries);
25332                        }
25333
25334                        return this;
25335                    };
25336
25337                    // Attach original PhotoSwipe to $.fn.photoSwipe
25338                    $.fn.photoSwipe.PhotoSwipe = _photoswipe2.default;
25339                }
25340
25341
25342                PhotoSwipeMounter(jQuery);
25343
25344
25345                exports.default = PhotoSwipeMounter;
25346                exports.PhotoSwipe = _photoswipe2.default;
25347
25348            }, {"./libs/photoswipe-ui-default": 3, "photoswipe": 1}
25348], 3: [function (require, module, exports) {
25349                'use strict';
25350
25351                var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
25352                    return typeof obj;
25353                } : function (obj) {
25354                    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
25355                };
25356
25357                /*! PhotoSwipe Default UI - 4.1.1 - 2015-12-24
25358* http://photoswipe.com
25359* Copyright (c) 2015 Dmitry Semenov; */
25360                /**
25361                 *
25362                 * UI on top of main sliding area (caption, arrows, close button, etc.).
25363                 * Built just using public methods/properties of PhotoSwipe.
25364                 *
25365                 */
25366                (function (root, factory) {
25367                    if (true) {
25368                        !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
25369                            __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
25370                                (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
25371                                __WEBPACK_AMD_DEFINE_FACTORY__),
25372                        __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
25373                    } else {
25374                    }
25375                })(undefined, function () {
25376
25377                    'use strict';
25378
25379                    var PhotoSwipeUI_Default = function PhotoSwipeUI_Default(pswp, framework) {
25380
25381                        var ui = this;
25382                        var _overlayUIUpdated = false,
25383                            _controlsVisible = true,
25384                            _fullscrenAPI,
25385                            _controls,
25386                            _captionContainer,
25387                            _fakeCaptionContainer,
25388                            _indexIndicator,
25389                            _shareButton,
25390                            _shareModal,
25391                            _shareModalHidden = true,
25392                            _initalCloseOnScrollValue,
25393                            _isIdle,
25394                            _listen,
25395                            _loadingIndicator,
25396                            _loadingIndicatorHidden,
25397                            _loadingIndicatorTimeout,
25398                            _galleryHasOneSlide,
25399                            _options,
25400                            _defaultUIOptions = {
25401                                barsSize: {top: 44, bottom: 'auto'},
25402                                closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
25403                                timeToIdle: 4000,
25404                                timeToIdleOutside: 1000,
25405                                loadingIndicatorDelay: 1000, // 2s
25406
25407                                addCaptionHTMLFn: function addCaptionHTMLFn(item, captionEl /*, isFake */) {
25408                                    if (!item.title) {
25409                                        captionEl.children[0].innerHTML = '';
25410                                        return false;
25411                                    }
25412                                    captionEl.children[0].innerHTML = item.title;
25413                                    return true;
25414                                },
25415
25416                                closeEl: true,
25417                                captionEl: true,
25418                                fullscreenEl: true,
25419                                zoomEl: true,
25420                                shareEl: true,
25421                                counterEl: true,
25422                                arrowEl: true,
25423                                preloaderEl: true,
25424
25425                                tapToClose: false,
25426                                tapToToggleControls: true,
25427
25428                                clickToCloseNonZoomable: true,
25429
25430                                shareButtons: [{
25431                                    id: 'facebook',
25432                                    label: 'Share on Facebook',
25433                                    url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}'
25434                                }, {
25435                                    id: 'twitter',
25436                                    label: 'Tweet',
25437                                    url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'
25438                                }, {
25439                                    id: 'pinterest',
25440                                    label: 'Pin it',
25441                                    url: 'http://www.pinterest.com/pin/create/button/' + '?url={{url}}&media={{image_url}}&description={{text}}'
25442                                }, {id: 'download', label: 'Download image', url: '{{raw_image_url}}', download: true}],
25443                                getImageURLForShare: function getImageURLForShare() /* shareButtonData */ {
25444                                    return pswp.currItem.src || '';
25445                                },
25446                                getPageURLForShare: function getPageURLForShare() /* shareButtonData */ {
25447                                    return window.location.href;
25448                                },
25449                                getTextForShare: function getTextForShare() /* shareButtonData */ {
25450                                    return pswp.currItem.title || '';
25451                                },
25452
25453                                indexIndicatorSep: ' / ',
25454                                fitControlsWidth: 1200
25455
25456                            },
25457                            _blockControlsTap,
25458                            _blockControlsTapTimeout;
25459
25460                        var _onControlsTap = function _onControlsTap(e) {
25461                                if (_blockControlsTap) {
25462                                    return true;
25463                                }
25464
25465                                e = e || window.event;
25466
25467                                if (_options.timeToIdle && _options.mouseUsed && !_isIdle) {
25468                                    // reset idle timer
25469                                    _onIdleMouseMove();
25470                                }
25471
25472                                var target = e.target || e.srcElement,
25473                                    uiElement,
25474                                    clickedClass = target.getAttribute('class') || '',
25475                                    found;
25476
25477                                for (var i = 0; i < _uiElements.length; i++) {
25478                                    uiElement = _uiElements[i];
25479                                    if (uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name) > -1) {
25480                                        uiElement.onTap();
25481                                        found = true;
25482                                    }
25483                                }
25484
25485                                if (found) {
25486                                    if (e.stopPropagation) {
25487                                        e.stopPropagation();
25488                                    }
25489                                    _blockControlsTap = true;
25490
25491                                    // Some versions of Android don't prevent ghost click event
25492                                    // when preventDefault() was called on touchstart and/or touchend.
25493                                    //
25494                                    // This happens on v4.3, 4.2, 4.1,
25495                                    // older versions strangely work correctly,
25496                                    // but just in case we add delay on all of them)
25497                                    var tapDelay = framework.features.isOldAndroid ? 600 : 30;
25498                                    _blockControlsTapTimeout = setTimeout(function () {
25499                                        _blockControlsTap = false;
25500                                    }, tapDelay);
25501                                }
25502                            },
25503                            _fitControlsInViewport = function _fitControlsInViewport() {
25504                                return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth;
25505                            },
25506                            _togglePswpClass = function _togglePswpClass(el, cName, add) {
25507                                framework[(add ? 'add' : 'remove') + 'Class'](el, 'pswp__' + cName);
25508                            },
25509
25510
25511                            // add class when there is just one item in the gallery
25512                            // (by default it hides left/right arrows and 1ofX counter)
25513                            _countNumItems = function _countNumItems() {
25514                                var hasOneSlide = _options.getNumItemsFn() === 1;
25515
25516                                if (hasOneSlide !== _galleryHasOneSlide) {
25517                                    _togglePswpClass(_controls, 'ui--one-slide', hasOneSlide);
25518                                    _galleryHasOneSlide = hasOneSlide;
25519                                }
25520                            },
25521                            _toggleShareModalClass = function _toggleShareModalClass() {
25522                                _togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden);
25523                            },
25524                            _toggleShareModal = function _toggleShareModal() {
25525
25526                                _shareModalHidden = !_shareModalHidden;
25527
25528                                if (!_shareModalHidden) {
25529                                    _toggleShareModalClass();
25530                                    setTimeout(function () {
25531                                        if (!_shareModalHidden) {
25532                                            framework.addClass(_shareModal, 'pswp__share-modal--fade-in');
25533                                        }
25534                                    }, 30);
25535                                } else {
25536                                    framework.removeClass(_shareModal, 'pswp__share-modal--fade-in');
25537                                    setTimeout(function () {
25538                                        if (_shareModalHidden) {
25539                                            _toggleShareModalClass();
25540                                        }
25541                                    }, 300);
25542                                }
25543
25544                                if (!_shareModalHidden) {
25545                                    _updateShareURLs();
25546                                }
25547                                return false;
25548                            },
25549                            _openWindowPopup = function _openWindowPopup(e) {
25550                                e = e || window.event;
25551                                var target = e.target || e.srcElement;
25552
25553                                pswp.shout('shareLinkClick', e, target);
25554
25555                                if (!target.href) {
25556                                    return false;
25557                                }
25558
25559                                if (target.hasAttribute('download')) {
25560                                    return true;
25561                                }
25562
25563                                window.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,' + 'location=yes,width=550,height=420,top=100,left=' + (window.screen ? Math.round(screen.width / 2 - 275) : 100));
25564
25565                                if (!_shareModalHidden) {
25566                                    _toggleShareModal();
25567                                }
25568
25569                                return false;
25570                            },
25571                            _updateShareURLs = function _updateShareURLs() {
25572                                var shareButtonOut = '',
25573                                    shareButtonData,
25574                                    shareURL,
25575                                    image_url,
25576                                    page_url,
25577                                    share_text;
25578
25579                                for (var i = 0; i < _options.shareButtons.length; i++) {
25580                                    shareButtonData = _options.shareButtons[i];
25581
25582                                    image_url = _options.getImageURLForShare(shareButtonData);
25583                                    page_url = _options.getPageURLForShare(shareButtonData);
25584                                    share_text = _options.getTextForShare(shareButtonData);
25585
25586                                    shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url)).replace('{{image_url}}', encodeURIComponent(image_url)).replace('{{raw_image_url}}', image_url).replace('{{text}}', encodeURIComponent(share_text));
25587
25588                                    shareButtonOut += '<a href="' + shareURL + '" target="_blank" ' + 'class="pswp__share--' + shareButtonData.id + '"' + (shareButtonData.download ? 'download' : '') + '>
25588' + shareButtonData.label + '</a>';
25589
25590                                    if (_options.parseShareButtonOut) {
25591                                        shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut);
25592                                    }
25593                                }
25594                                _shareModal.children[0].innerHTML = shareButtonOut;
25595                                _shareModal.children[0].onclick = _openWindowPopup;
25596                            },
25597                            _hasCloseClass = function _hasCloseClass(target) {
25598                                for (var i = 0; i < _options.closeElClasses.length; i++) {
25599                                    if (framework.hasClass(target, 'pswp__' + _options.closeElClasses[i])) {
25600                                        return true;
25601                                    }
25602                                }
25603                            },
25604                            _idleInterval,
25605                            _idleTimer,
25606                            _idleIncrement = 0,
25607                            _onIdleMouseMove = function _onIdleMouseMove() {
25608                                clearTimeout(_idleTimer);
25609                                _idleIncrement = 0;
25610                                if (_isIdle) {
25611                                    ui.setIdle(false);
25612                                }
25613                            },
25614                            _onMouseLeaveWindow = function _onMouseLeaveWindow(e) {
25615                                e = e ? e : window.event;
25616                                var from = e.relatedTarget || e.toElement;
25617                                if (!from || from.nodeName === 'HTML') {
25618                                    clearTimeout(_idleTimer);
25619                                    _idleTimer = setTimeout(function () {
25620                                        ui.setIdle(true);
25621                                    }, _options.timeToIdleOutside);
25622                                }
25623                            },
25624                            _setupFullscreenAPI = function _setupFullscreenAPI() {
25625                                if (_options.fullscreenEl && !framework.features.isOldAndroid) {
25626                                    if (!_fullscrenAPI) {
25627                                        _fullscrenAPI = ui.getFullscreenAPI();
25628                                    }
25629                                    if (_fullscrenAPI) {
25630                                        framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
25631                                        ui.updateFullscreen();
25632                                        framework.addClass(pswp.template, 'pswp--supports-fs');
25633                                    } else {
25634                                        framework.removeClass(pswp.template, 'pswp--supports-fs');
25635                                    }
25636                                }
25637                            },
25638                            _setupLoadingIndicator = function _setupLoadingIndicator() {
25639                                // Setup loading indicator
25640                                if (_options.preloaderEl) {
25641
25642                                    _toggleLoadingIndicator(true);
25643
25644                                    _listen('beforeChange', function () {
25645
25646                                        clearTimeout(_loadingIndicatorTimeout);
25647
25648                                        // display loading indicator with delay
25649                                        _loadingIndicatorTimeout = setTimeout(function () {
25650
25651                                            if (pswp.currItem && pswp.currItem.loading) {
25652
25653                                                if (!pswp.allowProgressiveImg() || pswp.currItem.img && !pswp.currItem.img.naturalWidth) {
25654                                                    // show preloader if progressive loading is not enabled,
25655                                                    // or image width is not defined yet (because of slow connection)
25656                                                    _toggleLoadingIndicator(false);
25657                                                    // items-controller.js function allowProgressiveImg
25658                                                }
25659                                            } else {
25660                                                _toggleLoadingIndicator(true); // hide preloader
25661                                            }
25662                                        }, _options.loadingIndicatorDelay);
25663                                    });
25664                                    _listen('imageLoadComplete', function (index, item) {
25665                                        if (pswp.currItem === item) {
25666                                            _toggleLoadingIndicator(true);
25667                                        }
25668                                    });
25669                                }
25670                            },
25671                            _toggleLoadingIndicator = function _toggleLoadingIndicator(hide) {
25672                                if (_loadingIndicatorHidden !== hide) {
25673                                    _togglePswpClass(_loadingIndicator, 'preloader--active', !hide);
25674                                    _loadingIndicatorHidden = hide;
25675                                }
25676                            },
25677                            _applyNavBarGaps = function _applyNavBarGaps(item) {
25678                                var gap = item.vGap;
25679
25680                                if (_fitControlsInViewport()) {
25681
25682                                    var bars = _options.barsSize;
25683                                    if (_options.captionEl && bars.bottom === 'auto') {
25684                                        if (!_fakeCaptionContainer) {
25685                                            _fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');
25686                                            _fakeCaptionContainer.appendChild(framework.createEl('pswp__caption__center'));
25687                                            _controls.insertBefore(_fakeCaptionContainer, _captionContainer);
25688                                            framework.addClass(_controls, 'pswp__ui--fit');
25689                                        }
25690                                        if (_options.addCaptionHTMLFn(item, _fakeCaptionContainer, true)) {
25691
25692                                            var captionSize = _fakeCaptionContainer.clientHeight;
25693                                            gap.bottom = parseInt(captionSize, 10) || 44;
25694                                        } else {
25695                                            gap.bottom = bars.top;
25695 // if no caption, set size of bottom gap to size of top
25696                                        }
25697                                    } else {
25698                                        gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom;
25699                                    }
25700
25701                                    // height of top bar is static, no need to calculate it
25702                                    gap.top = bars.top;
25703                                } else {
25704                                    gap.top = gap.bottom = 0;
25705                                }
25706                            },
25707                            _setupIdle = function _setupIdle() {
25708                                // Hide controls when mouse is used
25709                                if (_options.timeToIdle) {
25710                                    _listen('mouseUsed', function () {
25711
25712                                        framework.bind(document, 'mousemove', _onIdleMouseMove);
25713                                        framework.bind(document, 'mouseout', _onMouseLeaveWindow);
25714
25715                                        _idleInterval = setInterval(function () {
25716                                            _idleIncrement++;
25717                                            if (_idleIncrement === 2) {
25718                                                ui.setIdle(true);
25719                                            }
25720                                        }, _options.timeToIdle / 2);
25721                                    });
25722                                }
25723                            },
25724                            _setupHidingControlsDuringGestures = function _setupHidingControlsDuringGestures() {
25725
25726                                // Hide controls on vertical drag
25727                                _listen('onVerticalDrag', function (now) {
25728                                    if (_controlsVisible && now < 0.95) {
25729                                        ui.hideControls();
25730                                    } else if (!_controlsVisible && now >= 0.95) {
25731                                        ui.showControls();
25732                                    }
25733                                });
25734
25735                                // Hide controls when pinching to close
25736                                var pinchControlsHidden;
25737                                _listen('onPinchClose', function (now) {
25738                                    if (_controlsVisible && now < 0.9) {
25739                                        ui.hideControls();
25740                                        pinchControlsHidden = true;
25741                                    } else if (pinchControlsHidden && !_controlsVisible && now > 0.9) {
25742                                        ui.showControls();
25743                                    }
25744                                });
25745
25746                                _listen('zoomGestureEnded', function () {
25747                                    pinchControlsHidden = false;
25748                                    if (pinchControlsHidden && !_controlsVisible) {
25749                                        ui.showControls();
25750                                    }
25751                                });
25752                            };
25753
25754                        var _uiElements = [{
25755                            name: 'caption',
25756                            option: 'captionEl',
25757                            onInit: function onInit(el) {
25758                                _captionContainer = el;
25759                            }
25760                        }, {
25761                            name: 'share-modal',
25762                            option: 'shareEl',
25763                            onInit: function onInit(el) {
25764                                _shareModal = el;
25765                            },
25766                            onTap: function onTap() {
25767                                _toggleShareModal();
25768                            }
25769                        }, {
25770                            name: 'button--share',
25771                            option: 'shareEl',
25772                            onInit: function onInit(el) {
25773                                _shareButton = el;
25774                            },
25775                            onTap: function onTap() {
25776                                _toggleShareModal();
25777                            }
25778                        }, {
25779                            name: 'button--zoom',
25780                            option: 'zoomEl',
25781                            onTap: pswp.toggleDesktopZoom
25782                        }, {
25783                            name: 'counter',
25784                            option: 'counterEl',
25785                            onInit: function onInit(el) {
25786                                _indexIndicator = el;
25787                            }
25788                        }, {
25789                            name: 'button--close',
25790                            option: 'closeEl',
25791                            onTap: pswp.close
25792                        }, {
25793                            name: 'button--arrow--left',
25794                            option: 'arrowEl',
25795                            onTap: pswp.prev
25796                        }, {
25797                            name: 'button--arrow--right',
25798                            option: 'arrowEl',
25799                            onTap: pswp.next
25800                        }, {
25801                            name: 'button--fs',
25802                            option: 'fullscreenEl',
25803                            onTap: function onTap() {
25804                                if (_fullscrenAPI.isFullscreen()) {
25805                                    _fullscrenAPI.exit();
25806                                } else {
25807                                    _fullscrenAPI.enter();
25808                                }
25809                            }
25810                        }, {
25811                            name: 'preloader',
25812                            option: 'preloaderEl',
25813                            onInit: function onInit(el) {
25814                                _loadingIndicator = el;
25815                            }
25816                        }];
25817
25818                        var _setupUIElements = function _setupUIElements() {
25819                            var item, classAttr, uiElement;
25820
25821                            var loopThroughChildElements = function loopThroughChildElements(sChildren) {
25822                                if (!sChildren) {
25823                                    return;
25824                                }
25825
25826                                var l = sChildren.length;
25827                                for (var i = 0; i < l; i++) {
25828                                    item = sChildren[i];
25829                                    classAttr = item.className;
25830
25831                                    for (var a = 0; a < _uiElements.length; a++) {
25832                                        uiElement = _uiElements[a];
25833
25834                                        if (classAttr.indexOf('pswp__' + uiElement.name) > -1) {
25835
25836                                            if (_options[uiElement.option]) {
25837                                                // if element is not disabled from options
25838
25839                                                framework.removeClass(item, 'psw
25839p__element--disabled');
25840                                                if (uiElement.onInit) {
25841                                                    uiElement.onInit(item);
25842                                                }
25843
25844                                                //item.style.display = 'block';
25845                                            } else {
25846                                                framework.addClass(item, 'pswp__element--disabled');
25847                                                //item.style.display = 'none';
25848                                            }
25849                                        }
25850                                    }
25851                                }
25852                            };
25853                            loopThroughChildElements(_controls.children);
25854
25855                            var topBar = framework.getChildByClass(_controls, 'pswp__top-bar');
25856                            if (topBar) {
25857                                loopThroughChildElements(topBar.children);
25858                            }
25859                        };
25860
25861                        ui.init = function () {
25862
25863                            // extend options
25864                            framework.extend(pswp.options, _defaultUIOptions, true);
25865
25866                            // create local link for fast access
25867                            _options = pswp.options;
25868
25869                            // find pswp__ui element
25870                            _controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui');
25871
25872                            // create local link
25873                            _listen = pswp.listen;
25874
25875                            _setupHidingControlsDuringGestures();
25876
25877                            // update controls when slides change
25878                            _listen('beforeChange', ui.update);
25879
25880                            // toggle zoom on double-tap
25881                            _listen('doubleTap', function (point) {
25882                                var initialZoomLevel = pswp.currItem.initialZoomLevel;
25883                                if (pswp.getZoomLevel() !== initialZoomLevel) {
25884                                    pswp.zoomTo(initialZoomLevel, point, 333);
25885                                } else {
25886                                    pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333);
25887                                }
25888                            });
25889
25890                            // Allow text selection in caption
25891                            _listen('preventDragEvent', function (e, isDown, preventObj) {
25892                                var t = e.target || e.srcElement;
25893                                if (t && t.getAttribute('class') && e.type.indexOf('mouse') > -1 && (t.getAttribute('class').indexOf('__caption') > 0 || /(SMALL|STRONG|EM)/i.test(t.tagName))) {
25894                                    preventObj.prevent = false;
25895                                }
25896                            });
25897
25898                            // bind events for UI
25899                            _listen('bindEvents', function () {
25900                                framework.bind(_controls, 'pswpTap click', _onControlsTap);
25901                                framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
25902
25903                                if (!pswp.likelyTouchDevice) {
25904                                    framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
25905                                }
25906                            });
25907
25908                            // unbind events for UI
25909                            _listen('unbindEvents', function () {
25910                                if (!_shareModalHidden) {
25911                                    _toggleShareModal();
25912                                }
25913
25914                                if (_idleInterval) {
25915                                    clearInterval(_idleInterval);
25916                                }
25917                                framework.unbind(document, 'mouseout', _onMouseLeaveWindow);
25918                                framework.unbind(document, 'mousemove', _onIdleMouseMove);
25919                                framework.unbind(_controls, 'pswpTap click', _onControlsTap);
25920                                framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
25921                                framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
25922
25923                                if (_fullscrenAPI) {
25924                                    framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
25925                                    if (_fullscrenAPI.isFullscreen()) {
25926                                        _options.hideAnimationDuration = 0;
25927                                        _fullscrenAPI.exit();
25928                                    }
25929                                    _fullscrenAPI = null;
25930                                }
25931                            });
25932
25933                            // clean up things when gallery is destroyed
25934                            _listen('destroy', function () {
25935                                if (_options.captionEl) {
25936                                    if (_fakeCaptionContainer) {
25937                                        _controls.removeChild(_fakeCaptionContainer);
25938                                    }
25939                                    framework.removeClass(_captionContainer, 'pswp__caption--empty');
25940                                }
25941
25942                                if (_shareModal) {
25943                                    _shareModal.children[0].onclick = null;
25944                                }
25945                                framework.removeClass(_controls, 'pswp__ui--over-close');
25946                                framework.addClass(_controls, 'pswp__ui--hidden');
25947                                ui.setIdle(false);
25948                            });
25949
25950                            if (!_options.showAnimationDuration) {
25951                                framework.removeClass(_controls, 'pswp__ui--hidden');
25952                            }
25953                            _listen('initialZoomIn', function () {
25954                                if (_options.showAnimationDuration) {
25955                                    framework.removeClass(_controls, 'pswp__ui--hidden');
25956                                }
25957                            });
25958                            _listen('initialZoomOut', function () {
25959                                framework.addClass(_controls, 'pswp__ui--hidden');
25960                            });
25961
25962                            _listen('parseVerticalMargin', _applyNavBarGaps);
25963
25964                            _setupUIElements();
25965
25966                            if (_options.shareEl && _shareButton && _shareModal) {
25967                                _shareModalHidden = true;
25968                            }
25969
25970                            _countNumItems();
25971
25972                            _setupIdle();
25973
25974                            _setupFullscreenAPI();
25975
25976                            _setupLoadingIndicator();
25977                        };
25978
25979                        ui.setIdle = function (isIdle) {
25980                            _isIdle = isIdle;
25981                            _togglePswpClass(_controls, 'ui--idle', isIdle);
25982                        };
25983
25984                        ui.update = function () {
25985                            // Don't update UI if it's hidden
25986                            if (_controlsVisible && pswp.currItem) {
25987
25988                                ui.updateIndexIndicator();
25989
25990                                if (_options.captionEl) {
25991                                    _options.addCaptionHTMLFn(pswp.currItem, _captionContainer);
25992
25993                                    _togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title);
25994                                }
25995
25996                                _overlayUIUpdated = true;
25997                            } else {
25998                                _overlayUIUpdated = false;
25999                            }
26000
26001                            if (!_shareModalHidden) {
26002                                _toggleShareModal();
26003                            }
26004
26005                            _countNumItems();
26006                        };
26007
26008                        ui.updateFullscreen = function (e) {
26009
26010                            if (e) {
26011                                // some browsers change window scroll position during the fullscreen
26012                                // so PhotoSwipe updates it just in case
26013                                setTimeout(function () {
26014                                    pswp.setScrollOffset(0, framework.getScrollY());
26015                                }, 50);
26016                            }
26017
26018                            // toogle pswp--fs class on root element
26019                            framework[(_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class'](pswp.template, 'pswp--fs');
26020                        };
26021
26022                        ui.updateIndexIndicator = function () {
26023                            if (_options.counterEl) {
26024                                _indexIndicator.innerHTML = pswp.getCurrentIndex() + 1 + _options.indexIndicatorSep + _options.getNumItemsFn();
26025                            }
26026                        };
26027
26028                        ui.onGlobalTap = function (e) {
26029                            e = e || window.event;
26030                            var target = e.target || e.srcElement;
26031
26032                            if (_blockControlsTap) {
26033                                return;
26034                            }
26035
26036                            if (e.detail && e.detail.pointerType === 'mouse') {
26037
26038                                // close gallery if clicked outside of the image
26039                                if (_hasCloseClass(target)) {
26040                                    pswp.close();
26041                                    return;
26042                                }
26043
26044                                if (framework.hasClass(target, 'pswp__img')) {
26045                                    if (pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {
26046                                        if (_options.clickToCloseNonZoomable) {
26047                                            pswp.close();
26048                                        }
26049                                    } else {
26050                                        pswp.toggleDesktopZoom(e.detail.releasePoint);
26051                                    }
26052                                }
26053                            } else {
26054
26055                                // tap anywhere (except buttons) to toggle visibility of controls
26056                                if (_options.tapToToggleControls) {
26057                                    if (_controlsVisible) {
26058                                        ui.hideControls();
26059                                    } else {
26060                                        ui.showControls();
26061                                    }
26062                                }
26063
26064                                // tap to close gallery
26065                                if (_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target))) {
26066                                    pswp.close();
26067                                    return;
26068                                }
26069                            }
26070                        };
26071                        ui.onMouseOver = function (e) {
26072                            e = e || window.event;
26073                            var target = e.target || e.srcElement;
26074
26075                            // add class when mouse is over an element that should close the gallery
26076                            _togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target));
26077                        };
26078
26079                        ui.hideControls = function () {
26080                            framework.addClass(_controls, 'pswp__ui--hidden');
26081                            _controlsVisible = false;
26082                        };
26083
26084                        ui.showControls = function () {
26085                            _controlsVisible = true;
26086                            if (!_overlayUIUpdated) {
26087                                ui.update();
26088                            }
26089                            framework.removeClass(_controls, 'pswp__ui--hidden');
26090                        };
26091
26092                        ui.supportsFullscreen = function () {
26093                            var d = document;
26094                            return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);
26095                        };
26096
26097                        ui.getFullscreenAPI = function () {
26098                            var dE = document.documentElement,
26099                                api,
26100                                tF = 'fullscreenchange';
26101
26102                            if (dE.requestFullscreen) {
26103                                api = {
26104                                    enterK: 'requestFullscreen',
26105                                    exitK: 'exitFullscreen',
26106                                    elementK: 'fullscreenElement',
26107                                    eventK: tF
26108                                };
26109                            } else if (dE.mozRequestFullScreen) {
26110                                api = {
26111                                    enterK: 'mozRequestFullScreen',
26112                                    exitK: 'mozCancelFullScreen',
26113                                    elementK: 'mozFullScreenElement',
26114                                    eventK: 'moz' + tF
26115                                };
26116                            } else if (dE.webkitRequestFullscreen) {
26117                                api = {
26118                                    enterK: 'webkitRequestFullscreen',
26119                                    exitK: 'webkitExitFullscreen',
26120                                    elementK: 'webkitFullscreenElement',
26121                                    eventK: 'webkit' + tF
26122                                };
26123                            } else if (dE.msRequestFullscreen) {
26124                                api = {
26125                                    enterK: 'msRequestFullscreen',
26126                                    exitK: 'msExitFullscreen',
26127                                    elementK: 'msFullscreenElement',
26128                                    eventK: 'MSFullscreenChange'
26129                                };
26130                            }
26131
26132                            if (api) {
26133                                api.enter = function () {
26134                                    // disable close-on-scroll in fullscreen
26135                                    _initalCloseOnScrollValue = _options.closeOnScroll;
26136                                    _options.closeOnScroll = false;
26137
26138                                    if (this.enterK === 'webkitRequestFullscreen') {
26139                                        pswp.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT);
26140                                    } else {
26141                                        return pswp.template[this.enterK]();
26142                                    }
26143                                };
26144                                api.exit = function () {
26145                                    _options.closeOnScroll = _initalCloseOnScrollValue;
26146
26147                                    return document[this.exitK]();
26148                                };
26149                                api.isFullscreen = function () {
26150                                    return document[this.elementK];
26151                                };
26152                            }
26153
26154                            return api;
26155                        };
26156                    };
26157                    return PhotoSwipeUI_Default;
26158                });
26159
26160            }, {}]
26161        }, {}, [2]);
26162
26163
26164        /***/
26165    }),
26166    /* 56 */
26167    /***/ (function (module, exports, __webpack_require__) {
26168
26169
26170        /**
26171         * Load required plugins.
26172         */
26173        window.imagesLoaded = __webpack_require__(57);
26174        window.Shuffle = __webpack_require__(58);
26175
26176
26177        /**
26178         * Configure the plugin.
26179         */
26180
26181        +function ($) {
26182            page.registerVendor('Shuffle');
26183
26184            page.initShuffle = function () {
26185                if (undefined === window['Shuffle'] || 0 === $('[data-provide="shuffle"]').length) {
26186                    return;
26187                }
26188
26189                var Shuffle = window.Shuffle;
26190
26191                $('[data-provide="shuffle"]').each(function () {
26192
26193                    var list = $(this).find('[data-shuffle="list"]');
26194                    var filter = $(this).find('[data-shuffle="filter"]');
26195                    var search = $(this).find('[data-shuffle="search"]');
26196                    var options = {
26197                        itemSelector: '[data-shuffle="item"]',
26198                        sizer: '[data-shuffle="sizer"]',
26199                        delimeter: ',',
26200                        speed: 500,
26201                    };
26202
26203                    var shuffleInstance = new Shuffle(list, options);
26204
26205                    if (filter.length) {
26206
26207                        $(filter).find('[data-shuffle="button"]').each(function () {
26208                            $(this).on('click', function () {
26209                                var btn = $(this);
26210                                var isActive = btn.hasClass('active');
26211                                var btnGroup = btn.data('group');
26212
26213                                $(this).closest('[data-shuffle="filter"]').find('[data-shuffle="button"].active').removeClass('active');
26214
26215                                var filterGroup;
26216                                if (isActive) {
26217                                    btn.removeClass('active');
26218                                    filterGroup = Shuffle.ALL_ITEMS;
26219                                } else {
26220                                    btn.addClass('active');
26221                                    filterGroup = btnGroup;
26222                                }
26223
26224                                shuffleInstance.filter(filterGroup);
26225                            });
26226                        });
26227
26228                    } //End if
26229
26230
26231                    if (search.length) {
26232                        search.on('keyup', function () {
26233                            var searchText = $(this).val().toLowerCase();
26234                            shuffleInstance.filter(function (element, shuffle) {
26235                                var itemText = element.textContent.toLowerCase().trim();
26236                                return itemText.indexOf(searchText) !== -1;
26237                            });
26238                        });
26239                    }
26240
26241
26242                    $(this).imagesLoaded(function () {
26243                        shuffleInstance.layout()
26244                    });
26245
26246
26247                });
26248
26249
26250            }
26251
26252        }(jQuery);
26253
26254
26255        /***/
26256    }),
26257    /* 57 */
26258    /***/ (function (module, exports, __webpack_require__) {
26259
26260        var __WEBPACK_LOCAL_MODULE_0__, __WEBPACK_LOCAL_MODULE_0__factory, __WEBPACK_LOCAL_MODULE_0__module;
26261        var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
26262 * imagesLoaded PACKAGED v4.1.4
26263 * JavaScript is all like "You images are done yet or what?"
26264 * MIT License
26265 */
26266
26267        /**
26268         * EvEmitter v1.1.0
26269         * Lil' event emitter
26270         * MIT License
26271         */
26272
26273        /* jshint unused: true, undef: true, strict: true */
26274
26275        (function (global, factory) {
26276            // universal module definition
26277            /* jshint strict: false */ /* globals define, module, window */
26278            if (true) {
26279                // AMD - RequireJS
26280                !(__WEBPACK_LOCAL_MODULE_0__factory = (factory), (__WEBPACK_LOCAL_MODULE_0__module = {
26281                    id: "ev-emitter/ev-emitter",
26282                    exports: {},
26283                    loaded: false
26284                }), __WEBPACK_LOCAL_MODULE_0__ = (typeof __WEBPACK_LOCAL_MODULE_0__factory === 'function' ? (__WEBPACK_LOCAL_MODULE_0__factory.call(__WEBPACK_LOCAL_MODULE_0__module.exports, __webpack_require__, __WEBPACK_LOCAL_MODULE_0__module.exports, __WEBPACK_LOCAL_MODULE_0__module)) : __WEBPACK_LOCAL_MODULE_0__factory), (__WEBPACK_LOCAL_MODULE_0__module.loaded = true), __WEBPACK_LOCAL_MODULE_0__ === undefined && (__WEBPACK_LOCAL_MODULE_0__ = __WEBPACK_LOCAL_MODULE_0__module.exports));
26285            } else {
26286            }
26287
26288        }(typeof window != 'undefined' ? window : this, function () {
26289
26290
26291            function EvEmitter() {
26292            }
26293
26294            var proto = EvEmitter.prototype;
26295
26296            proto.on = function (eventName, listener) {
26297                if (!eventName || !listener) {
26298                    return;
26299                }
26300                // set events hash
26301                var events = this._events = this._events || {};
26302                // set listeners array
26303                var listeners = events[eventName] = events[eventName] || [];
26304                // only add once
26305                if (listeners.indexOf(listener) == -1) {
26306                    listeners.push(listener);
26307                }
26308
26309                return this;
26310            };
26311
26312            proto.once = function (eventName, listener) {
26313                if (!eventName || !listener) {
26314                    return;
26315                }
26316                // add event
26317                this.on(eventName, listener);
26318                // set once flag
26319                // set onceEvents hash
26320                var onceEvents = this._onceEvents = this._onceEvents || {};
26321                // set onceListeners object
26322                var onceListeners = onceEvents[eventName] = onceEvents[eventName] || {};
26323                // set flag
26324                onceListeners[listener] = true;
26325
26326                return this;
26327            };
26328
26329            proto.off = function (eventName, listener) {
26330                var listeners = this._events && this._events[eventName];
26331                if (!listeners || !listeners.length) {
26332                    return;
26333                }
26334                var index = listeners.indexOf(listener);
26335                if (index != -1) {
26336                    listeners.splice(index, 1);
26337                }
26338
26339                return this;
26340            };
26341
26342            proto.emitEvent = function (eventName, args) {
26343                var listeners = this._events && this._events[eventName];
26344                if (!listeners || !listeners.length) {
26345                    return;
26346                }
26347                // copy over to avoid interference if .off() in listener
26348                listeners = listeners.slice(0);
26349                args = args || [];
26350                // once stuff
26351                var onceListeners = this._onceEvents && this._onceEvents[eventName];
26352
26353                for (var i = 0; i < listeners.length; i++) {
26354                    var listener = listeners[i]
26355                    var isOnce = onceListeners && onceListeners[listener];
26356                    if (isOnce) {
26357                        // remove listener
26358                        // remove before trigger to prevent recursion
26359                        this.off(eventName, listener);
26360                        // unset once flag
26361                        delete onceListeners[listener];
26362                    }
26363                    // trigger listener
26364                    listener.apply(this, args);
26365                }
26366
26367                return this;
26368            };
26369
26370            proto.allOff = function () {
26371                delete this._events;
26372                delete this._onceEvents;
26373            };
26374
26375            return EvEmitter;
26376
26377        }));
26378
26379        /*!
26380 * imagesLoaded v4.1.4
26381 * JavaScript is all like "You images are done yet or what?"
26382 * MIT License
26383 */
26384
26385        (function (window, factory) {
26386            'use strict';
26387            // universal module definition
26388
26389            /*global define: false, module: false, require: false */
26390
26391            if (true) {
26392                // AMD
26393                !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
26394                    __WEBPACK_LOCAL_MODULE_0__
26395                ], __WEBPACK_AMD_DEFINE_RESULT__ = (function (EvEmitter) {
26396                    return factory(window, EvEmitter);
26397                }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
26398                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
26399            } else {
26400            }
26401
26402        })(typeof window !== 'undefined' ? window : this,
26403
vendor: 4,909 bytes, lines 26404-26529
26404// --------------------------  factory -------------------------- //
26405
26406            function factory(window, EvEmitter) {
26407
26408
26409                var $ = window.jQuery;
26410                var console = window.console;
26411
26412// -------------------------- helpers -------------------------- //
26413
26414// extend objects
26415                function extend(a, b) {
26416                    for (var prop in b) {
26417                        a[prop] = b[prop];
26418                    }
26419                    return a;
26420                }
26421
26422                var arraySlice = Array.prototype.slice;
26423
26424// turn element or nodeList into an array
26425                function makeArray(obj) {
26426                    if (Array.isArray(obj)) {
26427                        // use object if already an array
26428                        return obj;
26429                    }
26430
26431                    var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
26432                    if (isArrayLike) {
26433                        // convert nodeList to array
26434                        return arraySlice.call(obj);
26435                    }
26436
26437                    // array of single index
26438                    return [obj];
26439                }
26440
26441// -------------------------- imagesLoaded -------------------------- //
26442
26443                /**
26444                 * @param {Array, Element, NodeList, String} elem
26445                 * @param {Object or Function} options - if function, use as callback
26446                 * @param {Function} onAlways - callback function
26447                 */
26448                function ImagesLoaded(elem, options, onAlways) {
26449                    // coerce ImagesLoaded() without new, to be new ImagesLoaded()
26450                    if (!(this instanceof ImagesLoaded)) {
26451                        return new ImagesLoaded(elem, options, onAlways);
26452                    }
26453                    // use elem as selector string
26454                    var queryElem = elem;
26455                    if (typeof elem == 'string') {
26456                        queryElem = document.querySelectorAll(elem);
26457                    }
26458                    // bail if bad element
26459                    if (!queryElem) {
26460                        console.error('Bad element for imagesLoaded ' + (queryElem || elem));
26461                        return;
26462                    }
26463
26464                    this.elements = makeArray(queryElem);
26465                    this.options = extend({}, this.options);
26466                    // shift arguments if no options set
26467                    if (typeof options == 'function') {
26468                        onAlways = options;
26469                    } else {
26470                        extend(this.options, options);
26471                    }
26472
26473                    if (onAlways) {
26474                        this.on('always', onAlways);
26475                    }
26476
26477                    this.getImages();
26478
26479                    if ($) {
26480                        // add jQuery Deferred object
26481                        this.jqDeferred = new $.Deferred();
26482                    }
26483
26484                    // HACK check async to allow time to bind listeners
26485                    setTimeout(this.check.bind(this));
26486                }
26487
26488                ImagesLoaded.prototype = Object.create(EvEmitter.prototype);
26489
26490                ImagesLoaded.prototype.options = {};
26491
26492                ImagesLoaded.prototype.getImages = function () {
26493                    this.images = [];
26494
26495                    // filter & find items if we have an item selector
26496                    this.elements.forEach(this.addElementImages, this);
26497                };
26498
26499                /**
26500                 * @param {Node} element
26501                 */
26502                ImagesLoaded.prototype.addElementImages = function (elem) {
26503                    // filter siblings
26504                    if (elem.nodeName == 'IMG') {
26505                        this.addImage(elem);
26506                    }
26507                    // get background image on element
26508                    if (this.options.background === true) {
26509                        this.addElementBackgroundImages(elem);
26510                    }
26511
26512                    // find children
26513                    // no non-element nodes, #--143
26514                    var nodeType = elem.nodeType;
26515                    if (!nodeType || !elementNodeTypes[nodeType]) {
26516                        return;
26517                    }
26518                    var childImgs = elem.querySelectorAll('img');
26519                    // concat childElems to filterFound array
26520                    for (var i = 0; i < childImgs.length; i++) {
26521                        var img = childImgs[i];
26522                        this.addImage(img);
26523                    }
26524
26525                    // get child background images
26526                    if (typeof this.options.background == 'string') {
26527                        var children = elem.querySelectorAll(this.options.background);
26528                        for (i = 0; i < children.length; i++) {
26529                            var child = children[i];
vendor: 4,116 bytes, lines 26530-26631
26530                            this.addElementBackgroundImages(child);
26531                        }
26532                    }
26533                };
26534
26535                var elementNodeTypes = {
26536                    1: true,
26537                    9: true,
26538                    11: true
26539                };
26540
26541                ImagesLoaded.prototype.addElementBackgroundImages = function (elem) {
26542                    var style = getComputedStyle(elem);
26543                    if (!style) {
26544                        // Firefox returns null if in a hidden iframe https://bugzil.la/548397
26545                        return;
26546                    }
26547                    // get url inside url("...")
26548                    var reURL = /url\((['"])?(.*?)\1\)/gi;
26549                    var matches = reURL.exec(style.backgroundImage);
26550                    while (matches !== null) {
26551                        var url = matches && matches[2];
26552                        if (url) {
26553                            this.addBackground(url, elem);
26554                        }
26555                        matches = reURL.exec(style.backgroundImage);
26556                    }
26557                };
26558
26559                /**
26560                 * @param {Image} img
26561                 */
26562                ImagesLoaded.prototype.addImage = function (img) {
26563                    var loadingImage = new LoadingImage(img);
26564                    this.images.push(loadingImage);
26565                };
26566
26567                ImagesLoaded.prototype.addBackground = function (url, elem) {
26568                    var background = new Background(url, elem);
26569                    this.images.push(background);
26570                };
26571
26572                ImagesLoaded.prototype.check = function () {
26573                    var _this = this;
26574                    this.progressedCount = 0;
26575                    this.hasAnyBroken = false;
26576                    // complete if no images
26577                    if (!this.images.length) {
26578                        this.complete();
26579                        return;
26580                    }
26581
26582                    function onProgress(image, elem, message) {
26583                        // HACK - Chrome triggers event before object properties have changed. #83
26584                        setTimeout(function () {
26585                            _this.progress(image, elem, message);
26586                        });
26587                    }
26588
26589                    this.images.forEach(function (loadingImage) {
26590                        loadingImage.once('progress', onProgress);
26591                        loadingImage.check();
26592                    });
26593                };
26594
26595                ImagesLoaded.prototype.progress = function (image, elem, message) {
26596                    this.progressedCount++;
26597                    this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
26598                    // progress event
26599                    this.emitEvent('progress', [this, image, elem]);
26600                    if (this.jqDeferred && this.jqDeferred.notify) {
26601                        this.jqDeferred.notify(this, image);
26602                    }
26603                    // check if completed
26604                    if (this.progressedCount == this.images.length) {
26605                        this.complete();
26606                    }
26607
26608                    if (this.options.debug && console) {
26609                        ConsoleLog('#131: Progress: ' + message, image, elem);
26610                    }
26611                };
26612
26613                ImagesLoaded.prototype.complete = function () {
26614                    var eventName = this.hasAnyBroken ? 'fail' : 'done';
26615                    this.isComplete = true;
26616                    this.emitEvent(eventName, [this]);
26617                    this.emitEvent('always', [this]);
26618                    if (this.jqDeferred) {
26619                        var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
26620                        this.jqDeferred[jqMethod](this);
26621                    }
26622                };
26623
26624// --------------------------  -------------------------- //
26625
26626                function LoadingImage(img) {
26627                    this.img = img;
26628                }
26629
26630                LoadingImage.prototype = Object.create(EvEmitter.prototype);
26631
26632                LoadingImage.prototype.check = function () {
26633                    // If complete is true and browser supports natural sizes,
26634                    // try to check for image status manually.
26635                    var isComplete = this.getIsImageComplete();
26636                    if (isComplete) {
26637                        // report based on naturalWidth
26638                        this.confirm(this.img.naturalWidth !== 0, 'naturalWidth'); // @js-ok — prototype method, not window.confirm
26639                        return;
26640                    }
26641
26642                    // If none of the checks above matched, simulate loading on detached element.
26643                    this.proxyImage = new Image();
26644                    this.proxyImage.addEventListener('load', this);
26645                    this.proxyImage.addEventListener('error', this);
26646                    // bind to image as well for Firefox. #191
26647                    this.img.addEventListener('load', this);
26648                    this.img.addEventListener('error', this);
26649                    this.proxyImage.src = this.img.src;
26650                };
26651
26652                LoadingImage.prototype.getIsImageComplete = function () {
26653                    // check for non-zero, non-undefined naturalWidth
26654                    // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
26655                    return this.img.complete && this.img.naturalWidth;
26656                };
26657
26658                LoadingImage.prototype.confirm = function (isLoaded, message) {
26659                    this.isLoaded = isLoaded;
26660                    this.emitEvent('progress', [this, this.img, message]);
26661                };
26662
26663// ----- events ----- //
26664
26665// trigger specified handler for event type
26666                LoadingImage.prototype.handleEvent = function (event) {
26667                    var method = 'on' + event.type;
26668                    if (this[method]) {
26669                        this[method](event);
26670                    }
26671                };
26672
26673                LoadingImage.prototype.onload = function () {
26674                    this.confirm(true, 'onload'); // @js-ok — prototype method, not window.confirm
26675                    this.unbindEvents();
26676                };
26677
26678                LoadingImage.prototype.onerror = function () {
26679                    this.confirm(false, 'onerror'); // @js-ok — prototype method, not window.confirm
26680                    this.unbindEvents();
26681                };
26682
26683                LoadingImage.prototype.unbindEvents = function () {
26684                    this.proxyImage.removeEventListener('load', this);
26685                    this.proxyImage.removeEventListener('error', this);
26686                    this.img.removeEventListener('load', this);
26687                    this.img.removeEventListener('error', this);
26688                };
26689
26690// -------------------------- Background -------------------------- //
26691
26692                function Background(url, element) {
26693                    this.url = url;
26694                    this.element = element;
26695                    this.img = new Image();
26696                }
26697
26698// inherit LoadingImage prototype
26699                Background.prototype = Object.create(LoadingImage.prototype);
26700
26701                Background.prototype.check = function () {
26702                    this.img.addEventListener('load', this);
26703                    this.img.addEventListener('error', this);
26704                    this.img.src = this.url;
26705                    // check if image is already complete
26706                    var isComplete = this.getIsImageComplete();
26707                    if (isComplete) {
26708                        this.confirm(this.img.naturalWidth !== 0, 'naturalWidth'); // @js-ok — prototype method, not window.confirm
26709                        this.unbindEvents();
26710                    }
26711                };
26712
26713                Background.prototype.unbindEvents = function () {
26714                    this.img.removeEventListener('load', this);
26715                    this.img.removeEventListener('error', this);
26716                };
26717
26718                Background.prototype.confirm = function (isLoaded, message) {
26719                    this.isLoaded = isLoaded;
26720                    this.emitEvent('progress', [this, this.element, message]);
26721                };
26722
26723// -------------------------- jQuery -------------------------- //
26724
26725                ImagesLoaded.makeJQueryPlugin = function (jQuery) {
26726                    jQuery = jQuery || window.jQuery;
26727                    if (!jQuery) {
26728                        return;
26729                    }
26730                    // set local variable
26731                    $ = jQuery;
26732                    // $().imagesLoaded()
26733                    $.fn.imagesLoaded = function (options, callback) {
26734                        var instance = new ImagesLoaded(this, options, callback);
26735                        return instance.jqDeferred.promise($(this));
26736                    };
26737                };
26738// try making plugin
26739                ImagesLoaded.makeJQueryPlugin();
26740
26741// --------------------------  -------------------------- //
26742
26743                return ImagesLoaded;
26744
26745            });
26746
26747
26748        /***/
26749    }),
26750    /* 58 */
26751    /***/ (function (module, exports, __webpack_require__) {
26752
26753        !function (t, e) {
26754            true ? module.exports = e() : undefined
26755        }(this, function () {
26756            "use strict";
26757
26758            function t() {
26759            }
26760
26761            t.prototype = {
26762                on: function (t, e, i) {
26763                    var n = this.e || (this.e = {});
26764                    return (n[t] || (n[t] = [])).push({fn: e, ctx: i}), this
26765                }, once: function (t, e, i) {
26766                    var n = this;
26767
26768                    function s() {
26769                        n.off(t, s), e.apply(i, arguments)
26770                    }
26771
26772                    return s._ = e, this.on(t, s, i)
26773                }, emit: function (t) {
26774                    for (var e = [].slice.call(arguments, 1), i = ((this.e || (this.e = {}))[t] || []).slice(), n = 0, s = i.length; n < s; n++) i[n].fn.apply(i[n].ctx, e);
26775                    return this
26776                }, off: function (t, e) {
26777                    var i = this.e || (this.e = {}), n = i[t], s = [];
26778                    if (n && e) for (var o = 0, r = n.length; o < r; o++) n[o].fn !== e && n[o].fn._ !== e && s.push(n[o]);
26779                    return s.length ? i[t] = s : delete i[t], this
26780                }
26781            };
26782            var e = t, i = "undefined" != typeof Element ? Element.prototype : {},
26783                n = i.matches || i.matchesSelector || i.webkitMatchesSelector || i.mozMatchesSelector || i.msMatchesSelector || i.oMatchesSelector,
26784                s = function (t, e) {
26785                    if (!t || 1 !== t.nodeType) return !1;
26786                    if (n) return n.call(t, e);
26787                    for (var i = t.parentNode.querySelectorAll(e), s = 0; s < i.length; s++) if (i[s] == t) return !0;
26788                    return !1
26789                };
26790            var o = function (t, e) {
26791                var i, n, s, o, r = 0;
26792                return function () {
26793                    i = this, n = arguments;
26794                    var t = new Date - r;
26795                    return o || (t >= e ? l() : o = setTimeout(l, e - t)), s
26796                };
26797
26798                function l() {
26799                    o = 0, r = +new Date, s = t.apply(i, n), i = null, n = null
26800                }
26801            };
26802
26803            function r() {
26804            }
26805
26806            function l(t) {
26807                return parseFloat(t) || 0
26808            }
26809
26810            var a = function (t, e) {
26811                if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
26812            }, u = function () {
26813                function t(t, e) {
26814                    for (var i = 0; i < e.length; i++) {
26815                        var n = e[i];
26816                        n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
26817                    }
26818                }
26819
26820                return function (e, i, n) {
26821                    return i && t(e.prototype, i), n && t(e, n), e
26822                }
26823            }(), h = function (t, e) {
26824                if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
26825                return !e || "object" != typeof e && "function" != typeof e ? t : e
26826            }, f = function () {
26827                function t(e, i) {
26828                    a(this, t), this.x = l(e), this.y = l(i)
26829                }
26830
26831                return u(t, null, [{
26832                    key: "equals", value: function (t, e) {
26833                        return t.x === e.x && t.y === e.y
26834                    }
26835                }]), t
26836            }(), c = function () {
26837                function t(e, i, n, s, o) {
26838                    a(this, t), this.id = o, this.left = e, this.top = i, this.width = n, this.height = s
26839                }
26840
26841                return u(t, null, [{
26842                    key: "intersects", value: function (t, e) {
26843                        return t.left < e.left + e.width && e.left < t.left + t.width && t.top < e.top + e.height && e.top < t.top + t.height
26844                    }
26845                }]), t
26846            }(), d = {
26847                BASE: "shuffle",
26848                SHUFFLE_ITEM: "shuffle-item",
26849                VISIBLE: "shuffle-item--visible",
26850                HIDDEN: "shuffle-item--hidden"
26851            }, m = 0, p = function () {
26852                function t(e) {
26853                    a(this, t), m += 1, this.id = m, this.element = e, this.isVisible = !0, this.isHidden = !1
26854                }
26855
26856                return u(t, [{
26857                    key: "show", value: function () {
26858                        this.isVisible = !0, this.element.classList.remove(d.HIDDEN), this.element.classList.add(d.VISIBLE), this.element.removeAttribute("aria-hidden")
26859                    }
26860                }, {
26861                    key: "hide", value: function () {
26862                        this.isVisible = !1, this.element.classList.remove(d.VISIBLE), this.element.classList.add(d.HIDDEN), this.element.setAttribute("aria-hidden", !0)
26863                    }
26864                }, {
26865                    key: "init", value: function () {
26866                        this.addClasses([d.SHUFFLE_ITEM, d.VISIBLE]), this.applyCss(t.Css.INITIAL), this.scale = t.Scale.VISIBLE, this.point = new f
26867                    }
26868                }, {
26869                    key: "addClasses", value: function (t) {
26870                        var e = this;
26871                        t.forEach(function (t) {
26872                            e.element.classList.add(t)
26873                        })
26874                    }
26875                }, {
26876                    key: "removeClasses", value: function (t) {
26877                        var e = this;
26878                        t.forEach(function (t) {
26879                            e.element.classList.remove(t)
26880                        })
26881                    }
26882                }, {
26883                    key: "applyCss", value: function (t) {
26884                        var e = this;
26885                        Object.keys(t).forEach(function (i) {
26886                            e.element.style[i] = t[i]
26887                        })
26888                    }
26889                }, {
26890                    key: "dispose", value: function () {
26891                        this.removeClasses([d.HIDDEN, d.VISIBLE, d.SHUFFLE_ITEM]), this.element.removeAttribute("style"), this.element = null
26892                    }
26893                }]), t
26894            }();
26895            p.Css = {
26896                INITIAL: {
26897                    position: "absolute",
26898                    top: 0,
26899                    left: 0,
26900                    visibility: "visible",
26901                    "will-change": "transform"
26902                },
26903                VISIBLE: {before: {opacity: 1, visibility: "visible"}, after: {transitionDelay: ""}},
26904                HIDDEN: {before: {opacity: 0}, after: {visibility: "hidden", transitionDelay: ""}}
26905            }, p.Scale = {VISIBLE: 1, HIDDEN: .001};
26906            var v = null, y = function () {
26907                if (null !== v) return v;
26908                var t = document.body || document.documentElement, e = document.createElement("div");
26909                return e.style.cssText = "width:10px;padding:2px;box-sizing:border-box;", t.appendChild(e), v = "10px" === window.getComputedStyle(e, null).width, t.removeChild(e), v
26910            };
26911
26912            function g(t, e) {
26913                var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : window.getComputedStyle(t, null),
26914                    n = l(i[e]);
26915                return y() || "width" !== e ? y() || "height" !== e || (n += l(i.paddingTop) + l(i.paddingBottom) + l(i.borderTopWidth) + l(i.borderBottomWidth)) : n += l(i.paddingLeft) + l(i.paddingRight) + l(i.borderLeftWidth) + l(i.borderRightWidth), n
26916            }
26917
26918            var _ = {reverse: !1, by: null, compare: null, randomize: !1, key: "element"};
26919
26920            function E(t, e) {
26921                var i = Object.assign({}, _, e), n = Array.from(t), s = !1;
26922                return t.length ? i.randomize ? function (t) {
26923                    for (var e = t.length; e;) {
26924                        e -= 1;
26925                        var i = Math.floor(Math.random() * (e + 1)), n = t[i];
26926                        t[i] = t[e], t[e] = n
26927                    }
26928                    return t
26929                }(t) : ("function" == typeof i.by ? t.sort(function (t, e) {
26930                    if (s) return 0;
26931                    var n = i.by(t[i.key]), o = i.by(e[i.key]);
26932                    return void 0 === n && void 0 === o ? (s = !0, 0) : n < o || "sortFirst" === n || "sortLast" === o ? -1 : n > o || "sortLast" === n || "sortFirst" === o ? 1 : 0
26933                }) : "function" == typeof i.compare && t.sort(i.compare), s ? n : (i.reverse && t.reverse(), t)) : []
26934            }
26935
26936            var I = {}, b = "transitionend", S = 0;
26937
26938            function T(t) {
26939                return !!I[t] && (I[t].element.removeEventListener(b, I[t].listener), I[t] = null, !0)
26940            }
26941
26942            function k(t, e) {
26943                var i = b + (S += 1), n = function (t) {
26944                    t.currentTarget === t.target && (T(i), e(t))
26945                };
26946                return t.addEventListener(b, n), I[i] = {element: t, listener: n}, i
26947            }
26948
26949            function w(t) {
26950                return Math.max.apply(Math, t)
26951            }
26952
26953            function C(t, e, i, n) {
26954                var s = t / e;
26955                return Math.abs(Math.round(s) - s) < n && (s = Math.round(s)), Math.min(Math.ceil(s), i)
26956            }
26957
26958            function L(t, e, i) {
26959                if (1 === e) return t;
26960                for (var n = [], s = 0; s <= i - e; s++) n.push(w(t.slice(s, s + e)));
26961                return n
26962            }
26963
26964            function D(t, e) {
26965                for (var i, n = (i = t, Math.min.apply(Math, i)), s = 0, o = t.length; s < o; s++) if (t[s] >= n - e && t[s] <= n + e) return s;
26966                return 0
26967            }
26968
26969            function z(t, e) {
26970                var i = {};
26971                t.forEach(function (t) {
26972                    i[t.top] ? i[t.top].push(t) : i[t.top] = [t]
26973                });
26974                var n = [], s = [], o = [];
26975                return Object.keys(i).forEach(function (t) {
26976                    var r = i[t];
26977                    s.push(r);
26978                    var l = r[r.length - 1], a = l.left + l.width, u = Math.round((e - a) / 2), h = r, f = !1;
26979                    if (u > 0) {
26980                        var d = [];
26981                        (f = r.every(function (t) {
26982                            var e = new c(t.left + u, t.top, t.width, t.height, t.id), i = !n.some(function (t) {
26983                                return c.intersects(e, t)
26984                            });
26985                            return d.push(e), i
26986                        })) && (h = d)
26987                    }
26988                    if (!f) {
26989                        var m = void 0;
26990                        if (r.some(function (t) {
26991                            return n.some(function (e) {
26992                                var i = c.intersects(t, e);
26993                                return i && (m = e), i
26994                            })
26995                        })) {
26996                            var p = o.findIndex(function (t) {
26997                                return t.includes(m)
26998                            });
26999                            o.splice(p, 1, s[p])
27000                        }
27001                    }
27002                    n = n.concat(h), o.push(h)
27003                }), [].concat.apply([], o).sort(function (t, e) {
27004                    return t.id - e.id
27005                }).map(function (t) {
27006                    return new f(t.left, t.top)
27007                })
27008            }
27009
27010            function M(t) {
27011                return Array.from(new Set(t))
27012            }
27013
27014            var A = 0, F = function (t) {
27015                function i(t) {
27016                    var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
27017                    a(this, i);
27018                    var n = h(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this));
27019                    n.options = Object.assign({}, i.options, e), n.options.delimeter && (n.options.delimiter = n.options.delimeter), n.lastSort = {}, n.group = i.ALL_ITEMS, n.lastFilter = i.ALL_ITEMS, n.isEnabled = !0, n.isDestroyed = !1, n.isInitialized = !1, n._transitions = [], n.isTransitioning = !1, n._queue = [];
27020                    var s = n._getElementOption(t);
27021                    if (!s) throw new TypeError("Shuffle needs to be initialized with an element.");
27022                    return n.element = s, n.id = "shuffle_" + A, A += 1, n._init(), n.isInitialized = !0, n
27023                }
27024
27025                return function (t, e) {
27026                    if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
27027                    t.prototype = Object.create(e && e.prototype, {
27028                        constructor: {
27029                            value: t,
27030                            enumerable: !1,
27031                            writable: !0,
27032                            configurable: !0
27033                        }
27034                    }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
27035                }(i, e), u(i, [{
27036                    key: "_init", value: function () {
27037                        if (this.items = this._getItems(), this.options.sizer = this._getElementOption(this.options.sizer), this.element.classList.add(i.Classes.BASE), this._initItems(this.items), this._onResize = this._getResizeFunction(), window.addEventListener("resize", this._onResize), "complete" !== document.readyState) {
27038                            var t = this.layout.bind(this);
27039                            window.addEventListener("load", function e() {
27040                                window.removeEventListener("load", e), t()
27041                            })
27042                        }
27043                        var e = window.getComputedStyle(this.element, null), n = i.getSize(this.element).width;
27044                        this._validateStyles(e), this._setColumns(n), this.filter(this.options.group, this.options.initialSort), this.element.offsetWidth, this.setItemTransitions(this.items), this.element.style.transition = "height " + this.options.speed + "ms " + this.options.easing
27045                    }
27046                }, {
27047                    key: "_getResizeFunction", value: function () {
27048                        var t = this._handleResize.bind(this);
27049                        return this.options.throttle ? this.options.throttle(t, this.options.throttleTime) : t
27050                    }
27051                }, {
27052                    key: "_getElementOption", value: function (t) {
27053                        return "string" == typeof t ? this.element.querySelector(t) : t && t.nodeType && 1 === t.nodeType ? t : t && t.jquery ? t[0] : null
27054                    }
27055                }, {
27056                    key: "_validateStyles", value: function (t) {
27057                        "static" === t.position && (this.element.style.position = "relative"), "hidden" !== t.overflow && (this.element.style.overflow = "hidden")
27058                    }
27059                }, {
27060                    key: "_filter", value: function () {
27061                        var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.lastFilter,
27062                            e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.items,
27063                            i = this._getFilteredSets(t, e);
27064                        return this._toggleFilterClasses(i), this.lastFilter = t, "string" == typeof t && (this.group = t), i
27065                    }
27066                }, {
27067                    key: "_getFilteredSets", value: function (t, e) {
27068                        var n = this, s = [], o = [];
27069                        return t === i.ALL_ITEMS ? s = e : e.forEach(function (e) {
27070                            n._doesPassFilter(t, e.element) ? s.push(e) : o.push(e)
27071                        }), {visible: s, hidden: o}
27072                    }
27073                }, {
27074                    key: "_doesPassFilter", value: function (t, e) {
27075                        if ("function" == typeof t) return t.call(e, e, this);
27076                        var n = e.getAttribute("data-" + i.FILTER_ATTRIBUTE_KEY),
27077                            s = this.options.delimiter ? n.split(this.options.delimiter) : JSON.parse(n);
27078
27079                        function o(t) {
27080                            return s.includes(t)
27081                        }
27082
27083                        return Array.isArray(t) ? this.options.filterMode === i.FilterMode.ANY ? t.some(o) : t.every(o) : s.includes(t)
27084                    }
27085                }, {
27086                    key: "_toggleFilterClasses", value: function (t) {
27087                        var e = t.visible, i = t.hidden;
27088                        e.forEach(function (t) {
27089                            t.show()
27090                        }
27090), i.forEach(function (t) {
27091                            t.hide()
27092                        })
27093                    }
27094                }, {
27095                    key: "_initItems", value: function (t) {
27096                        t.forEach(function (t) {
27097                            t.init()
27098                        })
27099                    }
27100                }, {
27101                    key: "_disposeItems", value: function (t) {
27102                        t.forEach(function (t) {
27103                            t.dispose()
27104                        })
27105                    }
27106                }, {
27107                    key: "_updateItemCount", value: function () {
27108                        this.visibleItems = this._getFilteredItems().length
27109                    }
27110                }, {
27111                    key: "setItemTransitions", value: function (t) {
27112                        var e = this.options, i = e.speed, n = e.easing,
27113                            s = this.options.useTransforms ? ["transform"] : ["top", "left"],
27114                            o = Object.keys(p.Css.HIDDEN.before).map(function (t) {
27115                                return t.replace(/([A-Z])/g, function (t, e) {
27116                                    return "-" + e.toLowerCase()
27117                                })
27118                            }), r = s.concat(o).join();
27119                        t.forEach(function (t) {
27120                            t.element.style.transitionDuration = i + "ms", t.element.style.transitionTimingFunction = n, t.element.style.transitionProperty = r
27121                        })
27122                    }
27123                }, {
27124                    key: "_getItems", value: function () {
27125                        var t = this;
27126                        return Array.from(this.element.children).filter(function (e) {
27127                            return s(e, t.options.itemSelector)
27128                        }).map(function (t) {
27129                            return new p(t)
27130                        })
27131                    }
27132                }, {
27133                    key: "_mergeNewItems", value: function (t) {
27134                        var e = Array.from(this.element.children);
27135                        return E(this.items.concat(t), {
27136                            by: function (t) {
27137                                return e.indexOf(t)
27138                            }
27139                        })
27140                    }
27141                }, {
27142                    key: "_getFilteredItems", value: function () {
27143                        return this.items.filter(function (t) {
27144                            return t.isVisible
27145                        })
27146                    }
27147                }, {
27148                    key: "_getConcealedItems", value: function () {
27149                        return this.items.filter(function (t) {
27150                            return !t.isVisible
27151                        })
27152                    }
27153                }, {
27154                    key: "_getColumnSize", value: function (t, e) {
27155                        var n = void 0;
27156                        return 0 === (n = "function" == typeof this.options.columnWidth ? this.options.columnWidth(t) : this.options.sizer ? i.getSize(this.options.sizer).width : this.options.columnWidth ? this.options.columnWidth : this.items.length > 0 ? i.getSize(this.items[0].element, !0).width : t) && (n = t), n + e
27157                    }
27158                }, {
27159                    key: "_getGutterSize", value: function (t) {
27160                        return "function" == typeof this.options.gutterWidth ? this.options.gutterWidth(t) : this.options.sizer ? g(this.options.sizer, "marginLeft") : this.options.gutterWidth
27161                    }
27162                }, {
27163                    key: "_setColumns", value: function () {
27164                        var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : i.getSize(this.element).width,
27165                            e = this._getGutterSize(t), n = this._getColumnSize(t, e), s = (t + e) / n;
27166                        Math.abs(Math.round(s) - s) < this.options.columnThreshold && (s = Math.round(s)), this.cols = Math.max(Math.floor(s), 1), this.containerWidth = t, this.colWidth = n
27167                    }
27168                }, {
27169                    key: "_setContainerSize", value: function () {
27170                        this.element.style.height = this._getContainerSize() + "px"
27171                    }
27172                }, {
27173                    key: "_getContainerSize", value: function () {
27174                        return w(this.positions)
27175                    }
27176                }, {
27177                    key: "_getStaggerAmount", value: function (t) {
27178                        return Math.min(t * this.options.staggerAmount, this.options.staggerAmountMax)
27179                    }
27180                }, {
27181                    key: "_dispatch", value: function (t) {
27182                        var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
27183                        this.isDestroyed || (e.shuffle = this, this.emit
27183(t, e))
27184                    }
27185                }, {
27186                    key: "_resetCols", value: function () {
27187                        var t = this.cols;
27188                        for (this.positions = []; t;) t -= 1, this.positions.push(0)
27189                    }
27190                }, {
27191                    key: "_layout", value: function (t) {
27192                        var e = this, i = this._getNextPositions(t), n = 0;
27193                        t.forEach(function (t, s) {
27194                            function o() {
27195                                t.applyCss(p.Css.VISIBLE.after)
27196                            }
27197
27198                            if (f.equals(t.point, i[s]) && !t.isHidden) return t.applyCss(p.Css.VISIBLE.before), void o();
27199                            t.point = i[s], t.scale = p.Scale.VISIBLE, t.isHidden = !1;
27200                            var r = e.getStylesForTransition(t, p.Css.VISIBLE.before);
27201                            r.transitionDelay = e._getStaggerAmount(n) + "ms", e._queue.push({
27202                                item: t,
27203                                styles: r,
27204                                callback: o
27205                            }), n += 1
27206                        })
27207                    }
27208                }, {
27209                    key: "_getNextPositions", value: function (t) {
27210                        var e = this;
27211                        if (this.options.isCentered) {
27212                            var n = t.map(function (t, n) {
27213                                var s = i.getSize(t.element, !0), o = e._getItemPosition(s);
27214                                return new c(o.x, o.y, s.width, s.height, n)
27215                            });
27216                            return this.getTransformedPositions(n, this.containerWidth)
27217                        }
27218                        return t.map(function (t) {
27219                            return e._getItemPosition(i.getSize(t.element, !0))
27220                        })
27221                    }
27222                }, {
27223                    key: "_getItemPosition", value: function (t) {
27224                        return function (t) {
27225                            for (var e = t.itemSize, i = t.positions, n = t.gridSize, s = t.total, o = t.threshold, r = t.buffer, l = C(e.width, n, s, o), a = L(i, l, s), u = D(a, r), h = new f(n * u, a[u]), c = a[u] + e.height, d = 0; d < l; d++) i[u + d] = c;
27226                            return h
27227                        }({
27228                            itemSize: t,
27229                            positions: this.positions,
27230                            gridSize: this.colWidth,
27231                            total: this.cols,
27232                            threshold: this.options.columnThreshold,
27233                            buffer: this.options.buffer
27234                        })
27235                    }
27236                }, {
27237                    key: "getTransformedPositions", value: function (t, e) {
27238                        return z(t, e)
27239                    }
27240                }, {
27241                    key: "_shrink", value: function () {
27242                        var t = this,
27243                            e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._getConcealedItems(),
27244                            i = 0;
27245                        e.forEach(function (e) {
27246                            function n() {
27247                                e.applyCss(p.Css.HIDDEN.after)
27248                            }
27249
27250                            if (e.isHidden) return e.applyCss(p.Css.HIDDEN.before), void n();
27251                            e.scale = p.Scale.HIDDEN, e.isHidden = !0;
27252                            var s = t.getStylesForTransition(e, p.Css.HIDDEN.before);
27253                            s.transitionDelay = t._getStaggerAmount(i) + "ms", t._queue.push({
27254                                item: e,
27255                                styles: s,
27256                                callback: n
27257                            }), i += 1
27258                        })
27259                    }
27260                }, {
27261                    key: "_handleResize", value: function () {
27262                        this.isEnabled && !this.isDestroyed && this.update()
27263                    }
27264                }, {
27265                    key: "getStylesForTransition", value: function (t, e) {
27266                        var i = Object.assign({}, e);
27267                        if (this.options.useTransforms) {
27268                            var n = this.options.roundTransforms ? Math.round(t.point.x) : t.point.x,
27269                                s = this.options.roundTransforms ? Math.round(t.point.y) : t.point.y;
27270                            i.transform = "translate(" + n + "px, " + s + "px) scale(" + t.scale + ")"
27271                        } else i.left = t.point.x + "px", i.top = t.point.y + "px";
27272                        return i
27273                    }
27274                }, {
27275                    key: "_whenTransitionDone", value: function (t, e, i) {
27276                        var n = k(t, function (t) {
27277                            e(), i(null, t)
27278                        });
27279                        this._transitions.push(n)
27280                    }
27281                }, {
27282                    key: "_getTransitionFunction", value: function (t) {
27283                        var e = this;
27284                        return function (i) {
27285                            t.item.applyCss(t.styles), e._whenTransitionDone(t.item.element, t.callback, i)
27286                        }
27287                    }
27288                }, {
27289                    key: "_processQueue", value: function () {
27290                        this.isTransitioning && this._cancelMovement();
27291                        var t = this.options.speed > 0, e = this._queue.length > 0;
27292                        e && t && this.isInitialized ? this._startTransitions(this._queue) : e ? (this._styleImmediately(this._queue), this._dispatch(i.EventType.LAYOUT)) : this._dispatch(i.EventType.LAYOUT), this._queue.length = 0
27293                    }
27294                }, {
27295                    key: "_startTransitions", value: function (t) {
27296                        var e = this;
27297                        this.isTransitioning = !0, function (t, e, i) {
27298                            i || ("function" == typeof e ? (i = e, e = null) : i = r);
27299                            var n = t && t.length;
27300                            if (!n) return i(null, []);
27301                            var s = !1, o = new Array(n);
27302
27303                            function l(t) {
27304                                return function (e, r) {
27305                                    if (!s) {
27306                                        if (e) return i(e, o), void (s = !0);
27307                                        o[t] = r, --n || i(null, o)
27308                                    }
27309                                }
27310                            }
27311
27312                            t.forEach(e ? function (t, i) {
27313                                t.call(e, l(i))
27314                            } : function (t, e) {
27315                                t(l(e))
27316                            })
27317                        }(t.map(function (t) {
27318                            return e._getTransitionFunction(t)
27319                        }), this._movementFinished.bind(this))
27320                    }
27321                }, {
27322                    key: "_cancelMovement", value: function () {
27323                        this._transitions.forEach(T), this._transitions.length = 0, this.isTransitioning = !1
27324                    }
27325                }, {
27326                    key: "_styleImmediately", value: function (t) {
27327                        if (t.length) {
27328                            var e = t.map(function (t) {
27329                                return t.item.element
27330                            });
27331                            i._skipTransitions(e, function () {
27332                                t.forEach(function (t) {
27333                                    t.item.applyCss(t.styles), t.callback()
27334                                })
27335                            })
27336                        }
27337                    }
27338                }, {
27339                    key: "_movementFinished", value: function () {
27340                        this._transitions.length = 0, this.isTransitioning = !1, this._dispatch(i.EventType.LAYOUT)
27341                    }
27342                }, {
27343                    key: "filter", value: function (t, e) {
27344                        this.isEnabled && ((!t || t && 0 === t.length) && (t = i.ALL_ITEMS), this._filter(t), this._shrink(), this._updateItemCount(), this.sort(e))
27345                    }
27346                }, {
27347                    key: "sort", value: function () {
27348                        var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.lastSort;
27349                        if (this.isEnabled) {
27350                            this._resetCols();
27351                            var e = E(this._getFilteredItems(), t);
27352                            this._layout(e), this._processQueue(), this._setContainerSize(), this.lastSort = t
27353                        }
27354                    }
27355                }, {
27356                    key: "update", value: function () {
27357                        var t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
27358                        this.isEnabled && (t || this._setColumns(), this.sort())
27359                    }
27360                }, {
27361                    key: "layout", value: function () {
27362                        this.update(!0)
27363                    }
27364                }, {
27365                    key: "add", value: function (t) {
27366                        var e = this, i = M(t).map(function (t) {
27367                            return new p(t)
27368                        });
27369                        this._initItems(i), this._resetCols();
27370                        var n = E(this._mergeNewItems(i), this.lastSort), s = this._filter(this.lastFilter, n),
27371                            o = function (t) {
27372                                return i.includes(t)
27373                            }, r = function (t) {
27374                                t.scale = p.Scale.HIDDEN, t.isHidden = !0, t.applyCss(p.Css.HIDDEN.before), t.applyCss(p.Css.HIDDEN.after)
27375                            }, l = this._getNextPositions(s.visible);
27376                        s.visible.forEach(function (t, i) {
27377                            o(t) && (t.point = l[i], r(t), t.applyCss(e.getStylesForTransition(t, {})))
27378                        }
27378), s.hidden.forEach(function (t) {
27379                            o(t) && r(t)
27380                        }), this.element.offsetWidth, this.setItemTransitions(i), this.items = this._mergeNewItems(i), this.filter(this.lastFilter)
27381                    }
27382                }, {
27383                    key: "disable", value: function () {
27384                        this.isEnabled = !1
27385                    }
27386                }, {
27387                    key: "enable", value: function () {
27388                        var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
27389                        this.isEnabled = !0, t && this.update()
27390                    }
27391                }, {
27392                    key: "remove", value: function (t) {
27393                        var e = this;
27394                        if (t.length) {
27395                            var n = M(t), s = n.map(function (t) {
27396                                return e.getItemByElement(t)
27397                            }).filter(function (t) {
27398                                return !!t
27399                            });
27400                            this._toggleFilterClasses({
27401                                visible: [],
27402                                hidden: s
27403                            }), this._shrink(s), this.sort(), this.items = this.items.filter(function (t) {
27404                                return !s.includes(t)
27405                            }), this._updateItemCount(), this.once(i.EventType.LAYOUT, function () {
27406                                e._disposeItems(s), n.forEach(function (t) {
27407                                    t.parentNode.removeChild(t)
27408                                }), e._dispatch(i.EventType.REMOVED, {collection: n})
27409                            })
27410                        }
27411                    }
27412                }, {
27413                    key: "getItemByElement", value: function (t) {
27414                        return this.items.find(function (e) {
27415                            return e.element === t
27416                        })
27417                    }
27418                }, {
27419                    key: "resetItems", value: function () {
27420                        var t = this;
27421                        this._disposeItems(this.items), this.isInitialized = !1, this.items = this._getItems(), this._initItems(this.items), this.once(i.EventType.LAYOUT, function () {
27422                            t.setItemTransitions(t.items), t.isInitialized = !0
27423                        }), this.filter(this.lastFilter)
27424                    }
27425                }, {
27426                    key: "destroy", value: function () {
27427                        this._cancelMovement(), window.removeEventListener("resize", this._onResize), this.element.classList.remove("shuffle"), this.element.removeAttribute("style"), this._disposeItems(this.items), this.items.length = 0, this._transitions.length = 0, this.options.sizer = null, this.element = null, this.isDestroyed = !0, this.isEnabled = !1
27428                    }
27429                }], [{
27430                    key: "getSize", value: function (t) {
27431                        var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
27432                            i = window.getComputedStyle(t, null), n = g(t, "width", i), s = g(t, "height", i);
27433                        e && (n += g(t, "marginLeft", i) + g(t, "marginRight", i), s += g(t, "marginTop", i) + g(t, "marginBottom", i));
27434                        return {width: n, height: s}
27435                    }
27436                }, {
27437                    key: "_skipTransitions", value: function (t, e) {
27438                        var i = t.map(function (t) {
27439                            var e = t.style, i = e.transitionDuration, n = e.transitionDelay;
27440                            return e.transitionDuration = "0ms", e.transitionDelay = "0ms", {duration: i, delay: n}
27441                        });
27442                        e(), t[0].offsetWidth, t.forEach(function (t, e) {
27443                            t.style.transitionDuration = i[e].duration, t.style.transitionDelay = i[e].delay
27444                        })
27445                    }
27446                }]), i
27447            }();
27448            return F.ShuffleItem = p, F.ALL_ITEMS = "all", F.FILTER_ATTRIBUTE_KEY = "groups", F.EventType = {
27449                LAYOUT: "shuffle:layout",
27450                REMOVED: "shuffle:removed"
27451            }, F.Classes = d, F.FilterMode = {ANY: "any", ALL: "all"}, F.options = {
27452                group: F.ALL_ITEMS,
27453                speed: 250,
27454                easing: "cubic-bezier(0.4, 0.0, 0.2, 1)",
27455                itemSelector: "*",
27456                sizer: null,
27457                gutterWidth: 0,
27458                columnWidth: 0,
27459                delimiter: null,
27460                buffer: 0,
27461                columnThreshold: .01,
27462                initialSort: null,
27463                throttle: o,
27464                throttleTime: 300,
27465                staggerAmount: 15,
27466                staggerAmountMax: 150,
27467                useTransforms: !0,
27468                filterMode: F.FilterMode.ANY,
27469                isCentered: !1,
27470                roundTransforms: !0
27471            }, F.Point = f, F.Rect = c, F.__sorter = E, F.__getColumnSpan = C, F.__getAvailablePositions = L, F.__getShortColumn = D, F.__getCenteredPositions = z, F
27472        });
27473//# sourceMappingURL=shuffle.min.js.map
27474
27475
27476        /***/
27477    }),
27478    /* 59 */
27479    /***/ (function (module, exports, __webpack_require__) {
27480
27481
27482        /**
27483         * Load required plugin.
27484         */
27485        __webpack_require__(60);
27486
27487
27488        /**
27489         * Configure the plugin.
27490         */
27491
27492        +function ($) {
27493            page.registerVendor('Slick');
27494
27495            page.initSlick = function () {
27496
27497                $('[data-provide~="slider"]').each(function () {
27498                    var tag = $(this),
27499                        options = {
27500                            speed: 1000,
27501                            arrows: false,
27502                            centerPadding: '0',
27503                        };
27504
27505                    options = $.extend(options, page.getDataOptions(tag));
27506
27507                    if (options.slidesToShow !== undefined || options.centerMode !== undefined) {
27508                        var scrollOn768 = 1;
27509                        if (options.slidesToScroll !== undefined) {
27510                            if (options.slidesToScroll > 1) {
27511                                scrollOn768 = 2;
27512                            }
27513                        }
27514
27515                        options.responsive = [{
27516                            breakpoint: 768,
27517                            settings: {
27518                                slidesToShow: 2,
27519                                slidesToScroll: scrollOn768,
27520                            }
27521                        },
27522                            {
27523                                breakpoint: 576,
27524                                settings: {
27525                                    slidesToShow: 1,
27526                                    slidesToScroll: 1,
27527                                    centerPadding: '0px',
27528                                }
27529                            }];
27530                    }
27531
27532                    tag.slick(options);
27533                });
27534
27535            }
27536
27537        }(jQuery);
27538
27539
27540        /***/
27541    }),
27542    /* 60 */
27543    /***/ (function (module, exports, __webpack_require__) {
27544
27545        var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
27546     _ _      _       _
27547 ___| (_) ___| | __  (_)___
27548/ __| | |/ __| |/ /  | / __|
27549\__ \ | | (__|   < _ | \__ \
27550|___/_|_|\___|_|\_(_)/ |___/
27551                   |__/
27552
27553 Version: 1.8.1
27554  Author: Ken Wheeler
27555 Website: http://kenwheeler.github.io
27556    Docs: http://kenwheeler.github.io/slick
27557    Repo: http://github.com/kenwheeler/slick
27558  Issues: http://github.com/kenwheeler/slick/issues
27559
27560 */
27561        /* global window, document, define, jQuery, setInterval, clearInterval */
27562        ;(function (factory) {
27563            'use strict';
27564            if (true) {
27565                !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
27566                    __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
27567                        (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
27568                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
27569            } else {
27570            }
27571
27572        }(function ($) {
27573            'use strict';
27574            var Slick = window.Slick || {};
27575
27576            Slick = (function () {
27577
27578                var instanceUid = 0;
27579
27580                function Slick(element, settings) {
27581
27582                    var _ = this, dataSettings;
27583
27584                    _.defaults = {
27585                        accessibility: true,
27586                        adaptiveHeight: false,
27587                        appendArrows: $(element),
27588                        appendDots: $(element),
27589                        arrows: true,
27590                        asNavFor: null,
27591                        prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
27592                        nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
27593                        autoplay: false,
27594                        autoplaySpeed: 3000,
27595                        centerMode: false,
27596                        centerPadding: '50px',
27597                        cssEase: 'ease',
27598                        customPaging: function (slider, i) {
27599                            return $('<button type="button" />').text(i + 1);
27600                        },
27601                        dots: false,
27602                        dotsClass: 'slick-dots',
27603                        draggable: true,
27604                        easing: 'linear',
27605                        edgeFriction: 0.35,
27606                        fade: false,
27607                        focusOnSelect: false,
27608                        focusOnChange: false,
27609                        infinite: true,
27610                        initialSlide: 0,
27611                        lazyLoad: 'ondemand',
27612                        mobileFirst: false,
27613                        pauseOnHover: true,
27614                        pauseOnFocus: true,
27615                        pauseOnDotsHover: false,
27616                        respondTo: 'window',
27617                        responsive: true,
27618                        rows: 1,
27619                        rtl: false,
27620                        slide: '',
27621                        slidesPerRow: 1,
27622                        slidesToShow: 1,
27623                        slidesToScroll: 1,
27624                        speed: 500,
27625                        swipe: true,
27626                        swipeToSlide: false,
27627                        touchMove: true,
27628                        touchThreshold: 5,
27629                        useCSS: true,
27630                        useTransform: true,
27631                        variableWidth: false,
27632                        vertical: false,
27633                        verticalSwiping: false,
27634                        waitForAnimate: true,
27635                        zIndex: 1000
27636                    };
27637
27638                    _.initials = {
27639                        animating: false,
27640                        dragging: false,
27641                        autoPlayTimer: null,
27642                        currentDirection: 0,
27643                        currentLeft: null,
27644                        currentSlide: 0,
27645                        direction: 1,
27646                        $dots: null,
27647                        listWidth: null,
27648                        listHeight: null,
27649                        loadIndex: 0,
27650                        $nextArrow: null,
27651                        $prevArrow: null,
27652                        scrolling: false,
27653                        slideCount: null,
27654                        slideWidth: null,
27655                        $slideTrack: null,
27656                        $slides: null,
27657                        sliding: false,
27658                        slideOffset: 0,
27659                        swipeLeft: null,
27660                        swiping: false,
27661                        $list: null,
27662                        touchObject: {},
27663                        transformsEnabled: false,
vendor: 47,225 bytes, lines 27664-28951
27664                        unslicked: false
27665                    };
27666
27667                    $.extend(_, _.initials);
27668
27669                    _.activeBreakpoint = null;
27670                    _.animType = null;
27671                    _.animProp = null;
27672                    _.breakpoints = [];
27673                    _.breakpointSettings = [];
27674                    _.cssTransitions = false;
27675                    _.focussed = false;
27676                    _.interrupted = false;
27677                    _.hidden = 'hidden';
27678                    _.paused = true;
27679                    _.positionProp = null;
27680                    _.respondTo = null;
27681                    _.rowCount = 1;
27682                    _.shouldClick = true;
27683                    _.$slider = $(element);
27684                    _.$slidesCache = null;
27685                    _.transformType = null;
27686                    _.transitionType = null;
27687                    _.visibilityChange = 'visibilitychange';
27688                    _.windowWidth = 0;
27689                    _.windowTimer = null;
27690
27691                    dataSettings = $(element).data('slick') || {};
27692
27693                    _.options = $.extend({}, _.defaults, settings, dataSettings);
27694
27695                    _.currentSlide = _.options.initialSlide;
27696
27697                    _.originalSettings = _.options;
27698
27699                    if (typeof document.mozHidden !== 'undefined') {
27700                        _.hidden = 'mozHidden';
27701                        _.visibilityChange = 'mozvisibilitychange';
27702                    } else if (typeof document.webkitHidden !== 'undefined') {
27703                        _.hidden = 'webkitHidden';
27704                        _.visibilityChange = 'webkitvisibilitychange';
27705                    }
27706
27707                    _.autoPlay = $.proxy(_.autoPlay, _);
27708                    _.autoPlayClear = $.proxy(_.autoPlayClear, _);
27709                    _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
27710                    _.changeSlide = $.proxy(_.changeSlide, _);
27711                    _.clickHandler = $.proxy(_.clickHandler, _);
27712                    _.selectHandler = $.proxy(_.selectHandler, _);
27713                    _.setPosition = $.proxy(_.setPosition, _);
27714                    _.swipeHandler = $.proxy(_.swipeHandler, _);
27715                    _.dragHandler = $.proxy(_.dragHandler, _);
27716                    _.keyHandler = $.proxy(_.keyHandler, _);
27717
27718                    _.instanceUid = instanceUid++;
27719
27720                    // A simple way to check for HTML strings
27721                    // Strict HTML recognition (must start with <)
27722                    // Extracted from jQuery v1.11 source
27723                    _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
27724
27725
27726                    _.registerBreakpoints();
27727                    _.init(true);
27728
27729                }
27730
27731                return Slick;
27732
27733            }());
27734
27735            Slick.prototype.activateADA = function () {
27736                var _ = this;
27737
27738                _.$slideTrack.find('.slick-active').attr({
27739                    'aria-hidden': 'false'
27740                }).find('a, input, button, select').attr({
27741                    'tabindex': '0'
27742                });
27743
27744            };
27745
27746            Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {
27747
27748                var _ = this;
27749
27750                if (typeof (index) === 'boolean') {
27751                    addBefore = index;
27752                    index = null;
27753                } else if (index < 0 || (index >= _.slideCount)) {
27754                    return false;
27755                }
27756
27757                _.unload();
27758
27759                if (typeof (index) === 'number') {
27760                    if (index === 0 && _.$slides.length === 0) {
27761                        $(markup).appendTo(_.$slideTrack);
27762                    } else if (addBefore) {
27763                        $(markup).insertBefore(_.$slides.eq(index));
27764                    } else {
27765                        $(markup).insertAfter(_.$slides.eq(index));
27766                    }
27767                } else {
27768                    if (addBefore === true) {
27769                        $(markup).prependTo(_.$slideTrack);
27770                    } else {
27771                        $(markup).appendTo(_.$slideTrack);
27772                    }
27773                }
27774
27775                _.$slides = _.$slideTrack.children(this.options.slide);
27776
27777                _.$slideTrack.children(this.options.slide).detach();
27778
27779                _.$slideTrack.append(_.$slides);
27780
27781                _.$slides.each(function (index, element) {
27782                    $(element).attr('data-slick-index', index);
27783                });
27784
27785                _.$slidesCache = _.$slides;
27786
27787                _.reinit();
27788
27789            };
27790
27791            Slick.prototype.animateHeight = function () {
27792                var _ = this;
27793                if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
27794                    var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
27795                    _.$list.animate({
27796                        height: targetHeight
27797                    }, _.options.speed);
27798                }
27799            };
27800
27801            Slick.prototype.animateSlide = function (targetLeft, callback) {
27802
27803                var animProps = {},
27804                    _ = this;
27805
27806                _.animateHeight();
27807
27808                if (_.options.rtl === true && _.options.vertical === false) {
27809                    targetLeft = -targetLeft;
27810                }
27811                if (_.transformsEnabled === false) {
27812                    if (_.options.vertical === false) {
27813                        _.$slideTrack.animate({
27814                            left: targetLeft
27815                        }, _.options.speed, _.options.easing, callback);
27816                    } else {
27817                        _.$slideTrack.animate({
27818                            top: targetLeft
27819                        }, _.options.speed, _.options.easing, callback);
27820                    }
27821
27822                } else {
27823
27824                    if (_.cssTransitions === false) {
27825                        if (_.options.rtl === true) {
27826                            _.currentLeft = -(_.currentLeft);
27827                        }
27828                        $({
27829                            animStart: _.currentLeft
27830                        }).animate({
27831                            animStart: targetLeft
27832                        }, {
27833                            duration: _.options.speed,
27834                            easing: _.options.easing,
27835                            step: function (now) {
27836                                now = Math.ceil(now);
27837                                if (_.options.vertical === false) {
27838                                    animProps[_.animType] = 'translate(' +
27839                                        now + 'px, 0px)';
27840                                    _.$slideTrack.css(animProps);
27841                                } else {
27842                                    animProps[_.animType] = 'translate(0px,' +
27843                                        now + 'px)';
27844                                    _.$slideTrack.css(animProps);
27845                                }
27846                            },
27847                            complete: function () {
27848                                if (callback) {
27849                                    callback.call();
27850                                }
27851                            }
27852                        });
27853
27854                    } else {
27855
27856                        _.applyTransition();
27857                        targetLeft = Math.ceil(targetLeft);
27858
27859                        if (_.options.vertical === false) {
27860                            animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
27861                        } else {
27862                            animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
27863                        }
27864                        _.$slideTrack.css(animProps);
27865
27866                        if (callback) {
27867                            setTimeout(function () {
27868
27869                                _.disableTransition();
27870
27871                                callback.call();
27872                            }, _.options.speed);
27873                        }
27874
27875                    }
27876
27877                }
27878
27879            };
27880
27881            Slick.prototype.getNavTarget = function () {
27882
27883                var _ = this,
27884                    asNavFor = _.options.asNavFor;
27885
27886                if (asNavFor && asNavFor !== null) {
27887                    asNavFor = $(asNavFor).not(_.$slider);
27888                }
27889
27890                return asNavFor;
27891
27892            };
27893
27894            Slick.prototype.asNavFor = function (index) {
27895
27896                var _ = this,
27897                    asNavFor = _.getNavTarget();
27898
27899                if (asNavFor !== null && typeof asNavFor === 'object') {
27900                    asNavFor.each(function () {
27901                        var target = $(this).slick('getSlick');
27902                        if (!target.unslicked) {
27903                            target.slideHandler(index, true);
27904                        }
27905                    });
27906                }
27907
27908            };
27909
27910            Slick.prototype.applyTransition = function (slide) {
27911
27912                var _ = this,
27913                    transition = {};
27914
27915                if (_.options.fade === false) {
27916                    transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
27917                } else {
27918                    transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
27919                }
27920
27921                if (_.options.fade === false) {
27922                    _.$slideTrack.css(transition);
27923                } else {
27924                    _.$slides.eq(slide).css(transition);
27925                }
27926
27927            };
27928
27929            Slick.prototype.autoPlay = function () {
27930
27931                var _ = this;
27932
27933                _.autoPlayClear();
27934
27935                if (_.slideCount > _.options.slidesToShow) {
27936                    _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
27937                }
27938
27939            };
27940
27941            Slick.prototype.autoPlayClear = function () {
27942
27943                var _ = this;
27944
27945                if (_.autoPlayTimer) {
27946                    clearInterval(_.autoPlayTimer);
27947                }
27948
27949            };
27950
27951            Slick.prototype.autoPlayIterator = function () {
27952
27953                var _ = this,
27954                    slideTo = _.currentSlide + _.options.slidesToScroll;
27955
27956                if (!_.paused && !_.interrupted && !_.focussed) {
27957
27958                    if (_.options.infinite === false) {
27959
27960                        if (_.direction === 1 && (_.currentSlide + 1) === (_.slideCount - 1)) {
27961                            _.direction = 0;
27962                        } else if (_.direction === 0) {
27963
27964                            slideTo = _.currentSlide - _.options.slidesToScroll;
27965
27966                            if (_.currentSlide - 1 === 0) {
27967                                _.direction = 1;
27968                            }
27969
27970                        }
27971
27972                    }
27973
27974                    _.slideHandler(slideTo);
27975
27976                }
27977
27978            };
27979
27980            Slick.prototype.buildArrows = function () {
27981
27982                var _ = this;
27983
27984                if (_.options.arrows === true) {
27985
27986                    _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
27987                    _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
27988
27989                    if (_.slideCount > _.options.slidesToShow) {
27990
27991                        _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
27992                        _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
27993
27994                        if (_.htmlExpr.test(_.options.prevArrow)) {
27995                            _.$prevArrow.prependTo(_.options.appendArrows);
27996                        }
27997
27998                        if (_.htmlExpr.test(_.options.nextArrow)) {
27999                            _.$nextArrow.appendTo(_.options.appendArrows);
28000                        }
28001
28002                        if (_.options.infinite !== true) {
28003                            _.$prevArrow
28004                                .addClass('slick-disabled')
28005                                .attr('aria-disabled', 'true');
28006                        }
28007
28008                    } else {
28009
28010                        _.$prevArrow.add(_.$nextArrow)
28011
28012                            .addClass('slick-hidden')
28013                            .attr({
28014                                'aria-disabled': 'true',
28015                                'tabindex': '-1'
28016                            });
28017
28018                    }
28019
28020                }
28021
28022            };
28023
28024            Slick.prototype.buildDots = function () {
28025
28026                var _ = this,
28027                    i, dot;
28028
28029                if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
28030
28031                    _.$slider.addClass('slick-dotted');
28032
28033                    dot = $('<ul />').addClass(_.options.dotsClass);
28034
28035                    for (i = 0; i <= _.getDotCount(); i += 1) {
28036                        dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
28037                    }
28038
28039                    _.$dots = dot.appendTo(_.options.appendDots);
28040
28041                    _.$dots.find('li').first().addClass('slick-active');
28042
28043                }
28044
28045            };
28046
28047            Slick.prototype.buildOut = function () {
28048
28049                var _ = this;
28050
28051                _.$slides =
28052                    _.$slider
28053                        .children(_.options.slide + ':not(.slick-cloned)')
28054                        .addClass('slick-slide');
28055
28056                _.slideCount = _.$slides.length;
28057
28058                _.$slides.each(function (index, element) {
28059                    $(element)
28060                        .attr('data-slick-index', index)
28061                        .data('originalStyling', $(element).attr('style') || '');
28062                });
28063
28064                _.$slider.addClass('slick-slider');
28065
28066                _.$slideTrack = (_.slideCount === 0) ?
28067                    $('<div class="slick-track"/>').appendTo(_.$slider) :
28068                    _.$slides.wrapAll('<div class="slick-track"/>').parent();
28069
28070                _.$list = _.$slideTrack.wrap(
28071                    '<div class="slick-list"/>').parent();
28072                _.$slideTrack.css('opacity', 0);
28073
28074                if (_.options.centerMode === true || _.options.swipeToSlide === true) {
28075                    _.options.slidesToScroll = 1;
28076                }
28077
28078                $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
28079
28080                _.setupInfinite();
28081
28082                _.buildArrows();
28083
28084                _.buildDots();
28085
28086                _.updateDots();
28087
28088
28089                _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
28090
28091                if (_.options.draggable === true) {
28092                    _.$list.addClass('draggable');
28093                }
28094
28095            };
28096
28097            Slick.prototype.buildRows = function () {
28098
28099                var _ = this, a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection;
28100
28101                newSlides = document.createDocumentFragment();
28102                originalSlides = _.$slider.children();
28103
28104                if (_.options.rows > 0) {
28105
28106                    slidesPerSection = _.options.slidesPerRow * _.options.rows;
28107                    numOfSlides = Math.ceil(
28108                        originalSlides.length / slidesPerSection
28109                    );
28110
28111                    for (a = 0; a < numOfSlides; a++) {
28112                        var slide = document.createElement('div');
28113                        for (b = 0; b < _.options.rows; b++) {
28114                            var row = document.createElement('div');
28115                            for (c = 0; c < _.options.slidesPerRow; c++) {
28116                                var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
28117                                if (originalSlides.get(target)) {
28118                                    row.appendChild(originalSlides.get(target));
28119                                }
28120                            }
28121                            slide.appendChild(row);
28122                        }
28123                        newSlides.appendChild(slide);
28124                    }
28125
28126                    _.$slider.empty().append(newSlides);
28127                    _.$slider.children().children().children()
28128                        .css({
28129                            'width': (100 / _.options.slidesPerRow) + '%',
28130                            'display': 'inline-block'
28131                        });
28132
28133                }
28134
28135            };
28136
28137            Slick.prototype.checkResponsive = function (initial, forceUpdate) {
28138
28139                var _ = this,
28140                    breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
28141                var sliderWidth = _.$slider.width();
28142                var windowWidth = window.innerWidth || $(window).width();
28143
28144                if (_.respondTo === 'window') {
28145                    respondToWidth = windowWidth;
28146                } else if (_.respondTo === 'slider') {
28147                    respondToWidth = sliderWidth;
28148                } else if (_.respondTo === 'min') {
28149                    respondToWidth = Math.min(windowWidth, sliderWidth);
28150                }
28151
28152                if (_.options.responsive &&
28153                    _.options.responsive.length &&
28154                    _.options.responsive !== null) {
28155
28156                    targetBreakpoint = null;
28157
28158                    for (breakpoint in _.breakpoints) {
28159                        if (_.breakpoints.hasOwnProperty(breakpoint)) {
28160                            if (_.originalSettings.mobileFirst === false) {
28161                                if (respondToWidth < _.breakpoints[breakpoint]) {
28162                                    targetBreakpoint = _.breakpoints[breakpoint];
28163                                }
28164                            } else {
28165                                if (respondToWidth > _.breakpoints[breakpoint]) {
28166                                    targetBreakpoint = _.breakpoints[breakpoint];
28167                                }
28168                            }
28169                        }
28170                    }
28171
28172                    if (targetBreakpoint !== null) {
28173                        if (_.activeBreakpoint !== null) {
28174                            if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
28175                                _.activeBreakpoint =
28176                                    targetBreakpoint;
28177                                if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
28178                                    _.unslick(targetBreakpoint);
28179                                } else {
28180                                    _.options = $.extend({}, _.originalSettings,
28181                                        _.breakpointSettings[
28182                                            targetBreakpoint]);
28183                                    if (initial === true) {
28184                                        _.currentSlide = _.options.initialSlide;
28185                                    }
28186                                    _.refresh(initial);
28187                                }
28188                                triggerBreakpoint = targetBreakpoint;
28189                            }
28190                        } else {
28191                            _.activeBreakpoint = targetBreakpoint;
28192                            if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
28193                                _.unslick(targetBreakpoint);
28194                            } else {
28195                                _.options = $.extend({}, _.originalSettings,
28196                                    _.breakpointSettings[
28197                                        targetBreakpoint]);
28198                                if (initial === true) {
28199                                    _.currentSlide = _.options.initialSlide;
28200                                }
28201                                _.refresh(initial);
28202                            }
28203                            triggerBreakpoint = targetBreakpoint;
28204                        }
28205                    } else {
28206                        if (_.activeBreakpoint !== null) {
28207                            _.activeBreakpoint = null;
28208                            _.options = _.originalSettings;
28209                            if (initial === true) {
28210                                _.currentSlide = _.options.initialSlide;
28211                            }
28212                            _.refresh(initial);
28213                            triggerBreakpoint = targetBreakpoint;
28214                        }
28215                    }
28216
28217                    // only trigger breakpoints during an actual break. not on initialize.
28218                    if (!initial && triggerBreakpoint !== false) {
28219                        _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
28220                    }
28221                }
28222
28223            };
28224
28225            Slick.prototype.changeSlide = function (event, dontAnimate) {
28226
28227                var _ = this,
28228                    $target = $(event.currentTarget),
28229                    indexOffset, slideOffset, unevenOffset;
28230
28231                // If target is a link, prevent default action.
28232                if ($target.is('a')) {
28233                    event.preventDefault();
28234                }
28235
28236                // If target is not the <li> element (ie: a child), find the <li>.
28237                if (!$target.is('li')) {
28238                    $target = $target.closest('li');
28239                }
28240
28241                unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
28242                indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
28243
28244                switch (event.data.message) {
28245
28246                    case 'previous':
28247                        slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
28248                        if (_.slideCount > _.options.slidesToShow) {
28249                            _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
28250                        }
28251                        break;
28252
28253                    case 'next':
28254                        slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
28255                        if (_.slideCount > _.options.slidesToShow) {
28256                            _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
28257                        }
28258                        break;
28259
28260                    case 'index':
28261                        var index = event.data.index === 0 ? 0 :
28262                            event.data.index || $target.index() * _.options.slidesToScroll;
28263
28264                        _.slideHandler(_.checkNavigable(index), false, dontAnimate);
28265                        $target.children().trigger('focus');
28266                        break;
28267
28268                    default:
28269                        return;
28270                }
28271
28272            };
28273
28274            Slick.prototype.checkNavigable = function (index) {
28275
28276                var _ = this,
28277                    navigables, prevNavigable;
28278
28279                navigables = _.getNavigableIndexes();
28280                prevNavigable = 0;
28281                if (index > navigables[navigables.length - 1]) {
28282                    index = navigables[navigables.length - 1];
28283                } else {
28284                    for (var n in navigables) {
28285                        if (index < navigables[n]) {
28286                            index = prevNavigable;
28287                            break;
28288                        }
28289                        prevNavigable = navigables[n];
28290                    }
28291                }
28292
28293                return index;
28294            };
28295
28296            Slick.prototype.cleanUpEvents = function () {
28297
28298                var _ = this;
28299
28300                if (_.options.dots && _.$dots !== null) {
28301
28302                    $('li', _.$dots)
28303                        .off('click.slick', _.changeSlide)
28304                        .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
28305                        .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
28306
28307                    if (_.options.accessibility === true) {
28308                        _.$dots.off('keydown.slick', _.keyHandler);
28309                    }
28310                }
28311
28312                _.$slider.off('focus.slick blur.slick');
28313
28314                if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
28315                    _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
28316                    _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
28317
28318                    if (_.options.accessibility === true) {
28319                        _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
28320                        _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
28321                    }
28322                }
28323
28324                _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
28325                _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
28326                _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
28327                _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
28328
28329                _.$list.off('click.slick', _.clickHandler);
28330
28331                $(document).off(_.visibilityChange, _.visibility);
28332
28333                _.cleanUpSlideEvents();
28334
28335                if (_.options.accessibility === true) {
28336                    _.$list.off('keydown.slick', _.keyHandler);
28337                }
28338
28339                if (_.options.focusOnSelect === true) {
28340                    $(_.$slideTrack).children().off('click.slick', _.selectHandler);
28341                }
28342
28343                $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
28344
28345                $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
28346
28347                $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
28348
28349                $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
28350
28351            };
28352
28353            Slick.prototype.cleanUpSlideEvents = function () {
28354
28355                var _ = this;
28356
28357                _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
28358                _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
28359
28360            };
28361
28362            Slick.prototype.cleanUpRows = function () {
28363
28364                var _ = this, originalSlides;
28365
28366                if (_.options.rows > 0) {
28367                    originalSlides = _.$slides.children().children();
28368                    originalSlides.removeAttr('style');
28369                    _.$slider.empty().append(originalSlides);
28370                }
28371
28372            };
28373
28374            Slick.prototype.clickHandler = function (event) {
28375
28376                var _ = this;
28377
28378                if (_.shouldClick === false) {
28379                    event.stopImmediatePropagation();
28380                    event.stopPropagation();
28381                    event.preventDefault();
28382                }
28383
28384            };
28385
28386            Slick.prototype.destroy = function (refresh) {
28387
28388                var _ = this;
28389
28390                _.autoPlayClear();
28391
28392                _.touchObject = {};
28393
28394                _.cleanUpEvents();
28395
28396                $('.slick-cloned', _.$slider).detach();
28397
28398                if (_.$dots) {
28399                    _.$dots.remove();
28400                }
28401
28402                if (_.$prevArrow && _.$prevArrow.length) {
28403
28404                    _.$prevArrow
28405                        .removeClass('slick-disabled slick-arrow slick-hidden')
28406                        .removeAttr('aria-hidden aria-disabled tabindex')
28407                        .css('display', '');
28408
28409                    if (_.htmlExpr.test(_.options.prevArrow)) {
28410                        _.$prevArrow.remove();
28411                    }
28412                }
28413
28414                if (_.$nextArrow && _.$nextArrow.length) {
28415
28416                    _.$nextArrow
28417                        .removeClass('slick-disabled slick-arrow slick-hidden')
28418                        .removeAttr('aria-hidden aria-disabled tabindex')
28419                        .css('display', '');
28420
28421                    if (_.htmlExpr.test(_.options.nextArrow)) {
28422                        _.$nextArrow.remove();
28423                    }
28424                }
28425
28426
28427                if (_.$slides) {
28428
28429                    _.$slides
28430                        .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
28431                        .removeAttr('aria-hidden')
28432                        .removeAttr('data-slick-index')
28433                        .each(function () {
28434                            $(this).attr('style', $(this).data('originalStyling'));
28435                        });
28436
28437                    _.$slideTrack.children(this.options.slide).detach();
28438
28439                    _.$slideTrack.detach();
28440
28441                    _.$list.detach();
28442
28443                    _.$slider.append(_.$slides);
28444                }
28445
28446                _.cleanUpRows();
28447
28448                _.$slider.removeClass('slick-slider');
28449                _.$slider.removeClass('slick-initialized');
28450                _.$slider.removeClass('slick-dotted');
28451
28452                _.unslicked = true;
28453
28454                if (!refresh) {
28455                    _.$slider.trigger('destroy', [_]);
28456                }
28457
28458            };
28459
28460            Slick.prototype.disableTransition = function (slide) {
28461
28462                var _ = this,
28463                    transition = {};
28464
28465                transition[_.transitionType] = '';
28466
28467                if (_.options.fade === false) {
28468                    _.$slideTrack.css(transition);
28469                } else {
28470                    _.$slides.eq(slide).css(transition);
28471                }
28472
28473            };
28474
28475            Slick.prototype.fadeSlide = function (slideIndex, callback) {
28476
28477                var _ = this;
28478
28479                if (_.cssTransitions === false) {
28480
28481                    _.$slides.eq(slideIndex).css({
28482                        zIndex: _.options.zIndex
28483                    });
28484
28485                    _.$slides.eq(slideIndex).animate({
28486                        opacity: 1
28487                    }, _.options.speed, _.options.easing, callback);
28488
28489                } else {
28490
28491                    _.applyTransition(slideIndex);
28492
28493                    _.$slides.eq(slideIndex).css({
28494                        opacity: 1,
28495                        zIndex: _.options.zIndex
28496                    });
28497
28498                    if (callback) {
28499                        setTimeout(function () {
28500
28501                            _.disableTransition(slideIndex);
28502
28503                            callback.call();
28504                        }, _.options.speed);
28505                    }
28506
28507                }
28508
28509            };
28510
28511            Slick.prototype.fadeSlideOut = function (slideIndex) {
28512
28513                var _ = this;
28514
28515                if (_.cssTransitions === false) {
28516
28517                    _.$slides.eq(slideIndex).animate({
28518                        opacity: 0,
28519                        zIndex: _.options.zIndex - 2
28520                    }, _.options.speed, _.options.easing);
28521
28522                } else {
28523
28524                    _.applyTransition(slideIndex);
28525
28526                    _.$slides.eq(slideIndex).css({
28527                        opacity: 0,
28528                        zIndex: _.options.zIndex - 2
28529                    });
28530
28531                }
28532
28533            };
28534
28535            Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {
28536
28537                var _ = this;
28538
28539                if (filter !== null) {
28540
28541                    _.$slidesCache = _.$slides;
28542
28543                    _.unload();
28544
28545                    _.$slideTrack.children(this.options.slide).detach();
28546
28547                    _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
28548
28549                    _.reinit();
28550
28551                }
28552
28553            };
28554
28555            Slick.prototype.focusHandler = function () {
28556
28557                var _ = this;
28558
28559                _.$slider
28560                    .off('focus.slick blur.slick')
28561                    .on('focus.slick blur.slick', '*', function (event) {
28562
28563                        event.stopImmediatePropagation();
28564                        var $sf = $(this);
28565
28566                        setTimeout(function () {
28567
28568                            if (_.options.pauseOnFocus) {
28569                                _.focussed = $sf.is(':focus');
28570                                _.autoPlay();
28571                            }
28572
28573                        }, 0);
28574
28575                    });
28576            };
28577
28578            Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {
28579
28580                var _ = this;
28581                return _.currentSlide;
28582
28583            };
28584
28585            Slick.prototype.getDotCount = function () {
28586
28587                var _ = this;
28588
28589                var breakPoint = 0;
28590                var counter = 0;
28591                var pagerQty = 0;
28592
28593                if (_.options.infinite === true) {
28594                    if (_.slideCount <= _.options.slidesToShow) {
28595                        ++pagerQty;
28596                    } else {
28597                        while (breakPoint < _.slideCount) {
28598                            ++pagerQty;
28599                            breakPoint = counter + _.options.slidesToScroll;
28600                            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
28601                        }
28602                    }
28603                } else if (_.options.centerMode === true) {
28604                    pagerQty = _.slideCount;
28605                } else if (!_.options.asNavFor) {
28606                    pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
28607                } else {
28608                    while (breakPoint < _.slideCount) {
28609                        ++pagerQty;
28610                        breakPoint = counter + _.options.slidesToScroll;
28611                        counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
28612                    }
28613                }
28614
28615                return pagerQty - 1;
28616
28617            };
28618
28619            Slick.prototype.getLeft = function (slideIndex) {
28620
28621                var _ = this,
28622                    targetLeft,
28623                    verticalHeight,
28624                    verticalOffset = 0,
28625                    targetSlide,
28626                    coef;
28627
28628                _.slideOffset = 0;
28629                verticalHeight = _.$slides.first().outerHeight(true);
28630
28631                if (_.options.infinite === true) {
28632                    if (_.slideCount > _.options.slidesToShow) {
28633                        _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
28634                        coef = -1
28635
28636                        if (_.options.vertical === true && _.options.centerMode === true) {
28637                            if (_.options.slidesToShow === 2) {
28638                                coef = -1.5;
28639                            } else if (_.options.slidesToShow === 1) {
28640                                coef = -2
28641                            }
28642                        }
28643                        verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
28644                    }
28645                    if (_.slideCount % _.options.slidesToScroll !== 0) {
28646                        if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
28647                            if (slideIndex > _.slideCount) {
28648                                _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
28649                                verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
28650                            } else {
28651                                _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
28652                                verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
28653                            }
28654                        }
28655                    }
28656                } else {
28657                    if (slideIndex + _.options.slidesToShow > _.slideCount) {
28658                        _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
28659                        verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
28660                    }
28661                }
28662
28663                if (_.slideCount <= _.options.slidesToShow) {
28664                    _.slideOffset = 0;
28665                    verticalOffset = 0;
28666                }
28667
28668                if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
28669                    _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
28670                } else if (_.options.centerMode === true && _.options.infinite === true) {
28671                    _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
28672                } else if (_.options.centerMode === true) {
28673                    _.slideOffset = 0;
28674                    _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
28675                }
28676
28677                if (_.options.vertical === false) {
28678                    targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
28679                } else {
28680                    targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
28681                }
28682
28683                if (_.options.variableWidth === true) {
28684
28685                    if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
28686                        targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
28687                    } else {
28688                        targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
28689                    }
28690
28691                    if (_.options.rtl === true) {
28692                        if (targetSlide[0]) {
28693                            targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
28694                        } else {
28695                            targetLeft = 0;
28696                        }
28697                    } else {
28698                        targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
28699                    }
28700
28701                    if (_.options.centerMode === true) {
28702                        if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
28703                            targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
28704                        } else {
28705                            targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
28706                        }
28707
28708                        if (_.options.rtl === true) {
28709                            if (targetSlide[0]) {
28710                                targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
28711                            } else {
28712                                targetLeft = 0;
28713                            }
28714                        } else {
28715                            targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
28716                        }
28717
28718                        targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
28719                    }
28720                }
28721
28722                return targetLeft;
28723
28724            };
28725
28726            Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {
28727
28728                var _ = this;
28729
28730                return _.options[option];
28731
28732            };
28733
28734            Slick.prototype.getNavigableIndexes = function () {
28735
28736                var _ = this,
28737                    breakPoint = 0,
28738                    counter = 0,
28739                    indexes = [],
28740                    max;
28741
28742                if (_.options.infinite === false) {
28743                    max = _.slideCount;
28744                } else {
28745                    breakPoint = _.options.slidesToScroll * -1;
28746                    counter = _.options.slidesToScroll * -1;
28747                    max = _.slideCount * 2;
28748                }
28749
28750                while (breakPoint < max) {
28751                    indexes.push(breakPoint);
28752                    breakPoint = counter + _.options.slidesToScroll;
28753                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
28754                }
28755
28756                return indexes;
28757
28758            };
28759
28760            Slick.prototype.getSlick = function () {
28761
28762                return this;
28763
28764            };
28765
28766            Slick.prototype.getSlideCount = function () {
28767
28768                var _ = this,
28769                    slidesTraversed, swipedSlide, centerOffset;
28770
28771                centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
28772
28773                if (_.options.swipeToSlide === true) {
28774                    _.$slideTrack.find('.slick-slide').each(function (index, slide) {
28775                        if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
28776                            swipedSlide = slide;
28777                            return false;
28778                        }
28779                    });
28780
28781                    slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
28782
28783                    return slidesTraversed;
28784
28785                } else {
28786                    return _.options.slidesToScroll;
28787                }
28788
28789            };
28790
28791            Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {
28792
28793                var _ = this;
28794
28795                _.changeSlide({
28796                    data: {
28797                        message: 'index',
28798                        index: parseInt(slide)
28799                    }
28800                }, dontAnimate);
28801
28802            };
28803
28804            Slick.prototype.init = function (creation) {
28805
28806                var _ = this;
28807
28808                if (!$(_.$slider).hasClass('slick-initialized')) {
28809
28810                    $(_.$slider).addClass('slick-initialized');
28811
28812                    _.buildRows();
28813                    _.buildOut();
28814                    _.setProps();
28815                    _.startLoad();
28816                    _.loadSlider();
28817                    _.initializeEvents();
28818                    _.updateArrows();
28819                    _.updateDots();
28820                    _.checkResponsive(true);
28821                    _.focusHandler();
28822
28823                }
28824
28825                if (creation) {
28826                    _.$slider.trigger('init', [_]);
28827                }
28828
28829                if (_.options.accessibility === true) {
28830                    _.initADA();
28831                }
28832
28833                if (_.options.autoplay) {
28834
28835                    _.paused = false;
28836                    _.autoPlay();
28837
28838                }
28839
28840            };
28841
28842            Slick.prototype.initADA = function () {
28843                var _ = this,
28844                    numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
28845                    tabControlIndexes = _.getNavigableIndexes().filter(function (val) {
28846                        return (val >= 0) && (val < _.slideCount);
28847                    });
28848
28849                _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
28850                    'aria-hidden': 'true',
28851                    'tabindex': '-1'
28852                }).find('a, input, button, select').attr({
28853                    'tabindex': '-1'
28854                });
28855
28856                if (_.$dots !== null) {
28857                    _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
28858                        var slideControlIndex = tabControlIndexes.indexOf(i);
28859
28860                        $(this).attr({
28861                            'role': 'tabpanel',
28862                            'id': 'slick-slide' + _.instanceUid + i,
28863                            'tabindex': -1
28864                        });
28865
28866                        if (slideControlIndex !== -1) {
28867                            var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
28868                            if ($('#' + ariaButtonControl).length) {
28869                                $(this).attr({
28870                                    'aria-describedby': ariaButtonControl
28871                                });
28872                            }
28873                        }
28874                    });
28875
28876                    _.$dots.attr('role', 'tablist').find('li').each(function (i) {
28877                        var mappedSlideIndex = tabControlIndexes[i];
28878
28879                        $(this).attr({
28880                            'role': 'presentation'
28881                        });
28882
28883                        $(this).find('button').first().attr({
28884                            'role': 'tab',
28885                            'id': 'slick-slide-control' + _.instanceUid + i,
28886                            'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
28887                            'aria-label': (i + 1) + ' of ' + numDotGroups,
28888                            'aria-selected': null,
28889                            'tabindex': '-1'
28890                        });
28891
28892                    }).eq(_.currentSlide).find('button').attr({
28893                        'aria-selected': 'true',
28894                        'tabindex': '0'
28895                    }).end();
28896                }
28897
28898                for (var i = _.currentSlide, max = i + _.options.slidesToShow; i < max; i++) {
28899                    if (_.options.focusOnChange) {
28900                        _.$slides.eq(i).attr({'tabindex': '0'});
28901                    } else {
28902                        _.$slides.eq(i).removeAttr('tabindex');
28903                    }
28904                }
28905
28906                _.activateADA();
28907
28908            };
28909
28910            Slick.prototype.initArrowEvents = function () {
28911
28912                var _ = this;
28913
28914                if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
28915                    _.$prevArrow
28916                        .off('click.slick')
28917                        .on('click.slick', {
28918                            message: 'previous'
28919                        }, _.changeSlide);
28920                    _.$nextArrow
28921                        .off('click.slick')
28922                        .on('click.slick', {
28923                            message: 'next'
28924                        }, _.changeSlide);
28925
28926                    if (_.options.accessibility === true) {
28927                        _.$prevArrow.on('keydown.slick', _.keyHandler);
28928                        _.$nextArrow.on('keydown.slick', _.keyHandler);
28929                    }
28930                }
28931
28932            };
28933
28934            Slick.prototype.initDotEvents = function () {
28935
28936                var _ = this;
28937
28938                if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
28939                    $('li', _.$dots).on('click.slick', {
28940                        message: 'index'
28941                    }, _.changeSlide);
28942
28943                    if (_.options.accessibility === true) {
28944                        _.$dots.on('keydown.slick', _.keyHandler);
28945                    }
28946                }
28947
28948                if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
28949
28950                    $('li', _.$dots)
28951                        .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
28952                        .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
28953
28954                }
28955
28956            };
28957
28958            Slick.prototype.initSlideEvents = function () {
28959
28960                var _ = this;
28961
28962                if (_.options.pauseOnHover) {
28963
28964                    _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
28965                    _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
28966
28967                }
28968
28969            };
28970
28971            Slick.prototype.initializeEvents = function () {
28972
28973                var _ = this;
28974
28975                _.initArrowEvents();
28976
28977                _.initDotEvents();
28978                _.initSlideEvents();
28979
28980                _.$list.on('touchstart.slick mousedown.slick', {
28981                    action: 'start'
28982                }, _.swipeHandler);
28983                _.$list.on('touchmove.slick mousemove.slick', {
28984                    action: 'move'
28985                }, _.swipeHandler);
28986                _.$list.on('touchend.slick mouseup.slick', {
28987                    action: 'end'
28988                }, _.swipeHandler);
vendor: 27,514 bytes, lines 28989-29804
28989                _.$list.on('touchcancel.slick mouseleave.slick', {
28990                    action: 'end'
28991                }, _.swipeHandler);
28992
28993                _.$list.on('click.slick', _.clickHandler);
28994
28995                $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
28996
28997                if (_.options.accessibility === true) {
28998                    _.$list.on('keydown.slick', _.keyHandler);
28999                }
29000
29001                if (_.options.focusOnSelect === true) {
29002                    $(_.$slideTrack).children().on('click.slick', _.selectHandler);
29003                }
29004
29005                $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
29006
29007                $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
29008
29009                $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
29010
29011                $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
29012                $(_.setPosition);
29013
29014            };
29015
29016            Slick.prototype.initUI = function () {
29017
29018                var _ = this;
29019
29020                if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
29021
29022                    _.$prevArrow.show();
29023                    _.$nextArrow.show();
29024
29025                }
29026
29027                if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
29028
29029                    _.$dots.show();
29030
29031                }
29032
29033            };
29034
29035            Slick.prototype.keyHandler = function (event) {
29036
29037                var _ = this;
29038                //Dont slide if the cursor is inside the form fields and arrow keys are pressed
29039                if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
29040                    if (event.keyCode === 37 && _.options.accessibility === true) {
29041                        _.changeSlide({
29042                            data: {
29043                                message: _.options.rtl === true ? 'next' : 'previous'
29044                            }
29045                        });
29046                    } else if (event.keyCode === 39 && _.options.accessibility === true) {
29047                        _.changeSlide({
29048                            data: {
29049                                message: _.options.rtl === true ? 'previous' : 'next'
29050                            }
29051                        });
29052                    }
29053                }
29054
29055            };
29056
29057            Slick.prototype.lazyLoad = function () {
29058
29059                var _ = this,
29060                    loadRange, cloneRange, rangeStart, rangeEnd;
29061
29062                function loadImages(imagesScope) {
29063
29064                    $('img[data-lazy]', imagesScope).each(function () {
29065
29066                        var image = $(this),
29067                            imageSource = $(this).attr('data-lazy'),
29068                            imageSrcSet = $(this).attr('data-srcset'),
29069                            imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
29070                            imageToLoad = document.createElement('img');
29071
29072                        imageToLoad.onload = function () {
29073
29074                            image
29075                                .animate({opacity: 0}, 100, function () {
29076
29077                                    if (imageSrcSet) {
29078                                        image
29079                                            .attr('srcset', imageSrcSet);
29080
29081                                        if (imageSizes) {
29082                                            image
29083                                                .attr('sizes', imageSizes);
29084                                        }
29085                                    }
29086
29087                                    image
29088                                        .attr('src', imageSource)
29089                                        .animate({opacity: 1}, 200, function () {
29090                                            image
29091                                                .removeAttr('data-lazy data-srcset data-sizes')
29092                                                .removeClass('slick-loading');
29093                                        });
29094                                    _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
29095                                });
29096
29097                        };
29098
29099                        imageToLoad.onerror = function () {
29100
29101                            image
29102                                .removeAttr('data-lazy')
29103                                .removeClass('slick-loading')
29104                                .addClass('slick-lazyload-error');
29105
29106                            _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
29107
29108                        };
29109
29110                        imageToLoad.src = imageSource;
29111
29112                    });
29113
29114                }
29115
29116                if (_.options.centerMode === true) {
29117                    if (_.options.infinite === true) {
29118                        rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
29119                        rangeEnd = rangeStart + _.options.slidesToShow + 2;
29120                    } else {
29121                        rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
29122                        rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
29123                    }
29124                } else {
29125                    rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
29126                    rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
29127                    if (_.options.fade === true) {
29128                        if (rangeStart > 0) rangeStart--;
29129                        if (rangeEnd <= _.slideCount) rangeEnd++;
29130                    }
29131                }
29132
29133                loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
29134
29135                if (_.options.lazyLoad === 'anticipated') {
29136                    var prevSlide = rangeStart - 1,
29137                        nextSlide = rangeEnd,
29138                        $slides = _.$slider.find('.slick-slide');
29139
29140                    for (var i = 0; i < _.options.slidesToScroll; i++) {
29141                        if (prevSlide < 0) prevSlide = _.slideCount - 1;
29142                        loadRange = loadRange.add($slides.eq(prevSlide));
29143                        loadRange = loadRange.add($slides.eq(nextSlide));
29144                        prevSlide--;
29145                        nextSlide++;
29146                    }
29147                }
29148
29149                loadImages(loadRange);
29150
29151                if (_.slideCount <= _.options.slidesToShow) {
29152                    cloneRange = _.$slider.find('.slick-slide');
29153                    loadImages(cloneRange);
29154                } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
29155                    cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
29156                    loadImages(cloneRange);
29157                } else if (_.currentSlide === 0) {
29158                    cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
29159                    loadImages(cloneRange);
29160                }
29161
29162            };
29163
29164            Slick.prototype.loadSlider = function () {
29165
29166                var _ = this;
29167
29168                _.setPosition();
29169
29170                _.$slideTrack.css({
29171                    opacity: 1
29172                });
29173
29174                _.$slider.removeClass('slick-loading');
29175
29176                _.initUI();
29177
29178                if (_.options.lazyLoad === 'progressive') {
29179                    _.progressiveLazyLoad();
29180                }
29181
29182            };
29183
29184            Slick.prototype.next = Slick.prototype.slickNext = function () {
29185
29186                var _ = this;
29187
29188                _.changeSlide({
29189                    data: {
29190                        message: 'next'
29191                    }
29192                });
29193
29194            };
29195
29196            Slick.prototype.orientationChange = function () {
29197
29198                var _ = this;
29199
29200                _.checkResponsive();
29201                _.setPosition();
29202
29203            };
29204
29205            Slick.prototype.pause = Slick.prototype.slickPause = function () {
29206
29207                var _ = this;
29208
29209                _.autoPlayClear();
29210                _.paused = true;
29211
29212            };
29213
29214            Slick.prototype.play = Slick.prototype.slickPlay = function () {
29215
29216                var _ = this;
29217
29218                _.autoPlay();
29219                _.options.autoplay = true;
29220                _.paused = false;
29221                _.focussed = false;
29222                _.interrupted = false;
29223
29224            };
29225
29226            Slick.prototype.postSlide = function (index) {
29227
29228                var _ = this;
29229
29230                if (!_.unslicked) {
29231
29232                    _.$slider.trigger('afterChange', [_, index]);
29233
29234                    _.animating = false;
29235
29236                    if (_.slideCount > _.options.slidesToShow) {
29237                        _.setPosition();
29238                    }
29239
29240                    _.swipeLeft = null;
29241
29242                    if (_.options.autoplay) {
29243                        _.autoPlay();
29244                    }
29245
29246                    if (_.options.accessibility === true) {
29247                        _.initADA();
29248
29249                        if (_.options.focusOnChange) {
29250                            var $currentSlide = $(_.$slides.get(_.currentSlide));
29251                            $currentSlide.attr('tabindex', 0).focus();
29252                        }
29253                    }
29254
29255                }
29256
29257            };
29258
29259            Slick.prototype.prev = Slick.prototype.slickPrev = function () {
29260
29261                var _ = this;
29262
29263                _.changeSlide({
29264                    data: {
29265                        message: 'previous'
29266                    }
29267                });
29268
29269            };
29270
29271            Slick.prototype.preventDefault = function (event) {
29272
29273                event.preventDefault();
29274
29275            };
29276
29277            Slick.prototype.progressiveLazyLoad = function (tryCount) {
29278
29279                tryCount = tryCount || 1;
29280
29281                var _ = this,
29282                    $imgsToLoad = $('img[data-lazy]', _.$slider),
29283                    image,
29284                    imageSource,
29285                    imageSrcSet,
29286                    imageSizes,
29287                    imageToLoad;
29288
29289                if ($imgsToLoad.length) {
29290
29291                    image = $imgsToLoad.first();
29292                    imageSource = image.attr('data-lazy');
29293                    imageSrcSet = image.attr('data-srcset');
29294                    imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
29295                    imageToLoad = document.createElement('img');
29296
29297                    imageToLoad.onload = function () {
29298
29299                        if (imageSrcSet) {
29300                            image
29301                                .attr('srcset', imageSrcSet);
29302
29303                            if (imageSizes) {
29304                                image
29305                                    .attr('sizes', imageSizes);
29306                            }
29307                        }
29308
29309                        image
29310                            .attr('src', imageSource)
29311                            .removeAttr('data-lazy data-srcset data-sizes')
29312                            .removeClass('slick-loading');
29313
29314                        if (_.options.adaptiveHeight === true) {
29315                            _.setPosition();
29316                        }
29317
29318                        _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
29319                        _.progressiveLazyLoad();
29320
29321                    };
29322
29323                    imageToLoad.onerror = function () {
29324
29325                        if (tryCount < 3) {
29326
29327                            /**
29328                             * try to load the image 3 times,
29329                             * leave a slight delay so we don't get
29330                             * servers blocking the request.
29331                             */
29332                            setTimeout(function () {
29333                                _.progressiveLazyLoad(tryCount + 1);
29334                            }, 500);
29335
29336                        } else {
29337
29338                            image
29339                                .removeAttr('data-lazy')
29340                                .removeClass('slick-loading')
29341                                .addClass('slick-lazyload-error');
29342
29343                            _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
29344
29345                            _.progressiveLazyLoad();
29346
29347                        }
29348
29349                    };
29350
29351                    imageToLoad.src = imageSource;
29352
29353                } else {
29354
29355                    _.$slider.trigger('allImagesLoaded', [_]);
29356
29357                }
29358
29359            };
29360
29361            Slick.prototype.refresh = function (initializing) {
29362
29363                var _ = this, currentSlide, lastVisibleIndex;
29364
29365                lastVisibleIndex = _.slideCount - _.options.slidesToShow;
29366
29367                // in non-infinite sliders, we don't want to go past the
29368                // last visible index.
29369                if (!_.options.infinite && (_.currentSlide > lastVisibleIndex)) {
29370                    _.currentSlide = lastVisibleIndex;
29371                }
29372
29373                // if less slides than to show, go to start.
29374                if (_.slideCount <= _.options.slidesToShow) {
29375                    _.currentSlide = 0;
29376
29377                }
29378
29379                currentSlide = _.currentSlide;
29380
29381                _.destroy(true);
29382
29383                $.extend(_, _.initials, {currentSlide: currentSlide});
29384
29385                _.init();
29386
29387                if (!initializing) {
29388
29389                    _.changeSlide({
29390                        data: {
29391                            message: 'index',
29392                            index: currentSlide
29393                        }
29394                    }, false);
29395
29396                }
29397
29398            };
29399
29400            Slick.prototype.registerBreakpoints = function () {
29401
29402                var _ = this, breakpoint, currentBreakpoint, l,
29403                    responsiveSettings = _.options.responsive || null;
29404
29405                if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {
29406
29407                    _.respondTo = _.options.respondTo || 'window';
29408
29409                    for (breakpoint in responsiveSettings) {
29410
29411                        l = _.breakpoints.length - 1;
29412
29413                        if (responsiveSettings.hasOwnProperty(breakpoint)) {
29414                            currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
29415
29416                            // loop through the breakpoints and cut out any existing
29417                            // ones with the same breakpoint number, we don't want dupes.
29418                            while (l >= 0) {
29419                                if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
29420                                    _.breakpoints.splice(l, 1);
29421                                }
29422                                l--;
29423                            }
29424
29425                            _.breakpoints.push(currentBreakpoint);
29426                            _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
29427
29428                        }
29429
29430                    }
29431
29432                    _.breakpoints.sort(function (a, b) {
29433                        return (_.options.mobileFirst) ? a - b : b - a;
29434                    });
29435
29436                }
29437
29438            };
29439
29440            Slick.prototype.reinit = function () {
29441
29442                var _ = this;
29443
29444                _.$slides =
29445                    _.$slideTrack
29446                        .children(_.options.slide)
29447                        .addClass('slick-slide');
29448
29449                _.slideCount = _.$slides.length;
29450
29451                if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
29452                    _.currentSlide = _.currentSlide - _.options.slidesToScroll;
29453                }
29454
29455                if (_.slideCount <= _.options.slidesToShow) {
29456                    _.currentSlide = 0;
29457                }
29458
29459                _.registerBreakpoints();
29460
29461                _.setProps();
29462                _.setupInfinite();
29463                _.buildArrows();
29464                _.updateArrows();
29465                _.initArrowEvents();
29466                _.buildDots();
29467                _.updateDots();
29468                _.initDotEvents();
29469                _.cleanUpSlideEvents();
29470                _.initSlideEvents();
29471
29472                _.checkResponsive(false, true);
29473
29474                if (_.options.focusOnSelect === true) {
29475                    $(_.$slideTrack).children().on('click.slick', _.selectHandler);
29476                }
29477
29478                _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
29479
29480                _.setPosition();
29481                _.focusHandler();
29482
29483                _.paused = !_.options.autoplay;
29484                _.autoPlay();
29485
29486                _.$slider.trigger('reInit', [_]);
29487
29488            };
29489
29490            Slick.prototype.resize = function () {
29491
29492                var _ = this;
29493
29494                if ($(window).width() !== _.windowWidth) {
29495                    clearTimeout(_.windowDelay);
29496                    _.windowDelay = window.setTimeout(function () {
29497                        _.windowWidth = $(window).width();
29498                        _.checkResponsive();
29499                        if (!_.unslicked) {
29500                            _.setPosition();
29501                        }
29502                    }, 50);
29503                }
29504            };
29505
29506            Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {
29507
29508                var _ = this;
29509
29510                if (typeof (index) === 'boolean') {
29511                    removeBefore = index;
29512                    index = removeBefore === true ? 0 : _.slideCount - 1;
29513                } else {
29514                    index = removeBefore === true ? --index : index;
29515                }
29516
29517                if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
29518                    return false;
29519                }
29520
29521                _.unload();
29522
29523                if (removeAll === true) {
29524                    _.$slideTrack.children().remove();
29525                } else {
29526                    _.$slideTrack.children(this.options.slide).eq(index).remove();
29527                }
29528
29529                _.$slides = _.$slideTrack.children(this.options.slide);
29530
29531                _.$slideTrack.children(this.options.slide).detach();
29532
29533                _.$slideTrack.append(_.$slides);
29534
29535                _.$slidesCache = _.$slides;
29536
29537                _.reinit();
29538
29539            };
29540
29541            Slick.prototype.setCSS = function (position) {
29542
29543                var _ = this,
29544                    positionProps = {},
29545                    x, y;
29546
29547                if (_.options.rtl === true) {
29548                    position = -position;
29549                }
29550                x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
29551                y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
29552
29553                positionProps[_.positionProp] = position;
29554
29555                if (_.transformsEnabled === false) {
29556                    _.$slideTrack.css(positionProps);
29557                } else {
29558                    positionProps = {};
29559                    if (_.cssTransitions === false) {
29560                        positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
29561                        _.$slideTrack.css(positionProps);
29562                    } else {
29563                        positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
29564                        _.$slideTrack.css(positionProps);
29565                    }
29566                }
29567
29568            };
29569
29570            Slick.prototype.setDimensions = function () {
29571
29572                var _ = this;
29573
29574                if (_.options.vertical === false) {
29575                    if (_.options.centerMode === true) {
29576                        _.$list.css({
29577                            padding: ('0px ' + _.options.centerPadding)
29578                        });
29579                    }
29580                } else {
29581                    _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
29582                    if (_.options.centerMode === true) {
29583                        _.$list.css({
29584                            padding: (_.options.centerPadding + ' 0px')
29585                        });
29586                    }
29587                }
29588
29589                _.listWidth = _.$list.width();
29590                _.listHeight = _.$list.height();
29591
29592
29593                if (_.options.vertical === false && _.options.variableWidth === false) {
29594                    _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
29595                    _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
29596
29597                } else if (_.options.variableWidth === true) {
29598                    _.$slideTrack.width(5000 * _.slideCount);
29599                } else {
29600                    _.slideWidth = Math.ceil(_.listWidth);
29601                    _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
29602                }
29603
29604                var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
29605                if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
29606
29607            };
29608
29609            Slick.prototype.setFade = function () {
29610
29611                var _ = this,
29612                    targetLeft;
29613
29614                _.$slides.each(function (index, element) {
29615                    targetLeft = (_.slideWidth * index) * -1;
29616                    if (_.options.rtl === true) {
29617                        $(element).css({
29618                            position: 'relative',
29619                            right: targetLeft,
29620                            top: 0,
29621                            zIndex: _.options.zIndex - 2,
29622                            opacity: 0
29623                        });
29624                    } else {
29625                        $(element).css({
29626                            position: 'relative',
29627                            left: targetLeft,
29628                            top: 0,
29629                            zIndex: _.options.zIndex - 2,
29630                            opacity: 0
29631                        });
29632                    }
29633                });
29634
29635                _.$slides.eq(_.currentSlide).css({
29636                    zIndex: _.options.zIndex - 1,
29637                    opacity: 1
29638                });
29639
29640            };
29641
29642            Slick.prototype.setHeight = function () {
29643
29644                var _ = this;
29645
29646                if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
29647                    var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
29648                    _.$list.css('height', targetHeight);
29649                }
29650
29651            };
29652
29653            Slick.prototype.setOption =
29654                Slick.prototype.slickSetOption = function () {
29655
29656                    /**
29657                     * accepts arguments in format of:
29658                     *
29659                     *  - for changing a single option's value:
29660                     *     .slick("setOption", option, value, refresh )
29661                     *
29662                     *  - for changing a set of responsive options:
29663                     *     .slick("setOption", 'responsive', [{}, ...], refresh )
29664                     *
29665                     *  - for updating multiple values at once (not responsive)
29666                     *     .slick("setOption", { 'option': value, ... }, refresh )
29667                     */
29668
29669                    var _ = this, l, item, option, value, refresh = false, type;
29670
29671                    if ($.type(arguments[0]) === 'object') {
29672
29673                        option = arguments[0];
29674                        refresh = arguments[1];
29675                        type = 'multiple';
29676
29677                    } else if ($.type(arguments[0]) === 'string') {
29678
29679                        option = arguments[0];
29680                        value = arguments[1];
29681                        refresh = arguments[2];
29682
29683                        if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {
29684
29685                            type = 'responsive';
29686
29687                        } else if (typeof arguments[1] !== 'undefined') {
29688
29689                            type = 'single';
29690
29691                        }
29692
29693                    }
29694
29695                    if (type === 'single') {
29696
29697                        _.options[option] = value;
29698
29699
29700                    } else if (type === 'multiple') {
29701
29702                        $.each(option, function (opt, val) {
29703
29704                            _.options[opt] = val;
29705
29706                        });
29707
29708
29709                    } else if (type === 'responsive') {
29710
29711                        for (item in value) {
29712
29713                            if ($.type(_.options.responsive) !== 'array') {
29714
29715                                _.options.responsive = [value[item]];
29716
29717                            } else {
29718
29719                                l = _.options.responsive.length - 1;
29720
29721                                // loop through the responsive object and splice out duplicates.
29722                                while (l >= 0) {
29723
29724                                    if (_.options.responsive[l].breakpoint === value[item].breakpoint) {
29725
29726                                        _.options.responsive.splice(l, 1);
29727
29728                                    }
29729
29730                                    l--;
29731
29732                                }
29733
29734                                _.options.responsive.push(value[item]);
29735
29736                            }
29737
29738                        }
29739
29740                    }
29741
29742                    if (refresh) {
29743
29744                        _.unload();
29745                        _.reinit();
29746
29747                    }
29748
29749                };
29750
29751            Slick.prototype.setPosition = function () {
29752
29753                var _ = this;
29754
29755                _.setDimensions();
29756
29757                _.setHeight();
29758
29759                if (_.options.fade === false) {
29760                    _.setCSS(_.getLeft(_.currentSlide));
29761                } else {
29762                    _.setFade();
29763                }
29764
29765                _.$slider.trigger('setPosition', [_]);
29766
29767            };
29768
29769            Slick.prototype.setProps = function () {
29770
29771                var _ = this,
29772                    bodyStyle = document.body.style;
29773
29774                _.positionProp = _.options.vertical === true ? 'top' : 'left';
29775
29776                if (_.positionProp === 'top') {
29777                    _.$slider.addClass('slick-vertical');
29778                } else {
29779                    _.$slider.removeClass('slick-vertical');
29780                }
29781
29782                if (bodyStyle.WebkitTransition !== undefined ||
29783                    bodyStyle.MozTransition !== undefined ||
29784                    bodyStyle.msTransition !== undefined) {
29785                    if (_.options.useCSS === true) {
29786                        _.cssTransitions = true;
29787                    }
29788                }
29789
29790                if (_.options.fade) {
29791                    if (typeof _.options.zIndex === 'number') {
29792                        if (_.options.zIndex < 3) {
29793                            _.options.zIndex = 3;
29794                        }
29795                    } else {
29796                        _.options.zIndex = _.defaults.zIndex;
29797                    }
29798                }
29799
29800                if (bodyStyle.OTransform !== undefined) {
29801                    _.animType = 'OTransform';
29802                    _.transformType = '-o-transform';
29803                    _.transitionType = 'OTransition';
29804                    if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
29805                }
29806                if (bodyStyle.MozTransform !== undefined) {
29807                    _.animType = 'MozTransform';
29808                    _.transformType = '-moz-transform';
29809                    _.transitionType = 'MozTransition';
29810                    if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
29811                }
29812                if (bodyStyle.webkitTransform !== undefined) {
29813                    _.animType = 'webkitTransform';
29814                    _.transformType = '-webkit-transform';
29815                    _.transitionType = 'webkitTransition';
29816                    if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
29817                }
29818                if (bodyStyle.msTransform !== undefined) {
29819                    _.animType = 'msTransform';
29820                    _.transformType = '-ms-transform';
29821                    _.transitionType = 'msTransition';
29822                    if (bodyStyle.msTransform === undefined) _.animType = false;
vendor: 22,768 bytes, lines 29823-30481
29823                }
29824                if (bodyStyle.transform !== undefined && _.animType !== false) {
29825                    _.animType = 'transform';
29826                    _.transformType = 'transform';
29827                    _.transitionType = 'transition';
29828                }
29829                _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
29830            };
29831
29832
29833            Slick.prototype.setSlideClasses = function (index) {
29834
29835                var _ = this,
29836                    centerOffset, allSlides, indexOffset, remainder;
29837
29838                allSlides = _.$slider
29839                    .find('.slick-slide')
29840                    .removeClass('slick-active slick-center slick-current')
29841                    .attr('aria-hidden', 'true');
29842
29843                _.$slides
29844                    .eq(index)
29845                    .addClass('slick-current');
29846
29847                if (_.options.centerMode === true) {
29848
29849                    var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
29850
29851                    centerOffset = Math.floor(_.options.slidesToShow / 2);
29852
29853                    if (_.options.infinite === true) {
29854
29855                        if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
29856                            _.$slides
29857                                .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
29858                                .addClass('slick-active')
29859                                .attr('aria-hidden', 'false');
29860
29861                        } else {
29862
29863                            indexOffset = _.options.slidesToShow + index;
29864                            allSlides
29865                                .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
29866                                .addClass('slick-active')
29867                                .attr('aria-hidden', 'false');
29868
29869                        }
29870
29871                        if (index === 0) {
29872
29873                            allSlides
29874                                .eq(allSlides.length - 1 - _.options.slidesToShow)
29875                                .addClass('slick-center');
29876
29877                        } else if (index === _.slideCount - 1) {
29878
29879                            allSlides
29880                                .eq(_.options.slidesToShow)
29881                                .addClass('slick-center');
29882
29883                        }
29884
29885                    }
29886
29887                    _.$slides
29888                        .eq(index)
29889                        .addClass('slick-center');
29890
29891                } else {
29892
29893                    if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
29894
29895                        _.$slides
29896                            .slice(index, index + _.options.slidesToShow)
29897                            .addClass('slick-active')
29898                            .attr('aria-hidden', 'false');
29899
29900                    } else if (allSlides.length <= _.options.slidesToShow) {
29901
29902                        allSlides
29903                            .addClass('slick-active')
29904                            .attr('aria-hidden', 'false');
29905
29906                    } else {
29907
29908                        remainder = _.slideCount % _.options.slidesToShow;
29909                        indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
29910
29911                        if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
29912
29913                            allSlides
29914                                .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
29915                                .addClass('slick-active')
29916                                .attr('aria-hidden', 'false');
29917
29918                        } else {
29919
29920                            allSlides
29921                                .slice(indexOffset, indexOffset + _.options.slidesToShow)
29922                                .addClass('slick-active')
29923                                .attr('aria-hidden', 'false');
29924
29925                        }
29926
29927                    }
29928
29929                }
29930
29931                if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
29932                    _.lazyLoad();
29933                }
29934            };
29935
29936            Slick.prototype.setupInfinite = function () {
29937
29938                var _ = this,
29939                    i, slideIndex, infiniteCount;
29940
29941                if (_.options.fade === true) {
29942                    _.options.centerMode = false;
29943                }
29944
29945                if (_.options.infinite === true && _.options.fade === false) {
29946
29947                    slideIndex = null;
29948
29949                    if (_.slideCount > _.options.slidesToShow) {
29950
29951                        if (_.options.centerMode === true) {
29952                            infiniteCount = _.options.slidesToShow + 1;
29953                        } else {
29954                            infiniteCount = _.options.slidesToShow;
29955                        }
29956
29957                        for (i = _.slideCount; i > (_.slideCount -
29958                            infiniteCount); i -= 1) {
29959                            slideIndex = i - 1;
29960                            $(_.$slides[slideIndex]).clone(true).attr('id', '')
29961                                .attr('data-slick-index', slideIndex - _.slideCount)
29962                                .prependTo(_.$slideTrack).addClass('slick-cloned');
29963                        }
29964                        for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
29965                            slideIndex = i;
29966                            $(_.$slides[slideIndex]).clone(true).attr('id', '')
29967                                .attr('data-slick-index', slideIndex + _.slideCount)
29968                                .appendTo(_.$slideTrack).addClass('slick-cloned');
29969                        }
29970                        _.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
29971                            $(this).attr('id', '');
29972                        });
29973
29974                    }
29975
29976                }
29977
29978            };
29979
29980            Slick.prototype.interrupt = function (toggle) {
29981
29982                var _ = this;
29983
29984                if (!toggle) {
29985                    _.autoPlay();
29986                }
29987                _.interrupted = toggle;
29988
29989            };
29990
29991            Slick.prototype.selectHandler = function (event) {
29992
29993                var _ = this;
29994
29995                var targetElement =
29996                    $(event.target).is('.slick-slide') ?
29997                        $(event.target) :
29998                        $(event.target).parents('.slick-slide');
29999
30000                var index = parseInt(targetElement.attr('data-slick-index'));
30001
30002                if (!index) index = 0;
30003
30004                if (_.slideCount <= _.options.slidesToShow) {
30005
30006                    _.slideHandler(index, false, true);
30007                    return;
30008
30009                }
30010
30011                _.slideHandler(index);
30012
30013            };
30014
30015            Slick.prototype.slideHandler = function (index, sync, dontAnimate) {
30016
30017                var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
30018                    _ = this, navTarget;
30019
30020                sync = sync || false;
30021
30022                if (_.animating === true && _.options.waitForAnimate === true) {
30023                    return;
30024                }
30025
30026                if (_.options.fade === true && _.currentSlide === index) {
30027                    return;
30028                }
30029
30030                if (sync === false) {
30031                    _.asNavFor(index);
30032                }
30033
30034                targetSlide = index;
30035                targetLeft = _.getLeft(targetSlide);
30036                slideLeft = _.getLeft(_.currentSlide);
30037
30038                _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
30039
30040                if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
30041                    if (_.options.fade === false) {
30042                        targetSlide = _.currentSlide;
30043                        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
30044                            _.animateSlide(slideLeft, function () {
30045                                _.postSlide(targetSlide);
30046                            });
30047                        } else {
30048                            _.postSlide(targetSlide);
30049                        }
30050                    }
30051                    return;
30052                } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
30053                    if (_.options.fade === false) {
30054                        targetSlide = _.currentSlide;
30055                        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
30056                            _.animateSlide(slideLeft, function () {
30057                                _.postSlide(targetSlide);
30058                            });
30059                        } else {
30060                            _.postSlide(targetSlide);
30061                        }
30062                    }
30063                    return;
30064                }
30065
30066                if (_.options.autoplay) {
30067                    clearInterval(_.autoPlayTimer);
30068                }
30069
30070                if (targetSlide < 0) {
30071                    if (_.slideCount % _.options.slidesToScroll !== 0) {
30072                        animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
30073                    } else {
30074                        animSlide = _.slideCount + targetSlide;
30075                    }
30076                } else if (targetSlide >= _.slideCount) {
30077                    if (_.slideCount % _.options.slidesToScroll !== 0) {
30078                        animSlide = 0;
30079                    } else {
30080                        animSlide = targetSlide - _.slideCount;
30081                    }
30082                } else {
30083                    animSlide = targetSlide;
30084                }
30085
30086                _.animating = true;
30087
30088                _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
30089
30090                oldSlide = _.currentSlide;
30091                _.currentSlide = animSlide;
30092
30093                _.setSlideClasses(_.currentSlide);
30094
30095                if (_.options.asNavFor) {
30096
30097                    navTarget = _.getNavTarget();
30098                    navTarget = navTarget.slick('getSlick');
30099
30100                    if (navTarget.slideCount <= navTarget.options.slidesToShow) {
30101                        navTarget.setSlideClasses(_.currentSlide);
30102                    }
30103
30104                }
30105
30106                _.updateDots();
30107                _.updateArrows();
30108
30109                if (_.options.fade === true) {
30110                    if (dontAnimate !== true) {
30111
30112                        _.fadeSlideOut(oldSlide);
30113
30114                        _.fadeSlide(animSlide, function () {
30115                            _.postSlide(animSlide);
30116                        });
30117
30118                    } else {
30119                        _.postSlide(animSlide);
30120                    }
30121                    _.animateHeight();
30122                    return;
30123                }
30124
30125                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
30126                    _.animateSlide(targetLeft, function () {
30127                        _.postSlide(animSlide);
30128                    });
30129                } else {
30130                    _.postSlide(animSlide);
30131                }
30132
30133            };
30134
30135            Slick.prototype.startLoad = function () {
30136
30137                var _ = this;
30138
30139                if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
30140
30141                    _.$prevArrow.hide();
30142                    _.$nextArrow.hide();
30143
30144                }
30145
30146                if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
30147
30148                    _.$dots.hide();
30149
30150                }
30151
30152                _.$slider.addClass('slick-loading');
30153
30154            };
30155
30156            Slick.prototype.swipeDirection = function () {
30157
30158                var xDist, yDist, r, swipeAngle, _ = this;
30159
30160                xDist = _.touchObject.startX - _.touchObject.curX;
30161                yDist = _.touchObject.startY - _.touchObject.curY;
30162                r = Math.atan2(yDist, xDist);
30163
30164                swipeAngle = Math.round(r * 180 / Math.PI);
30165                if (swipeAngle < 0) {
30166                    swipeAngle = 360 - Math.abs(swipeAngle);
30167                }
30168
30169                if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
30170                    return (_.options.rtl === false ? 'left' : 'right');
30171                }
30172                if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
30173                    return (_.options.rtl === false ? 'left' : 'right');
30174                }
30175                if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
30176                    return (_.options.rtl === false ? 'right' : 'left');
30177                }
30178                if (_.options.verticalSwiping === true) {
30179                    if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
30180                        return 'down';
30181                    } else {
30182                        return 'up';
30183                    }
30184                }
30185
30186                return 'vertical';
30187
30188            };
30189
30190            Slick.prototype.swipeEnd = function (event) {
30191
30192                var _ = this,
30193                    slideCount,
30194                    direction;
30195
30196                _.dragging = false;
30197                _.swiping = false;
30198
30199                if (_.scrolling) {
30200                    _.scrolling = false;
30201                    return false;
30202                }
30203
30204                _.interrupted = false;
30205                _.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;
30206
30207                if (_.touchObject.curX === undefined) {
30208                    return false;
30209                }
30210
30211                if (_.touchObject.edgeHit === true) {
30212                    _.$slider.trigger('edge', [_, _.swipeDirection()]);
30213                }
30214
30215                if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
30216
30217                    direction = _.swipeDirection();
30218
30219                    switch (direction) {
30220
30221                        case 'left':
30222                        case 'down':
30223
30224                            slideCount =
30225                                _.options.swipeToSlide ?
30226                                    _.checkNavigable(_.currentSlide + _.getSlideCount()) :
30227                                    _.currentSlide + _.getSlideCount();
30228
30229                            _.currentDirection = 0;
30230
30231                            break;
30232
30233                        case 'right':
30234                        case 'up':
30235
30236                            slideCount =
30237                                _.options.swipeToSlide ?
30238                                    _.checkNavigable(_.currentSlide - _.getSlideCount()) :
30239                                    _.currentSlide - _.getSlideCount();
30240
30241                            _.currentDirection = 1;
30242
30243                            break;
30244
30245                        default:
30246
30247
30248                    }
30249
30250                    if (direction != 'vertical') {
30251
30252                        _.slideHandler(slideCount);
30253                        _.touchObject = {};
30254                        _.$slider.trigger('swipe', [_, direction]);
30255
30256                    }
30257
30258                } else {
30259
30260                    if (_.touchObject.startX !== _.touchObject.curX) {
30261
30262                        _.slideHandler(_.currentSlide);
30263                        _.touchObject = {};
30264
30265                    }
30266
30267                }
30268
30269            };
30270
30271            Slick.prototype.swipeHandler = function (event) {
30272
30273                var _ = this;
30274
30275                if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
30276                    return;
30277                } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
30278                    return;
30279                }
30280
30281                _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
30282                    event.originalEvent.touches.length : 1;
30283
30284                _.touchObject.minSwipe = _.listWidth / _.options
30285                    .touchThreshold;
30286
30287                if (_.options.verticalSwiping === true) {
30288                    _.touchObject.minSwipe = _.listHeight / _.options
30289                        .touchThreshold;
30290                }
30291
30292                switch (event.data.action) {
30293
30294                    case 'start':
30295                        _.swipeStart(event);
30296                        break;
30297
30298                    case 'move':
30299                        _.swipeMove(event);
30300                        break;
30301
30302                    case 'end':
30303                        _.swipeEnd(event);
30304                        break;
30305
30306                }
30307
30308            };
30309
30310            Slick.prototype.swipeMove = function (event) {
30311
30312                var _ = this,
30313                    edgeWasHit = false,
30314                    curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
30315
30316                touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
30317
30318                if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
30319                    return false;
30320                }
30321
30322                curLeft = _.getLeft(_.currentSlide);
30323
30324                _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
30325                _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
30326
30327                _.touchObject.swipeLength = Math.round(Math.sqrt(
30328                    Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
30329
30330                verticalSwipeLength = Math.round(Math.sqrt(
30331                    Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
30332
30333                if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
30334                    _.scrolling = true;
30335                    return false;
30336                }
30337
30338                if (_.options.verticalSwiping === true) {
30339                    _.touchObject.swipeLength = verticalSwipeLength;
30340                }
30341
30342                swipeDirection = _.swipeDirection();
30343
30344                if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
30345                    _.swiping = true;
30346                    event.preventDefault();
30347                }
30348
30349                positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
30350                if (_.options.verticalSwiping === true) {
30351                    positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
30352                }
30353
30354
30355                swipeLength = _.touchObject.swipeLength;
30356
30357                _.touchObject.edgeHit = false;
30358
30359                if (_.options.infinite === false) {
30360                    if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
30361                        swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
30362                        _.touchObject.edgeHit = true;
30363                    }
30364                }
30365
30366                if (_.options.vertical === false) {
30367                    _.swipeLeft = curLeft + swipeLength * positionOffset;
30368                } else {
30369                    _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
30370                }
30371                if (_.options.verticalSwiping === true) {
30372                    _.swipeLeft = curLeft + swipeLength * positionOffset;
30373                }
30374
30375                if (_.options.fade === true || _.options.touchMove === false) {
30376                    return false;
30377                }
30378
30379                if (_.animating === true) {
30380                    _.swipeLeft = null;
30381                    return false;
30382                }
30383
30384                _.setCSS(_.swipeLeft);
30385
30386            };
30387
30388            Slick.prototype.swipeStart = function (event) {
30389
30390                var _ = this,
30391                    touches;
30392
30393                _.interrupted = true;
30394
30395                if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
30396                    _.touchObject = {};
30397                    return false;
30398                }
30399
30400                if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
30401                    touches = event.originalEvent.touches[0];
30402                }
30403
30404                _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
30405                _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
30406
30407                _.dragging = true;
30408
30409            };
30410
30411            Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {
30412
30413                var _ = this;
30414
30415                if (_.$slidesCache !== null) {
30416
30417                    _.unload();
30418
30419                    _.$slideTrack.children(this.options.slide).detach();
30420
30421                    _.$slidesCache.appendTo(_.$slideTrack);
30422
30423                    _.reinit();
30424
30425                }
30426
30427            };
30428
30429            Slick.prototype.unload = function () {
30430
30431                var _ = this;
30432
30433                $('.slick-cloned', _.$slider).remove();
30434
30435                if (_.$dots) {
30436                    _.$dots.remove();
30437                }
30438
30439                if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
30440                    _.$prevArrow.remove();
30441                }
30442
30443                if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
30444                    _.$nextArrow.remove();
30445                }
30446
30447                _.$slides
30448                    .removeClass('slick-slide slick-active slick-visible slick-current')
30449                    .attr('aria-hidden', 'true')
30450                    .css('width', '');
30451
30452            };
30453
30454            Slick.prototype.unslick = function (fromBreakpoint) {
30455
30456                var _ = this;
30457                _.$slider.trigger('unslick', [_, fromBreakpoint]);
30458                _.destroy();
30459
30460            };
30461
30462            Slick.prototype.updateArrows = function () {
30463
30464                var _ = this,
30465                    centerOffset;
30466
30467                centerOffset = Math.floor(_.options.slidesToShow / 2);
30468
30469                if (_.options.arrows === true &&
30470                    _.slideCount > _.options.slidesToShow &&
30471                    !_.options.infinite) {
30472
30473                    _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
30474                    _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
30475
30476                    if (_.currentSlide === 0) {
30477
30478                        _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
30479                        _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
30480
30481                    } else if (_.currentSlide >
30481= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
30482
30483                        _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
30484                        _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
30485
30486                    } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
30487
30488                        _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
30489                        _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
30490
30491                    }
30492
30493                }
30494
30495            };
30496
30497            Slick.prototype.updateDots = function () {
30498
30499                var _ = this;
30500
30501                if (_.$dots !== null) {
30502
30503                    _.$dots
30504                        .find('li')
30505                        .removeClass('slick-active')
30506                        .end();
30507
30508                    _.$dots
30509                        .find('li')
30510                        .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
30511                        .addClass('slick-active');
30512
30513                }
30514
30515            };
30516
30517            Slick.prototype.visibility = function () {
30518
30519                var _ = this;
30520
30521                if (_.options.autoplay) {
30522
30523                    if (document[_.hidden]) {
30524
30525                        _.interrupted = true;
30526
30527                    } else {
30528
30529                        _.interrupted = false;
30530
30531                    }
30532
30533                }
30534
30535            };
30536
30537            $.fn.slick = function () {
30538                var _ = this,
30539                    opt = arguments[0],
30540                    args = Array.prototype.slice.call(arguments, 1),
30541                    l = _.length,
30542                    i,
30543                    ret;
30544                for (i = 0; i < l; i++) {
30545                    if (typeof opt == 'object' || typeof opt == 'undefined')
30546                        _[i].slick = new Slick(_[i], opt);
30547                    else
30548                        ret = _[i].slick[opt].apply(_[i].slick, args);
30549                    if (typeof ret != 'undefined') return ret;
30550                }
30551                return _;
30552            };
30553
30554        }));
30555
30556
30557        /***/
30558    }),
30559    /* 61 */
30560    /***/ (function (module, exports, __webpack_require__) {
30561
30562
30563        /**
30564         * Load required plugin.
30565         */
30566        window.Typed = __webpack_require__(62);
30567
30568
30569        /**
30570         * Configure the plugin.
30571         */
30572
30573        +function ($) {
30574            page.registerVendor('Typed');
30575
30576            page.initTyped = function () {
30577                $('[data-typing]').each(function () {
30578                    var strings = $(this).data('typing').split(',');
30579                    var options = {
30580                        strings: strings,
30581                        typeSpeed: 50,
30582                        backSpeed: 30,
30583                        backDelay: 800,
30584                        loop: true
30585                    };
30586
30587                    options = $.extend(options, page.getDataOptions($(this)));
30588                    var typed = new Typed($(this)[0], options);
30589                });
30590            }
30591
30592        }(jQuery);
30593
30594
30595        /***/
30596    }),
30597    /* 62 */
30598    /***/ (function (module, exports, __webpack_require__) {
30599
30600        /*!
30601 *
30602 *   typed.js - A JavaScript Typing Animation Library
30603 *   Author: Matt Boldt <[email protected]>
30604 *   Version: v2.0.9
30605 *   Url: https://github.com/mattboldt/typed.js
30606 *   License(s): MIT
30607 *
30608 */
30609        (function webpackUniversalModuleDefinition(root, factory) {
30610            if (true)
30611                module.exports = factory();
30612            else {
30613            }
30614        })(this, function () {
30615            return /******/ (function (modules) { // webpackBootstrap
30616                /******/ 	// The module cache
30617                /******/
30618                var installedModules = {};
30619                /******/
30620                /******/ 	// The require function
30621                /******/
30622                function __webpack_require__(moduleId) {
30623                    /******/
30624                    /******/ 		// Check if module is in cache
30625                    /******/
30626                    if (installedModules[moduleId])
30627                        /******/            return installedModules[moduleId].exports;
30628                    /******/
30629                    /******/ 		// Create a new module (and put it into the cache)
30630                    /******/
30631                    var module = installedModules[moduleId] = {
30632                        /******/            exports: {},
30633                        /******/            id: moduleId,
30634                        /******/            loaded: false
30635                        /******/
30636                    };
30637                    /******/
30638                    /******/ 		// Execute the module function
30639                    /******/
30640                    modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
30641                    /******/
30642                    /******/ 		// Flag the module as loaded
30643                    /******/
30644                    module.loaded = true;
30645                    /******/
30646                    /******/ 		// Return the exports of the module
30647                    /******/
30648                    return module.exports;
30649                    /******/
30650                }
30651
30652                /******/
30653                /******/
30654                /******/ 	// expose the modules object (__webpack_modules__)
30655                /******/
30656                __webpack_require__.m = modules;
30657                /******/
30658                /******/ 	// expose the module cache
30659                /******/
30660                __webpack_require__.c = installedModules;
30661                /******/
30662                /******/ 	// __webpack_public_path__
30663                /******/
30664                __webpack_require__.p = "";
30665                /******/
30666                /******/ 	// Load entry module and return exports
30667                /******/
30668                return __webpack_require__(0);
30669                /******/
30670            })
30671                /************************************************************************/
30672                /******/ ([
30673                    /* 0 */
30674                    /***/ (function (module, exports, __webpack_require__) {
30675
30676                        'use strict';
30677
30678                        Object.defineProperty(exports, '__esModule', {
30679                            value: true
30680                        });
30681
30682                        var _createClass = (function () {
30683                            function defineProperties(target, props) {
30684                                for (var i = 0; i < props.length; i++) {
30685                                    var descriptor = props[i];
30686                                    descriptor.enumerable = descriptor.enumerable || false;
30687                                    descriptor.configurable = true;
30688                                    if ('value' in descriptor) descriptor.writable = true;
30689                                    Object.defineProperty(target, descriptor.key, descriptor);
30690                                }
30691                            }
30692
30693                            return function (Constructor, protoProps, staticProps) {
30694                                if (protoProps) defineProperties(Constructor.prototype, protoProps);
30695                                if (staticProps) defineProperties(Constructor, staticProps);
30696                                return Constructor;
30697                            };
30698                        })();
30699
30700                        function _classCallCheck(instance, Constructor) {
30701                            if (!(instance instanceof Constructor)) {
30702                                throw new TypeError('Cannot call a class as a function');
30703                            }
30704                        }
30705
30706                        var _initializerJs = __webpack_require__(1);
30707
30708                        var _htmlParserJs = __webpack_require__(3);
30709
30710                        /**
30711                         * Welcome to Typed.js!
30712                         * @param {string} elementId HTML element ID _OR_ HTML element
30713                         * @param {object} options options object
30714                         * @returns {object} a new Typed object
30715                         */
30716
30717                        var Typed = (function () {
30718                            function Typed(elementId, options) {
30719                                _classCallCheck(this, Typed);
30720
30721                                // Initialize it up
30722                                _initializerJs.initializer.load(this, options, elementId);
30723                                // All systems go!
30724                                this.begin();
30725                            }
30726
30727                            /**
30728                             * Toggle start() and stop() of the Typed instance
30729                             * @public
30730                             */
30731
30732                            _createClass(Typed, [{
30733                                key: 'toggle',
30734                                value: function toggle() {
30735                                    this.pause.status ? this.start() : this.stop();
30736                                }
30737
30738                                /**
30739                                 * Stop typing / backspacing and enable cursor blinking
30740                                 * @public
30741                                 */
30742                            }, {
30743                                key: 'stop',
30744                                value: function stop() {
30745                                    if (this.typingComplete) return;
30746                                    if (this.pause.status) return;
30747                                    this.toggleBlinking(true);
30748                                    this.pause.status = true;
30749                                    this.options.onStop(this.arrayPos, this);
30750                                }
30751
30752                                /**
30753                                 * Start typing / backspacing after being stopped
30754                                 * @public
30755                                 */
30756                            }, {
30757                                key: 'start',
30758                                value: function start() {
30759                                    if (this.typingComplete) return;
30760                                    if (!this.pause.status) return;
30761                                    this.pause.status = false;
30762                                    if (this.pause.typewrite) {
30763                                        this.typewrite(this.pause.curString, this.pause.curStrPos);
30764                                    } else {
30765                                        this.backspace(this.pause.curString, this.pause.curStrPos);
30766                                    }
30767                                    this.options.onStart(this.arrayPos, this);
30768                                }
30769
30770                                /**
30771                                 * Destroy this instance of Typed
30772                                 * @public
30773                                 */
30774                            }, {
30775                                key: 'destroy',
30776                                value: function destroy() {
30777                                    this.reset(false);
30778                                    this.options.onDestroy(this);
30779                                }
30780
30781                                /**
30782                                 * Reset Typed and optionally restarts
30783                                 * @param {boolean} restart
30784                                 * @public
30785                                 */
30786                            }, {
30787                                key: 'reset',
30788                                value: function reset() {
30789                                    var restart = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
30790
30791                                    clearInterval(this.timeout);
30792                                    this.replaceText('');
30793                                    if (this.cursor && this.cursor.parentNode) {
30794                                        this.cursor.parentNode.removeChild(this.cursor);
30795                                        this.cursor = null;
30796                                    }
30797                                    this.strPos = 0;
30798                                    this.arrayPos = 0;
30799                                    this.curLoop = 0;
30800                                    if (restart) {
30801                                        this.insertCursor();
30802                                        this.options.onReset(this);
30803                                        this.begin();
30804                                    }
30805                                }
30806
30807                                /**
30808                                 * Begins the typing animation
30809                                 * @private
30810                                 */
30811                            }, {
30812                                key: 'begin',
30813                                value: function begin() {
30814                                    var _this = this;
30815
30816                                    this.typingComplete = false;
30817                                    this.shuffleStringsIfNeeded(this);
30818                                    this.insertCursor();
30819                                    if (this.bindInputFocusEvents) this.bindFocusEvents();
30820                                    this.timeout = setTimeout(function () {
30821                                        // Check if there is some text in the element, if yes start by backspacing the default message
30822                                        if (!_this.currentElContent || _this.currentElContent.length === 0) {
30823                                            _this.typewrite(_this.strings[_this.sequence[_this.arrayPos]], _this.strPos);
30824                                        } else {
30825                                            // Start typing
30826                                            _this.backspace(_this.currentElContent, _this.currentElContent.length);
30827                                        }
30828                                    }, this.startDelay);
30829                                }
30830
30831                                /**
30832                                 * Called for each character typed
30833                                 * @param {string} curString the current string in the strings array
30834                                 * @param {number} curStrPos the current position in the curString
30835                                 * @private
30836                                 */
30837                            }, {
30838                                key: 'typewrite',
30839                                value: function typewrite(curString, curStrPos) {
30840                                    var _this2 = this;
30841
30842                                    if (this.fadeOut && this.el.classList.contains(this.fadeOutClass)) {
30843                                        this.el.classList.remove(this.fadeOutClass);
30844                                        if (this.cursor) this.cursor.classList.remove(this.fadeOutClass);
30845                                    }
30846
30847                                    var humanize = this.humanizer(this.typeSpeed);
30848                                    var numChars = 1;
30849
30850                                    if (this.pause.status === true) {
30851                                        this.setPauseStatus(curString, curStrPos, true);
30852                                        return;
30853                                    }
30854
30855                                    // contain typing function in a timeout humanize'd delay
30856                                    this.timeout = setTimeout(function () {
30857                                        // skip over any HTML chars
30858                                        curStrPos = _htmlParserJs.htmlParser.typeHtmlChars(curString, curStrPos, _this2);
30859
30860                                        var pauseTime = 0;
30861                                        var substr = curString.substr(curStrPos);
30862                                        // check for an escape character before a pause value
30863                                        // format: \^\d+ .. eg: ^1000 .. should be able to print the ^ too using ^^
30864                                        // single ^ are removed from string
30865                                        if (substr.charAt(0) === '^') {
30866                                            if (/^\^\d+/.test(substr)) {
30867                                                var skip = 1; // skip at least 1
30868                                                substr = /\d+/.exec(substr)[0];
30869                                                skip += substr.length;
30870                                                pauseTime = parseInt(substr);
30871                                                _this2.temporaryPause = true;
30872                                                _this2.options.onTypingPaused(_this2.arrayPos, _this2);
30873                                                // strip out the escape character and pause value so they're not printed
30874                                                curString = curString.substring(0, curStrPos) + curString.substring(curStrPos + skip);
30875                                                _this2.toggleBlinking(true);
30876                                            }
30877                                        }
30878
30879                                        // check for skip characters formatted as
30880                                        // "this is a `string to print NOW` ..."
30881                                        if (substr.charAt(0) === '`') {
30882                                            while (curString.substr(curStrPos + numChars).charAt(0) !== '`') {
30883                                                numChars++;
30884                                                if (curStrPos + numChars > curString.length) break;
30885                                            }
30886                                            // strip out the escape characters and append all the string in between
30887                                            var stringBeforeSkip = curString.substring(0, curStrPos);
30888                                            var stringSkipped = cur
30888String.substring(stringBeforeSkip.length + 1, curStrPos + numChars);
30889                                            var stringAfterSkip = curString.substring(curStrPos + numChars + 1);
30890                                            curString = stringBeforeSkip + stringSkipped + stringAfterSkip;
30891                                            numChars--;
30892                                        }
30893
30894                                        // timeout for any pause after a character
30895                                        _this2.timeout = setTimeout(function () {
30896                                            // Accounts for blinking while paused
30897                                            _this2.toggleBlinking(false);
30898
30899                                            // We're done with this sentence!
30900                                            if (curStrPos === curString.length) {
30901                                                _this2.doneTyping(curString, curStrPos);
30902                                            } else {
30903                                                _this2.keepTyping(curString, curStrPos, numChars);
30904                                            }
30905                                            // end of character pause
30906                                            if (_this2.temporaryPause) {
30907                                                _this2.temporaryPause = false;
30908                                                _this2.options.onTypingResumed(_this2.arrayPos, _this2);
30909                                            }
30910                                        }, pauseTime);
30911
30912                                        // humanized value for typing
30913                                    }, humanize);
30914                                }
30915
30916                                /**
30917                                 * Continue to the next string & begin typing
30918                                 * @param {string} curString the current string in the strings array
30919                                 * @param {number} curStrPos the current position in the curString
30920                                 * @private
30921                                 */
30922                            }, {
30923                                key: 'keepTyping',
30924                                value: function keepTyping(curString, curStrPos, numChars) {
30925                                    // call before functions if applicable
30926                                    if (curStrPos === 0) {
30927                                        this.toggleBlinking(false);
30928                                        this.options.preStringTyped(this.arrayPos, this);
30929                                    }
30930                                    // start typing each new char into existing string
30931                                    // curString: arg, this.el.html: original text inside element
30932                                    curStrPos += numChars;
30933                                    var nextString = curString.substr(0, curStrPos);
30934                                    this.replaceText(nextString);
30935                                    // loop the function
30936                                    this.typewrite(curString, curStrPos);
30937                                }
30938
30939                                /**
30940                                 * We're done typing all strings
30941                                 * @param {string} curString the current string in the strings array
30942                                 * @param {number} curStrPos the current position in the curString
30943                                 * @private
30944                                 */
30945                            }, {
30946                                key: 'doneTyping',
30947                                value: function doneTyping(curString, curStrPos) {
30948                                    var _this3 = this;
30949
30950                                    // fires callback function
30951                                    this.options.onStringTyped(this.arrayPos, this);
30952                                    this.toggleBlinking(true);
30953                                    // is this the final string
30954                                    if (this.arrayPos === this.strings.length - 1) {
30955                                        // callback that occurs on the last typed string
30956                                        this.complete();
30957                                        // quit if we wont loop back
30958                                        if (this.loop === false || this.curLoop === this.loopCount) {
30959                                            return;
30960                                        }
30961                                    }
30962                                    this.timeout = setTimeout(function () {
30963                                        _this3.backspace(curString, curStrPos);
30964                                    }, this.backDelay);
30965                                }
30966
30967                                /**
30968                                 * Backspaces 1 character at a time
30969                                 * @param {string} curString the current string in the strings array
30970                                 * @param {number} curStrPos the current position in the curString
30971                                 * @private
30972                                 */
30973                            }, {
30974                                key: 'backspace',
30975                                value: function backspace(curString, curStrPos) {
30976                                    var _this4 = this;
30977
30978                                    if (this.pause.status === true) {
30979                                        this.setPauseStatus(curString, curStrPos, true);
30980                                        return;
30981                                    }
30982                                    if (this.fadeOut) return this.initFadeOut();
30983
30984                                    this.toggleBlinking(false);
30985                                    var humanize = this.humanizer(this.backSpeed);
30986
30987                                    this.timeout = setTimeout(function () {
30988                                        curStrPos = _htmlParserJs.htmlParser.backSpaceHtmlChars(curString, curStrPos, _this4);
30989                                        // replace text with base text + typed characters
30990                                        var curStringAtPosition = curString.substr(0, curStrPos);
30991                                        _this4.replaceText(curStringAtPosition);
30992
30993                                        // if smartBack is enabled
30994                                        if (_this4.smartBackspace) {
30995                                            // the remaining part of the current string is equal of the same part of the new string
30996                                            var nextString = _this4.strings[_this4.arrayPos + 1];
30997                                            if (nextString && curStringAtPosition === nextString.substr(0, curStrPos)) {
30998                                                _this4.stopNum = curStrPos;
30999                                            } else {
31000                                                _this4.stopNum = 0;
31001                                            }
31002                                        }
31003
31004                                        // if the number (id of character in current string) is
31005                                        // less than the stop number, keep going
31006                                        if (curStrPos > _this4.stopNum) {
31007                                            // subtract characters one by one
31008                                            curStrPos--;
31009                                            // loop the function
31010                                            _this4.backspace(curString, curStrPos);
31011                                        } else if (curStrPos <= _this4.stopNum) {
31012                                            // if the stop number has been reached, increase
31013                                            // array position to next string
31014                                            _this4.arrayPos++;
31015                                            // When looping, begin at the beginning after backspace complete
31016                                            if (_this4.arrayPos === _this4.strings.length) {
31017                                                _this4.arrayPos = 0;
31018                                                _this4.options.onLastStringBackspaced();
31019                                                _this4.shuffleStringsIfNeeded();
31020                                                _this4.begin();
31021                                            } else {
31022                                                _this4.typewrite(_this4.strings[_this4.sequence[_this4.arrayPos
31022]], curStrPos);
31023                                            }
31024                                        }
31025                                        // humanized value for typing
31026                                    }, humanize);
31027                                }
31028
31029                                /**
31030                                 * Full animation is complete
31031                                 * @private
31032                                 */
31033                            }, {
31034                                key: 'complete',
31035                                value: function complete() {
31036                                    this.options.onComplete(this);
31037                                    if (this.loop) {
31038                                        this.curLoop++;
31039                                    } else {
31040                                        this.typingComplete = true;
31041                                    }
31042                                }
31043
31044                                /**
31045                                 * Has the typing been stopped
31046                                 * @param {string} curString the current string in the strings array
31047                                 * @param {number} curStrPos the current position in the curString
31048                                 * @param {boolean} isTyping
31049                                 * @private
31050                                 */
31051                            }, {
31052                                key: 'setPauseStatus',
31053                                value: function setPauseStatus(curString, curStrPos, isTyping) {
31054                                    this.pause.typewrite = isTyping;
31055                                    this.pause.curString = curString;
31056                                    this.pause.curStrPos = curStrPos;
31057                                }
31058
31059                                /**
31060                                 * Toggle the blinking cursor
31061                                 * @param {boolean} isBlinking
31062                                 * @private
31063                                 */
31064                            }, {
31065                                key: 'toggleBlinking',
31066                                value: function toggleBlinking(isBlinking) {
31067                                    if (!this.cursor) return;
31068                                    // if in paused state, don't toggle blinking a 2nd time
31069                                    if (this.pause.status) return;
31070                                    if (this.cursorBlinking === isBlinking) return;
31071                                    this.cursorBlinking = isBlinking;
31072                                    if (isBlinking) {
31073                                        this.cursor.classList.add('typed-cursor--blink');
31074                                    } else {
31075                                        this.cursor.classList.remove('typed-cursor--blink');
31076                                    }
31077                                }
31078
31079                                /**
31080                                 * Speed in MS to type
31081                                 * @param {number} speed
31082                                 * @private
31083                                 */
31084                            }, {
31085                                key: 'humanizer',
31086                                value: function humanizer(speed) {
31087                                    return Math.round(Math.random() * speed / 2) + speed;
31088                                }
31089
31090                                /**
31091                                 * Shuffle the sequence of the strings array
31092                                 * @private
31093                                 */
31094                            }, {
31095                                key: 'shuffleStringsIfNeeded',
31096                                value: function shuffleStringsIfNeeded() {
31097                                    if (!this.shuffle) return;
31098                                    this.sequence = this.sequence.sort(function () {
31099                                        return Math.random() - 0.5;
31100                                    });
31101                                }
31102
31103                                /**
31104                                 * Adds a CSS class to fade out current string
31105                                 * @private
31106                                 */
31107                            }, {
31108                                key: 'initFadeOut',
31109                                value: function initFadeOut() {
31110                                    var _this5 = this;
31111
31112                                    this.el.className += ' ' + this.fadeOutClass;
31113                                    if (this.cursor) this.cursor.className += ' ' + this.fadeOutClass;
31114                                    return setTimeout(function () {
31115                                        _this5.arrayPos++;
31116                                        _this5.replaceText('');
31117
31118                                        // Resets current string if end of loop reached
31119                                        if (_this5.strings.length > _this5.arrayPos) {
31120                                            _this5.typewrite(_this5.strings[_this5.sequence[_this5.arrayPos]], 0);
31121                                        } else {
31122                                            _this5.typewrite(_this5.strings[0], 0);
31123                                            _this5.arrayPos = 0;
31124                                        }
31125                                    }, this.fadeOutDelay);
31126                                }
31127
31128                                /**
31129                                 * Replaces current text in the HTML element
31130                                 * depending on element type
31131                                 * @param {string} str
31132                                 * @private
31133                                 */
31134                            }, {
31135                                key: 'replaceText',
31136                                value: function replaceText(str) {
31137                                    if (this.attr) {
31138                                        this.el.setAttribute(this.attr, str);
31139                                    } else {
31140                                        if (this.isInput) {
31141                                            this.el.value = str;
31142                                        } else if (this.contentType === 'html') {
31143                                            this.el.innerHTML = str;
31144                                        } else {
31145                                            this.el.textContent = str;
31146                                        }
31147                                    }
31148                                }
31149
31150                                /**
31151                                 * If using input elements, bind focus in order to
31152                                 * start and stop the animation
31153                                 * @private
31154                                 */
31155                            }, {
31156                                key: 'bindFocusEvents',
31157                                value: function bindFocusEvents() {
31158                                    var _this6 = this;
31159
31160                                    if (!this.isInput) return;
31161                                    this.el.addEventListener('focus', function (e) {
31162                                        _this6.stop();
31163                                    });
31164                                    this.el.addEventListener('blur', function (e) {
31165                                        if (_this6.el.value && _this6.el.value.length !== 0) {
31166                                            return;
31167                                        }
31168                                        _this6.start();
31169                                    });
31170                                }
31171
31172                                /**
31173                                 * On init, insert the cursor element
31174                                 * @private
31175                                 */
31176                            }, {
31177                                key: 'insertCursor',
31178                                value: function insertCursor() {
31179                                    if (!this.showCursor) return;
31180                                    if (this.cursor) return;
31181                                    this.cursor = document.createElement('span');
31182                                    this.cursor.className = 'typed-cursor';
31183                                    this.cursor.innerHTML = this.cursorChar;
31184                                    this.el.parentNode && this.el.parentNode.insertBefore(this.cursor, this.el.nextSibling);
31185                                }
31186                            }]);
31187
31188                            return Typed;
31189                        })();
31190
31191                        exports['default'] = Typed;
31192                        module.exports = exports['default'];
31193
31194                        /***/
31195                    }),
31196                    /* 1 */
31197                    /***/ (function (module, exports, __webpack_require__) {
31198
31199                        'use strict';
31200
31201                        Object.defineProperty(exports, '__esModule', {
31202                            value: true
31203                        });
31204
31205                        var _extends = Object.assign || function (target) {
31206                            for (var i = 1; i < arguments.length; i++) {
31207                                var source = arguments[i];
31208                                for (var key in source) {
31209                                    if (Object.prototype.hasOwnProperty.call(source, key)) {
31210                                        target[key] = source[key];
31211                                    }
31212                                }
31213                            }
31214                            return target;
31215                        };
31216
31217                        var _createClass = (function () {
31218                            function defineProperties(target, props) {
31219                                for (var i = 0; i < props.length; i++) {
31220                                    var descriptor = props[i];
31221                                    descriptor.enumerable = descriptor.enumerable || false;
31222                                    descriptor.configurable = true;
31223                                    if ('value' in descriptor) descriptor.writable = true;
31224                                    Object.defineProperty(target, descriptor.key, descriptor);
31225                                }
31226                            }
31227
31228                            return function (Constructor, protoProps, staticProps) {
31229                                if (protoProps) defineProperties(Constructor.prototype, protoProps);
31230                                if (staticProps) defineProperties(Constructor, staticProps);
31231                                return Constructor;
31232                            };
31233                        })();
31234
31235                        function _interopRequireDefault(obj) {
31236                            return obj && obj.__esModule ? obj : {'default': obj};
31237                        }
31238
31239                        function _classCallCheck(instance, Constructor) {
31240                            if (!(instance instanceof Constructor)) {
31241                                throw new TypeError('Cannot call a class as a function');
31242                            }
31243                        }
31244
31245                        var _defaultsJs = __webpack_require__(2);
31246
31247                        var _defaultsJs2 = _interopRequireDefault(_defaultsJs);
31248
31249                        /**
31250                         * Initialize the Typed object
31251                         */
31252
31253                        var Initializer = (function () {
31254                            function Initializer() {
31255                                _classCallCheck(this, Initializer);
31256                            }
31257
31258                            _createClass(Initializer, [{
31259                                key: 'load',
31260
31261                                /**
31262                                 * Load up defaults & options on the Typed instance
31263                                 * @param {Typed} self instance of Typed
31264                                 * @param {object} options options object
31265                                 * @param {string} elementId HTML element ID _OR_ instance of HTML element
31266                                 * @private
31267                                 */
31268
31269                                value: function load(self, options, elementId) {
31270                                    // chosen element to manipulate text
31271                                    if (typeof elementId === 'string') {
31272                                        self.el = document.querySelector(elementId);
31273                                    } else {
31274                                        self.el = elementId;
31275                                    }
31276
31277                                    self.options = _extends({}, _defaultsJs2['default'], options);
31278
31279                                    // attribute to type into
31280                                    self.isInput = self.el.tagName.toLowerCase() === 'input';
31281                                    self.attr = self.options.attr;
31282                                    self.bindInputFocusEvents = self.options.bindInputFocusEvents;
31283
31284                                    // show cursor
31285                                    self.showCursor = self.isInput ? false : self.options.showCursor;
31286
31287                                    // custom cursor
31288                                    self.cursorChar = self.options.cursorChar;
31289
31290                                    // Is the cursor blinking
31291                                    self.cursorBlinking = true;
31292
31293                                    // text content of element
31294                                    self.elContent = self.attr ? self.el.getAttribute(self.attr) : self.el.textContent;
31295
31296                                    // html or plain text
31297                                    self.contentType = self.options.contentType;
31298
31299                                    // typing speed
31300                                    self.typeSpeed = self.options.typeSpeed;
31301
31302                                    // add a delay before typing starts
31303                                    self.startDelay = self.options.startDelay;
31304
31305                                    // backspacing speed
31306                                    self.backSpeed = self.options.backSpeed;
31307
31308                                    // only backspace what doesn't match the previous string
31309                                    self.smartBackspace = self.options.smartBackspace;
31310
31311                                    // amount of time to wait before backspacing
31312                                    self.backDelay = self.options.backDelay;
31313
31314                                    // Fade out instead of backspace
31315                                    self.fadeOut = self.options.fadeOut;
31316                                    self.fadeOutClass = self.options.fadeOutClass;
31317                                    self.fadeOutDelay = self.options.fadeOutDelay;
31318
31319                                    // variable to check whether typing is currently paused
31320                                    self.isPaused = false;
31321
31322                                    // input strings of text
31323                                    self.strings = self.options.strings.map(function (s) {
31324                                        return s.trim();
31325                                    });
31326
31327                                    // div containing strings
31328                                    if (typeof self.options.stringsElement === 'string') {
31329                                        self.stringsElement = document.querySelector(self.options.stringsElement);
31330                                    } else {
31331                                        self.stringsElement = self.options.stringsElement;
31332                                    }
31333
31334                                    if (self.stringsElement) {
31335                                        self.strings = [];
31336                                        self.stringsElement.style.display = 'none';
31337                                        var strings = Array.prototype.slice.apply(self.stringsElement.children);
31338                                        var stringsLength = strings.length;
31339
31340                                        if (stringsLength) {
31341                                            for (var i = 0; i < stringsLength; i += 1) {
31342                                                var stringEl = strings[i];
31343                                                self.strings.push(stringEl.innerHTML.trim());
31344                                            }
31345                                        }
31346                                    }
31347
31348                                    // character number position of current string
31349                                    self.strPos = 0;
31350
31351                                    // current array position
31352                                    self.arrayPos = 0;
31353
31354                                    // index of string to stop backspacing on
31355                                    self.stopNum = 0;
31356
31357                                    // Looping logic
31358                                    self.loop = self.options.loop;
31359                                    self.loopCount = self.options.loopCount;
31360                                    self.curLoop = 0;
31361
31362                                    // shuffle the strings
31363                                    self.shuffle = self.options.shuffle;
31364                                    // the order of strings
31365                                    self.sequence = [];
31366
31367                                    self.pause = {
31368                                        status: false,
31369                                        typewrite: true,
31370                                        curString: '',
31371                                        curStrPos: 0
31372                                    };
31373
31374                                    // When the typing is complete (when not looped)
31375                                    self.typingComplete = false;
31376
31377                                    // Set the order in which the strings are typed
31378                                    for (var i in self.strings) {
31379                                        self.sequence[i] = i;
31380                                    }
31381
31382                                    // If there is some text in the element
31383                                    self.currentElContent = this.getCurrentElContent(self);
31384
31385                                    self.autoInsertCss = self.options.autoInsertCss;
31386
31387                                    this.appendAnimationCss(self);
31388                                }
31389                            }, {
31390                                key: 'getCurrentElContent',
31391                                value: function getCurrentElContent(self) {
31392                                    var elContent = '';
31393                                    if (self.attr) {
31394                                        elContent = self.el.getAttribute(self.attr);
31395                                    } else if (self.isInput) {
31396                                        elContent = self.el.value;
31397                                    } else if (self.contentType === 'html') {
31398                                        elContent = self.el.innerHTML;
31399                                    } else {
31400                                        elContent = self.el.textContent;
31401                                    }
31402                                    return elContent;
31403                                }
31404                            }, {
31405                                key: 'appendAnimationCss',
31406                                value: function appendAnimationCss(self) {
31407                                    var cssDataName = 'data-typed-js-css';
31408                                    if (!self.autoInsertCss) {
31409                                        return;
31410                                    }
31411                                    if (!self.showCursor && !self.fadeOut) {
31412                                        return;
31413                                    }
31414                                    if (document.querySelector('[' + cssDataName + ']')) {
31415                                        return;
31416                                    }
31417
31418                                    var css = document.createElement('style');
31419                                    css.type = 'text/css';
31420                                    css.setAttribute(cssDataName, true);
31421
31422                                    var innerCss = '';
31423                                    if (self.showCursor) {
31424                                        innerCss += '\n        .typed-cursor{\n          opacity: 1;\n        }\n        .typed-cursor.typed-cursor--blink{\n          animation: typedjsBlink 0.7s infinite;\n          -webkit-animation: typedjsBlink 0.7s infinite;\n                  animation: typedjsBlink 0.7s infinite;\n        }\n        @keyframes typedjsBlink{\n          50% { opacity: 0.0; }\n        }\n        @-webkit-keyframes typedjsBlink{\n          0% { opacity: 1; }\n          50% { opacity: 0.0; }\n          100% { opacity: 1; }\n        }\n      ';
31425                                    }
31426                                    if (self.fadeOut) {
31427                                        innerCss += '\n        .typed-fade-out{\n          opacity: 0;\n          transition: opacity .25s;\n        }\n        .typed-cursor.typed-cursor--blink.typed-fade-out{\n          -webkit-animation: 0;\n          animation: 0;\n        }\n      ';
31428                                    }
31429                                    if (css.length === 0) {
31430                                        return;
31431                                    }
31432                                    css.innerHTML = innerCss;
31433                                    document.body.appendChild(css);
31434                                }
31435                            }]);
31436
31437                            return Initializer;
31438                        })();
31439
31440                        exports['default'] = Initializer;
31441                        var initializer = new Initializer();
31442                        exports.initializer = initializer;
31443
31444                        /***/
31445                    }),
31446                    /* 2 */
31447                    /***/ (function (module, exports) {
31448
31449                        /**
31450                         * Defaults & options
31451                         * @returns {object} Typed defaults & options
31452                         * @public
31453                         */
31454
31455                        'use strict';
31456
31457                        Object.defineProperty(exports, '__esModule', {
31458                            value: true
31459                        });
31460                        var defaults = {
31461                            /**
31462                             * @property {array} strings strings to be typed
31463                             * @property {string} stringsElement ID of element containing string children
31464                             */
31465                            strings: ['These are the default values...', 'You know what you should do?', 'Use your own!', 'Have a great day!'],
31466                            stringsElement: null,
31467
31468                            /**
31469                             * @property {number} typeSpeed type speed in milliseconds
31470                             */
31471                            typeSpeed: 0,
31472
31473                            /**
31474                             * @property {number} startDelay time before typing starts in milliseconds
31475                             */
31476                            startDelay: 0,
31477
31478                            /**
31479                             * @property {number} backSpeed backspacing speed in milliseconds
31480                             */
31481                            backSpeed: 0,
31482
31483                            /**
31484                             * @property {boolean} smartBackspace only backspace what doesn't match the previous string
31485                             */
31486                            smartBackspace: true,
31487
31488                            /**
31489                             * @property {boolean} shuffle shuffle the strings
31490                             */
31491                            shuffle: false,
31492
31493                            /**
31494                             * @property {number} backDelay time before backspacing in milliseconds
31495                             */
31496                            backDelay: 700,
31497
31498                            /**
31499                             * @property {boolean} fadeOut Fade out instead of backspace
31500                             * @property {string} fadeOutClass css class for fade animation
31501                             * @property {boolean} fadeOutDelay Fade out delay in milliseconds
31502                             */
31503                            fadeOut: false,
31504                            fadeOutClass: 'typed-fade-out',
31505                            fadeOutDelay: 500,
31506
31507                            /**
31508                             * @property {boolean} loop loop strings
31509                             * @property {number} loopCount amount of loops
31510                             */
31511                            loop: false,
31512                            loopCount: Infinity,
31513
31514                            /**
31515                             * @property {boolean} showCursor show cursor
31516                             * @property {string} cursorChar character for cursor
31517                             * @property {boolean} autoInsertCss insert CSS for cursor and fadeOut into HTML <head>
31518                             */
31519                            showCursor: true,
31520                            cursorChar: '|',
31521                            autoInsertCss: true,
31522
31523                            /**
31524                             * @property {string} attr attribute for typing
31525                             * Ex: input placeholder, value, or just HTML text
31526                             */
31527                            attr: null,
31528
31529                            /**
31530                             * @property {boolean} bindInputFocusEvents bind to focus and blur if el is text input
31531                             */
31532                            bindInputFocusEvents: false,
31533
31534                            /**
31535                             * @property {string} contentType 'html' or 'null' for plaintext
31536                             */
31537                            contentType: 'html',
31538
31539                            /**
31540                             * All typing is complete
31541                             * @param {Typed} self
31542                             */
31543                            onComplete: function onComplete(self) {
31544                            },
31545
31546                            /**
31547                             * Before each string is typed
31548                             * @param {number} arrayPos
31549                             * @param {Typed} self
31550                             */
31551                            preStringTyped: function preStringTyped(arrayPos, self) {
31552                            },
31553
31554                            /**
31555                             * After each string is typed
31556                             * @param {number} arrayPos
31557                             * @param {Typed} self
31558                             */
31559                            onStringTyped: function onStringTyped(arrayPos, self) {
31560                            },
31561
31562                            /**
31563                             * During looping, after last string is typed
31564                             * @param {Typed} self
31565                             */
31566                            onLastStringBackspaced: function onLastStringBackspaced(self) {
31567                            },
31568
31569                            /**
31570                             * Typing has been stopped
31571                             * @param {number} arrayPos
31572                             * @param {Typed} self
31573                             */
31574                            onTypingPaused: function onTypingPaused(arrayPos, self) {
31575                            },
31576
31577                            /**
31578                             * Typing has been started after being stopped
31579                             * @param {number} arrayPos
31580                             * @param {Typed} self
31581                             */
31582                            onTypingResumed: function onTypingResumed(arrayPos, self) {
31583                            },
31584
31585                            /**
31586                             * After reset
31587                             * @param {Typed} self
31588                             */
31589                            onReset: function onReset(self) {
31590                            },
31591
31592                            /**
31593                             * After stop
31594                             * @param {number} arrayPos
31595                             * @param {Typed} self
31596                             */
31597                            onStop: function onStop(arrayPos, self) {
31598                            },
31599
31600                            /**
31601                             * After start
31602                             * @param {number} arrayPos
31603                             * @param {Typed} self
31604                             */
31605                            onStart: function onStart(arrayPos, self) {
31606                            },
31607
31608                            /**
31609                             * After destroy
31610                             * @param {Typed} self
31611                             */
31612                            onDestroy: function onDestroy(self) {
31613                            }
31614                        };
31615
31616                        exports['default'] = defaults;
31617                        module.exports = exports['default'];
31618
31619                        /***/
31620                    }),
31621                    /* 3 */
31622                    /***/ (function (module, exports) {
31623
31624
31625                        /**
31626                         * TODO: These methods can probably be combined somehow
31627                         * Parse HTML tags & HTML Characters
31628                         */
31629
31630                        'use strict';
31631
31632                        Object.defineProperty(exports, '__esModule', {
31633                            value: true
31634                        });
31635
31636                        var _createClass = (function () {
31637                            function defineProperties(target, props) {
31638                                for (var i = 0; i < props.length; i++) {
31639                                    var descriptor = props[i];
31640                                    descriptor.enumerable = descriptor.enumerable || false;
31641                                    descriptor.configurable = true;
31642                                    if ('value' in descriptor) descriptor.writable = true;
31643                                    Object.defineProperty(target, descriptor.key, descriptor);
31644                                }
31645                            }
31646
31647                            return function (Constructor, protoProps, staticProps) {
31648                                if (protoProps) defineProperties(Constructor.prototype, protoProps);
31649                                if (staticProps) defineProperties(Constructor, staticProps);
31650                                return Constructor;
31651                            };
31652                        })();
31653
31654                        function _classCallCheck(instance, Constructor) {
31655                            if (!(instance instanceof Constructor)) {
31656                                throw new TypeError('Cannot call a class as a function');
31657                            }
31658                        }
31659
31660                        var HTMLParser = (function () {
31661                            function HTMLParser() {
31662                                _classCallCheck(this, HTMLParser);
31663                            }
31664
31665                            _createClass(HTMLParser, [{
31666                                key: 'typeHtmlChars',
31667
31668                                /**
31669                                 * Type HTML tags & HTML Characters
31670                                 * @param {string} curString Current string
31671                                 * @param {number} curStrPos Position in current string
31672                                 * @param {Typed} self instance of Typed
31673                                 * @returns {number} a new string position
31674                                 * @private
31675                                 */
31676
31677                                value: function typeHtmlChars(curString, curStrPos, self) {
31678                                    if (self.contentType !== 'html') return curStrPos;
31679                                    var curChar = curString.substr(curStrPos).charAt(0);
31680                                    if (curChar === '<' || curChar === '&') {
31681                                        var endTag = '';
31682                                        if (curChar === '<') {
31683                                            endTag = '>';
31684                                        } else {
31685                                            endTag = ';';
31686                                        }
31687                                        while (curString.substr(curStrPos + 1).charAt(0) !== endTag) {
31688                                            curStrPos++;
31689                                            if (curStrPos + 1 > curString.length) {
31690                                                break;
31691                                            }
31692                                        }
31693                                        curStrPos++;
31694                                    }
31695                                    return curStrPos;
31696                                }
31697
31698                                /**
31699                                 * Backspace HTML tags and HTML Characters
31700                                 * @param {string} curString Current string
31701                                 * @param {number} curStrPos Position in current string
31702                                 * @param {Typed} self instance of Typed
31703                                 * @returns {number}
31703 a new string position
31704                                 * @private
31705                                 */
31706                            }, {
31707                                key: 'backSpaceHtmlChars',
31708                                value: function backSpaceHtmlChars(curString, curStrPos, self) {
31709                                    if (self.contentType !== 'html') return curStrPos;
31710                                    var curChar = curString.substr(curStrPos).charAt(0);
31711                                    if (curChar === '>' || curChar === ';') {
31712                                        var endTag = '';
31713                                        if (curChar === '>') {
31714                                            endTag = '<';
31715                                        } else {
31716                                            endTag = '&';
31717                                        }
31718                                        while (curString.substr(curStrPos - 1).charAt(0) !== endTag) {
31719                                            curStrPos--;
31720                                            if (curStrPos < 0) {
31721                                                break;
31722                                            }
31723                                        }
31724                                        curStrPos--;
31725                                    }
31726                                    return curStrPos;
31727                                }
31728                            }]);
31729
31730                            return HTMLParser;
31731                        })();
31732
31733                        exports['default'] = HTMLParser;
31734                        var htmlParser = new HTMLParser();
31735                        exports.htmlParser = htmlParser;
31736
31737                        /***/
31738                    })
31739                    /******/])
31740        });
31741        ;
31742
31743        /***/
31744    }),
31745    /* 63 */
31746    /***/ (function (module, exports, __webpack_require__) {
31747
31748
31749        /*
31750|--------------------------------------------------------------------------
31751| Partials
31752|--------------------------------------------------------------------------
31753|
31754| Split the application code to several files. Almost all of the following
31755| files are required for the application to work properly.
31756|
31757*/
31758        __webpack_require__(64);
31759        __webpack_require__(65);
31760        __webpack_require__(66);
31761        __webpack_require__(67);
31762        __webpack_require__(68);
31763        __webpack_require__(69);
31764        __webpack_require__(70);
31765        __webpack_require__(71);
31766        __webpack_require__(72);
31767        __webpack_require__(73);
31768        __webpack_require__(74);
31769        __webpack_require__(75);
31770        __webpack_require__(76);
31771        __webpack_require__(77);
31772        __webpack_require__(78);
31773        __webpack_require__(79);
31774        __webpack_require__(80);
31775
31776
31777        /***/
31778    }),
31779    /* 64 */
31780    /***/ (function (module, exports) {
31781
31782
31783        /**
31784         * Config the application behaviour.
31785         */
31786
31787        +function ($) {
31788
31789            page.config = function (options) {
31790
31791                // Return config value
31792                if (typeof options === 'string') {
31793                    return page.defaults[options];
31794                }
31795
31796                // Save configs
31797                $.extend(true, page.defaults, options);
31798
31799                // Make necessary changes
31800                //
31801                if (!page.defaults.smoothScroll) {
31802                    SmoothScroll.destroy();
31803                }
31804
31805                // Google map
31806                //
31807                if ($('[data-provide~="map"]').length && window["google.maps.Map"] === undefined) {
31808                    $.getScript("https://maps.googleapis.com/maps/api/js?key=" + page.defaults.googleApiKey + "&callback=page.initMap");
31809                }
31810
31811                // Google Analytics
31812                //
31813                if (page.defaults.googleAnalyticsId) {
31814                    (function (i, s, o, g, r, a, m) {
31815                        i['GoogleAnalyticsObject'] = r;
31816                        i[r] = i[r] || function () {
31817                            (i[r].q = i[r].q || []).push(arguments)
31818                        }, i[r].l = 1 * new Date();
31819                        a = s.createElement(o),
31820                            m = s.getElementsByTagName(o)[0];
31821                        a.async = 1;
31822                        a.src = g;
31823                        m.parentNode.insertBefore(a, m)
31824                    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
31825
31826                    ga('create', page.defaults.googleAnalyticsId, 'auto');
31827                    ga('send', 'pageview');
31828                }
31829
31830
31831                // Google reCAPTCHA
31832                //
31833                if ($('[data-provide~="recaptcha"]').length && window["grecaptcha"] === undefined) {
31834                    var url = "https://www.google.com/recaptcha/api.js?onload=recaptchaLoadCallback";
31835                    if (page.defaults.reCaptchaLanguage != '') {
31836                        url += '&hl=' + page.defaults.reCaptchaLanguage;
31837                    }
31838                    $.getScript(url);
31839                }
31840
31841                // DOM is loaded, let's init the page.
31842                //
31843                page.init();
31844
31845            }
31846
31847        }(jQuery);
31848
31849
31850        /***/
31851    }),
31852    /* 65 */
31853    /***/ (function (module, exports) {
31854
31855
31856        /**
31857         * Bind input changes to data attributes
31858         */
31859
31860        +function ($) {
31861
31862            page.initBind = function () {
31863
31864                // Set the inner text
31865                //
31866                $('[data-bind-radio]').each(function () {
31867                    var e = $(this),
31868                        radio = e.data('bind-radio'),
31869                        value = $('input[name="' + radio + '"]:checked').val();
31870                    e.text(e.dataAttr(value, e.text()));
31871
31872                    $('input[name="' + radio + '"]').on('change', function () {
31873                        var value = $('input[name="' + radio + '"]:checked').val();
31874                        $('[data-bind-radio="' + radio + '"]').each(function () {
31875                            var e = $(this);
31876                            e.text(e.dataAttr(value, e.text()));
31877                        });
31878                    });
31879                });
31880
31881
31882                // Set href attribute
31883                //
31884                $('[data-bind-href]').each(function () {
31885                    var e = $(this),
31886                        radio = e.data('bind-href'),
31887                        value = $('input[name="' + radio + '"]:checked').val();
31888
31889                    e.attr('href', e.dataAttr(value));
31890
31891                    $('input[name="' + radio + '"]').on('change', function () {
31892                        var value = $('input[name="' + radio + '"]:checked').val();
31893                        $('[data-bind-href="' + radio + '"]').each(function () {
31894                            var e = $(this);
31895                            e.attr('href', e.dataAttr(value));
31896                        });
31897                    });
31898                });
31899
31900            }
31901
31902        }(jQuery);
31903
31904
31905        /***/
31906    }),
31907    /* 66 */
31908    /***/ (function (module, exports) {
31909
31910
31911        /**
31912         *
31913         */
31914
31915        +function ($) {
31916
31917            page.initDrawer = function () {
31918
31919                $(document).on('click', '.drawer-toggler, .drawer-close, .backdrop-drawer', function () {
31920                    $('body').toggleClass('drawer-open');
31921                });
31922
31923            }
31924
31925        }(jQuery);
31926
31927
31928        /***/
31929    }),
31930    /* 67 */
31931    /***/ (function (module, exports) {
31932
31933
31934        /**
31935         *
31936         */
31937
31938        +function ($) {
31939
31940            page.initFont = function () {
31941
31942                var fonts = [];
31943
31944                $('[data-font]').each(function () {
31945                    var tag = $(this),
31946                        font = tag.data('font')
31947                    part = font.split(':');
31948
31949                    fonts.push(font);
31950                    tag.css({'font-family': part[0], 'font-weight': part[1]});
31951                });
31952
31953                if (fonts.length > 0) {
31954                    $("head").append("<link href='https://fonts.googleapis.com/css?family=" + fonts.join('|') + "' rel='stylesheet'>");
31955                }
31956
31957            }
31958
31959        }(jQuery);
31960
31961
31962        /***/
31963    }),
31964    /* 68 */
31965    /***/ (function (module, exports) {
31966
31967
31968        /**
31969         * All the form related methods.
31970         */
31971
31972        +function ($) {
31973
31974            page.initForm = function () {
31975
31976
31977                /**
31978                 * Add/remove .focus to .input-group
31979                 */
31980                $(document).on('focusin', '.input-group', function () {
31981                    $(this).addClass('focus');
31982                });
31983
31984                $(document).on('focusout', '.input-group', function () {
31985                    $(this).removeClass('focus');
31986                });
31987
31988
31989                // Switch
31990                //
31991                $(document).on('click', '.switch', function () {
31992                    var input = $(this).children('.switch-input').not(':disabled');
31993                    input.prop('checked', !input.prop('checked')).trigger("change");
31994                });
31995
31996
31997                // Upload
31998                //
31999                $(document).on('click', '.file-browser', function () {
32000                    var browser = $(this);
32001                    var file = browser.closest('.file-group').find('[type="file"]');
32002                    if (browser.hasClass('form-control')) {
32003                        setTimeout(function () {
32004                            file.trigger('click');
32005                        }, 300);
32006                    } else {
32007                        file.trigger('click');
32008                    }
32009                });
32010
32011                // Event to change file name after file selection
32012                $(document).on('change', '.file-group [type="file"]', function () {
32013                    var input = $(this);
32014                    var filename = input.val().split('\\').pop();
32015                    input.closest('.file-group').find('.file-value').val(filename).text(filename).focus();
32016                });
32017
32018
32019            }
32020
32021        }(jQuery);
32022
32023
32024        /***/
32025    }),
32026    /* 69 */
32027    /***/ (function (module, exports) {
32028
32029
32030        /**
32031         * Send a form details to the sendmail.php file.
32032         */
32033
32034        +function ($) {
32035
32036            page.initMailer = function () {
32037
32038                var validEmail = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
32039
32040                $('[data-form="mailer"]').each(function () {
32041
32042                    var form = $(this),
32043                        email = form.find('[name="email"]'),
32044                        message = form.find('[name="message"]'),
32045                        onSuccess = form.dataAttr('on-success', null),
32046                        onError = form.dataAttr('on-error', null);
32047
32048                    form.on('submit', function () {
32049
32050                        form.children('.alert-danger').remove();
32051
32052                        if (email.length) {
32053                            if (email.val().length < 1 || !validEmail.test(email.val())) {
32054                                email.addClass('is-invalid');
32055                                return false;
32056                            }
32057                        }
32058
32059
32060                        if (message.length) {
32061                            if (message.val().length < 1) {
32062                                message.addClass('is-invalid');
32063                                return false;
32064                            }
32065                        }
32066
32067                        $.ajax({
32068                            type: "POST",
32069                            url: form.attr('action'),
32070                            data: form.serializeArray(),
32071                        })
32072                            .done(function (data) {
32073                                var response = JSON.parse(data);
32074                                if ('success' == response.status) {
32075                                    form.find('.alert-success').fadeIn(1000);
32076                                    form.find(':input').val('');
32077                                    if (onSuccess !== null) {
32078                                        window[onSuccess]();
32079                                    }
32080                                } else {
32081                                    form.prepend('<div class="alert alert-danger">' + response.message + '</div>');
32082                                    ConsoleLog("#133: ", response.reason);
32083                                    if (onError !== null) {
32084                                        window[onError](response.reason);
32085                                    }
32086                                }
32087                            });
32088
32089                        return false;
32090                    });
32091
32092                    email.on('focus', function () {
32093                        $(this).removeClass('is-invalid');
32094                    });
32095
32096                    message.on('focus', function () {
32097                        $(this).removeClass('is-invalid');
32098                    });
32099
32100                });
32101
32102            }
32103
32104        }(jQuery);
32105
32106
32107        /***/
32108    }),
32109    /* 70 */
32110    /***/ (function (module, exports) {
32111
32112
32113        /**
32114         * Display google map.
32115         */
32116
32117        +function ($) {
32118
32119            page.initMap = function () {
32120
32121                $('[data-provide~="map"]').each(function () {
32122                    var tag = $(this),
32123                        setting = {
32124                            lat: '',
32125                            lng: '',
32126                            zoom: 13,
32127                            markerLat: '',
32128                            markerLng: '',
32129                            markerIcon: '',
32130                            markers: '',
32131                            style: '',
32132                            removeControls: false,
32133                        };
32134
32135                    setting = $.extend(setting, page.getDataOptions(tag));
32136
32137                    var map = new google.maps.Map(tag[0], {
32138                        center: {
32139                            lat: Number(setting.lat),
32140                            lng: Number(setting.lng)
32141                        },
32142                        zoom: Number(setting.zoom),
32143                        disableDefaultUI: setting.removeControls,
32144                    });
32145
32146                    // Multiple locations
32147                    //
32148                    if (setting.markers != '') {
32149
32150                        var locations = JSON.parse("[" + setting.markers.replace(/'/g, '"') + "]"),
32151                            infowindow = new google.maps.InfoWindow(),
32152                            marker, i;
32153
32154                        for (i = 0; i < locations.length; i++) {
32155                            var markerIcon = setting.markerIcon;
32156
32157                            if (locations[i].length > 3 && locations[i][3] != '') {
32158                                markerIcon = locations[i][3];
32159                            }
32160
32161                            marker = new google.maps.Marker({
32162                                position: {
32163                                    lat: Number(locations[i][0]),
32164                                    lng: Number(locations[i][1])
32165                                },
32166                                map: map,
32167                                animation: google.maps.Animation.DROP,
32168                                icon: markerIcon
32169                            });
32170
32171                            if (locations[i].length > 2 && locations[i][2] != '') {
32172                                google.maps.event.addListener(marker, 'click', (function (marker, i) {
32173                                    return function () {
32174                                        infowindow.setContent(locations[i][2]);
32175                                        infowindow.open(map, marker);
32176                                    }
32177                                })(marker, i));
32178                            }
32179
32180                        }
32181
32182                    }
32183
32184                        // Single location
32185                    //
32186                    else {
32187
32188                        var marker = new google.maps.Marker({
32189                            position: {
32190                                lat: Number(setting.markerLat),
32191                                lng: Number(setting.markerLng)
32192                            },
32193                            map: map,
32194                            animation: google.maps.Animation.DROP,
32195                            icon: setting.markerIcon
32196                        });
32197
32198                        if (tag.is('[data-info]')) {
32199                            var infowindow = new google.maps.InfoWindow({
32200                                content: tag.dataAttr('info', '')
32201                            });
32202
32203                            marker.addListener('click', function () {
32204                                infowindow.open(map, marker);
32205                            });
32206                        }
32207
32208                    }
32209
32210
32211                    switch (setting.style) {
32212                        case 'light':
32213                            map.set('styles', [{
32214                                "featureType": "water",
32215                                "elementType": "geometry",
32216                                "stylers": [{"color": "#e9e9e9"}, {"lightness": 17}]
32217                            }, {
32218                                "featureType": "landscape",
32219                                "elementType": "geometry",
32220                                "stylers": [{"color": "#f5f5f5"}, {"lightness": 20}]
32221                            }, {
32222                                "featureType": "road.highway",
32223                                "elementType": "geometry.fill",
32224                                "stylers": [{"color": "#ffffff"}, {"lightness": 17}]
32225                            }, {
32226                                "featureType": "road.highway",
32227                                "elementType": "geometry.stroke",
32228                                "stylers": [{"color": "#ffffff"}, {"lightness": 29}, {"weight": 0.2}]
32229                            }, {
32230                                "featureType": "road.arterial",
32231                                "elementType": "geometry",
32232                                "stylers": [{"color": "#ffffff"}, {"lightness": 18}]
32233                            }, {
32234                                "featureType": "road.local",
32235                                "elementType": "geometry",
32236                                "stylers": [{"color": "#ffffff"}, {"lightness": 16}]
32237                            }, {
32238                                "featureType": "poi",
32239                                "elementType": "geometry",
32240                                "stylers": [{"color": "#f5f5f5"}, {"lightness": 21}]
32241                            }, {
32242                                "featureType": "poi.park",
32243                                "elementType": "geometry",
32244                                "stylers": [{"color": "#dedede"}, {"lightness": 21}]
32245                            }, {
32246                                "elementType": "labels.text.stroke",
32247                                "stylers": [{"visibility": "on"}, {"color": "#ffffff"}, {"lightness": 16}]
32248                            }, {
32249                                "elementType": "labels.text.fill",
32250                                "stylers": [{"saturation": 36}, {"color": "#333333"}, {"lightness": 40}]
32251                            }, {
32252                                "elementType": "labels.icon",
32253                                "stylers": [{"visibility": "off"}]
32254                            }, {
32255                                "featureType": "transit",
32256                                "elementType": "geometry",
32257                                "stylers": [{"color": "#f2f2f2"}, {"lightness": 19}]
32258                            }, {
32259                                "featureType": "administrative",
32260                                "elementType": "geometry.fill",
32261                                "stylers": [{"color": "#fefefe"}, {"lightness": 20}]
32262                            }, {
32263                                "featureType": "administrative",
32264                                "elementType": "geometry.stroke",
32265                                "stylers": [{"color": "#fefefe"}, {"lightness": 17}, {"weight": 1.2}]
32266                            }]);
32267                            break;
32268
32269                        case 'dark':
32270                            map.set('styles', [{
32271                                "featureType": "all",
32272                                "elementType": "labels.text.fill",
32273                                "stylers": [{"saturation": 36}, {"color": "#000000"}, {"lightness": 40}]
32274                            }, {
32275                                "featureType": "all",
32276                                "elementType": "labels.text.stroke",
32277                                "stylers": [{"visibility": "on"}, {"color": "#000000"}, {"lightness": 16}]
32278                            }, {
32279                                "featureType": "all",
32280                                "elementType": "labels.icon",
32281                                "stylers": [{"visibility": "off"}]
32282                            }, {
32283                                "featureType": "administrative",
32284                                "elementType": "geometry.fill",
32285                                "stylers": [{"color": "#000000"}, {"lightness": 20}]
32286                            }, {
32287                                "featureType": "administrative",
32288                                "elementType": "geometry.stroke",
32289                                "stylers": [{"color": "#000000"}, {"lightness": 17}, {"weight": 1.2}]
32290                            }, {
32291                                "featureType": "landscape",
32292                                "elementType": "geometry",
32293                                "stylers": [{"color": "#000000"}, {"lightness": 20}]
32294                            }, {
32295                                "featureType": "poi",
32296                                "elementType": "geometry",
32297                                "stylers": [{"color": "#000000"}, {"lightness": 21}]
32298                            }, {
32299                                "featureType": "road.highway",
32300                                "elementType": "geometry.fill",
32301                                "stylers": [{"color": "#000000"}, {"lightness": 17}]
32302                            }, {
32303                                "featureType": "road.highway",
32304                                "elementType": "geometry.stroke",
32305                                "stylers": [{"color": "#000000"}, {"lightness": 29}, {"weight": 0.2}]
32306                            }, {
32307                                "featureType": "road.arterial",
32308                                "elementType": "geometry",
32309                                "stylers": [{"color": "#000000"}, {"lightness": 18}]
32310                            }, {
32311                                "featureType": "road.local",
32312                                "elementType": "geometry",
32313                                "stylers": [{"color": "#000000"}, {"lightness": 16}]
32314                            }, {
32315                                "featureType": "transit",
32316                                "elementType": "geometry",
32317                                "stylers": [{"color": "#000000"}, {"lightness": 19}]
32318                            }, {
32319                                "featureType": "water",
32320                                "elementType": "geometry",
32321                                "stylers": [{"color": "#000000"}, {"lightness": 17}]
32322                            }])
32323                            break;
32324
32325                        default:
32326                            if (Array.isArray(setting.style)) {
32327                                map.set('styles', setting.style);
32328                            }
32329                    }
32330
32331                });
32332
32333            }
32334
32335        }(jQuery);
32336
32337
32338        /***/
32339    }),
32340    /* 71 */
32341    /***/ (function (module, exports) {
32342
32343
32344        /**
32345         * All the modal related methods.
32346         */
32347
32348        +function ($) {
32349
32350            page.initModal = function () {
32351                var body = page.body;
32352
32353                /**
32354                 * Autoshow
32355                 */
32356                $('.modal[data-autoshow]').each(function () {
32357                    var modal = $(this),
32358                        delay = parseInt(modal.dataAttr('autoshow'));
32359                    setTimeout(function () {
32360                        modal.modal('show')
32361                    }, delay);
32362                });
32363
32364
32365                /**
32366                 * Exit
32367                 */
32368                $('.modal[data-exitshow]').each(function () {
32369                    var modal = $(this),
32370                        delay = parseInt(modal.dataAttr('delay', 0)),
32371                        target = modal.dataAttr('exitshow');
32372
32373                    if ($(target).length) {
32374                        $(document).one('mouseleave', target, function () {
32375                            setTimeout(function () {
32376                                modal.modal('show')
32377                            }, delay);
32378                        });
32379                    }
32380
32381                });
32382
32383            }
32384
32385        }(jQuery);
32386
32387
32388        /***/
32389    }),
32390    /* 72 */
32391    /***/ (function (module, exports) {
32392
32393
32394        /**
32395         * All the navbar related methods.
32396         */
32397
32398        +function ($) {
32399
32400            page.initNavbar = function () {
32401
32402                /**
32403                 * Toggle navbar
32404                 */
32405                $(document).on('click', '.navbar-toggler', function () {
32406                    page.navbarToggle();
32407                });
32408
32409
32410                /**
32411                 * Tapping on the backdrop will close the navbar
32412                 */
32413                $(document).on('click', '.backdrop-navbar', function () {
32414                    page.navbarClose();
32415                });
32416
32417
32418                /**
32419                 * Toggle menu open on small screen devices
32420                 */
32421                $(document).on('click', '.navbar-open .nav-navbar > .nav-item > .nav-link', function () {
32422                    $(this).closest('.nav-item').siblings('.nav-item').find('> .nav:visible').slideUp(333, 'linear');
32423                    $(this).next('.nav').slideToggle(333, 'linear');
32424                });
32425
32426            }
32427
32428
32429            page.navbarToggle = function () {
32430                var body = page.body,
32431                    navbar = page.navbar;
32432
32433                body.toggleClass('navbar-open');
32434                if (body.hasClass('navbar-open')) {
32435                    navbar.prepend('<div class="backdrop backdrop-navbar"></div>');
32436                }
32437            }
32438
32439            page.navbarClose = function () {
32440                page.body.removeClass('navbar-open');
32441                $('.backdrop-navbar').remove();
32442            }
32443
32444        }(jQuery);
32445
32446
32447        /***/
32448    }),
32449    /* 73 */
32450    /***/ (function (module, exports) {
32451
32452
32453        /**
32454         * All the popup related methods.
32455         */
32456
32457        +function ($) {
32458
32459            page.initOffcanvas = function () {
32460
32461                /**
32462                 * Toggle
32463                 */
32464                $(document).on('click', '[data-toggle="offcanvas"]', function () {
32465                    var target = $(this).data('target'),
32466                        offcanvas = $(target);
32467
32468                    if (target !== undefined && offcanvas.length) {
32469                        if (offcanvas.hasClass('show')) {
32470                            $('.backdrop-offcanvas').remove();
32471                            offcanvas.removeClass('show');
32472                        } else {
32473                            offcanvas.before('<div class="backdrop backdrop-offcanvas"></div>');
32474                            offcanvas.addClass('show');
32475                            setTimeout(function () {
32476                                offcanvas.find('input:text:visible:first').focus();
32477                            }, 300);
32478                        }
32479                    }
32480                });
32481
32482
32483                /**
32484                 * Dismiss
32485                 */
32486                $(document).on('click', '.offcanvas [data-dismiss], .backdrop-offcanvas', function () {
32487                    $('.offcanvas.show').removeClass('show');
32488                    $('.backdrop-offcanvas').remove();
32489                });
32490
32491
32492                /**
32493                 * Esc key
32494                 */
32495                $(document).on('keyup', function (e) {
32496                    if ($('.offcanvas.show').length && e.keyCode == 27) { // esc keycode
32497                        $('.offcanvas.show').removeClass('show');
32498                        $('.backdrop-offcanvas').remove();
32499                    }
32500                });
32501            }
32502
32503        }(jQuery);
32504
32505
32506        /***/
32507    }),
32508    /* 74 */
32509    /***/ (function (module, exports) {
32510
32511
32512        /**
32513         * All the popup related methods.
32514         */
32515
32516        +function ($) {
32517
32518            page.initPopup = function () {
32519                var body = page.body;
32520
32521
32522                /**
32523                 * Toggle
32524                 */
32525                $(document).on('click', '[data-toggle="popup"]', function () {
32526                    var target = $(this).data('target'),
32527                        popup = $(target);
32528
32529                    if (target !== undefined && popup.length) {
32530                        if (popup.hasClass('show')) {
32531                            popup.removeClass('show');
32532                        } else {
32533                            popupShow(popup);
32534                        }
32535                    }
32536                });
32537
32538
32539                /**
32540                 * Dismiss
32541                 */
32542                $(document).on('click', '.popup [data-dismiss]', function () {
32543                    $(this).closest('.popup').removeClass('show');
32544                });
32545
32546
32547                /**
32548                 * Autoshow
32549                 */
32550                $('.popup[data-autoshow]').each(function () {
32551                    var popup = $(this),
32552                        delay = parseInt(popup.dataAttr('autoshow'));
32553                    setTimeout(function () {
32554                        popupShow(popup)
32555                    }, delay);
32556                });
32557
32558
32559                /**
32560                 * Exit
32561                 */
32562                $('.popup[data-exitshow]').each(function () {
32563                    var popup = $(this),
32564                        delay = parseInt(popup.dataAttr('delay', 0)),
32565                        target = popup.dataAttr('exitshow');
32566
32567                    if ($(target).length) {
32568                        $(document).one('mouseleave', target, function () {
32569                            setTimeout(function () {
32570                                popupShow(popup)
32571                            }, delay);
32572                        });
32573                    }
32574
32575                });
32576
32577
32578                /**
32579                 * Show
32580                 */
32581                var popupShow = function (popup) {
32582
32583                    var autohide = parseInt(popup.dataAttr('autohide', 0)),
32584                        once_key = popup.dataAttr('once', '');
32585
32586                    // Check if it was a once popup
32587                    if (once_key != '') {
32588                        if (localStorage.getItem(once_key) == 'displayed') {
32589                            return;
32590                        }
32591
32592                        var once_btn = popup.find('[data-once-button="true"]');
32593                        if (once_btn.length) {
32594                            once_btn.on('click', function () {
32595                                localStorage.setItem(once_key, 'displayed');
32596                            });
32597                        } else {
32598                            localStorage.setItem(once_key, 'displayed');
32599                        }
32600                    }
32601
32602                    popup.addClass('show');
32603                    setTimeout(function () {
32604                        popup.find('input:text:visible:first').focus();
32605                    }, 300);
32606
32607                    if (autohide > 0) {
32608                        setTimeout(function () {
32609                            popup.removeClass('show')
32610                        }, autohide);
32611                    }
32612                }
32613            }
32614
32615        }(jQuery);
32616
32617
32618        /***/
32619    }),
32620    /* 75 */
32621    /***/ (function (module, exports) {
32622
32623
32624        /**
32625         *
32626         */
32627
32628        +function ($) {
32629
32630            page.initRecaptcha = function () {
32631                $('[data-provide~="recaptcha"]').each(function () {
32632
32633                    var options = {
32634                        sitekey: page.defaults.reCaptchaSiteKey
32635                    }
32636
32637                    options = $.extend(options, page.getDataOptions($(this)));
32638
32639                    if (options.enable) {
32640                        options.callback = function () {
32641                            $(options.enable).removeAttr('disabled');
32642                        }
32643
32644                        options['expired-callback'] = function () {
32645                            $(options.enable).attr('disabled', 'true');
32646                        }
32647                    }
32648
32649                    grecaptcha.render($(this)[0], options);
32650                });
32651            }
32652
32653            window.recaptchaLoadCallback = function () {
32654                page.initRecaptcha();
32655            }
32656
32657
32658        }(jQuery);
32659
32660
32661        /***/
32662    }),
32663    /* 76 */
32664    /***/ (function (module, exports) {
32665
32666
32667        /**
32668         * All methods related to the page scroll and link click.
32669         */
32670
32671        +function ($) {
32672
32673            var body = page.body,
32674                footer = page.footer,
32675                hasHeader = page.header.length,
32676                navbarHeight = page.navbar.outerHeight(),
32677                headerHeight = page.header.innerHeight(),
32678                scrollOffsetTop = 0,
32679                prevOffsetTop = 0;
32680
32681            page.initScroll = function () {
32682
32683
32684                if ($('[data-navbar="fixed"], [data-navbar="sticky"], [data-navbar="smart"]').length) {
32685                    scrollOffsetTop = navbarHeight;
32686                }
32687
32688                $(document).on('click', "a[href='#']", function () {
32689                    return false;
32690                });
32691
32692
32693                // Back to top
32694                //
32695                $(document).on('click', '.scroll-top', function () {
32696                    smoothlyScrollTo(0);
32697                    return false;
32698                });
32699
32700
32701                // Smooth scroll for anchors
32702                //
32703                $(document).on('click', "a[href^='#']", function () {
32704                    if ($(this).attr('href').length < 2) {
32705                        return;
32706                    }
32707
32708                    if ($(this)[0].hasAttribute('data-toggle')) {
32709                        return;
32710                    }
32711
32712                    var target = $($(this).attr('href'));
32713                    if (target.length) {
32714                        var targetTop = target.offset().top,
32715                            windowTop = $(window).scrollTop();
32716
32717                        // We don't need offsetTop for scroll down with smart navbar
32718                        //
32719                        if (targetTop > windowTop && $('.navbar[data-navbar="smart"]').length) {
32720                            smoothlyScrollTo(targetTop);
32721                        } else {
32722                            smoothlyScrollTo(targetTop - scrollOffsetTop);
32723                        }
32724
32725                        if (body.hasClass('navbar-open')) {
32726                            page.navbarClose();
32727                        }
32728                        return false;
32729                    }
32730                });
32731
32732
32733                // Smoothscroll to anchor in page load
32734                //
32735                var hash = location.hash.replace('#', '');
32736                if (hash != '') {
32737                    var el = $("#" + hash);
32738                    if (el.length > 0) {
32739                        smoothlyScrollTo(el.offset().top - scrollOffsetTop);
32740                    }
32741                }
32742
32743
32744                // Actions which are related to the page scroll position
32745                windowScrollActions();
32746
32747                $(window).on('scroll', function () {
32748                    windowScrollActions()
32749                });
32750
32751
32752                // Sticky sidebar width
32753                //
32754                $('.sidebar-sticky').each(function () {
32755                    var tag = $(this),
32756                        width = tag.closest('div').width();
32757                    tag.css('width', width);
32758
32759                    if (body.width() / width < 1.8) {
32760                        tag.addClass('is-mobile-wide');
32761                    }
32762                });
32763
32764            }
32765
32766
32767            var windowScrollActions = function () {
32768                var window_top = $(window).scrollTop();
32769
32770                // .body-scrolled
32771                //
32772                if (window_top > 1) {
32773                    body.addClass('body-scrolled');
32774                } else {
32775                    body.removeClass('body-scrolled');
32776                }
32777
32778                // .navbar-scrolled
32779                //
32780
32781                if (window_top > navbarHeight) {
32782                    body.addClass('navbar-scrolled');
32783                } else {
32784                    body.removeClass('navbar-scrolled');
32785                }
32786
32787
32788                // .header-scrolled
32789                //
32790                if (window_top > headerHeight - navbarHeight - 1) {
32791                    body.addClass('header-scrolled');
32792                } else {
32793                    body.removeClass('header-scrolled');
32794                }
32795
32796                // Sticky elements
32797                //
32798                $('[data-sticky="true"]').each(function () {
32799                    var tag = $(this),
32800                        top = tag.offset().top;
32801
32802                    if (!tag.hasDataAttr('original-top')) {
32803                        tag.attr('data-original-top', top);
32804                    }
32805
32806                    var stick_start = tag.dataAttr('original-top'),
32807                        stick_end = footer.offset().top - tag.outerHeight();
32808
32809                    if (window_top > stick_start) {// && window_top <= stick_end) {
32810                        tag.addClass('stick');
32811                    } else {
32812                        tag.removeClass('stick');
32813                    }
32814                });
32815
32816                // Smart navbar
32817                //
32818                $('[data-navbar="smart"]').each(function () {
32819                    var tag = $(this);
32820
32821                    //toggleFixClass(tag);
32822                    if (window_top < prevOffsetTop) {
32823                        toggleStickClass(tag);
32824                    } else {
32825                        tag.removeClass('stick');
32826                    }
32827                });
32828
32829                // Sticky navbar
32830                //
32831                $('[data-navbar="sticky"]').each(function () {
32832                    var tag = $(this);
32833                    toggleStickClass(tag);
32834                });
32835
32836                // Fixed navbar
32837                //
32838                $('[data-navbar="fixed"]').each(function () {
32839                    var tag = $(this);
32840                    if (body.hasClass('body-scrolled')) {
32841                        tag.addClass('stick');
32842                    } else {
32843                        tag.removeClass('stick');
32844                    }
32845                });
32846
32847                // Sticky sidebar
32848                //
32849                $('.sidebar-sticky').each(function () {
32850                    var tag = $(this);
32851                    toggleStickClass(tag);
32852                });
32853
32854                // Fadeout effect
32855                //
32856                $('.header.fadeout').css('opacity', (1 - window_top - 200 / window.innerHeight));
32857
32858
32859                prevOffsetTop = window_top;
32860            }
32861
32862
32863            var smoothlyScrollTo = function (pos) {
32864                $('html, body').animate({scrollTop: pos}, 600);
32865            }
32866
32867
32868            var toggleFixClass = function (tag) {
32869                if (body.hasClass('navbar-scrolled')) {
32870                    tag.addClass('fix');
32871                } else {
32872                    tag.removeClass('fix');
32873                }
32874            }
32875
32876            var toggleStickClass = function (tag) {
32877                var requiredClass = 'navbar-scrolled';
32878                if (hasHeader) {
32879                    requiredClass = 'header-scrolled';
32880                }
32881
32882                if (body.hasClass(requiredClass)) {
32883                    tag.addClass('stick');
32884                } else {
32885                    tag.removeClass('stick');
32886                }
32887            }
32888
32889        }(jQuery);
32890
32891
32892        /***/
32893    }),
32894    /* 77 */
32895    /***/ (function (module, exports) {
32896
32897
32898        /**
32899         *
32900         */
32901
32902        +function ($) {
32903
32904            page.initSection = function () {
32905
32906            }
32907
32908        }(jQuery);
32909
32910
32911        /***/
32912    }),
32913    /* 78 */
32914    /***/ (function (module, exports) {
32915
32916
32917        /**
32918         *
32919         */
32920
32921        +function ($) {
32922
32923            page.initSidebar = function () {
32924                var body = page.body;
32925
32926                $(document).on('click', '.sidebar-toggler, .sidebar-close, .backdrop-sidebar', function () {
32927                    body.toggleClass('sidebar-open');
32928                    if (body.hasClass('sidebar-open')) {
32929                        body.prepend('<div class="backdrop backdrop-sidebar"></div>')
32930                    } else {
32931                        $('.backdrop-sidebar').remove();
32932                    }
32933                });
32934
32935                // Sidebar nav
32936                //
32937                var navItemShow = $('.nav-sidebar .nav-item.show');
32938                navItemShow.find('> .nav-link .nav-angle').addClass('rotate');
32939                navItemShow.find('> .nav').css('display', 'block');
32940                navItemShow.removeClass('show');
32941
32942                var navSidebarIsAccordion = false;
32943                if ('true' == $('.nav-sidebar').dataAttr('accordion', 'false')) {
32944                    navSidebarIsAccordion = true;
32945                }
32946
32947                $(document).on('click', '.nav-sidebar > .nav-item > .nav-link', function () {
32948                    var link = $(this);
32949                    link.next('.nav').slideToggle();
32950                    if (navSidebarIsAccordion) {
32951                        link.closest('.nav-item').siblings('.nav-item').children('.nav:visible').slideUp().prev('.nav-link').children('.nav-angle').removeClass('rotate');
32952                    }
32953                    link.children('.nav-angle').toggleClass('rotate');
32954                });
32955
32956
32957                // Perfect scrollbar
32958                //
32959                $('.sidebar-body').each(function (e) {
32960                    var ps = new PerfectScrollbar($(this)[0], {
32961                        wheelSpeed: 0.4,
32962                        minScrollbarLength: 20
32963                    });
32964                })
32965
32966            }
32967
32968        }(jQuery);
32969
32970
32971        /***/
32972    }),
32973    /* 79 */
32974    /***/ (function (module, exports) {
32975
32976
32977        /**
32978         * All the video related methods.
32979         */
32980
32981        +function ($) {
32982
32983            page.initVideo = function () {
32984
32985                // Video-wrapper
32986                //
32987                $(document).on('click', '.video-wrapper .btn', function () {
32988                    var wrapper = $(this).closest('.video-wrapper');
32989                    wrapper.addClass('reveal');
32990
32991                    if (wrapper.find('video').length)
32992                        wrapper.find('video').get(0).play();
32993
32994                    if (wrapper.find('iframe').length) {
32995                        var iframe = wrapper.find('iframe');
32996                        var src = iframe.attr('src');
32997
32998                        if (src.indexOf('?') > 0)
32999                            iframe.get(0).src += "&autoplay=1";
33000                        else
33001                            iframe.get(0).src += "?autoplay=1";
33002                    }
33003                });
33004
33005
33006                // Object-fit polyfill
33007                //
33008                objectFitPolyfill($('.bg-video'));
33009
33010            }
33011
33012        }(jQuery);
33013
33014
33015        /***/
33016    }),
33017    /* 80 */
33018    /***/ (function (module, exports) {
33019
33020
33021        /**
33022         * Utility functions to be used in the whole application.
33023         */
33024
33025        +function ($) {
33026
33027            // Convert data-attributes options to Javascript object
33028            //
33029            page.getDataOptions = function (el, castList) {
33030                var options = {};
33031
33032                $.each($(el).data(), function (key, value) {
33033
33034                    key = page.dataToOption(key);
33035
33036                    // Escape data-provide
33037                    if (key == 'provide') {
33038                        return;
33039                    }
33040
33041                    if (castList != undefined) {
33042                        var type = castList[key];
33043                        switch (type) {
33044                            case 'bool':
33045                                value = Boolean(value);
33046                                break;
33047
33048                            case 'num':
33049                                value = Number(value);
33050                                break;
33051
33052                            case 'array':
33053                                value = value.split(',');
33054                                break;
33055
33056                            default:
33057
33058                        }
33059                    }
33060
33061                    options[key] = value;
33062                });
33063
33064                return options;
33065            }
33066
33067
33068            // Get target of an action from element.
33069            //
33070            // It can be 'data-target' or 'href' attribute.
33071            // We support 'next' and 'prev' values to target next or previous element. In this case, we return jQuery element.
33072            //
33073            page.getTarget = function (e) {
33074                var target;
33075                if (e.hasDataAttr('target')) {
33076                    target = e.data('target');
33077                } else {
33078                    target = e.attr('href');
33079                }
33080
33081                if (target == 'next') {
33082                    target = $(e).next();
33083                } else if (target == 'prev') {
33084                    target = $(e).prev();
33085                }
33086
33087                if (target == undefined) {
33088                    return false;
33089                }
33090
33091                return target;
33092            };
33093
33094
33095            // Get URL of an action from element.
33096            //
33097            // It can be 'data-url' or 'href' attribute.
33098            //
33099            page.getURL = function (e) {
33100                var url;
33101                if (e.hasDataAttr('url')) {
33102                    url = e.data('url');
33103                } else {
33104                    url = e.attr('href');
33105                }
33106
33107                return url;
33108            };
33109
33110
33111            // Convert fooBarBaz to foo-bar-baz
33112            //
33113            page.optionToData = function (name) {
33114                return name.replace(/([A-Z])/g, "-$1").toLowerCase();
33115            }
33116
33117
33118            // Convert foo-bar-baz to fooBarBaz
33119            //
33120            page.dataToOption = function (name) {
33121                return name.replace(/-([a-z])/g, function (x) {
33122                    return x[1].toUpperCase();
33123                });
33124            }
33125
33126
33127        }(jQuery);
33128
33129
33130        /***/
33131    })
33132    /******/]);
33133
33134
33135/**
33136 * Validates a Google reCAPTCHA token and returns the response.
33137 *
33138 * @param {Object} grecaptcha
33139 * @param {string} public_key
33140 * @param {string} recaptcha_type
33141 * @param {string} action
33142 * @param {HTMLElement} sender
33143 * @returns {Promise}
33144 */
33145function ValidateGoogleRecaptcha(grecaptcha, public_key, recaptcha_type, action, sender) {
33146
33147    ConsoleLog(`#338: Starting ValidateGoogleRecaptcha with recaptcha type [${recaptcha_type}] and action [${action}]`)
33148    // centralized function for google captcha
33149    let functionString = "loadAfterGoogleCaptcha";
33150    let fn = typeof window[functionString]; // returns "undefined" or "function"
33151    try {
33152        if (typeof grecaptcha != 'undefined') {
33153            let recaptcha_type_int = parseInt(recaptcha_type, 10);
33154            switch (recaptcha_type_int) {
33155                case 3:
33156                    grecaptcha.ready(function () {
33157                        grecaptcha.execute(public_key, {action: action})
33158                            .then(function (token) {
33159                                // Verify the token on the server
33160                                loadAfterGoogleCaptcha(sender, token, action);
33161                            });
33162                    });
33163                    return true;
33164                case 4:
33165                    grecaptcha.enterprise.ready(async () => {
33166                        const reply = await grecaptcha.enterprise.execute(public_key, {action: action})
33167                            .then(function (token) {
33168                                // Verify the token on the server
33169                                if (fn === "function") {
33170                                    // safe to use the function
33171                                    loadAfterGoogleCaptcha(sender, token, action);
33172                                }
33173                            });
33174                    });
33175                    return true;
33176                default:
33177                    ConsoleLog("#050 Recaptcha type is not handled [" + recaptcha_type_int 
33177+ "]");
33178                    return false;
33179            }
33180        } else {
33181            // captcha is disabled
33182            if (fn === "function") {
33183                // safe to use the function
33184                loadAfterGoogleCaptcha(sender, token, action);
33185                return true;
33186            }
33187            return false;
33188        }
33189    } catch (ex) {
33190        ConsoleError("#287 Recaptcha error happened [" + ex.message + "]: " + ex.stack);
33191        return false;
33192    }
33193}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.