PageSourceSearch

https://www.tpg.com.au/sites/tpg/files/js/js_CZd3Ej8_WOMKwO-zPM1XWJhrENYgawY0WWq5KeuLIbc.js

js tpg.com.au collected 2026-09-24 08:32:25 UTC 605,173 bytes, 8,714 lines download raw bytes

1/**
2 * @file
3 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists.
4 */
5
6(function ($, Drupal, drupalSettings) {
7
8  'use strict';
9
10  /**
11   * jQuery Superfish plugin.
12   *
13   * @type {Drupal~behavior}
14   *
15   * @prop {Drupal~behaviorAttach} attach
16   *   Attaches the behavior to an applicable <ul> element.
17   */
18  Drupal.behaviors.superfish = {
19    attach: function (context, drupalSettings) {
20      // Take a look at each menu to apply Superfish to.
21      $.each(drupalSettings.superfish || {}, function (index, options) {
22        var $menu = $('ul#' + options.id, context);
23
24        // Check if we are to apply the Supersubs plug-in to it.
25        if (options.plugins || false) {
26          if (options.plugins.supersubs || false) {
27            $menu.supersubs(options.plugins.supersubs);
28          }
29        }
30
31        // Apply Superfish to the menu.
32        $menu.superfish(options.sf);
33
34        // Check if we are to apply any other plug-in to it.
35        if (options.plugins || false) {
36          if (options.plugins.touchscreen || false) {
37            $menu.sftouchscreen(options.plugins.touchscreen);
38          }
39          if (options.plugins.smallscreen || false) {
40            $menu.sfsmallscreen(options.plugins.smallscreen);
41          }
42          if (options.plugins.supposition || false) {
43            $menu.supposition();
44          }
45        }
46      });
47    }
48  };
49})(jQuery, Drupal, drupalSettings);
50;
51(function($) {
52  $.fn.extend({
53    hideSuperfishUl: function() {
54      var o = $.fn.superfish.op || $.fn.superfish.defaults,
55        not = (o.retainPath === true) ? o.$path : '';
56      o.retainPath = false;
57      var $ul = $(['li.', o.hoverClass].join(''), this).add(this).not(not).removeClass(o.hoverClass)
58        .children('ul').addClass('sf-hidden');
59      (o.onHide || $.noop).call($ul);
60      return this;
61    },
62    showSuperfishUl: function() {
63      var o = $.fn.superfish.op || $.fn.superfish.defaults,
64        sh = $.fn.superfish.c.shadowClass + '-off',
65        $ul = this.addClass(o.hoverClass)
66          .children('ul.sf-hidden').hide().removeClass('sf-hidden');
67      (o.onBeforeShow || $.noop).call($ul);
68      $ul.animate(o.animation, o.speed, function() {
69        (o.onShow || $.noop).call($ul);
70      });
71      return this;
72    }
73  });
74})(jQuery);;
75//GA4 Tracking
76function launchTracking(eventName, clickedText, featureTitle, clickedUrl, featurePosition) {
77    try{
78        dataLayer.push({
79            'event': eventName,
80            'clicked_text': clickedText,
81            'feature_title': featureTitle,
82            'clicked_url': clickedUrl,
83            'feature_position': featurePosition
84        });
85    } catch (e) {
86        console.log('launch tracking failed!' , e);
87    } 
88}
89
90// Global Tracking Values
91var linkHref = "";
92var linkText = "";
93var featureTitle = "";
94
95// USP LINKS
96function addUSPLinkListeners() {
97    const usps = document.querySelectorAll('.bottom-section-usp');
98    if (usps.length === 0) return;
99
100    usps.forEach(usp => {
101        const uspLink = usp.querySelector('a');
102        if (uspLink) {
103            uspLink.addEventListener('click', () => {
104                const uspTitle = uspLink.closest('.bottom-section').querySelector('h3');
105                featureTitle = uspTitle ? uspTitle.textContent : '';
106                linkHref = uspLink.href;
107                linkText = uspLink.textContent;
108                launchTracking('usp_link', linkText, featureTitle, linkHref, '');
109            });
110        }
111    });
112}
113
114// NAV MENU
115function addNavMenuListeners() {
116    const menuLinks = document.querySelectorAll('a.sf-depth-1.menu-links, a.sf-depth-2.menu-links');
117    if (menuLinks.length === 0) return;
118
119    menuLinks.forEach(menuLink => {
120        menuLink.addEventListener('click', () => {
121            var manuLevelOne = '';
122            var menuLevelTwo = '';
123            if (menuLink.classList.contains('sf-depth-2')) {
124                menuLevelTwo = menuLink.textContent;
125                const parentElement = menuLink.closest('.sf-depth-1.menu-items');
126                const parentLink = parentElement.querySelector('.sf-depth-1.menu-links, .sf-depth-1.menuparent');
127                manuLevelOne = parentLink ? parentLink.textContent : '';
128            } else {
129                manuLevelOne = menuLink.textContent;
130            }
131            linkText = menuLink.textContent;
132            const eventParams = {
133                nav_type: 'mega',
134                nav_name: linkText,
135                menu_level_1: manuLevelOne,
136            };
137            if (menuLevelTwo) {
138                eventParams.menu_level_2 = menuLevelTwo;
139            }
140            try{
141                dataLayer.push({
142                    event: 'menu_click',
143                    event_params: eventParams
144                });
145            } catch (e) {
146                console.log('launch tracking failed!' , e);
147            } 
148        });
149    });
150}
151
152// POC FOOTER MENU
153function addPocFooterMenuListeners() {
154    const footerMenus = document.querySelectorAll('.dropdown-menu');
155    if (footerMenus.length === 0) return;
156
157    footerMenus.forEach(footerMenu => {
158        const footerLinks = footerMenu.querySelectorAll('a');
159        footerLinks.forEach(footerLink => {
160            footerLink.addEventListener('click', () => {
161                const featureElement = footerLink.closest('li').parentElement.previousElementSibling;
162                featureTitle = featureElement ? featureElement.textContent : '';
163                linkText = footerLink.textContent;
164                linkHref = footerLink.href;
165                launchTracking('footer_click', linkText, featureTitle, linkHref, 'Footer');
166            });
167        });
168    });
169}
170
171// MACO FFOOTER MENU
172function addMacoFooterMenuListeners() {
173    const footerBlock = document.getElementById('block-maco-footer-4');
174    if (!footerBlock) return;
175
176    const firstLevelLinks = footerBlock.querySelectorAll('ul > li > a');
177    firstLevelLinks.forEach(firstLevelLink => {
178        const secondLevelLinks = firstLevelLink.nextElementSibling?.querySelectorAll('ul > li > a');
179        if (secondLevelLinks) {
180            secondLevelLinks.forEach(secondLevelLink => {
181                secondLevelLink.addEventListener('click', () => {
182                    linkText = secondLevelLink.textContent;
183                    linkHref = secondLevelLink.href;
184                    featureTitle = firstLevelLink.textContent;
185                    launchTracking('footer_click', linkText, featureTitle, linkHref, 'Footer');
186                });
187            });
188        }
189    });
190}
191
192// BOTTOM LINKS
193function addBottomLinkListeners() {
194    const bottomLinks = document.querySelectorAll('.bottom-link');
195    if (bottomLinks.length === 0) return;
196
197    bottomLinks.forEach(bottomLink => {
198        bottomLink.addEventListener('click', () => {
199            linkText = bottomLink.textContent;
200            linkHref = bottomLink.href;
201            launchTracking('bottom_link', linkText, 'Bottom Link', linkHref, '');
202        });
203    });
204}
205
206// HERO BANNER
207function addBannerCTAListeners() {
208    const bannerDescription = document.querySelector('.banner-message-wrapper');
209    if (!bannerDescription) return;
210
211    const bannerHeading = document.querySelector('.banner-heading');
212    featureTitle = bannerHeading ? bannerHeading.textContent : '';
213
214    const bannerCTAs = bannerDescription.querySelectorAll('.banner-cta a');
215    if (!bannerCTAs) return;
216    bannerCTAs.forEach(bannerCTA => {
217        bannerCTA.addEventListener('click', () => {
218            linkText = bannerCTA.textContent;
219            linkHref = bannerCTA.href;
220            launchTracking('hero_banner', linkText, featureTitle, linkHref, '');
221        });
222    });
223}
224
225// HOT OFFERS
226function addHotOfferLinkListeners() {
227    const productTiles = document.querySelectorAll('.hot-offer-link');
228    if (productTiles.length === 0) return;
229
230    productTiles.forEach(productTile => {
231        productTile.addEventListener('click', () => {
232            linkHref = productTile.href;
233            const productName = productTile.querySelector('.product-title');
234            featureTitle = productName ? productName.textContent : '';
235            const productButton = productTile.querySelector('.product-cta');
236            linkText = productButton ? productButton.textContent : '';
237            launchTracking('home_page_tile_clicks', linkText, featureTitle, linkHref, '');
238        });
239    });
240}
241
242// QUICK LINKS
243function addQuickLinkListeners() {
244    const quickLinks = document.querySelectorAll('.quick-link');
245    if (quickLinks.length === 0) return;
246
247    quickLinks.forEach(quickLink => {
248        quickLink.addEventListener('click', () => {
249            linkHref = quickLink.href;
250            const quickLinkText = quickLink.querySelector('h3');
251            linkText = quickLinkText ? quickLinkText.textContent : '';
252            launchTracking('quick_link', linkText, 'Quick Link', linkHref, '');
253        });
254    });
255}
256
257
258//CLUDO SEARCH
259function addCludoSearchListeners() {
260    const cludoOverlay = document.querySelector(".cludo-overlay-trigger");
261    if (cludoOverlay){
262        cludoOverlay.addEventListener("click", function () {
263            launchTracking('search_click', '', 'Search initiated', '', 'Header');
264          });
265    }
266}
267
268function addAlertBarListeners() {
269    const alertLink = document.querySelector(".alert-link");
270    if (alertLink){
271        alertLink.addEventListener("click", function () {
272            linkText = alertLink.textContent;
273            linkHref = alertLink.href;
274            launchTracking('alert_bar_click', linkText, 'Alert Info', linkHref, '');
275        });
276    }
277}
278
279//TOP LINKS
280function addTopLinkListeners() {
281    const topLinks = document.querySelectorAll('.top-link-item a');
282    if (topLinks.length !== 0) {
283        topLinks.forEach(topLink => {
284            topLink.addEventListener('click', () => {
285                linkText = topLink.textContent;
286                linkHref = topLink.href;
287                launchTracking('top_link', linkText, 'Top Link', linkHref, '');
288            });
289        });
290    }
291}
292
293
294document.addEventListener("DOMContentLoaded", function () {
295    // Initialize event listeners
296    addUSPLinkListeners();
297    addNavMenuListeners();
298    addPocFooterMenuListeners()
299    addMacoFooterMenuListeners()
300    addBottomLinkListeners();
301    addBannerCTAListeners();
302    addHotOfferLinkListeners();
303    addQuickLinkListeners();
304    addCludoSearchListeners();
305    addAlertBarListeners();
306    addTopLinkListeners();
307});
308
309;
310(function ($) {
311    'use strict';
312    $.fn.extend({
313        setupMmenu: function () {
314            this.mmenu({
315                extensions: [drupalSettings.responsive_menu.theme, 'effect-slide-menu'],
316                navbars: [
317                    {
318                        position: 'top',
319                        content: ['prev', 'title', 'close']
320                    }
321                ],
322                slidingSubmenus: false,
323                clone: false
324            });
325            return this;
326        }
327    });
328
329    Drupal.behaviors.responsive_menu_mmenu = {
330        attach: function (context) {
331            $(context).find('body').once('responsive-menu-mmenu').each(function () {
332                if (typeof ($.mmenu) != 'undefined') {
333                    $('#off-canvas').setupMmenu();
334                }
335            });
336        }
337    };
338
339    Drupal.behaviors.responsive_menu_optional = {
340        attach: function (context, settings) {
341            $(context).find('body').once('responsive-menu-optional').each(function () {
342                // Add the Hammer config if needed.
343                if (typeof (Hammer) != 'undefined') {
344                    var mc = new Hammer($('body').get(0), {
345                        cssProps: {
346                            userSelect: true
347                        },
348                        touchAction: 'auto'
349                    });
350                    mc.get('swipe').set({
351                        velocity: 0.3,
352                        threshold: 5
353                    });
354
355                    mc.on("swipedown swipeup", function (e) {
356                        if ($('.responsive-menu-block-wrapper').is(':hidden')) {
357                            hammerswipe(mc, e);
358                        }
359                    });
360                }
361            });
362        }
363    };
364
365    function hammerswipe(mc, e) {
366        var position = drupalSettings.responsive_menu.position;
367        var api = $('#off-canvas').data('mmenu'),
368            $html = $('html');
369
370        if (e.type == 'swipedown') {
371            if (!$html.hasClass('mm-opened')) {
372                api.open();
373            }
374        }
375        if (e.type == 'swipeup') {
376            if ($html.hasClass('mm-opened')) {
377                api.close();
378            }
379        }
380    }
381
382})(jQuery);;
383;
384function openTermsModal(targetModal){
385    targetModal.style.display = "block";
386}
387function closeTermsModal(targetModal){
388    targetModal.style.display = "none";
389}
390
391document.addEventListener("DOMContentLoaded", function(){
392    const termsLink = document.querySelector(".terms-link-br");
393    const termsModalCloseBtn = document.querySelector(".modal-close-btn");
394    const inlineTermsLink = document.querySelector(".inline-terms-link-br");
395    const inlineTermsModalCloseBtn = document.querySelector(".inline-modal-close-btn");
396    const inlineTermsModal = document.querySelector('.inline-terms-modal-overlay');
397    const termsModal = document.querySelector('.terms-modal-overlay');
398    if(termsLink){
399        termsLink.addEventListener('click', function(event) {
400            event.preventDefault(); 
401            openTermsModal(termsModal);
402        });
403    }
404    if(termsModalCloseBtn){
405        termsModalCloseBtn.addEventListener('click', function(event) {
406            event.preventDefault(); 
407            closeTermsModal(termsModal);
408        });
409    }
410    if(inlineTermsLink){
411        inlineTermsLink.addEventListener('click', function(event) {
412            event.preventDefault(); 
413            openTermsModal(inlineTermsModal);
414        });
415    }
416    if(inlineTermsModalCloseBtn){
417        inlineTermsModalCloseBtn.addEventListener('click', function(event) {
418            event.preventDefault(); 
419            closeTermsModal(inlineTermsModal);
420        });
421    }
422    // close modal by clicking overlay
423    if (termsModal) {
424      termsModal.addEventListener('click', function(event) {
425          if (event.target === termsModal) {
426              closeTermsModal(termsModal);
427          }
428      });
429    }
430    if (inlineTermsModal) {
431      inlineTermsModal.addEventListener('click', function(event) {
432          if (event.target === inlineTermsModal) {
433              closeTermsModal(inlineTermsModal);
434          }
435      });
436    }
437});;
438/**
439* DO NOT EDIT THIS FILE.
440* See the following change record for more information,
441* https://www.drupal.org/node/2815083
442* @preserve
443**/
444
445(function ($, Drupal) {
446  Drupal.theme.progressBar = function (id) {
447    return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label">&nbsp;</div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description">&nbsp;</div>' + '</div>';
448  };
449
450  Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
451    this.id = id;
452    this.method = method || 'GET';
453    this.updateCallback = updateCallback;
454    this.errorCallback = errorCallback;
455
456    this.element = $(Drupal.theme('progressBar', id));
457  };
458
459  $.extend(Drupal.ProgressBar.prototype, {
460    setProgress: function setProgress(percentage, message, label) {
461      if (percentage >= 0 && percentage <= 100) {
462        $(this.element).find('div.progress__bar').css('width', percentage + '%');
463        $(this.element).find('div.progress__percentage').html(percentage + '%');
464      }
465      $('div.progress__description', this.element).html(message);
466      $('div.progress__label', this.element).html(label);
467      if (this.updateCallback) {
468        this.updateCallback(percentage, message, this);
469      }
470    },
471    startMonitoring: function startMonitoring(uri, delay) {
472      this.delay = delay;
473      this.uri = uri;
474      this.sendPing();
475    },
476    stopMonitoring: function stopMonitoring() {
477      clearTimeout(this.timer);
478
479      this.uri = null;
480    },
481    sendPing: function sendPing() {
482      if (this.timer) {
483        clearTimeout(this.timer);
484      }
485      if (this.uri) {
486        var pb = this;
487
488        var uri = this.uri;
489        if (uri.indexOf('?') === -1) {
490          uri += '?';
491        } else {
492          uri += '&';
493        }
494        uri += '_format=json';
495        $.ajax({
496          type: this.method,
497          url: uri,
498          data: '',
499          dataType: 'json',
500          success: function success(progress) {
501            if (progress.status === 0) {
502              pb.displayError(progress.data);
503              return;
504            }
505
506            pb.setProgress(progress.percentage, progress.message, progress.label);
507
508            pb.timer = setTimeout(function () {
509              pb.sendPing();
510            }, pb.delay);
511          },
512          error: function error(xmlhttp) {
513            var e = new Drupal.AjaxError(xmlhttp, pb.uri);
514            pb.displayError('<pre>' + e.message + '</pre>');
515          }
516        });
517      }
518    },
519    displayError: function displayError(string) {
520      var error = $('<div class="messages messages--error"></div>').html(string);
521      $(this.element).before(error).hide();
522
523      if (this.errorCallback) {
524        this.errorCallback(this);
525      }
526    }
527  });
528})(jQuery, Drupal);;
529/**
530 * @file
531 * Extends methods from core/misc/progress.js.
532 */
533
534(function ($, Drupal) {
535
536  'use strict';
537
538  /**
539   * Theme function for the progress bar.
540   *
541   * @param {string} id
542   *
543   * @return {string}
544   *   The HTML for the progress bar.
545   */
546  Drupal.theme.progressBar = function (id) {
547    return '<div class="progress-wrapper" aria-live="polite">' +
548             '<div class="message"></div>'+
549             '<div id ="' + id + '" class="progress progress-striped active">' +
550               '<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">' +
551                 '<span class="percentage"></span>' +
552               '</div>' +
553             '</div>' +
554             '<div class="progress-label"></div>' +
555           '</div>';
556  };
557
558  $.extend(Drupal.ProgressBar.prototype, /** @lends Drupal.ProgressBar */{
559
560    /**
561     * Set the percentage and status message for the progressbar.
562     *
563     * @param {number} percentage
564     * @param {string} message
565     * @param {string} label
566     */
567    setProgress: function (percentage, message, label) {
568      if (percentage >= 0 && percentage <= 100) {
569        $(this.element).find('.progress-bar').css('width', percentage + '%').attr('aria-valuenow', percentage);
570        $(this.element).find('.percentage').html(percentage + '%');
571      }
572      if (message) {
573        // Remove the unnecessary whitespace at the end of the message.
574        message = message.replace(/<br\/>&nbsp;|\s*$/, '');
575
576        $('.message', this.element).html(message);
577      }
578      if (label) {
579        $('.progress-label', this.element).html(label);
580      }
581      if (this.updateCallback) {
582        this.updateCallback(percentage, message, this);
583      }
584    },
585
586    /**
587     * Display errors on the page.
588     *
589     * @param {string} string
590     */
591    displayError: function (string) {
592      var error = $('<div class="alert alert-block alert-error"><button class="close" data-dismiss="alert">&times;</button><h4>' + Drupal.t('Error message') + '</h4></div>').append(string);
593      $(this.element).before(error).hide();
594
595      if (this.errorCallback) {
596        this.errorCallback(this);
597      }
598    }
599  });
600
601})(jQuery, Drupal);
602;
603/**
604* DO NOT EDIT THIS FILE.
605* See the following change record for more information,
606* https://www.drupal.org/node/2815083
607* @preserve
608**/
609
610(function (Drupal) {
611  Drupal.behaviors.responsiveImageAJAX = {
612    attach: function attach() {
613      if (window.picturefill) {
614        window.picturefill();
615      }
616    }
617  };
618})(Drupal);;
619/**
620* DO NOT EDIT THIS FILE.
621* See the following change record for more information,
622* https://www.drupal.org/node/2815083
623* @preserve
624**/
625function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
626
627(function ($, window, Drupal, drupalSettings) {
628  Drupal.behaviors.AJAX = {
629    attach: function attach(context, settings) {
630      function loadAjaxBehavior(base) {
631        var elementSettings = settings.ajax[base];
632        if (typeof elementSettings.selector === 'undefined') {
633          elementSettings.selector = '#' + base;
634        }
635        $(elementSettings.selector).once('drupal-ajax').each(function () {
636          elementSettings.element = this;
637          elementSettings.base = base;
638          Drupal.ajax(elementSettings);
639        });
640      }
641
642      Object.keys(settings.ajax || {}).forEach(function (base) {
643        return loadAjaxBehavior(base);
644      });
645
646      Drupal.ajax.bindAjaxLinks(document.body);
647
648      $('.use-ajax-submit').once('ajax').each(function () {
649        var elementSettings = {};
650
651        elementSettings.url = $(this.form).attr('action');
652
653        elementSettings.setClick = true;
654
655        elementSettings.event = 'click';
656
657        elementSettings.progress = { type: 'throbber' };
658        elementSettings.base = $(this).attr('id');
659        elementSettings.element = this;
660
661        Drupal.ajax(elementSettings);
662      });
663    },
664    detach: function detach(context, settings, trigger) {
665      if (trigger === 'unload') {
666        Drupal.ajax.expired().forEach(function (instance) {
667          Drupal.ajax.instances[instance.instanceIndex] = null;
668        });
669      }
670    }
671  };
672
673  Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
674    var statusCode = void 0;
675    var statusText = void 0;
676    var responseText = void 0;
677    if (xmlhttp.status) {
678      statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', { '!status': xmlhttp.status });
679    } else {
680      statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.');
681    }
682    statusCode += '\n' + Drupal.t('Debugging information follows.');
683    var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri });
684    statusText = '';
685
686    try {
687      statusText = '\n' + Drupal.t('StatusText: !statusText', {
688        '!statusText': $.trim(xmlhttp.statusText)
689      });
690    } catch (e) {}
691
692    responseText = '';
693
694    try {
695      responseText = '\n' + Drupal.t('ResponseText: !responseText', {
696        '!responseText': $.trim(xmlhttp.responseText)
697      });
698    } catch (e) {}
699
700    responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
701    responseText = responseText.replace(/[\n]+\s+/g, '\n');
702
703    var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', {
704      '!readyState': xmlhttp.readyState
705    }) : '';
706
707    customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', {
708      '!customMessage': customMessage
709    }) : '';
710
711    this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
712
713    this.name = 'AjaxError';
714  };
715
716  Drupal.AjaxError.prototype = new Error();
717  Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
718
719  Drupal.ajax = function (settings) {
720    if (arguments.length !== 1) {
721      throw new Error('Drupal.ajax() function must be called with one configuration object only');
722    }
723
724    var base = settings.base || false;
725    var element = settings.element || false;
726    delete settings.base;
727    delete settings.element;
728
729    if (!settings.progress && !element) {
730      settings.progress = false;
731    }
732
733    var ajax = new Drupal.Ajax(base, element, settings);
734    ajax.instanceIndex = Drupal.ajax.instances.length;
735    Drupal.ajax.instances.push(ajax);
736
737    return ajax;
738  };
739
740  Drupal.ajax.instances = [];
741
742  Drupal.ajax.expired = function () {
743    return Drupal.ajax.instances.filter(function (instance) {
744      return instance && instance.element !== false && !document.body.contains(instance.element);
745    });
746  };
747
748  Drupal.ajax.bindAjaxLinks = function (element) {
749    $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
750      var $linkElement = $(ajaxLink);
751
752      var elementSettings = {
753        progress: { type: 'throbber' },
754        dialogType: $linkElement.data('dialog-type'),
755        dialog: $linkElement.data('dialog-options'),
756        dialogRenderer: $linkElement.data('dialog-renderer'),
757        base: $linkElement.attr('id'),
758        element: ajaxLink
759      };
760      var href = $linkElement.attr('href');
761
762      if (href) {
763        elementSettings.url = href;
764        elementSettings.event = 'click';
765      }
766      Drupal.ajax(elementSettings);
767    });
768  };
769
770  Drupal.Ajax = function (base, element, elementSettings) {
771    var defaults = {
772      event: element ? 'mousedown' : null,
773      keypress: true,
774      selector: base ? '#' + base : null,
775      effect: 'none',
776      speed: 'none',
777      method: 'replaceWith',
778      progress: {
779        type: 'throbber',
780        message: Drupal.t('Please wait...')
781      },
782      submit: {
783        js: true
784      }
785    };
786
787    $.extend(this, defaults, elementSettings);
788
789    this.commands = new Drupal.AjaxCommands();
790
791    this.instanceIndex = false;
792
793    if (this.wrapper) {
794      this.wrapper = '#' + this.wrapper;
795    }
796
797    this.element = element;
798
799    this.element_settings = elementSettings;
800
801    this.elementSettings = elementSettings;
802
803    if (this.element && this.element.form) {
804      this.$form = $(this.element.form);
805    }
806
807    if (!this.url) {
808      var $element = $(this.element);
809      if ($element.is('a')) {
810        this.url = $element.attr('href');
811      } else if (this.element && element.form) {
812        this.url = this.$form.attr('action');
813      }
814    }
815
816    var originalUrl = this.url;
817
818    this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1');
819
820    if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
821      drupalSettings.ajaxTrustedUrl[this.url] = true;
822    }
823
824    var ajax = this;
825
826    ajax.options = {
827      url: ajax.url,
828      data: ajax.submit,
829      beforeSerialize: function beforeSerialize(elementSettings, options) {
830        return ajax.beforeSerialize(elementSettings, options);
831      },
832      beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
833        ajax.ajaxing = true;
834        return ajax.beforeSubmit(formValues, elementSettings, options);
835      },
836      beforeSend: function beforeSend(xmlhttprequest, options) {
837        ajax.ajaxing = true;
838        return ajax.beforeSend(xmlhttprequest, options);
839      },
840      success: function success(response, status, xmlhttprequest) {
841        if (typeof response === 'string') {
842          response = $.parseJSON(response);
843        }
844
845        if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
846          if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
847            var customMessage = Drupal.t('The response failed verification so will not be processed.');
848            return ajax.error(xmlhttprequest, ajax.url, customMessage);
849          }
850        }
851
852        return ajax.success(response, status);
853      },
854      complete: function complete(xmlhttprequest, status) {
855        ajax.ajaxing = false;
856        if (status === 'error' || status === 'parsererror') {
857          return ajax.error(xmlhttprequest, ajax.url);
858        }
859      },
860
861      dataType: 'json',
862      type: 'POST'
863    };
864
865    if (elementSettings.dialog) {
866      ajax.options.data.dialogOptions = elementSettings.dialog;
867    }
868
869    if (ajax.options.url.indexOf('?') === -1) {
870      ajax.options.url += '?';
871    } else {
872      ajax.options.url += '&';
873    }
874
875    var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax');
876    if (elementSettings.dialogRenderer) {
877      wrapper += '.' + elementSettings.dialogRenderer;
878    }
879    ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper;
880
881    $(ajax.element).on(elementSettings.event, function (event) {
882      if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
883        throw new Error(Drupal.t('The callback URL is not local and n
883ot trusted: !url', {
884          '!url': ajax.url
885        }));
886      }
887      return ajax.eventResponse(this, event);
888    });
889
890    if (elementSettings.keypress) {
891      $(ajax.element).on('keypress', function (event) {
892        return ajax.keypressResponse(this, event);
893      });
894    }
895
896    if (elementSettings.prevent) {
897      $(ajax.element).on(elementSettings.prevent, false);
898    }
899  };
900
901  Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
902
903  Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
904
905  Drupal.Ajax.prototype.execute = function () {
906    if (this.ajaxing) {
907      return;
908    }
909
910    try {
911      this.beforeSerialize(this.element, this.options);
912
913      return $.ajax(this.options);
914    } catch (e) {
915      this.ajaxing = false;
916      window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message);
917
918      return $.Deferred().reject();
919    }
920  };
921
922  Drupal.Ajax.prototype.keypressResponse = function (element, event) {
923    var ajax = this;
924
925    if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
926      event.preventDefault();
927      event.stopPropagation();
928      $(element).trigger(ajax.elementSettings.event);
929    }
930  };
931
932  Drupal.Ajax.prototype.eventResponse = function (element, event) {
933    event.preventDefault();
934    event.stopPropagation();
935
936    var ajax = this;
937
938    if (ajax.ajaxing) {
939      return;
940    }
941
942    try {
943      if (ajax.$form) {
944        if (ajax.setClick) {
945          element.form.clk = element;
946        }
947
948        ajax.$form.ajaxSubmit(ajax.options);
949      } else {
950        ajax.beforeSerialize(ajax.element, ajax.options);
951        $.ajax(ajax.options);
952      }
953    } catch (e) {
954      ajax.ajaxing = false;
955      window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message);
956    }
957  };
958
959  Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
960    if (this.$form && document.body.contains(this.$form.get(0))) {
961      var settings = this.settings || drupalSettings;
962      Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
963    }
964
965    options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
966
967    var pageState = drupalSettings.ajaxPageState;
968    options.data['ajax_page_state[theme]'] = pageState.theme;
969    options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
970    options.data['ajax_page_state[libraries]'] = pageState.libraries;
971  };
972
973  Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
974
975  Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
976    if (this.$form) {
977      options.extraData = options.extraData || {};
978
979      options.extraData.ajax_iframe_upload = '1';
980
981      var v = $.fieldValue(this.element);
982      if (v !== null) {
983        options.extraData[this.element.name] = v;
984      }
985    }
986
987    $(this.element).prop('disabled', true);
988
989    if (!this.progress || !this.progress.type) {
990      return;
991    }
992
993    var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase();
994    if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
995      this[progressIndicatorMethod].call(this);
996    }
997  };
998
999  Drupal.theme.ajaxProgressThrobber = function (message) {
1000    var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : '';
1001    var throbber = '<div class="throbber">&nbsp;</div>';
1002
1003    return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>';
1004  };
1005
1006  Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
1007    return '<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';
1008  };
1009
1010  Drupal.theme.ajaxProgressMessage = function (message) {
1011    return '<div class="message">' + message + '</div>';
1012  };
1013
1014  Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
1015    var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop);
1016    if (this.progress.message) {
1017      progressBar.setProgress(-1, this.progress.message);
1018    }
1019    if (this.progress.url) {
1020      progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
1021    }
1022    this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar');
1023    this.progress.object = progressBar;
1024    $(this.element).after(this.progress.element);
1025  };
1026
1027  Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
1028    this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message));
1029    $(this.element).after(this.progress.element);
1030  };
1031
1032  Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
1033    this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen'));
1034    $('body').after(this.progress.element);
1035  };
1036
1037  Drupal.Ajax.prototype.success = function (response, status) {
1038    var _this = this;
1039
1040    if (this.progress.element) {
1041      $(this.progress.element).remove();
1042    }
1043    if (this.progress.object) {
1044      this.progress.object.stopMonitoring();
1045    }
1046    $(this.element).prop('disabled', false);
1047
1048    var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
1049
1050    var focusChanged = false;
1051    Object.keys(response || {}).forEach(function (i) {
1052      if (response[i].command && _this.commands[response[i].command]) {
1053        _this.commands[response[i].command](_this, response[i], status);
1054        if (response[i].command === 'invoke' && response[i].method === 'focus') {
1055          focusChanged = true;
1056        }
1057      }
1058    });
1059
1060    if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
1061      var target = false;
1062
1063      for (var n = elementParents.length - 1; !target && n >= 0; n--) {
1064        target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
1065      }
1066
1067      if (target) {
1068        $(target).trigger('focus');
1069      }
1070    }
1071
1072    if (this.$form && document.body.contains(this.$form.get(0))) {
1073      var settings = this.settings || drupalSettings;
1074      Drupal.attachBehaviors(this.$form.get(0), settings);
1075    }
1076
1077    this.settings = null;
1078  };
1079
1080  Drupal.Ajax.prototype.getEffect = function (response) {
1081    var type = response.effect || this.effect;
1082    var speed = response.speed || this.speed;
1083
1084    var effect = {};
1085    if (type === 'none') {
1086      effect.showEffect = 'show';
1087      effect.hideEffect = 'hide';
1088      effect.showSpeed = '';
1089    } else if (type === 'fade') {
1090      effect.showEffect = 'fadeIn';
1091      effect.hideEffect = 'fadeOut';
1092      effect.showSpeed = speed;
1093    } else {
1094      effect.showEffect = type + 'Toggle';
1095      effect.hideEffect = type + 'Toggle';
1096      effect.showSpeed = speed;
1097    }
1098
1099    return effect;
1100  };
1101
1102  Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
1103    if (this.progress.element) {
1104      $(this.progress.element).remove();
1105    }
1106    if (this.progress.object) {
1107      this.progress.object.stopMonitoring();
1108    }
1109
1110    $(this.wrapper).show();
1111
1112    $(this.element).prop('disabled', false);
1113
1114    if (this.$form && document.body.contains(this.$form.get(0))) {
1115      var settings = this.settings || drupalSettings;
1116      Drupal.attachBehaviors(this.$form.get(0), settings);
1117    }
1118    throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
1119  };
1120
1121  Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) {
1122    return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) {
1123      return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent));
1124    }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent;
1125  };
1126
1127  Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) {
1128    return $('<div></div>').append($elements);
1129  };
1130
1131  Drupal.AjaxCommands = function () {};
1132  Drupal.AjaxCommands.prototype = {
1133    insert: function insert(ajax, response) {
1134      var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
1135      var method = response.method || ajax.method;
1136      var effect = ajax.getEffect(response);
1137
1138      var settings = response.settings || ajax.settings || drupalSettings;
1139
1140      var $newContent = $($.parseHTML(response.data, document, true));
1141
1142      $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response);
1143
1144      switch (method) {
1145        case 'html':
1146        case 'replaceWith':
1147        case 'replaceAll':
1148        case 'empty':
1149        case 'remove':
1150          Drupal.detachBehaviors($wrapper.get(0), settings);
1151          break;
1152        default:
1153          break;
1154      }
1155
1156      $wrapper[method]($newContent);
1157
1158      if (effect.showEffect !== 'show') {
1159        $newContent.hide();
1160      }
1161
1162      var $ajaxNewContent = $newContent.find('.ajax-new-content');
1163      if ($ajaxNewContent.length) {
1164        $ajaxNewContent.hide();
1165        $newContent.show();
1166        $ajaxNewContent[effect.showEffect](effect.showSpeed);
1167      } else if (effect.showEffect !== 'show') {
1168        $newContent[effect.showEffect](effect.showSpeed);
1169      }
1170
1171      if ($newContent.parents('html').length) {
1172        $newContent.each(function (index, element) {
1173          if (element.nodeType === Node.ELEMENT_NODE) {
1174            Drupal.attachBehaviors(element, settings);
1175          }
1176        });
1177      }
1178    },
1179    remove: function remove(ajax, response, status) {
1180      var settings = response.settings || ajax.settings || drupalSettings;
1181      $(response.selector).each(function () {
1182        Drupal.detachBehaviors(this, settings);
1183      }).remove();
1184    },
1185    changed: function changed(ajax, response, status) {
1186      var $element = $(response.selector);
1187      if (!$element.hasClass('ajax-changed')) {
1188        $element.addClass('ajax-changed');
1189        if (response.asterisk) {
1190          $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> ');
1191        }
1192      }
1193    },
1194    alert: function alert(ajax, response, status) {
1195      window.alert(response.text, response.title);
1196    },
1197    redirect: function redirect(ajax, response, status) {
1198      window.location = response.url;
1199    },
1200    css: function css(ajax, response, status) {
1201      $(response.selector).css(response.argument);
1202    },
1203    settings: function settings(ajax, response, status) {
1204      var ajaxSettings = drupalSettings.ajax;
1205
1206      if (ajaxSettings) {
1207        Drupal.ajax.expired().forEach(function (instance) {
1208
1209          if (instance.selector) {
1210            var selector = instance.selector.replace('#', '');
1211            if (selector in ajaxSettings) {
1212              delete ajaxSettings[selector];
1213            }
1214          }
1215        });
1216      }
1217
1218      if (response.merge) {
1219        $.extend(true, drupalSettings, response.settings);
1220      } else {
1221        ajax.settings = response.settings;
1222      }
1223    },
1224    data: function data(ajax, response, status) {
1225      $(response.selector).data(response.name, response.value);
1226    },
1227    invoke: function invoke(ajax, response, status) {
1228      var $element = $(response.selector);
1229      $element[response.method].apply($element, _toConsumableArray(response.args));
1230    },
1231    restripe: function restripe(ajax, response, status) {
1232      $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
1233    },
1234    update_build_id: function update_build_id(ajax, response, status) {
1235      $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new);
1236    },
1237    add_css: function add_css(ajax, response, status) {
1238      $('head').prepend(response.data);
1239
1240      var match = void 0;
1241      var importMatch = /^@import url\("(.*)"\);$/gim;
1242      if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
1243        importMatch.lastIndex = 0;
1244        do {
1245          match = importMatch.exec(response.data);
1246          document.styleSheets[0].addImport(match[1]);
1247        } while (match);
1248      }
1249    }
1250  };
1251})(jQuery, window, Drupal, drupalSettings);;
1252/**
1253 * @file
1254 * Extends methods from core/misc/ajax.js.
1255 */
1256
1257(function ($, window, Drupal, drupalSettings) {
1258
1259  /**
1260   * Attempts to find the closest glyphicon progress indicator.
1261   *
1262   * @param {jQuery|Element} element
1263   *   A DOM element.
1264   *
1265   * @returns {jQuery}
1266   *   A jQuery object.
1267   */
1268  Drupal.Ajax.prototype.findGlyphicon = function (element) {
1269    return $(element).closest('.form-item').find('.ajax-progress.glyphicon')
1270  };
1271
1272  /**
1273   * Starts the spinning of the glyphicon progress indicator.
1274   *
1275   * @param {jQuery|Element} element
1276   *   A DOM element.
1277   * @param {string} [message]
1278   *   An optional message to display (tooltip) for the progress.
1279   *
1280   * @returns {jQuery}
1281   *   A jQuery object.
1282   */
1283  Drupal.Ajax.prototype.glyphiconStart = function (element, message) {
1284    var $glyphicon = this.findGlyphicon(element);
1285    if ($glyphicon[0]) {
1286      $glyphicon.addClass('glyphicon-spin');
1287
1288      // Add any message as a tooltip to the glyphicon.
1289      if (drupalSettings.bootstrap.tooltip_enabled) {
1290        $glyphicon
1291          .removeAttr('data-toggle')
1292          .removeAttr('data-original-title')
1293          .removeAttr('title')
1294          .tooltip('destroy')
1295        ;
1296
1297        if (message) {
1298          $glyphicon.attr('data-toggle', 'tooltip').attr('title', message).tooltip();
1299        }
1300      }
1301
1302      // Append a message for screen readers.
1303      if (message) {
1304        $glyphicon.parent().append('<div class="sr-only message">' + message + '</div>');
1305      }
1306    }
1307    return $glyphicon;
1308  };
1309
1310  /**
1311   * Stop the spinning of a glyphicon progress indicator.
1312   *
1313   * @param {jQuery|Element} element
1314   *   A DOM element.
1315   */
1316  Drupal.Ajax.prototype.glyphiconStop = function (element) {
1317    var $glyphicon = this.findGlyphicon(element);
1318    if ($glyphicon[0]) {
1319      $glyphicon.removeClass('glyphicon-spin');
1320      if (drupalSettings.bootstrap.tooltip_enabled) {
1321        $glyphicon
1322          .removeAttr('data-toggle')
1323          .removeAttr('data-original-title')
1324          .removeAttr('title')
1325          .tooltip('destroy')
1326        ;
1327      }
1328    }
1329  };
1330
1331  /**
1332   * Sets the throbber progress indicator.
1333   */
1334  Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
1335    var $element = $(this.element);
1336
1337    // Find an existing glyphicon progress indicator.
1338    var $glyphicon = this.glyphiconStart($element, this.progress.message);
1339    if ($glyphicon[0]) {
1340      this.progress.element = $glyphicon.parent();
1341      this.progress.glyphicon = true;
1342      return;
1343    }
1344
1345    // Otherwise, add a glyphicon throbber after the element.
1346    if (!this.progress.element) {
1347      this.progress.element = $(Drupal.theme('ajaxThrobber'));
1348    }
1349    if (this.progress.message) {
1350      this.progress.element.after('<div class="message">' + this.progress.message + '</div>');
1351    }
1352
1353    // If element is an input DOM element type (not :input), append after.
1354    if ($element.is('input')) {
1355      $element.after(this.progress.element);
1356    }
1357    // Otherwise append the throbber inside the element.
1358    else {
1359      $element.append(this.progress.element);
1360    }
1361  };
1362
1363
1364  /**
1365   * Handler for the form redirection completion.
1366   *
1367   * @param {Array.<Drupal.AjaxCommands~commandDefinition>} response
1368   * @param {number} status
1369   */
1370  Drupal.Ajax.prototype.success = function (response, status) {
1371    if (this.progress.element) {
1372
1373      // Stop a glyphicon throbber.
1374      if (this.progress.glyphicon) {
1375        this.glyphiconStop(this.progress.element);
1376      }
1377      // Remove the progress element.
1378      else {
1379        this.progress.element.remove();
1380      }
1381
1382      // Remove any message set.
1383      this.progress.element.parent().find('.message').remove();
1384    }
1385
1386    // --------------------------------------------------------
1387    // Everything below is from core/misc/ajax.js.
1388    // --------------------------------------------------------
1389
1390    if (this.progress.object) {
1391      this.progress.object.stopMonitoring();
1392    }
1393    $(this.element).prop('disabled', false);
1394
1395    // Save element's ancestors tree so if the element is removed from the dom
1396    // we can try to refocus one of its parents. Using addBack reverse the
1397    // result array, meaning that index 0 is the highest parent in the hierarchy
1398    // in this situation it is usually a <form> element.
1399    var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
1400
1401    // Track if any command is altering the focus so we can avoid changing the
1402    // focus set by the Ajax command.
1403    var focusChanged = false;
1404    for (var i in response) {
1405      if (response.hasOwnProperty(i) && response[i].command && this.commands[response[i].command]) {
1406        this.commands[response[i].command](this, response[i], status);
1407        if (response[i].command === 'invoke' && response[i].method === 'focus') {
1408          focusChanged = true;
1409        }
1410      }
1411    }
1412
1413    // If the focus hasn't be changed by the ajax commands, try to refocus the
1414    // triggering element or one of its parents if that element does not exist
1415    // anymore.
1416    if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
1417      var target = false;
1418
1419      for (var n = elementParents.length - 1; !target && n > 0; n--) {
1420        target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
1421      }
1422
1423      if (target) {
1424        $(target).trigger('focus');
1425      }
1426    }
1427
1428    // Reattach behaviors, if they were detached in beforeSerialize(). The
1429    // attachBehaviors() called on the new content from processing the response
1430    // commands is not sufficient, because behaviors from the entire form need
1431    // to be reattached.
1432    if (this.$form) {
1433      var settings = this.settings || drupalSettings;
1434      Drupal.attachBehaviors(this.$form.get(0), settings);
1435    }
1436
1437    // Remove any response-specific settings so they don't get used on the next
1438    // call by mistake.
1439    this.settings = null;
1440  };
1441
1442})(jQuery, this, Drupal, drupalSettings);
1443;
1444/**
1445* DO NOT EDIT THIS FILE.
1446* See the following change record for more information,
1447* https://www.drupal.org/node/2815083
1448* @preserve
1449**/
1450
1451Drupal.debounce = function (func, wait, immediate) {
1452  var timeout = void 0;
1453  var result = void 0;
1454  return function () {
1455    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1456      args[_key] = arguments[_key];
1457    }
1458
1459    var context = this;
1460    var later = function later() {
1461      timeout = null;
1462      if (!immediate) {
1463        result = func.apply(context, args);
1464      }
1465    };
1466    var callNow = immediate && !timeout;
1467    clearTimeout(timeout);
1468    timeout = setTimeout(later, wait);
1469    if (callNow) {
1470      result = func.apply(context, args);
1471    }
1472    return result;
1473  };
1474};;
1475/**
1476* DO NOT EDIT THIS FILE.
1477* See the following change record for more information,
1478* https://www.drupal.org/node/2815083
1479* @preserve
1480**/
1481
1482(function ($, Drupal, debounce) {
1483  var offsets = {
1484    top: 0,
1485    right: 0,
1486    bottom: 0,
1487    left: 0
1488  };
1489
1490  function getRawOffset(el, edge) {
1491    var $el = $(el);
1492    var documentElement = document.documentElement;
1493    var displacement = 0;
1494    var horizontal = edge === 'left' || edge === 'right';
1495
1496    var placement = $el.offset()[horizontal ? 'left' : 'top'];
1497
1498    placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0;
1499
1500    switch (edge) {
1501      case 'top':
1502        displacement = placement + $el.outerHeight();
1503        break;
1504
1505      case 'left':
1506        displacement = placement + $el.outerWidth();
1507        break;
1508
1509      case 'bottom':
1510        displacement = documentElement.clientHeight - placement;
1511        break;
1512
1513      case 'right':
1514        displacement = documentElement.clientWidth - placement;
1515        break;
1516
1517      default:
1518        displacement = 0;
1519    }
1520    return displacement;
1521  }
1522
1523  function calculateOffset(edge) {
1524    var edgeOffset = 0;
1525    var displacingElements = document.querySelectorAll('[data-offset-' + edge + ']');
1526    var n = displacingElements.length;
1527    for (var i = 0; i < n; i++) {
1528      var el = displacingElements[i];
1529
1530      if (el.style.display === 'none') {
1531        continue;
1532      }
1533
1534      var displacement = parseInt(el.getAttribute('data-offset-' + edge), 10);
1535
1536      if (isNaN(displacement)) {
1537        displacement = getRawOffset(el, edge);
1538      }
1539
1540      edgeOffset = Math.max(edgeOffset, displacement);
1541    }
1542
1543    return edgeOffset;
1544  }
1545
1546  function calculateOffsets() {
1547    return {
1548      top: calculateOffset('top'),
1549      right: calculateOffset('right'),
1550      bottom: calculateOffset('bottom'),
1551      left: calculateOffset('left')
1552    };
1553  }
1554
1555  function displace(broadcast) {
1556    offsets = calculateOffsets();
1557    Drupal.displace.offsets = offsets;
1558    if (typeof broadcast === 'undefined' || broadcast) {
1559      $(document).trigger('drupalViewportOffsetChange', offsets);
1560    }
1561    return offsets;
1562  }
1563
1564  Drupal.behaviors.drupalDisplace = {
1565    attach: function attach() {
1566      if (this.displaceProcessed) {
1567        return;
1568      }
1569      this.displaceProcessed = true;
1570
1571      $(window).on('resize.drupalDisplace', debounce(displace, 200));
1572    }
1573  };
1574
1575  Drupal.displace = displace;
1576  $.extend(Drupal.displace, {
1577    offsets: offsets,
1578
1579    calculateOffset: calculateOffset
1580  });
1581})(jQuery, Drupal, Drupal.debounce);;
1582/**
1583 * @file
1584 * Bootstrap Modals.
1585 */
1586(function ($, Drupal, Bootstrap, Attributes) {
1587  'use strict';
1588
1589  /**
1590   * Document jQuery object.
1591   *
1592   * @type {jQuery}
1593   */
1594  var $document = $(document);
1595
1596  /**
1597   * Finds the first available and visible focusable input element.
1598   *
1599   * This is abstracted from the main code below so sub-themes can override
1600   * this method to return their own element if desired.
1601   *
1602   * @param {Modal} modal
1603   *   The Bootstrap modal instance.
1604   *
1605   * @return {jQuery}
1606   *   A jQuery object containing the element that should be focused. Note: if
1607   *   this object contains multiple elements, only the first visible one will
1608   *   be used.
1609   */
1610  Bootstrap.modalFindFocusableElement = function (modal) {
1611    return modal.$dialogBody.find(':input,:button,.btn').not('.visually-hidden,.sr-only');
1612  };
1613
1614  $document.on('shown.bs.modal', function (e) {
1615    var $modal = $(e.target);
1616    var modal = $modal.data('bs.modal');
1617
1618    // Focus the first input element found.
1619    if (modal && modal.options.focusInput) {
1620      var $focusable = Bootstrap.modalFindFocusableElement(modal);
1621      if ($focusable && $focusable[0]) {
1622        var $input = $focusable.filter(':visible:first').focus();
1623
1624        // Select text if input is text.
1625        if (modal.options.selectText && $input.is(':text')) {
1626          $input[0].setSelectionRange(0, $input[0].value.length)
1627        }
1628      }
1629      else if (modal.$close.is(':visible')) {
1630        modal.$close.focus();
1631      }
1632    }
1633  });
1634
1635  /**
1636   * Only process this once.
1637   */
1638  Bootstrap.once('modal', function (settings) {
1639
1640    /**
1641     * Replace the Bootstrap Modal jQuery plugin definition.
1642     *
1643     * This adds a little bit of functionality so it works better with Drupal.
1644     */
1645    Bootstrap.replacePlugin('modal', function () {
1646      var BootstrapModal = this;
1647
1648      // Override the Modal constructor.
1649      var Modal = function (element, options) {
1650        this.$body               = $(document.body);
1651        this.$element            = $(element);
1652        this.$dialog             = this.$element.find('.modal-dialog');
1653        this.$header             = this.$dialog.find('.modal-header');
1654        this.$close              = this.$header.find('.close');
1655        this.$footer             = this.$dialog.find('.modal-footer');
1656        this.$content            = this.$dialog.find('.modal-content');
1657        this.$dialogBody         = this.$content.find('.modal-body');
1658        this.$backdrop           = null;
1659        this.isShown             = null;
1660        this.originalBodyPad     = null;
1661        this.scrollbarWidth      = 0;
1662        this.ignoreBackdropClick = false;
1663        this.options             = this.mapDialogOptions(options);
1664      };
1665
1666      // Extend defaults to take into account for theme settings.
1667      Modal.DEFAULTS = $.extend({}, BootstrapModal.DEFAULTS, {
1668        animation: !!settings.modal_animation,
1669        backdrop: settings.modal_backdrop === 'static' ? 'static' : !!settings.modal_backdrop,
1670        focusInput: !!settings.modal_focus_input,
1671        selectText: !!settings.modal_select_text,
1672        keyboard: !!settings.modal_keyboard,
1673        remote: null,
1674        show: !!settings.modal_show,
1675        size: settings.modal_size
1676      });
1677
1678      // Copy over the original prototype methods.
1679      Modal.prototype = BootstrapModal.prototype;
1680
1681      /**
1682       * Handler for $.fn.modal('destroy').
1683       */
1684      Modal.prototype.destroy = function () {
1685        this.hide();
1686        Drupal.detachBehaviors(this.$element[0]);
1687        this.$element.removeData('bs.modal').remove();
1688      };
1689
1690      /**
1691       * Initialize the modal.
1692       */
1693      Modal.prototype.init = function () {
1694        if (this.options.remote) {
1695          this.$content.load(this.options.remote, $.proxy(function () {
1696            this.$element.trigger('loaded.bs.modal');
1697          }, this));
1698        }
1699      };
1700
1701      /**
1702       * Map dialog options.
1703       *
1704       * Note: this is primarily for use in modal.jquery.ui.bridge.js.
1705       *
1706       * @param {Object} options
1707       *   The passed options.
1708       */
1709      Modal.prototype.mapDialogOptions = function (options) {
1710        return options || {};
1711      }
1712
1713      // Modal jQuery Plugin Definition.
1714      var Plugin = function () {
1715        // Extract the arguments.
1716        var args = Array.prototype.slice.call(arguments);
1717        var method = args[0];
1718        var options = args[1] || {};
1719        var relatedTarget = args[2] || null;
1720        // Move arguments down if no method was passed.
1721        if ($.isPlainObject(method)) {
1722          relatedTarget = options || null;
1723          options = method;
1724          method = null;
1725        }
1726        var ret = void 0;
1727        this.each(function () {
1728          var $this   = $(this);
1729          var data    = $this.data('bs.modal');
1730          var initialize = false;
1731
1732          // Immediately return if there's no instance to invoke a valid method.
1733          var showMethods = ['open', 'show', 'toggle'];
1734          if (!data && method && showMethods.indexOf(method) === -1) {
1735            return;
1736          }
1737
1738          options = Bootstrap.normalizeObject($.extend({}, Modal.DEFAULTS, data && data.options, $this.data(), options));
1739          delete options['bs.modal'];
1740
1741          if (!data) {
1742            $this.data('bs.modal', (data = new Modal(this, options)));
1743            initialize = true;
1744          }
1745
1746          // Initialize the modal.
1747          if (initialize || (!method && !args.length)) {
1748            data.init();
1749          }
1750
1751          // Explicit method passed.
1752          if (method) {
1753            if (typeof data[method] === 'function') {
1754              try {
1755                ret = data[method].apply(data, args.slice(1));
1756              }
1757              catch (e) {
1758                Drupal.throwError(e);
1759              }
1760            }
1761            else {
1762              Bootstrap.unsupported('method', method);
1763            }
1764          }
1765          // No method, set options and open if necessary.
1766          else {
1767            data.option(options);
1768            if (options.show && !data.isShown) {
1769              data.show(relatedTarget);
1770            }
1771          }
1772        });
1773
1774        // If just one element and there was a result returned for the option passed,
1775        // then return the result. Otherwise, just return the jQuery object.
1776        return this.length === 1 && ret !== void 0 ? ret : this;
1777      };
1778
1779      // Replace the plugin constructor with the new Modal constructor.
1780      Plugin.Constructor = Modal;
1781
1782      // Replace the data API so that it calls $.fn.modal rather than Plugin.
1783      // This allows sub-themes to replace the jQuery Plugin if they like with
1784      // out having to redo all this boilerplate.
1785      $document
1786        .off('click.bs.modal.data-api')
1787        .on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1788          var $this   = $(this);
1789          var href    = $this.attr('href');
1790          var target  = $this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
1791          var $target = $document.find(target);
1792          var options  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data());
1793
1794          if ($this.is('a')) e.preventDefault();
1795
1796          $target.one('show.bs.modal', function (showEvent) {
1797            // Only register focus restorer if modal will actually get shown.
1798            if (showEvent.isDefaultPrevented()) return;
1799            $target.one('hidden.bs.modal', function () {
1800              $this.is(':visible') && $this.trigger('focus');
1801            });
1802          });
1803          $target.modal(options, this);
1804        });
1805
1806      return Plugin;
1807    });
1808
1809    /**
1810     * Extend Drupal theming functions.
1811     */
1812    $.extend(Drupal.theme, /** @lend Drupal.theme */ {
1813      /**
1814       * Theme function for a Bootstrap Modal.
1815       *
1816       * @param {Object} [variables]
1817       *   An object containing key/value pairs of variables.
1818       *
1819       * @return {string}
1820       *   The HTML for the modal.
1821       */
1822      bootstrapModal: function (variables) {
1823        var output = '';
1824        var settings = drupalSettings.bootstrap || {};
1825        var defaults = {
1826          attributes: {
1827            class: ['modal'],
1828            tabindex: -1,
1829            role: 'dialog'
1830          },
1831          body: '',
1832          closeButton: true,
1833          description: {
1834            attributes: {
1835              class: ['help-block']
1836            },
1837            content: null,
1838            position: 'before'
1839          },
1840          footer: '',
1841          id: 'drupal-modal',
1842          size: settings.modal_size ? settings.modal_size : '',
1843          title: {
1844            attributes: {
1845              class: ['modal-title']
1846            },
1847            content: Drupal.t('Loading...'),
1848            html: false,
1849            tag: 'h4'
1850          }
1851        };
1852        variables = $.extend(true, {}, defaults, variables);
1853
1854        var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
1855        attributes.set('id', attributes.get('id', variables.id));
1856
1857        if (settings.modal_animation) {
1858          attributes.addClass('fade');
1859        }
1860
1861        // Build the modal wrapper.
1862        output += '<div' + attributes + '>';
1863
1864        // Build the modal-dialog wrapper.
1865        output += Drupal.theme('bootstrapModalDialog', _.omit(variables, 'attributes'));
1866
1867        // Close the modal wrapper.
1868        output += '</div>';
1869
1870        // Return the constructed modal.
1871        return output;
1872      },
1873
1874      /**
1875       * Theme function for a Bootstrap Modal dialog markup.
1876       *
1877       * @param {Object} [variables]
1878       *   An object containing key/value pairs of variables.
1879       *
1880       * @return {string}
1881       *   The HTML for the modal close button.
1882       */
1883      bootstrapModalDialog: function (variables) {
1884        var output = '';
1885
1886        var defaults = {
1887          attributes: {
1888            class: ['modal-dialog'],
1889            role: 'document'
1890          },
1891          id: 'drupal-modal'
1892        };
1893        variables = $.extend(true, {}, defaults, variables);
1894
1895        var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
1896        attributes.set('id', attributes.get('id', variables.id + '--dialog'));
1897
1898        if (variables.size) {
1899          attributes.addClass(variables.size);
1900        }
1901        output += '<div' + attributes + '>';
1902
1903        // Build the modal-content wrapper.
1904        output += Drupal.theme('bootstrapModalContent', _.omit(variables, 'attributes'));
1905
1906        // Close the modal-dialog wrapper.
1907        output += '</div>';
1908        return output;
1909      },
1910
1911      /**
1912       * Theme function for a Bootstrap Modal content markup.
1913       *
1914       * @param {Object} [variables]
1915       *   An object containing key/value pairs of variables.
1916       *
1917       * @return {string}
1918       *   The HTML for the modal close button.
1919       */
1920      bootstrapModalContent: function (variables) {
1921        var output = '';
1922
1923        var defaults = {
1924          attributes: {
1925            class: ['modal-content']
1926          },
1927          id: 'drupal-modal'
1928        };
1929        variables = $.extend(true, {}, defaults, variables);
1930
1931        var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
1932        attributes.set('id', attributes.get('id', variables.id + '--content'));
1933
1934        // Build the modal-content wrapper.
1935        output += '<div' + attributes + '>';
1936        variables = _.omit(variables, 'attributes');
1937
1938        // Build the header wrapper and title.
1939        output += Drupal.theme('bootstrapModalHeader', variables);
1940
1941        // Build the body.
1942        output += Drupal.theme('bootstrapModalBody', variables);
1943
1944        // Build the footer.
1945        output += Drupal.theme('bootstrapModalFooter', variables);
1946
1947        // Close the modal-content wrapper.
1948        output += '</div>';
1949
1950        return output;
1951      },
1952
1953      /**
1954       * Theme function for a Bootstrap Modal body markup.
1955       *
1956       * @param {Object} [variables]
1957       *   An object containing key/value pairs of variables.
1958       *
1959       * @return {string}
1960       *   The HTML for the modal close button.
1961       */
1962      bootstrapModalBody: function (variables) {
1963        var output = '';
1964
1965        var defaults = {
1966          attributes: {
1967            class: ['modal-body']
1968          },
1969          body: '',
1970          description: {
1971            attributes: {
1972              class: ['help-block']
1973            },
1974            content: null,
1975            position: 'before'
1976          },
1977          id: 'drupal-modal'
1978        };
1979        variables = $.extend(true, {}, defaults, variables);
1980
1981        var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
1982        attributes.set('id', attributes.get('id', variables.id + '--body'));
1983
1984        output += '<div' + attributes + '>';
1985
1986        if (typeof variables.description === 'string') {
1987          variables.description = $.extend({}, defaults.description, { content: variables.description });
1988        }
1989
1990        var description = variables.description;
1991        description.attributes = Attributes.create(defaults.description.attributes).merge(description.attributes);
1992
1993        if (description.content && description.position === 'invisible') {
1994          description.attributes.addClass('sr-only');
1995        }
1996
1997        if (description.content && description.position === 'before') {
1998          output += '<p' + description.attributes + '>' + description.content + '</p>';
1999        }
2000
2001        output += variables.body;
2002
2003        if (description.content && (description.position === 'after' || description.position === 'invisible')) {
2004          output += '<p' + description.attributes + '>' + description.content + '</p>';
2005        }
2006
2007        output += '</div>';
2008
2009        return output;
2010      },
2011
2012      /**
2013       * Theme function for a Bootstrap Modal close button.
2014       *
2015       * @param {Object} [variables]
2016       *   An object containing key/value pairs of variables.
2017       *
2018       * @return {string}
2019       *   The HTML for the modal close button.
2020       */
2021      bootstrapModalClose: function (variables) {
2022        var defaults = {
2023          attributes: {
2024            'aria-label': Drupal.t('Close'),
2025            class: ['close'],
2026            'data-dismiss': 'modal',
2027            type: 'button'
2028          }
2029        };
2030        variables = $.extend(true, {}, defaults, variables);
2031        var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
2032        return '<button' + attributes + '><span aria-hidden="true">&times;</span></button>';
2033      },
2034
2035      /**
2036       * Theme function for a Bootstrap Modal footer.
2037       *
2038       * @param {Object} [variables]
2039       *   An object containing key/value pairs of variables.
2040       * @param {boolean} [force]
2041       *   Flag to force rendering the footer, regardless if there's content.
2042       *
2043       * @return {string}
2044       *   The HTML for the modal footer.
2045       */
2046      bootstrapModalFooter: function (variables, force) {
2047        var output = '';
2048        var defaults = {
2049          attributes: {
2050            class: ['modal-footer']
2051          },
2052          footer: '',
2053          id: 'drupal-modal'
2054        };
2055
2056        variables = $.extend(true, {}, defaults, variables);
2057
2058        if (force || variables.footer) {
2059          var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
2060          attributes.set('id', attributes.get('id', variables.id + '--footer'));
2061          output += '<div' + attributes + '>';
2062          output += variables.footer;
2063          output += '</div>';
2064        }
2065
2066        return output;
2067      },
2068
2069      /**
2070       * Theme function for a Bootstrap Modal header.
2071       *
2072       * @param {Object} [variables]
2073       *   An object containing key/value pairs of variables.
2074       *
2075       * @return {string}
2076       *   The HTML for the modal header.
2077       */
2078      bootstrapModalHeader: function (variables) {
2079        var output = '';
2080
2081        var defaults = {
2082          attributes: {
2083            class: ['modal-header']
2084          },
2085          closeButton: true,
2086          id: 'drupal-modal',
2087          title: {
2088            attributes: {
2089              class: ['modal-title']
2090            },
2091            content: Drupal.t('Loading...'),
2092            html: false,
2093            tag: 'h4'
2094          }
2095        };
2096        variables = $.extend(true, {}, defaults, variables);
2097
2098        var title = variables.title;
2099        if (title) {
2100          var attributes = Attributes.create(defaults.attributes).merge(variables.attributes);
2101          attributes.set('id', attributes.get('id', variables.id + '--header'));
2102
2103          if (typeof title === 'string') {
2104            title = $.extend({}, defaults.title, { content: title });
2105          }
2106
2107          output += '<div' + attributes + '>';
2108
2109          if (variables.closeButton) {
2110            output += Drupal.theme('bootstrapModalClose', _.omit(variables, 'attributes'));
2111          }
2112
2113          output += '<' + Drupal.checkPlain(title.tag) + Attributes.create(defaults.title.attributes).merge(title.attributes) + '>' + (title.html ? title.content : Drupal.checkPlain(title.content)) + '</' + Drupal.checkPlain(title.tag) + '>';
2114
2115          output += '</div>';
2116        }
2117
2118        return output;
2119      }
2120    })
2121
2122  });
2123
2124})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes);
2125;
2126/*! jQuery UI - v1.12.1 - 2017-03-31
2127* http://jqueryui.com
2128* Copyright jQuery Foundation and other contributors; Licensed  */
2129!function(a){"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).on("mouseup",function(){b=!1}),a.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.on("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).on("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)if(b.originalEvent.altKey||b.originalEvent.ctrlKey||b.originalEvent.metaKey||b.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,b=!1,c.preventDefault()},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});;
vendor: 5,705 bytes, lines 2130-2133
2130/*! jQuery UI - v1.12.1 - 2017-03-31
2131* http://jqueryui.com
2132* Copyright jQuery Foundation and other contributors; Licensed  */
2133!function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(this._blurActiveElement(b),this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0))},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=a.ui.safeActiveElement(this.document[0]),d=a(b.target);d.closest(c).length||a.ui.safeBlur(c)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp(new a.Event("mouseup",b)),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.trigger("focus"),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new a.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}
vendor: 4,649 bytes, line 2133
2133),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)
vendor: 5,728 bytes, line 2133
2133/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left
vendor: 5,816 bytes, lines 2133-2137
2133:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});;
2134/*! jQuery UI - v1.12.1 - 2017-03-31
2135* http://jqueryui.com
2136* Copyright jQuery Foundation and other contributors; Licensed  */
2137!function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}var e,f=Math.max,g=Math.abs,h=/left|center|right/,i=/top|center|bottom/,j=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,l=/%$/,m=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType,f=!d&&!e;return{element:c,isWindow:d,isDocument:e,offset:f?a(b).offset():{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:c.outerWidth(),height:c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return m.apply(this,arguments);e=a.extend({},e);var l,n,o,p,q,r,s=a(e.of),t=a.position.getWithinInfo(e.within),u=a.position.getScrollInfo(t),v=(e.collision||"flip").split(" "),w={};return r=d(s),s[0].preventDefault&&(e.at="left top"),n=r.width,o=r.height,p=r.offset,q=a.extend({},p),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]),c[0]=h.test(c[0])?c[0]:"center",c[1]=i.test(c[1])?c[1]:"center",a=j.exec(c[0]),b=j.exec(c[1]),w[this]=[a?a[0]:0,b?b[0]:0],e[this]=[k.exec(c[0])[0],k.exec(c[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===e.at[0]?q.left+=n:"center"===e.at[0]&&(q.left+=n/2),"bottom"===e.at[1]?q.top+=o:"center"===e.at[1]&&(q.top+=o/2),l=b(w.at,n,o),q.left+=l[0],q.top+=l[1],this.each(function(){var d,h,i=a(this),j=i.outerWidth(),k=i.outerHeight(),m=c(this,"marginLeft"),r=c(this,"marginTop"),x=j+m+c(this,"marginRight")+u.width,y=k+r+c(this,"marginBottom")+u.height,z=a.extend({},q),A=b(w.my,i.outerWidth(),i.outerHeight());"right"===e.my[0]?z.left-=j:"center"===e.my[0]&&(z.left-=j/2),"bottom"===e.my[1]?z.top-=k:"center"===e.my[1]&&(z.top-=k/2),z.left+=A[0],z.top+=A[1],d={marginLeft:m,marginTop:r},a.each(["left","top"],function(b,c){a.ui.position[v[b]]&&a.ui.position[v[b]][c](z,{targetWidth:n,targetHeight:o,elemWidth:j,elemHeight:k,collisionPosition:d,collisionWidth:x,collisionHeight:y,offset:[l[0]+A[0],l[1]+A[1]],my:e.my,at:e.at,within:t,elem:i})}),e.using&&(h=function(a){var b=p.left-z.left,c=b+n-j,d=p.top-z.to
vendor: 1,339 bytes, line 2137
2137p,h=d+o-k,l={target:{element:s,left:p.left,top:p.top,width:n,height:o},element:{element:i,left:z.left,top:z.top,width:j,height:k},horizontal:c<0?"left":b>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};n<j&&g(b+c)<n&&(l.horizontal="center"),o<k&&g(d+h)<o&&(l.vertical="middle"),f(g(b),g(c))>f(g(d),g(h))?l.important="horizontal":l.important="vertical",e.using.call(this,a,l)}),i.offset(a.extend(z,{using:h}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,g=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-g-e;b.collisionWidth>g?i>0&&j<=0?(c=a.left+i+b.collisionWidth-g-e,a.left+=i-c):j>0&&i<=0?a.left=e:i>j?a.left=e+g-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=f(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,g=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-g-e;b.collisionHeight>g?i>0&&j<=0?(c=a.top+i+b.collisionHeight-g-e,a.top+=i-c):j>0&&i<=0?a.top=e:i>j?a.top=e+g-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=f(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,h=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-h-i,m="left"
vendor: 5,361 bytes, lines 2137-2141
2137===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];k<0?(c=a.left+m+n+o+b.collisionWidth-h-f,(c<0||c<g(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||g(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,h=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-h-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];k<0?(d=a.top+n+o+p+b.collisionHeight-h-f,(d<0||d<g(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||g(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}}}(),a.ui.position});;
2138/*! jQuery UI - v1.12.1 - 2017-03-31
2139* http://jqueryui.com
2140* Copyright jQuery Foundation and other contributors; Licensed  */
2141!function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseFloat(a)||0},_isNumber:function(a){return!isNaN(parseFloat(a))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c=this.options,d=this;this._addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,b={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(b),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(b),this._proportionallyResize()),this._setupHandles(),c.autoHide&&a(this.element).on("mouseenter",function(){c.disabled||(d._removeClass("ui-resizable-autohide"),d._handles.show())}).on("mouseleave",function(){c.disabled||d.resizing||(d._addClass("ui-resizable-autohide"),d._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_setOption:function(a,b){switch(this._super(a,b),a){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var b,c,d,e,f,g=this.options,h=this;if(this.handles=g.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),d=this.handles.split(","),this.handles={},c=0;c<d.length;c++)b=a.trim(d[c]),e="ui-resizable-"+b,f=a("<div>"),this._addClass(f,"ui-resizable-handle "+e),f.css({zIndex:g.zIndex}),this.handles[b]=".ui-resizable-"+b,this.element.append(f);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n
vendor: 4,356 bytes, line 2141
2141/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(f=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=f&&f[1]?f[1]:"se")}),g.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),this._addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),!!i&&(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseFloat(k.element.css("left"))+(k.position.left-k.originalPosition.left)||null,i=parseFloat(k.element.css("top"))+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left
vendor: 5,133 bytes, line 2141
2141=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.originalPosition.top+this.originalSize.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];b<4;b++)c[b]=parseFloat(d[b])||0,c[b]+=parseFloat(e[b])||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,k=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseFloat(c.element.css("width")),height:parseFloat(c.element.css("height")),top:parseFloat(c.element.css("top")),left:parseFloat(c.element.css("left"))};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHe
vendor: 4,270 bytes, line 2141
2141ight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseFloat(b.width()),height:parseFloat(b.height()),left:parseFloat(b.css("left")),top:parseFloat(b.css("top"))})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("ui-resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}),b._addClass(b.ghost,"ui-resizable-ghost"),a.uiBackCompat!==!1&&"string"==typeof b.options.ghost&&b.ghost.addClass(this.options.ghost),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o
2141):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((o-k<=0||n-j<=0)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});;
2142/**
2143 * @file
2144 * Bootstrap Modals.
2145 */
2146(function ($, Drupal, Bootstrap, Attributes, drupalSettings) {
2147  'use strict';
2148
2149  /**
2150   * Only process this once.
2151   */
2152  Bootstrap.once('modal.jquery.ui.bridge', function (settings) {
2153    // RTL support.
2154    var rtl = document.documentElement.getAttribute('dir').toLowerCase() === 'rtl';
2155
2156    // Override drupal.dialog button classes. This must be done on DOM ready
2157    // since core/drupal.dialog technically depends on this file and has not
2158    // yet set their default settings.
2159    $(function () {
2160      drupalSettings.dialog.buttonClass = 'btn';
2161      drupalSettings.dialog.buttonPrimaryClass = 'btn-primary';
2162    });
2163
2164    var relayEvent = function ($element, name, stopPropagation) {
2165      return function (e) {
2166        if (stopPropagation === void 0 || stopPropagation) {
2167          e.stopPropagation();
2168        }
2169        var parts = name.split('.').filter(Boolean);
2170        var type = parts.shift();
2171        e.target = $element[0];
2172        e.currentTarget = $element[0];
2173        e.namespace = parts.join('.');
2174        e.type = type;
2175        $element.trigger(e);
2176      };
2177    };
2178
2179    /**
2180     * Proxy $.fn.dialog to $.fn.modal.
2181     */
2182    var Dialog = function (options) {
2183      // When only options are passed, jQuery UI dialog treats this like a
2184      // initialization method. Destroy any existing Bootstrap modal and
2185      // recreate it using the contents of the dialog HTML.
2186      if (arguments.length === 1 && typeof options === 'object') {
2187        this.each($.fn.dialog.ensureModalStructure);
2188
2189        // Proxy to the Bootstrap Modal plugin, indicating that this is a
2190        // jQuery UI dialog bridge.
2191        return $.fn.modal.apply(this, [{
2192          dialogOptions: options,
2193          jQueryUiBridge: true
2194        }]);
2195      }
2196
2197      // Otherwise, proxy all arguments to the Bootstrap Modal plugin.
2198      return $.fn.modal.apply(this, arguments);
2199    };
2200
2201    /**
2202     * Ensures a DOM element has the appropriate structure for a modal.
2203     *
2204     * Note: this can get a little tricky. Core potentially already
2205     * semi-processes a "dialog" if was created using an Ajax command
2206     * (i.e. prepareDialogButtons in drupal.ajax.js). Because of this, the
2207     * contents (HTML) of the existing element cannot simply be dumped into a
2208     * newly created modal. This would destroy any existing event bindings.
2209     * Instead, the contents must be "moved" (appended) to the new modal and
2210     * then "moved" again back to the to the existing container as needed.
2211     */
2212    Dialog.ensureModalStructure = function () {
2213      var $element = $(this);
2214
2215      // Immediately return if the modal was already converted into a proper modal.
2216      if ($element.is('[data-drupal-theme="bootstrapModal"]')) {
2217        return;
2218      }
2219
2220      // Create a new modal.
2221      var $modal = $(Drupal.theme('bootstrapModal', {
2222        attributes: Attributes.create(this).remove('style').set('data-drupal-theme', 'bootstrapModal'),
2223      }));
2224
2225      // Store a reference to the content inside the existing element container.
2226      // This references the actual DOM node elements which will allow
2227      // jQuery to "move" then when appending below. Using $.fn.children()
2228      // does not return any text nodes present and $.fn.html() only returns
2229      // a string representation of the content, which effectively destroys
2230      // any prior event bindings or processing.
2231      var $body = $element.find('.modal-body');
2232      var $existing = $body[0] ? $body.contents() : $element.contents();
2233
2234      // Set the attributes of the dialog to that of the newly created modal.
2235      $element.attr(Attributes.create($modal).toPlainObject());
2236
2237      // Append the newly created modal markup.
2238      $element.append($modal.html());
2239
2240      // Move the existing HTML into the modal markup that was just appended.
2241      $element.find('.modal-body').append($existing);
2242    };
2243
2244    Bootstrap.createPlugin('dialog', Dialog);
2245
2246    /**
2247     * Extend the Bootstrap Modal plugin constructor class.
2248     */
2249    Bootstrap.extendPlugin('modal', function () {
2250      var Modal = this;
2251
2252      return {
2253        DEFAULTS: {
2254          // By default, this option is disabled. It's only flagged when a modal
2255          // was created using $.fn.dialog above.
2256          jQueryUiBridge: false
2257        },
2258        prototype: {
2259
2260          /**
2261           * Handler for $.fn.dialog('close').
2262           */
2263          close: function () {
2264            var _this = this;
2265
2266            this.hide.apply(this, arguments);
2267
2268            // For some reason (likely due to the transition event not being
2269            // registered properly), the backdrop doesn't always get removed
2270            // after the above "hide" method is invoked . Instead, ensure the
2271            // backdrop is removed after the transition duration by manually
2272            // invoking the internal "hideModal" method shortly thereafter.
2273            setTimeout(function () {
2274              if (!_this.isShown && _this.$backdrop) {
2275                _this.hideModal();
2276              }
2277            }, (Modal.TRANSITION_DURATION !== void 0 ? Modal.TRANSITION_DURATION : 300) + 10);
2278          },
2279
2280          /**
2281           * Creates any necessary buttons from dialog options.
2282           */
2283          createButtons: function () {
2284            this.$footer.find('.modal-buttons').remove();
2285
2286            // jQuery UI supports both objects and arrays. Unfortunately
2287            // developers have misunderstood and abused this by simply placing
2288            // the objects that should be in an array inside an object with
2289            // arbitrary keys (likely to target specific buttons as a hack).
2290            var buttons = this.options.dialogOptions && this.options.dialogOptions.buttons || [];
2291            if (!Array.isArray(buttons)) {
2292              var array = [];
2293              for (var k in buttons) {
2294                // Support the proper object values: label => click callback.
2295                if (typeof buttons[k] === 'function') {
2296                  array.push({
2297                    label: k,
2298                    click: buttons[k],
2299                  });
2300                }
2301                // Support nested objects, but log a warning.
2302                else if (buttons[k].text || buttons[k].label) {
2303                  Bootstrap.warn('Malformed jQuery UI dialog button: @key. The button object should be inside an array.', {
2304                    '@key': k
2305                  });
2306                  array.push(buttons[k]);
2307                }
2308                else {
2309                  Bootstrap.unsupported('button', k, buttons[k]);
2310                }
2311              }
2312              buttons = array;
2313            }
2314
2315            if (buttons.length) {
2316              var $buttons = $('<div class="modal-buttons"/>').appendTo(this.$footer);
2317              for (var i = 0, l = buttons.length; i < l; i++) {
2318                var button = buttons[i];
2319                var $button = $(Drupal.theme('bootstrapModalDialogButton', button));
2320
2321                // Invoke the "create" method for jQuery UI buttons.
2322                if (typeof button.create === 'function') {
2323                  button.create.call($button[0]);
2324                }
2325
2326                // Bind the "click" method for jQuery UI buttons to the modal.
2327                if (typeof button.click === 'function') {
2328                  $button.on('click', button.click.bind(this.$element));
2329                }
2330
2331                $buttons.append($button);
2332              }
2333            }
2334
2335            // Toggle footer visibility based on whether it has child elements.
2336            this.$footer[this.$footer.children()[0] ? 'show' : 'hide']();
2337          },
2338
2339          /**
2340           * Initializes the Bootstrap Modal.
2341           */
2342          init: function () {
2343            // Relay necessary events.
2344            if (this.options.jQueryUiBridge) {
2345              this.$element.on('hide.bs.modal',   relayEvent(this.$element, 'dialogbeforeclose', false));
2346              this.$element.on('hidden.bs.modal', relayEvent(this.$element, 'dialogclose', false));
2347              this.$element.on('show.bs.modal',   relayEvent(this.$element, 'dialogcreate', false));
2348              this.$element.on('shown.bs.modal',  relayEvent(this.$element, 'dialogopen', false));
2349            }
2350
2351            // Create a footer if one doesn't exist.
2352            // This is necessary in case dialog.ajax.js decides to add buttons.
2353            if (!this.$footer[0]) {
2354              this.$footer = $(Drupal.theme('bootstrapModalFooter', {}, true)).insertAfter(this.$dialogBody);
2355            }
2356
2357            // Now call the parent init method.
2358            this.super();
2359
2360            // Handle autoResize option (this is a drupal.dialog option).
2361            if (this.options.dialogOptions && this.options.dialogOptions.autoResize && this.options.dialogOptions.position) {
2362              this.position(this.options.dialogOptions.position);
2363            }
2364
2365            // If show is enabled and currently not shown, show it.
2366            if (this.options.jQueryUiBridge && this.options.show && !this.isShown) {
2367              this.show();
2368            }
2369          },
2370
2371          /**
2372           * Handler for $.fn.dialog('instance').
2373           */
2374          instance: function () {
2375            Bootstrap.unsupported('method', 'instance', arguments);
2376          },
2377
2378          /**
2379           * Handler for $.fn.dialog('isOpen').
2380           */
2381          isOpen: function () {
2382            return !!this.isShown;
2383          },
2384
2385          /**
2386           * Maps dialog options to the modal.
2387           *
2388           * @param {Object} options
2389           *   The options to map.
2390           */
2391          mapDialogOptions: function (options) {
2392            var mappedOptions = {};
2393            var dialogOptions = options.dialogOptions || {};
2394
2395            // Remove any existing dialog options.
2396            delete options.dialogOptions;
2397
2398            // Separate Bootstrap modal options from jQuery UI dialog options.
2399            for (var k in options) {
2400              if (Modal.DEFAULTS.hasOwnProperty(k)) {
2401                mappedOptions[k] = options[k];
2402              }
2403              else {
2404                dialogOptions[k] = options[k];
2405              }
2406            }
2407
2408
2409            // Handle CSS properties.
2410            var cssUnitRegExp = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)?$/;
2411            var parseCssUnit = function (value, defaultUnit) {
2412              var parts = ('' + value).match(cssUnitRegExp);
2413              return parts && parts[1] !== void 0 ? parts[1] + (parts[2] || defaultUnit || 'px') : null;
2414            };
2415            var styles = {};
2416            var cssProperties = ['height', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'width'];
2417            for (var i = 0, l = cssProperties.length; i < l; i++) {
2418              var prop = cssProperties[i];
2419              if (dialogOptions[prop] !== void 0) {
2420                var value = parseCssUnit(dialogOptions[prop]);
2421                if (value) {
2422                  styles[prop] = value;
2423
2424                  // If there's a defined height of some kind, enforce the modal
2425                  // to use flex (on modern browsers). This will ensure that
2426                  // the core autoResize calculations don't cause the content
2427                  // to overflow.
2428                  if (dialogOptions.autoResize && (prop === 'height' || prop === 'maxHeight')) {
2429                    styles.display = 'flex';
2430                    styles.flexDirection = 'column';
2431                    this.$dialogBody.css('overflow', 'scroll');
2432                  }
2433                }
2434              }
2435            }
2436
2437            // Apply mapped CSS styles to the modal-content container.
2438            this.$content.css(styles);
2439
2440            // Handle deprecated "dialogClass" option by merging it with "classes".
2441            var classesMap = {
2442              'ui-dialog': 'modal-content',
2443              'ui-dialog-titlebar': 'modal-header',
2444              'ui-dialog-title': 'modal-title',
2445              'ui-dialog-titlebar-close': 'close',
2446              'ui-dialog-content': 'modal-body',
2447              'ui-dialog-buttonpane': 'modal-footer'
2448            };
2449            if (dialogOptions.dialogClass) {
2450              if (dialogOptions.classes === void 0) {
2451                dialogOptions.classes = {};
2452              }
2453              if (dialogOptions.classes['ui-dialog'] === void 0) {
2454                dialogOptions.classes['ui-dialog'] = '';
2455              }
2456              var dialogClass = dialogOptions.classes['ui-dialog'].split(' ');
2457              dialogClass.push(dialogOptions.dialogClass);
2458              dialogOptions.classes['ui-dialog'] = dialogClass.join(' ');
2459              delete dialogOptions.dialogClass;
2460            }
2461
2462            // Add jQuery UI classes to elements in case developers target them
2463            // in callbacks.
2464            for (k in classesMap) {
2465              this.$element.find('.' + classesMap[k]).addClass(k);
2466            }
2467
2468            // Bind events.
2469            var events = [
2470              'beforeClose', 'close',
2471              'create',
2472              'drag', 'dragStart', 'dragStop',
2473              'focus',
2474              'open',
2475              'resize', 'resizeStart', 'resizeStop'
2476            ];
2477            for (i = 0, l = events.length; i < l; i++) {
2478              var event = events[i].toLowerCase();
2479              if (dialogOptions[event] === void 0 || typeof dialogOptions[event] !== 'function') continue;
2480              this.$element.on('dialog' + event, dialogOptions[event]);
2481            }
2482
2483            // Support title attribute on the modal.
2484            var title;
2485            if ((dialogOptions.title === null || dialogOptions.title === void 0) && (title = this.$element.attr('title'))) {
2486              dialogOptions.title = title;
2487            }
2488
2489            // Handle the reset of the options.
2490            for (var name in dialogOptions) {
2491              if (!dialogOptions.hasOwnProperty(name) || dialogOptions[name] === void 0) continue;
2492
2493              switch (name) {
2494                case 'appendTo':
2495                  Bootstrap.unsupported('option', name, dialogOptions.appendTo);
2496                  break;
2497
2498                case 'autoOpen':
2499                  mappedOptions.show = dialogOptions.show = !!dialogOptions.autoOpen;
2500                  break;
2501
2502                case 'classes':
2503                  if (dialogOptions.classes) {
2504                    for (var key in dialogOptions.classes) {
2505                      if (dialogOptions.classes.hasOwnProperty(key) && classesMap[key] !== void 0) {
2506                        // Run through Attributes to sanitize classes.
2507                        var attributes = Attributes.create().addClass(dialogOptions.classes[key]).toPlainObject();
2508                        var selector = '.' + classesMap[key];
2509                        this.$element.find(selector).addClass(attributes['class']);
2510                      }
2511                    }
2512                  }
2513                  break;
2514
2515                case 'closeOnEscape':
2516                  mappedOptions.keyboard = !!dialogOptions.closeOnEscape;
2517                  if (!dialogOptions.closeOnEscape && dialogOptions.modal) {
2518                    mappedOptions.backdrop = 'static';
2519                  }
2520                  break;
2521
2522                case 'closeText':
2523                  Bootstrap.unsupported('option', name, dialogOptions.closeText);
2524                  break;
2525
2526                case 'draggable':
2527                  this.$content
2528                    .draggable({
2529                      handle: '.modal-header',
2530                      drag: relayEvent(this.$element, 'dialogdrag'),
2531                      start: relayEvent(this.$element, 'dialogdragstart'),
2532                      end: relayEvent(this.$element, 'dialogdragend')
2533                    })
2534                    .draggable(dialogOptions.draggable ? 'enable' : 'disable');
2535                  break;
2536
2537                case 'hide':
2538                  if (dialogOptions.hide === false || dialogOptions.hide === true) {
2539                    this.$element[dialogOptions.hide ? 'addClass' : 'removeClass']('fade');
2540                    mappedOptions.animation = dialogOptions.hide;
2541                  }
2542                  else {
2543                    Bootstrap.unsupported('option', name + ' (complex animation)', dialogOptions.hide);
2544                  }
2545                  break;
2546
2547                case 'modal':
2548                  if (!dialogOptions.closeOnEscape && dialogOptions.modal) {
2549                    mappedOptions.backdrop = 'static';
2550                  }
2551                  else {
2552                    mappedOptions.backdrop = dialogOptions.modal;
2553                  }
2554
2555                  // If not a modal and no initial position, center it.
2556                  if (!dialogOptions.modal && !dialogOptions.position) {
2557                    this.position({ my: 'center', of: window });
2558                  }
2559                  break;
2560
2561                case 'position':
2562                  this.position(dialogOptions.position);
2563                  break;
2564
2565                // Resizable support (must initialize first).
2566                case 'resizable':
2567                  this.$content
2568                    .resizable({
2569                      resize: relayEvent(this.$element, 'dialogresize'),
2570                      start: relayEvent(this.$element, 'dialogresizestart'),
2571                      end: relayEvent(this.$element, 'dialogresizeend')
2572                    })
2573                    .resizable(dialogOptions.resizable ? 'enable' : 'disable');
2574                  break;
2575
2576                case 'show':
2577                  if (dialogOptions.show === false || dialogOptions.show === true) {
2578                    this.$element[dialogOptions.show ? 'addClass' : 'removeClass']('fade');
2579                    mappedOptions.animation = dialogOptions.show;
2580                  }
2581                  else {
2582                    Bootstrap.unsupported('option', name + ' (complex animation)', dialogOptions.show);
2583                  }
2584                  break;
2585
2586                case 'title':
2587                  this.$dialog.find('.modal-title').text(dialogOptions.title);
2588                  break;
2589
2590              }
2591            }
2592
2593            // Add the supported dialog options to the mapped options.
2594            mappedOptions.dialogOptions = dialogOptions;
2595
2596            return mappedOptions;
2597          },
2598
2599          /**
2600           * Handler for $.fn.dialog('moveToTop').
2601           */
2602          moveToTop: function () {
2603            Bootstrap.unsupported('method', 'moveToTop', arguments);
2604          },
2605
2606          /**
2607           * Handler for $.fn.dialog('option').
2608           */
2609          option: function () {
2610            var clone = {options: {}};
2611
2612            // Apply the parent option method to the clone of current options.
2613            this.super.apply(clone, arguments);
2614
2615            // Merge in the cloned mapped options.
2616            $.extend(true, this.options, this.mapDialogOptions(clone.options));
2617
2618            // Update buttons.
2619            this.createButtons();
2620          },
2621
2622          position: function(position) {
2623            // Reset modal styling.
2624            this.$element.css({
2625              bottom: 'initial',
2626              overflow: 'visible',
2627              right: 'initial'
2628            });
2629
2630            // Position the modal.
2631            this.$element.position(position);
2632          },
2633
2634          /**
2635           * Handler for $.fn.dialog('open').
2636           */
2637          open: function () {
2638            this.show.apply(this, arguments);
2639          },
2640
2641          /**
2642           * Handler for $.fn.dialog('widget').
2643           */
2644          widget: function () {
2645            return this.$element;
2646          }
2647        }
2648      };
2649    });
2650
2651    /**
2652     * Extend Drupal theming functions.
2653     */
2654    $.extend(Drupal.theme, /** @lend Drupal.theme */ {
2655
2656      /**
2657       * Renders a jQuery UI Dialog compatible button element.
2658       *
2659       * @param {Object} button
2660       *   The button object passed in the dialog options.
2661       *
2662       * @return {String}
2663       *   The modal dialog button markup.
2664       *
2665       * @see http://api.jqueryui.com/dialog/#option-buttons
2666       * @see http://api.jqueryui.com/button/
2667       */
2668      bootstrapModalDialogButton: function (button) {
2669        var attributes = Attributes.create();
2670
2671        var icon = '';
2672        var iconPosition = button.iconPosition || 'beginning';
2673        iconPosition = (iconPosition === 'end' && !rtl) || (iconPosition === 'beginning' && rtl) ? 'after' : 'before';
2674
2675        // Handle Bootstrap icons differently.
2676        if (button.bootstrapIcon) {
2677          icon = Drupal.theme('icon', 'bootstrap', button.icon);
2678        }
2679        // Otherwise, assume it's a jQuery UI icon.
2680        // @todo Map jQuery UI icons to Bootstrap icons?
2681        else if (button.icon) {
2682          var iconAttributes = Attributes.create()
2683            .addClass(['ui-icon', button.icon])
2684            .set('aria-hidden', 'true');
2685          icon = '<span' + iconAttributes + '></span>';
2686        }
2687
2688        // Label. Note: jQuery UI dialog has an inconsistency where it uses
2689        // "text" instead of "label", so both need to be supported.
2690        var value = button.label || button.text;
2691
2692        // Show/hide label.
2693        if (icon && ((button.showLabel !== void 0 && !button.showLabel) || (button.text !== void 0 && !button.text))) {
2694          value = '<span' + Attributes.create().addClass('sr-only') + '>
2694' + value + '</span>';
2695        }
2696        attributes.set('value', iconPosition === 'before' ? icon + value : value + icon);
2697
2698        // Handle disabled.
2699        attributes[button.disabled ? 'set' :'remove']('disabled', 'disabled');
2700
2701        if (button.classes) {
2702          attributes.addClass(Object.keys(button.classes).map(function(key) { return button.classes[key]; }));
2703        }
2704        if (button['class']) {
2705          attributes.addClass(button['class']);
2706        }
2707        if (button.primary) {
2708          attributes.addClass('btn-primary');
2709        }
2710
2711        return Drupal.theme('button', attributes);
2712      }
2713
2714    });
2715
2716  });
2717
2718
2719})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes, window.drupalSettings);
2720;
2721/**
2722* DO NOT EDIT THIS FILE.
2723* See the following change record for more information,
2724* https://www.drupal.org/node/2815083
2725* @preserve
2726**/
2727
2728(function ($, Drupal, drupalSettings) {
2729  drupalSettings.dialog = {
2730    autoOpen: true,
2731    dialogClass: '',
2732
2733    buttonClass: 'button',
2734    buttonPrimaryClass: 'button--primary',
2735    close: function close(event) {
2736      Drupal.dialog(event.target).close();
2737      Drupal.detachBehaviors(event.target, null, 'unload');
2738    }
2739  };
2740
2741  Drupal.dialog = function (element, options) {
2742    var undef = void 0;
2743    var $element = $(element);
2744    var dialog = {
2745      open: false,
2746      returnValue: undef
2747    };
2748
2749    function openDialog(settings) {
2750      settings = $.extend({}, drupalSettings.dialog, options, settings);
2751
2752      $(window).trigger('dialog:beforecreate', [dialog, $element, settings]);
2753      $element.dialog(settings);
2754      dialog.open = true;
2755      $(window).trigger('dialog:aftercreate', [dialog, $element, settings]);
2756    }
2757
2758    function closeDialog(value) {
2759      $(window).trigger('dialog:beforeclose', [dialog, $element]);
2760      $element.dialog('close');
2761      dialog.returnValue = value;
2762      dialog.open = false;
2763      $(window).trigger('dialog:afterclose', [dialog, $element]);
2764    }
2765
2766    dialog.show = function () {
2767      openDialog({ modal: false });
2768    };
2769    dialog.showModal = function () {
2770      openDialog({ modal: true });
2771    };
2772    dialog.close = closeDialog;
2773
2774    return dialog;
2775  };
2776})(jQuery, Drupal, drupalSettings);;
2777/**
2778* DO NOT EDIT THIS FILE.
2779* See the following change record for more information,
2780* https://www.drupal.org/node/2815083
2781* @preserve
2782**/
2783
2784(function ($, Drupal, drupalSettings, debounce, displace) {
2785  drupalSettings.dialog = $.extend({ autoResize: true, maxHeight: '95%' }, drupalSettings.dialog);
2786
2787  function resetPosition(options) {
2788    var offsets = displace.offsets;
2789    var left = offsets.left - offsets.right;
2790    var top = offsets.top - offsets.bottom;
2791
2792    var leftString = (left > 0 ? '+' : '-') + Math.abs(Math.round(left / 2)) + 'px';
2793    var topString = (top > 0 ? '+' : '-') + Math.abs(Math.round(top / 2)) + 'px';
2794    options.position = {
2795      my: 'center' + (left !== 0 ? leftString : '') + ' center' + (top !== 0 ? topString : ''),
2796      of: window
2797    };
2798    return options;
2799  }
2800
2801  function resetSize(event) {
2802    var positionOptions = ['width', 'height', 'minWidth', 'minHeight', 'maxHeight', 'maxWidth', 'position'];
2803    var adjustedOptions = {};
2804    var windowHeight = $(window).height();
2805    var option = void 0;
2806    var optionValue = void 0;
2807    var adjustedValue = void 0;
2808    for (var n = 0; n < positionOptions.length; n++) {
2809      option = positionOptions[n];
2810      optionValue = event.data.settings[option];
2811      if (optionValue) {
2812        if (typeof optionValue === 'string' && /%$/.test(optionValue) && /height/i.test(option)) {
2813          windowHeight -= displace.offsets.top + displace.offsets.bottom;
2814          adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10);
2815
2816          if (option === 'height' && event.data.$element.parent().outerHeight() < adjustedValue) {
2817            adjustedValue = 'auto';
2818          }
2819          adjustedOptions[option] = adjustedValue;
2820        }
2821      }
2822    }
2823
2824    if (!event.data.settings.modal) {
2825      adjustedOptions = resetPosition(adjustedOptions);
2826    }
2827    event.data.$element.dialog('option', adjustedOptions).trigger('dialogContentResize');
2828  }
2829
2830  $(window).on({
2831    'dialog:aftercreate': function dialogAftercreate(event, dialog, $element, settings) {
2832      var autoResize = debounce(resetSize, 20);
2833      var eventData = { settings: settings, $element: $element };
2834      if (settings.autoResize === true || settings.autoResize === 'true') {
2835        $element.dialog('option', { resizable: false, draggable: false }).dialog('widget').css('position', 'fixed');
2836        $(window).on('resize.dialogResize scroll.dialogResize', eventData, autoResize).trigger('resize.dialogResize');
2837        $(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize);
2838      }
2839    },
2840    'dialog:beforeclose': function dialogBeforeclose(event, dialog, $element) {
2841      $(window).off('.dialogResize');
2842      $(document).off('.dialogResize');
2843    }
2844  });
2845})(jQuery, Drupal, drupalSettings, Drupal.debounce, Drupal.displace);;
2846/**
2847* DO NOT EDIT THIS FILE.
2848* See the following change record for more information,
2849* https://www.drupal.org/node/2815083
2850* @preserve
2851**/
2852
2853(function ($, Drupal) {
2854  Drupal.behaviors.dialog = {
2855    attach: function attach(context, settings) {
2856      var $context = $(context);
2857
2858      if (!$('#drupal-modal').length) {
2859        $('<div id="drupal-modal" class="ui-front"/>').hide().appendTo('body');
2860      }
2861
2862      var $dialog = $context.closest('.ui-dialog-content');
2863      if ($dialog.length) {
2864        if ($dialog.dialog('option', 'drupalAutoButtons')) {
2865          $dialog.trigger('dialogButtonsChange');
2866        }
2867
2868        $dialog.dialog('widget').trigger('focus');
2869      }
2870
2871      var originalClose = settings.dialog.close;
2872
2873      settings.dialog.close = function (event) {
2874        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2875          args[_key - 1] = arguments[_key];
2876        }
2877
2878        originalClose.apply(settings.dialog, [event].concat(args));
2879        $(event.target).remove();
2880      };
2881    },
2882    prepareDialogButtons: function prepareDialogButtons($dialog) {
2883      var buttons = [];
2884      var $buttons = $dialog.find('.form-actions input[type=submit], .form-actions a.button');
2885      $buttons.each(function () {
2886        var $originalButton = $(this).css({
2887          display: 'block',
2888          width: 0,
2889          height: 0,
2890          padding: 0,
2891          border: 0,
2892          overflow: 'hidden'
2893        });
2894        buttons.push({
2895          text: $originalButton.html() || $originalButton.attr('value'),
2896          class: $originalButton.attr('class'),
2897          click: function click(e) {
2898            if ($originalButton.is('a')) {
2899              $originalButton[0].click();
2900            } else {
2901              $originalButton.trigger('mousedown').trigger('mouseup').trigger('click');
2902              e.preventDefault();
2903            }
2904          }
2905        });
2906      });
2907      return buttons;
2908    }
2909  };
2910
2911  Drupal.AjaxCommands.prototype.openDialog = function (ajax, response, status) {
2912    if (!response.selector) {
2913      return false;
2914    }
2915    var $dialog = $(response.selector);
2916    if (!$dialog.length) {
2917      $dialog = $('<div id="' + response.selector.replace(/^#/, '') + '" class="ui-front"/>').appendTo('body');
2918    }
2919
2920    if (!ajax.wrapper) {
2921      ajax.wrapper = $dialog.attr('id');
2922    }
2923
2924    response.command = 'insert';
2925    response.method = 'html';
2926    ajax.commands.insert(ajax, response, status);
2927
2928    if (!response.dialogOptions.buttons) {
2929      response.dialogOptions.drupalAutoButtons = true;
2930      response.dialogOptions.buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog);
2931    }
2932
2933    $dialog.on('dialogButtonsChange', function () {
2934      var buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog);
2935      $dialog.dialog('option', 'buttons', buttons);
2936    });
2937
2938    response.dialogOptions = response.dialogOptions || {};
2939    var dialog = Drupal.dialog($dialog.get(0), response.dialogOptions);
2940    if (response.dialogOptions.modal) {
2941      dialog.showModal();
2942    } else {
2943      dialog.show();
2944    }
2945
2946    $dialog.parent().find('.ui-dialog-buttonset').addClass('form-actions');
2947  };
2948
2949  Drupal.AjaxCommands.prototype.closeDialog = function (ajax, response, status) {
2950    var $dialog = $(response.selector);
2951    if ($dialog.length) {
2952      Drupal.dialog($dialog.get(0)).close();
2953      if (!response.persist) {
2954        $dialog.remove();
2955      }
2956    }
2957
2958    $dialog.off('dialogButtonsChange');
2959  };
2960
2961  Drupal.AjaxCommands.prototype.setDialogOption = function (ajax, response, status) {
2962    var $dialog = $(response.selector);
2963    if ($dialog.length) {
2964      $dialog.dialog('option', response.optionName, response.optionValue);
2965    }
2966  };
2967
2968  $(window).on('dialog:aftercreate', function (e, dialog, $element, settings) {
2969    $element.on('click.dialog', '.dialog-cancel', function (e) {
2970      dialog.close('cancel');
2971      e.preventDefault();
2972      e.stopPropagation();
2973    });
2974  });
2975
2976  $(window).on('dialog:beforeclose', function (e, dialog, $element) {
2977    $element.off('.dialog');
2978  });
2979})(jQuery, Drupal);;
2980/**
2981 * @file
2982 * dialog.ajax.js
2983 */
2984(function ($, Drupal, Bootstrap) {
2985
2986  Drupal.behaviors.dialog.ajaxCurrentButton = null;
2987  Drupal.behaviors.dialog.ajaxOriginalButton = null;
2988
2989  /**
2990   * Synchronizes a faux button with its original counterpart.
2991   *
2992   * @param {Boolean} [reset = false]
2993   *   Whether to reset the current and original buttons after synchronizing.
2994   */
2995  Drupal.behaviors.dialog.ajaxUpdateButtons = function (reset) {
2996    if (this.ajaxCurrentButton && this.ajaxOriginalButton) {
2997      this.ajaxCurrentButton.html(this.ajaxOriginalButton.html());
2998      this.ajaxCurrentButton.prop('disabled', this.ajaxOriginalButton.prop('disabled'));
2999    }
3000    if (reset) {
3001      this.ajaxCurrentButton = null;
3002      this.ajaxOriginalButton = null;
3003    }
3004  };
3005
3006  $(document)
3007    .ajaxSend(function () {
3008      Drupal.behaviors.dialog.ajaxUpdateButtons();
3009    })
3010    .ajaxComplete(function () {
3011      Drupal.behaviors.dialog.ajaxUpdateButtons(true);
3012    })
3013  ;
3014
3015  /**
3016   * {@inheritdoc}
3017   */
3018  Drupal.behaviors.dialog.prepareDialogButtons = function prepareDialogButtons($dialog) {
3019    var _this = this;
3020    var buttons = [];
3021    var $buttons = $dialog.find('.form-actions').find('button, input[type=submit], .form-actions a.button');
3022    $buttons.each(function () {
3023      var $originalButton = $(this)
3024        // Prevent original button from being tabbed to.
3025        .attr('tabindex', -1)
3026        // Visually make the original button invisible, but don't actually hide
3027        // or remove it from the DOM because the click needs to be proxied from
3028        // the faux button created in the footer to its original counterpart.
3029        .css({
3030          display: 'block',
3031          width: 0,
3032          height: 0,
3033          padding: 0,
3034          border: 0,
3035          overflow: 'hidden'
3036        });
3037
3038      buttons.push({
3039        // Strip all HTML from the actual text value. This value is escaped.
3040        // It actual HTML value will be synced with the original button's HTML
3041        // below in the "create" method.
3042        text: Bootstrap.stripHtml($originalButton),
3043        class: $originalButton.attr('class').replace('use-ajax-submit', ''),
3044        click: function click(e) {
3045          e.preventDefault();
3046          e.stopPropagation();
3047          _this.ajaxCurrentButton = $(e.target);
3048          _this.ajaxOriginalButton = $originalButton;
3049          // Some core JS binds dialog buttons to the mousedown or mouseup
3050          // events instead of click; all three events must be simulated here.
3051          // @see https://www.drupal.org/project/bootstrap/issues/3016254
3052          Bootstrap.simulate($originalButton, ['mousedown', 'mouseup', 'click']);
3053        },
3054        create: function () {
3055          _this.ajaxCurrentButton = $(this);
3056          _this.ajaxOriginalButton = $originalButton;
3057          _this.ajaxUpdateButtons(true);
3058        }
3059      });
3060    });
3061
3062    return buttons;
3063  };
3064
3065})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
3066;
3067/*! jQuery UI - v1.12.1 - 2017-03-31
3068* http://jqueryui.com
3069* Copyright jQuery Foundation and other contributors; Licensed  */
3070!function(a){"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var a,b=this._super()||{};return this.isInput=this.element.is("input"),a=this.element[0].disabled,null!=a&&(b.disabled=a),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(b.label=this.originalLabel),b},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(b){b.keyCode===a.ui.keyCode.SPACE&&(b.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(b,c){var d="iconPosition"!==b,e=d?this.options.iconPosition:c,f="top"===e||"bottom"===e;this.icon?d&&this._removeClass(this.icon,null,this.options.icon):(this.icon=a("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),d&&this._addClass(this.icon,null,c),this._attachIcon(e),f?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconS
vendor: 15,388 bytes, lines 3070-3074
3070pace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=a("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(e))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(a){this.icon[/^(?:end|bottom)/.test(a)?"before":"after"](this.iconSpace)},_attachIcon:function(a){this.element[/^(?:end|bottom)/.test(a)?"append":"prepend"](this.icon)},_setOptions:function(a){var b=void 0===a.showLabel?this.options.showLabel:a.showLabel,c=void 0===a.icon?this.options.icon:a.icon;b||c||(a.showLabel=!0),this._super(a)},_setOption:function(a,b){"icon"===a&&(b?this._updateIcon(a,b):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===a&&this._updateIcon(a,b),"showLabel"===a&&(this._toggleClass("ui-button-icon-only",null,!b),this._updateTooltip()),"label"===a&&(this.isInput?this.element.val(b):(this.element.html(b),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(a,b),"disabled"===a&&(this._toggleClass(null,"ui-state-disabled",b),this.element[0].disabled=b,b&&this.element.blur())},refresh:function(){var a=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");a!==this.options.disabled&&this._setOptions({disabled:a}),this._updateTooltip()}}),a.uiBackCompat!==!1&&(a.widget("ui.button",a.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(a,b){return"text"===a?void this._super("showLabel",b):("showLabel"===a&&(this.options.text=b),"icon"===a&&(this.options.icons.primary=b),"icons"===a&&(b.primary?(this._super("icon",b.primary),this._super("iconPosition","beginning")):b.secondary&&(this._super("icon",b.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),a.fn.button=function(b){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?b.apply(this,arguments):(a.ui.checkboxradio||a.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(a.fn.button),a.fn.buttonset=function(){return a.ui.controlgroup||a.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),a.ui.button});;
3071/*! jQuery UI - v1.12.1 - 2017-03-31
3072* http://jqueryui.com
3073* Copyright jQuery Foundation and other contributors; Licensed  */
3074!function(a){"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../safe-active-element","../safe-blur","../tabbable","../unique-id","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||a.ui.safeBlur(a.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,c){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+a(this).css("z-index")}).get(),f=Math.max.apply(null,e);return f>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",f+1),d=!0),d&&!c&&this._trigger("focus",b),d},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(a.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")),a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).trigger("focus")},_keepFocus:function(b){function c(){var b=a.ui.safeActiveElement(this.document[0]),c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB&&!b.isDefaultPrevented()){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(this._delay(function(){e.trigger("focus")}),b.preventDefault()):(this._delay(function(){d.trigger("focus")}),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=a("<button type='button'></button>").button({label:a("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(b,"ui-dialog-title"),this._title(b),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title?a.text(this.options.title):a.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,f={icon:d.icon,iconPosition:d.iconPosition,showLabel:d.showLabel,icons:d.icons,text:d.text},delete d.click,delete d.icon,delete d.iconPosition,delete d.showLabel,delete d.icons,"boolean"==typeof d.text&&delete d.text,a("<button></button>",d).button(f).appendTo(b.uiButtonSet).on("click",function(){e.apply(b.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){c._addClass(a(this),"ui-dialog-dragging"),c._blockFrames(),c._trigger("dragStart",d,b(e))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(e,f){var g=f.offset.left-c.document.scrollLeft(),h=f.offset.top-c.document.scrollTop();d.position={my:"left top",at:"left"+(g>=0?"+":"")+g+" top"+(h>=0?"+":"")+h,of:c.window},c._removeClass(a(this),"ui-dialog-dragging"),c._unblockFrames(),c._trigger("dragStop",e,b(f))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),g="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:g,start:function(d,e){c._addClass(a(this),"ui-dialog-resizing"),c._blockFrames(),c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(e,f){var g=c.uiDialog.offset(),h=g.left-c.document.scrollLeft(),i=g.top-c.document.scrollTop();d.height=c.uiDialog.height(),d.width=c.uiDialog.width(),d.position={my:"left top",at:"left"+(h>=0?"+":"")+h+" top"+(i>=0?"+":"")+i,of:c.window},c._removeClass(a(this),"ui-dialog-resizing"),c._unblockFrames(),c._trigger("resizeStop",e,b(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(b){this._makeFocusTarget(),this._focusedElement=a(b.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var b=this._trackingInstances(),c=a.inArray(this,b);c!==-1&&b.splice(c,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");return a||(a=[],this.document.data("ui-dialog-instances",a)),a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var c=this,d=!1,e={};a.each(b,function(a,b){c._setOption(a,b),a in c.sizeRelatedOptions&&(d=!0),a in c.resizableRelatedOptions&&(e[a]=b)}),d&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(b,c){var d,e,f=this.uiDialog;"disabled"!==b&&(this._super(b,c),"appendTo"===b&&this.uiDialog.appendTo(this._appendTo()),"buttons"===b&&this._createButtons(),"closeText"===b&&this.uiDialogTitlebarClose.button({label:a("<a>").text(""+this.options.closeText).html()}),"draggable"===b&&(d=f.is(":data(ui-draggable)"),d&&!c&&f.draggable("destroy"),!d&&c&&this._makeDraggable()),"position"===b&&this._position(),"resizable"===b&&(e=f.is(":data(ui-resizable)"),e&&!c&&f.resizable("destroy"),e&&"string"==typeof c&&f.resizable("option","handles",c),e||c===!1||this._makeResizable()),"title"===b&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=!0;this._delay(function(){b=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(a){b||this._allowInteraction(a)||
3074(a.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=a("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(a,b){"dialogClass"===a&&this.uiDialog.removeClass(this.options.dialogClass).addClass(b),this._superApply(arguments)}}),a.ui.dialog});;
3075/**
3076 * @file
3077 * JavaScript behaviors to fix jQuery UI dialogs.
3078 */
3079
3080(function ($, Drupal) {
3081
3082  'use strict';
3083
3084  /**
3085   * Ensure that ckeditor has focus when displayed inside of jquery-ui dialog widget
3086   *
3087   * @see http://stackoverflow.com/questions/20533487/how-to-ensure-that-ckeditor-has-focus-when-displayed-inside-of-jquery-ui-dialog
3088   */
3089  var _allowInteraction = $.ui.dialog.prototype._allowInteraction;
3090  $.ui.dialog.prototype._allowInteraction = function (event) {
3091    if ($(event.target).closest('.cke_dialog').length) {
3092      return true;
3093    }
3094    return _allowInteraction.apply(this, arguments);
3095  };
3096
3097  /**
3098   * Attaches webform dialog behaviors.
3099   *
3100   * @type {Drupal~behavior}
3101   *
3102   * @prop {Drupal~behaviorAttach} attach
3103   *   Attaches event listeners for webform dialogs.
3104   */
3105  Drupal.behaviors.webformDialogEvents = {
3106    attach: function () {
3107      $(window).once('webform-dialog').on({
3108        'dialog:aftercreate': function (event, dialog, $element, settings) {
3109          setTimeout(function () {
3110            var hasFocus = $element.find('[autofocus]:tabbable');
3111            if (!hasFocus.length) {
3112              // Move focus to first input which is not a button.
3113              hasFocus = $element.find(':input:tabbable:not(:button)');
3114            }
3115            if (!hasFocus.length) {
3116              // Move focus to close dialog button.
3117              hasFocus = $element.parent().find('.ui-dialog-titlebar-close');
3118            }
3119            hasFocus.eq(0).focus();
3120          });
3121        }
3122      });
3123    }
3124  };
3125
3126})(jQuery, Drupal);
3127;
3128/**
3129 * @file
3130 * JavaScript behaviors for webform dialogs.
3131 */
3132
3133(function ($, Drupal, drupalSettings) {
3134
3135  'use strict';
3136
3137  // @see http://api.jqueryui.com/dialog/
3138  Drupal.webform = Drupal.webform || {};
3139  Drupal.webform.dialog = Drupal.webform.dialog || {};
3140  Drupal.webform.dialog.options = Drupal.webform.dialog.options || {};
3141
3142  /**
3143   * Open webform dialog using preset options.
3144   *
3145   * @type {Drupal~behavior}
3146   */
3147  Drupal.behaviors.webformDialog = {
3148    attach: function (context) {
3149      $('a.webform-dialog', context).once('webform-dialog').each(function () {
3150        var $a = $(this);
3151
3152        // Get default options.
3153        var options = $.extend({}, Drupal.webform.dialog.options);
3154
3155        // Get preset dialog options.
3156        if ($a.attr('class').match(/webform-dialog-([a-z0-9_]+)/)) {
3157          var dialogOptionsName = RegExp.$1;
3158          if (drupalSettings.webform.dialog.options[dialogOptionsName]) {
3159            options = drupalSettings.webform.dialog.options[dialogOptionsName];
3160
3161            // Unset title.
3162            delete options.title;
3163          }
3164        }
3165
3166        // Get custom dialog options.
3167        if ($(this).data('dialog-options')) {
3168          $.extend(options, $(this).data('dialog-options'));
3169        }
3170
3171        var href = $a.attr('href');
3172
3173        // Replace ENTITY_TYPE and ENTITY_ID placeholders and update the href.
3174        // @see webform_page_attachments()
3175        if (href.indexOf('?source_entity_type=ENTITY_TYPE&source_entity_id=ENTITY_ID') !== -1) {
3176          if (drupalSettings.webform.dialog.entity_type && drupalSettings.webform.dialog.entity_id) {
3177            href = href.replace('ENTITY_TYPE', encodeURIComponent(drupalSettings.webform.dialog.entity_type));
3178            href = href.replace('ENTITY_ID', encodeURIComponent(drupalSettings.webform.dialog.entity_id));
3179          }
3180          else {
3181            href = href.replace('?source_entity_type=ENTITY_TYPE&source_entity_id=ENTITY_ID', '');
3182          }
3183          $a.attr('href', href);
3184        }
3185
3186        // Append _webform_dialog=1 to href to trigger Ajax support.
3187        // @see \Drupal\webform\WebformSubmissionForm::setEntity
3188        href += (href.indexOf('?') === -1 ? '?' : '&') + '_webform_dialog=1';
3189
3190        var element_settings = {};
3191        element_settings.progress = {type: 'fullscreen'};
3192        element_settings.url = href;
3193        element_settings.event = 'click';
3194        element_settings.dialogType = $a.data('dialog-type') || 'modal';
3195        element_settings.dialog = options;
3196        element_settings.element = this;
3197        Drupal.ajax(element_settings);
3198      });
3199    }
3200  };
3201
3202})(jQuery, Drupal, drupalSettings);
3203;
3204/**
3205 * @file
3206 */
3207
3208(function ($, Drupal, drupalSettings) {
3209
3210  'use strict';
3211
3212  Drupal.extlink = Drupal.extlink || {};
3213
3214  Drupal.extlink.attach = function (context, drupalSettings) {
3215    if (!drupalSettings.data.hasOwnProperty('extlink')) {
3216      return;
3217    }
3218
3219    // Strip the host name down, removing ports, subdomains, or www.
3220    var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
3221    var host = window.location.host.replace(pattern, '$2$3');
3222    var subdomain = window.location.host.replace(host, '');
3223
3224    // Determine what subdomains are considered internal.
3225    var subdomains;
3226    if (drupalSettings.data.extlink.extSubdomains) {
3227      subdomains = '([^/]*\\.)?';
3228    }
3229    else if (subdomain === 'www.' || subdomain === '') {
3230      subdomains = '(www\\.)?';
3231    }
3232    else {
3233      subdomains = subdomain.replace('.', '\\.');
3234    }
3235
3236    // Build regular expressions that define an internal link.
3237    var internal_link = new RegExp('^https?://' + subdomains + host, 'i');
3238
3239    // Extra internal link matching.
3240    var extInclude = false;
3241    if (drupalSettings.data.extlink.extInclude) {
3242      extInclude = new RegExp(drupalSettings.data.extlink.extInclude.replace(/\\/, '\\'), 'i');
3243    }
3244
3245    // Extra external link matching.
3246    var extExclude = false;
3247    if (drupalSettings.data.extlink.extExclude) {
3248      extExclude = new RegExp(drupalSettings.data.extlink.extExclude.replace(/\\/, '\\'), 'i');
3249    }
3250
3251    // Extra external link CSS selector exclusion.
3252    var extCssExclude = false;
3253    if (drupalSettings.data.extlink.extCssExclude) {
3254      extCssExclude = drupalSettings.data.extlink.extCssExclude;
3255    }
3256
3257    // Extra external link CSS selector explicit.
3258    var extCssExplicit = false;
3259    if (drupalSettings.data.extlink.extCssExplicit) {
3260      extCssExplicit = drupalSettings.data.extlink.extCssExplicit;
3261    }
3262
3263    // Find all links which are NOT internal and begin with http as opposed
3264    // to ftp://, javascript:, etc. other kinds of links.
3265    // When operating on the 'this' variable, the host has been appended to
3266    // all links by the browser, even local ones.
3267    // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
3268    // available in jQuery 1.0 (Drupal 5 default).
3269    var external_links = [];
3270    var mailto_links = [];
3271    $('a:not(.' + drupalSettings.data.extlink.extClass + ', .' + drupalSettings.data.extlink.mailtoClass + '), area:not(.' + drupalSettings.data.extlink.extClass + ', .' + drupalSettings.data.extlink.mailtoClass + ')', context).each(function (el) {
3272      try {
3273        var url = '';
3274        if (typeof this.href == 'string') {
3275          url = this.href.toLowerCase();
3276        }
3277        // Handle SVG links (xlink:href).
3278        else if (typeof this.href == 'object') {
3279          url = this.href.baseVal;
3280        }
3281        if (url.indexOf('http') === 0
3282          && ((!internal_link.test(url) && !(extExclude && extExclude.test(url))) || (extInclude && extInclude.test(url)))
3283          && !(extCssExclude && $(this).is(extCssExclude))
3284          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
3285          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
3286          external_links.push(this);
3287        }
3288        // Do not include area tags with begin with mailto: (this prohibits
3289        // icons from being added to image-maps).
3290        else if (this.tagName !== 'AREA'
3291          && url.indexOf('mailto:') === 0
3292          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
3293          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
3294          mailto_links.push(this);
3295        }
3296      }
3297      // IE7 throws errors often when dealing with irregular links, such as:
3298      // <a href="node/10"></a> Empty tags.
3299      // <a href="http://user:[email protected]">example</a> User:pass syntax.
3300      catch (error) {
3301        return false;
3302      }
3303    });
3304
3305    if (drupalSettings.data.extlink.extClass !== '0' && drupalSettings.data.extlink.extClass !== '') {
3306      Drupal.extlink.applyClassAndSpan(external_links, drupalSettings.data.extlink.extClass);
3307    }
3308
3309    if (drupalSettings.data.extlink.mailtoClass !== '0' && drupalSettings.data.extlink.mailtoClass !== '') {
3310      Drupal.extlink.applyClassAndSpan(mailto_links, drupalSettings.data.extlink.mailtoClass);
3311    }
3312
3313    if (drupalSettings.data.extlink.extTarget) {
3314      // Apply the target attribute to all links.
3315      $(external_links).filter(function () {
3316        // Filter out links with target set if option specified.
3317        return !(drupalSettings.data.extlink.extTargetNoOverride && $(this).is('a[target]'));
3318      }).attr({ target: '_blank' });
3319
3320      // Add noopener and noreferrer rel attributes to combat phishing.
3321      $(external_links).attr('rel', function (i, val) {
3322        // If no rel attribute is present, create one with the values noopener and noreferrer.
3323        if (val === null || typeof val === 'undefined') {
3324          return 'noopener noreferrer';
3325        }
3326        // Check to see if rel contains noopener or noreferrer. Add what doesn't exist.
3327        if (val.indexOf('noopener') > -1 || val.indexOf('noreferrer') > -1) {
3328          if (val.indexOf('noopener') === -1) {
3329            return val + ' noopener';
3330          }
3331          if (val.indexOf('noreferrer') === -1) {
3332            return val + ' noreferrer';
3333          }
3334          // Both noopener and noreferrer exist. Nothing needs to be added.
3335          else {
3336            return val;
3337          }
3338        }
3339        // Else, append noopener and noreferrer to val.
3340        else {
3341          return val + ' noopener noreferrer';
3342        }
3343      });
3344    }
3345
3346    if (drupalSettings.data.extlink.extNofollow) {
3347      $(external_links).attr('rel', function (i, val) {
3348        // when the link does not have a rel attribute set it to 'nofollow'.
3349        if (val === null || typeof val === 'undefined') {
3350          return 'nofollow';
3351        }
3352        var target = 'nofollow';
3353        // Change the target, if not overriding follow.
3354        if (drupalSettings.data.extlink.extFollowNoOverride) {
3355          target = 'follow';
3356        }
3357        if (val.indexOf(target) === -1) {
3358          return val + ' nofollow';
3359        }
3360        return val;
3361      });
3362    }
3363
3364    Drupal.extlink = Drupal.extlink || {};
3365
3366    // Set up default click function for the external links popup. This should be
3367    // overridden by modules wanting to alter the popup.
3368    Drupal.extlink.popupClickHandler = Drupal.extlink.popupClickHandler || function () {
3369      if (drupalSettings.data.extlink.extAlert) {
3370        return confirm(drupalSettings.data.extlink.extAlertText);
3371      }
3372    };
3373
3374    $(external_links).click(function (e) {
3375      return Drupal.extlink.popupClickHandler(e, this);
3376    });
3377  };
3378
3379  /**
3380   * Apply a class and a trailing <span> to all links not containing images.
3381   *
3382   * @param {object[]} links
3383   *   An array of DOM elements representing the links.
3384   * @param {string} class_name
3385   *   The class to apply to the links.
3386   */
3387  Drupal.extlink.applyClassAndSpan = function (links, class_name) {
3388    var $links_to_process;
3389    if (drupalSettings.data.extlink.extImgClass) {
3390      $links_to_process = $(links);
3391    }
3392    else {
3393      var links_with_images = $(links).find('img').parents('a');
3394      $links_to_process = $(links).not(links_with_images);
3395    }
3396    if (class_name !== '0') {
3397      $links_to_process.addClass(class_name);
3398    }
3399    var i;
3400    var length = $links_to_process.length;
3401    for (i = 0; i < length; i++) {
3402      var $link = $($links_to_process[i]);
3403      if (class_name === drupalSettings.data.extlink.mailtoClass) {
3404        $link.append('<span class="' + class_name + '" aria-label="' + drupalSettings.data.extlink.mailtoLabel + '"></span>');
3405      }
3406      else {
3407        $link.append('<span class="' + class_name + '" aria-label="' + drupalSettings.data.extlink.extLabel + '"></span>');
3408      }
3409    }
3410  };
3411
3412  Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
3413  Drupal.behaviors.extlink.attach = function (context, drupalSettings) {
3414    // Backwards compatibility, for the benefit of modules overriding extlink
3415    // functionality by defining an "extlinkAttach" global function.
3416    if (typeof extlinkAttach === 'function') {
3417      extlinkAttach(context);
3418    }
3419    else {
3420      Drupal.extlink.attach(context, drupalSettings);
3421    }
3422  };
3423
3424})(jQuery, Drupal, drupalSettings);
3425;
3426/**
3427* DO NOT EDIT THIS FILE.
3428* See the following change record for more information,
3429* https://www.drupal.org/node/2815083
3430* @preserve
3431**/
3432
3433(function ($, Drupal) {
3434  var states = {
3435    postponed: []
3436  };
3437
3438  Drupal.states = states;
3439
3440  function invert(a, invertState) {
3441    return invertState && typeof a !== 'undefined' ? !a : a;
3442  }
3443
3444  function _compare2(a, b) {
3445    if (a === b) {
3446      return typeof a === 'undefined' ? a : true;
3447    }
3448
3449    return typeof a === 'undefined' || typeof b === 'undefined';
3450  }
3451
3452  function ternary(a, b) {
3453    if (typeof a === 'undefined') {
3454      return b;
3455    }
3456    if (typeof b === 'undefined') {
3457      return a;
3458    }
3459
3460    return a && b;
3461  }
3462
3463  Drupal.behaviors.states = {
3464    attach: function attach(context, settings) {
3465      var $states = $(context).find('[data-drupal-states]');
3466      var il = $states.length;
3467
3468      var _loop = function _loop(i) {
3469        var config = JSON.parse($states[i].getAttribute('data-drupal-states'));
3470        Object.keys(config || {}).forEach(function (state) {
3471          new states.Dependent({
3472            element: $($states[i]),
3473            state: states.State.sanitize(state),
3474            constraints: config[state]
3475          });
3476        });
3477      };
3478
3479      for (var i = 0; i < il; i++) {
3480        _loop(i);
3481      }
3482
3483      while (states.postponed.length) {
3484        states.postponed.shift()();
3485      }
3486    }
3487  };
3488
3489  states.Dependent = function (args) {
3490    var _this = this;
3491
3492    $.extend(this, { values: {}, oldValue: null }, args);
3493
3494    this.dependees = this.getDependees();
3495    Object.keys(this.dependees || {}).forEach(function (selector) {
3496      _this.initializeDependee(selector, _this.dependees[selector]);
3497    });
3498  };
3499
3500  states.Dependent.comparisons = {
3501    RegExp: function RegExp(reference, value) {
3502      return reference.test(value);
3503    },
3504    Function: function Function(reference, value) {
3505      return reference(value);
3506    },
3507    Number: function Number(reference, value) {
3508      return typeof value === 'string' ? _compare2(reference.toString(), value) : _compare2(reference, value);
3509    }
3510  };
3511
3512  states.Dependent.prototype = {
3513    initializeDependee: function initializeDependee(selector, dependeeStates) {
3514      var _this2 = this;
3515
3516      this.values[selector] = {};
3517
3518      Object.keys(dependeeStates).forEach(function (i) {
3519        var state = dependeeStates[i];
3520
3521        if ($.inArray(state, dependeeStates) === -1) {
3522          return;
3523        }
3524
3525        state = states.State.sanitize(state);
3526
3527        _this2.values[selector][state.name] = null;
3528
3529        $(selector).on('state:' + state, { selector: selector, state: state }, function (e) {
3530          _this2.update(e.data.selector, e.data.state, e.value);
3531        });
3532
3533        new states.Trigger({ selector: selector, state: state });
3534      });
3535    },
3536    compare: function compare(reference, selector, state) {
3537      var value = this.values[selector][state.name];
3538      if (reference.constructor.name in states.Dependent.comparisons) {
3539        return states.Dependent.comparisons[reference.constructor.name](reference, value);
3540      }
3541
3542      return _compare2(reference, value);
3543    },
3544    update: function update(selector, state, value) {
3545      if (value !== this.values[selector][state.name]) {
3546        this.values[selector][state.name] = value;
3547        this.reevaluate();
3548      }
3549    },
3550    reevaluate: function reevaluate() {
3551      var value = this.verifyConstraints(this.constraints);
3552
3553      if (value !== this.oldValue) {
3554        this.oldValue = value;
3555
3556        value = invert(value, this.state.invert);
3557
3558        this.element.trigger({
3559          type: 'state:' + this.state,
3560          value: value,
3561          trigger: true
3562        });
3563      }
3564    },
3565    verifyConstraints: function verifyConstraints(constraints, selector) {
3566      var result = void 0;
3567      if ($.isArray(constraints)) {
3568        var hasXor = $.inArray('xor', constraints) === -1;
3569        var len = constraints.length;
3570        for (var i = 0; i < len; i++) {
3571          if (constraints[i] !== 'xor') {
3572            var constraint = this.checkConstraints(constraints[i], selector, i);
3573
3574            if (constraint && (hasXor || result)) {
3575              return hasXor;
3576            }
3577            result = result || constraint;
3578          }
3579        }
3580      } else if ($.isPlainObject(constraints)) {
3581          for (var n in constraints) {
3582            if (constraints.hasOwnProperty(n)) {
3583              result = ternary(result, this.checkConstraints(constraints[n], selector, n));
3584
3585              if (result === false) {
3586                return false;
3587              }
3588            }
3589          }
3590        }
3591      return result;
3592    },
3593    checkConstraints: function checkConstraints(value, selector, state) {
3594      if (typeof state !== 'string' || /[0-9]/.test(state[0])) {
3595        state = null;
3596      } else if (typeof selector === 'undefined') {
3597        selector = state;
3598        state = null;
3599      }
3600
3601      if (state !== null) {
3602        state = states.State.sanitize(state);
3603        return invert(this.compare(value, selector, state), state.invert);
3604      }
3605
3606      return this.verifyConstraints(value, selector);
3607    },
3608    getDependees: function getDependees() {
3609      var cache = {};
3610
3611      var _compare = this.compare;
3612      this.compare = function (reference, selector, state) {
3613        (cache[selector] || (cache[selector] = [])).push(state.name);
3614      };
3615
3616      this.verifyConstraints(this.constraints);
3617
3618      this.compare = _compare;
3619
3620      return cache;
3621    }
3622  };
3623
3624  states.Trigger = function (args) {
3625    $.extend(this, args);
3626
3627    if (this.state in states.Trigger.states) {
3628      this.element = $(this.selector);
3629
3630      if (!this.element.data('trigger:' + this.state)) {
3631        this.initialize();
3632      }
3633    }
3634  };
3635
3636  states.Trigger.prototype = {
3637    initialize: function initialize() {
3638      var _this3 = this;
3639
3640      var trigger = states.Trigger.states[this.state];
3641
3642      if (typeof trigger === 'function') {
3643        trigger.call(window, this.element);
3644      } else {
3645        Object.keys(trigger || {}
3645).forEach(function (event) {
3646          _this3.defaultTrigger(event, trigger[event]);
3647        });
3648      }
3649
3650      this.element.data('trigger:' + this.state, true);
3651    },
3652    defaultTrigger: function defaultTrigger(event, valueFn) {
3653      var oldValue = valueFn.call(this.element);
3654
3655      this.element.on(event, $.proxy(function (e) {
3656        var value = valueFn.call(this.element, e);
3657
3658        if (oldValue !== value) {
3659          this.element.trigger({
3660            type: 'state:' + this.state,
3661            value: value,
3662            oldValue: oldValue
3663          });
3664          oldValue = value;
3665        }
3666      }, this));
3667
3668      states.postponed.push($.proxy(function () {
3669        this.element.trigger({
3670          type: 'state:' + this.state,
3671          value: oldValue,
3672          oldValue: null
3673        });
3674      }, this));
3675    }
3676  };
3677
3678  states.Trigger.states = {
3679    empty: {
3680      keyup: function keyup() {
3681        return this.val() === '';
3682      }
3683    },
3684
3685    checked: {
3686      change: function change() {
3687        var checked = false;
3688        this.each(function () {
3689          checked = $(this).prop('checked');
3690
3691          return !checked;
3692        });
3693        return checked;
3694      }
3695    },
3696
3697    value: {
3698      keyup: function keyup() {
3699        if (this.length > 1) {
3700          return this.filter(':checked').val() || false;
3701        }
3702        return this.val();
3703      },
3704      change: function change() {
3705        if (this.length > 1) {
3706          return this.filter(':checked').val() || false;
3707        }
3708        return this.val();
3709      }
3710    },
3711
3712    collapsed: {
3713      collapsed: function collapsed(e) {
3714        return typeof e !== 'undefined' && 'value' in e ? e.value : !this.is('[open]');
3715      }
3716    }
3717  };
3718
3719  states.State = function (state) {
3720    this.pristine = state;
3721    this.name = state;
3722
3723    var process = true;
3724    do {
3725      while (this.name.charAt(0) === '!') {
3726        this.name = this.name.substring(1);
3727        this.invert = !this.invert;
3728      }
3729
3730      if (this.name in states.State.aliases) {
3731        this.name = states.State.aliases[this.name];
3732      } else {
3733        process = false;
3734      }
3735    } while (process);
3736  };
3737
3738  states.State.sanitize = function (state) {
3739    if (state instanceof states.State) {
3740      return state;
3741    }
3742
3743    return new states.State(state);
3744  };
3745
3746  states.State.aliases = {
3747    enabled: '!disabled',
3748    invisible: '!visible',
3749    invalid: '!valid',
3750    untouched: '!touched',
3751    optional: '!required',
3752    filled: '!empty',
3753    unchecked: '!checked',
3754    irrelevant: '!relevant',
3755    expanded: '!collapsed',
3756    open: '!collapsed',
3757    closed: 'collapsed',
3758    readwrite: '!readonly'
3759  };
3760
3761  states.State.prototype = {
3762    invert: false,
3763
3764    toString: function toString() {
3765      return this.name;
3766    }
3767  };
3768
3769  var $document = $(document);
3770  $document.on('state:disabled', function (e) {
3771    if (e.trigger) {
3772      $(e.target).prop('disabled', e.value).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value).find('select, input, textarea').prop('disabled', e.value);
3773    }
3774  });
3775
3776  $document.on('state:required', function (e) {
3777    if (e.trigger) {
3778      if (e.value) {
3779        var label = 'label' + (e.target.id ? '[for=' + e.target.id + ']' : '');
3780        var $label = $(e.target).attr({ required: 'required', 'aria-required': 'true' }).closest('.js-form-item, .js-form-wrapper').find(label);
3781
3782        if (!$label.hasClass('js-form-required').length) {
3783          $label.addClass('js-form-required form-required');
3784        }
3785      } else {
3786        $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');
3787      }
3788    }
3789  });
3790
3791  $document.on('state:visible', function (e) {
3792    if (e.trigger) {
3793      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value);
3794    }
3795  });
3796
3797  $document.on('state:checked', function (e) {
3798    if (e.trigger) {
3799      $(e.target).prop('checked', e.value);
3800    }
3801  });
3802
3803  $document.on('state:collapsed', function (e) {
3804    if (e.trigger) {
3805      if ($(e.target).is('[open]') === e.value) {
3806        $(e.target).find('> summary').trigger('click');
3807      }
3808    }
3809  });
3810})(jQuery, Drupal);;
3811/**
3812 * @file
3813 * Extends core/misc/states.js.
3814 */
3815(function($) {
3816
3817  // Unbind core state.js from document first so we can then override below.
3818  $(document).unbind('state:disabled');
3819
3820  /**
3821   * Global state change handlers. These are bound to "document" to cover all
3822   * elements whose state changes. Events sent to elements within the page
3823   * bubble up to these handlers. We use this system so that themes and modules
3824   * can override these state change handlers for particular parts of a page.
3825   */
3826  $(document).bind('state:disabled', function(e) {
3827    // Only act when this change was triggered by a dependency and not by the
3828    // element monitoring itself.
3829    if (e.trigger) {
3830      $(e.target)
3831        .attr('disabled', e.value)
3832        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value)
3833        .find(':input').attr('disabled', e.value);
3834
3835      // Note: WebKit nightlies don't reflect that change correctly.
3836      // See https://bugs.webkit.org/show_bug.cgi?id=23789
3837    }
3838  });
3839
3840})(jQuery);
3841;
3842/**
3843 * @file
3844 * JavaScript behaviors for custom webform #states.
3845 */
3846
3847(function ($, Drupal) {
3848
3849  'use strict';
3850
3851  Drupal.webform = Drupal.webform || {};
3852  Drupal.webform.states = Drupal.webform.states || {};
3853  Drupal.webform.states.slideDown = Drupal.webform.states.slideDown || {};
3854  Drupal.webform.states.slideDown.duration = 'slow';
3855  Drupal.webform.states.slideUp = Drupal.webform.states.slideUp || {};
3856  Drupal.webform.states.slideUp.duration = 'fast';
3857
3858  /**
3859   * Check if an element has a specified data attribute.
3860   *
3861   * @param {string} data
3862   *   The data attribute name.
3863   *
3864   * @return {boolean}
3865   *   TRUE if an element has a specified data attribute.
3866   */
3867  $.fn.hasData = function (data) {
3868    return (typeof this.data(data) !== 'undefined');
3869  };
3870
3871  /**
3872   * Check if element is within the webform or not.
3873   *
3874   * @return {boolean}
3875   *   TRUE if element is within the webform.
3876   */
3877  $.fn.isWebform = function () {
3878    return $(this).closest('form[id^="webform"]').length ? true : false;
3879  };
3880
3881  // The change event is triggered by cut-n-paste and select menus.
3882  // Issue #2445271: #states element empty check not triggered on mouse
3883  // based paste.
3884  // @see https://www.drupal.org/node/2445271
3885  Drupal.states.Trigger.states.empty.change = function change() {
3886    return this.val() === '';
3887  };
3888
3889  // Apply solution included in #1962800 patch.
3890  // Issue #1962800: Form #states not working with literal integers as
3891  // values in IE11.
3892  // @see https://www.drupal.org/project/drupal/issues/1962800
3893  // @see https://www.drupal.org/files/issues/core-states-not-working-with-integers-ie11_1962800_46.patch
3894  //
3895  // This issue causes pattern, less than, and greater than support to break.
3896  // @see https://www.drupal.org/project/webform/issues/2981724
3897  var states = Drupal.states;
3898  Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) {
3899    var value = this.values[selector][state.name];
3900
3901    var name = reference.constructor.name;
3902    if (!name) {
3903      name = $.type(reference);
3904
3905      name = name.charAt(0).toUpperCase() + name.slice(1);
3906    }
3907    if (name in states.Dependent.comparisons) {
3908      return states.Dependent.comparisons[name](reference, value);
3909    }
3910
3911    if (reference.constructor.name in states.Dependent.comparisons) {
3912      return states.Dependent.comparisons[reference.constructor.name](reference, value);
3913    }
3914
3915    return _compare2(reference, value);
3916  };
3917  function _compare2(a, b) {
3918    if (a === b) {
3919      return typeof a === 'undefined' ? a : true;
3920    }
3921
3922    return typeof a === 'undefined' || typeof b === 'undefined';
3923  }
3924
3925  // Adds pattern, less than, and greater than support to #state API.
3926  // @see http://drupalsun.com/julia-evans/2012/03/09/extending-form-api-states-regular-expressions
3927  Drupal.states.Dependent.comparisons.Object = function (reference, value) {
3928    if ('pattern' in reference) {
3929      return (new RegExp(reference['pattern'])).test(value);
3930    }
3931    else if ('!pattern' in reference) {
3932      return !((new RegExp(reference['!pattern'])).test(value));
3933    }
3934    else if ('less' in reference) {
3935      return (value !== '' && parseFloat(reference['less']) > parseFloat(value));
3936    }
3937    else if ('greater' in reference) {
3938      return (value !== '' && parseFloat(reference['greater']) < parseFloat(value));
3939    }
3940    else {
3941      return reference.indexOf(value) !== false;
3942    }
3943  };
3944
3945  var $document = $(document);
3946
3947  $document.on('state:required', function (e) {
3948    if (e.trigger && $(e.target).isWebform()) {
3949      var $target = $(e.target);
3950      // Fix #required file upload.
3951      // @see Issue #2860529: Conditional required File upload field don't work.
3952      if (e.value) {
3953        $target.find('input[type="file"]').attr({'required': 'required', 'aria-required': 'true'});
3954      }
3955      else {
3956        $target.find('input[type="file"]').removeAttr('required aria-required');
3957      }
3958
3959      // Fix required label for checkboxes and radios.
3960      // @see Issue #2938414: Checkboxes don't support #states required
3961      // @see Issue #2731991: Setting required on radios marks all options required.
3962      // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
3963      // Fix #required for fieldsets.
3964      // @see Issue #2977569: Hidden fieldsets that become visible with conditional logic cannot be made required.
3965      if ($target.is('.js-webform-type-radios, .js-webform-type-checkboxes, fieldset')) {
3966        if (e.value) {
3967          $target.find('legend span.fieldset-legend:not(.visually-hidden)').addClass('js-form-required form-required');
3968        }
3969        else {
3970          $target.find('legend span.fieldset-legend:not(.visually-hidden)').removeClass('js-form-required form-required');
3971        }
3972      }
3973
3974      // Fix #required for radios.
3975      // @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted.
3976      if ($target.is('.js-webform-type-radios, .js-form-type-webform-radios-other')) {
3977        if (e.value) {
3978          $target.find('input[type="radio"]').attr({'required': 'required', 'aria-required': 'true'});
3979        }
3980        else {
3981          $target.find('input[type="radio"]').removeAttr('required aria-required');
3982        }
3983      }
3984
3985      // Fix #required for checkboxes.
3986      // @see Issue #2938414: Checkboxes don't support #states required.
3987      // @see checkboxRequiredhandler
3988      if ($target.is('.js-webform-type-checkboxes, .js-form-type-webform-checkboxes-other')) {
3989        var $checkboxes = $target.find('input[type="checkbox"]');
3990        if (e.value) {
3991          // Bind the event handler and add custom HTML5 required validation
3992          // to all checkboxes.
3993          $checkboxes.bind('click', checkboxRequiredhandler);
3994          if (!$checkboxes.is(':checked')) {
3995            $checkboxes.attr({'required': 'required', 'aria-required': 'true'});
3996          }
3997        }
3998        else {
3999          // Remove custom HTML5 required validation from all checkboxes
4000          // and unbind the event handler.
4001          $checkboxes
4002            .removeAttr('required aria-required')
4003            .unbind('click', checkboxRequiredhandler);
4004        }
4005      }
4006
4007      // Issue #2986017: Fieldsets shouldn't have required attribute.
4008      if ($target.is('fieldset')) {
4009        $target.removeAttr('required aria-required');
4010      }
4011    }
4012
4013  });
4014
4015  $document.on('state:readonly', function (e) {
4016    if (e.trigger && $(e.target).isWebform()) {
4017      $(e.target).prop('readonly', e.value).closest('.js-form-item, .js-form-wrapper').toggleClass('webform-readonly', e.value).find('input, textarea').prop('readonly', e.value);
4018    }
4019  });
4020
4021  $document.on('state:visible state:visible-slide', function (e) {
4022    if (e.trigger && $(e.target).isWebform()) {
4023      if (e.value) {
4024        $(':input', e.target).addBack().each(function () {
4025          restoreValueAndRequired(this);
4026          triggerEventHandlers(this);
4027        });
4028      }
4029      else {
4030        // @see https://www.sitepoint.com/jquery-function-clear-form-data/
4031        $(':input', e.target).addBack().each(function () {
4032          backupValueAndRequired(this);
4033          clearValueAndRequired(this);
4034          triggerEventHandlers(this);
4035        });
4036      }
4037    }
4038  });
4039
4040  $document.bind('state:visible-slide', function (e) {
4041    if (e.trigger && $(e.target).isWebform()) {
4042      var effect = e.value ? 'slideDown' : 'slideUp';
4043      var duration = Drupal.webform.states[effect].duration;
4044      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper')[effect](duration);
4045    }
4046  });
4047  Drupal.states.State.aliases['invisible-slide'] = '!visible-slide';
4048
4049  $document.on('state:disabled', function (e) {
4050    if (e.trigger && $(e.target).isWebform()) {
4051      // Make sure disabled property is set before triggering webform:disabled.
4052      // Copied from: core/misc/states.js
4053      $(e.target)
4054        .prop('disabled', e.value)
4055        .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value)
4056        .find('select, input, textarea, button').prop('disabled', e.value);
4057
4058      // Trigger webform:disabled.
4059      $(e.target).trigger('webform:disabled')
4060        .find('select, input, textarea, button').trigger('webform:disabled');
4061    }
4062  });
4063
4064  /**
4065   * Trigger custom HTML5 multiple checkboxes validation.
4066   *
4067   * @see https://stackoverflow.com/a/37825072/145846
4068   */
4069  function checkboxRequiredhandler() {
4070    var $checkboxes = $(this).closest('.js-webform-type-checkboxes, .js-form-type-webform-checkboxes-other').find('input[type="checkbox"]');
4071    if ($checkboxes.is(':checked')) {
4072      $checkboxes.removeAttr('required aria-required');
4073    }
4074    else {
4075      $checkboxes.attr({'required': 'required', 'aria-required': 'true'});
4076    }
4077  }
4078
4079  /**
4080   * Trigger an input's event handlers.
4081   *
4082   * @param {element} input
4083   *   An input.
4084   */
4085  function triggerEventHandlers(input) {
4086    var $input = $(input);
4087    var type = input.type;
4088    var tag = input.tagName.toLowerCase();
4089    // Add 'webform.states' as extra parameter to event handlers.
4090    // @see Drupal.behaviors.webformUnsaved
4091    var extraParameters = ['webform.states'];
4092    if (type === 'checkbox' || type === 'radio') {
4093      $input
4094        .trigger('change', extraParameters)
4095        .trigger('blur', extraParameters);
4096    }
4097    else if (tag === 'select') {
4098      $input
4099        .trigger('change', extraParameters)
4100        .trigger('blur', extraParameters);
4101    }
4102    else if (type !== 'submit' && type !== 'button' && type !== 'file') {
4103      $input
4104        .trigger('input', extraParameters)
4105        .trigger('change', extraParameters)
4106        .trigger('keydown', extraParameters)
4107        .trigger('keyup', extraParameters)
4108        .trigger('blur', extraParameters);
4109    }
4110  }
4111
4112  /**
4113   * Backup an input's current value and required attribute
4114   *
4115   * @param {element} input
4116   *   An input.
4117   */
4118  function backupValueAndRequired(input) {
4119    var $input = $(input);
4120    var type = input.type;
4121    var tag = input.tagName.toLowerCase(); // Normalize case.
4122
4123    // Backup required.
4124    if ($input.prop('required') && !$input.hasData('webform-required')) {
4125      $input.data('webform-required', true);
4126    }
4127
4128    // Backup value.
4129    if (!$input.hasData('webform-value')) {
4130      if (type === 'checkbox' || type === 'radio') {
4131        $input.data('webform-value', $input.prop('checked'));
4132      }
4133      else if (tag === 'select') {
4134        var values = [];
4135        $input.find('option:selected').each(function (i, option) {
4136          values[i] = option.value;
4137        });
4138        $input.data('webform-value', values);
4139      }
4140      else if (type !== 'submit' && type !== 'button') {
4141        $input.data('webform-value', input.value);
4142      }
4143    }
4144  }
4145
4146  /**
4147   * Restore an input's value and required attribute.
4148   *
4149   * @param {element} input
4150   *   An input.
4151   */
4152  function restoreValueAndRequired(input) {
4153    var $input = $(input);
4154
4155    // Restore value.
4156    var value = $input.data('webform-value');
4157    if (typeof value !== 'undefined') {
4158      var type = input.type;
4159      var tag = input.tagName.toLowerCase(); // Normalize case.
4160
4161      if (type === 'checkbox' || type === 'radio') {
4162        $input.prop('checked', value);
4163      }
4164      else if (tag === 'select') {
4165        $.each(value, function (i, option_value) {
4166          $input.find("option[value='" + option_value + "']").prop('selected', true);
4167        });
4168      }
4169      else if (type !== 'submit' && type !== 'button') {
4170        input.value = value;
4171      }
4172      $input.removeData('webform-value');
4173    }
4174
4175    // Restore required.
4176    var required = $input.data('webform-required');
4177    if (typeof required !== 'undefined') {
4178      if (required) {
4179        $input.prop('required', true);
4180      }
4181      $input.removeData('webform-required');
4182    }
4183  }
4184
4185  /**
4186   * Clear an input's value and required attributes.
4187   *
4188   * @param {element} input
4189   *   An input.
4190   */
4191  function clearValueAndRequired(input) {
4192    var $input = $(input);
4193
4194    // Check for #states no clear attribute.
4195    // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
4196    if ($input.closest('[data-webform-states-no-clear]').length) {
4197      return;
4198    }
4199
4200    // Clear value.
4201    var type = input.type;
4202    var tag = input.tagName.toLowerCase(); // Normalize case.
4203    if (type === 'checkbox' || type === 'radio') {
4204      $input.prop('checked', false);
4205    }
4206    else if (tag === 'select') {
4207      if ($input.find('option[value=""]').length) {
4208        $input.val('');
4209      }
4210      else {
4211        input.selectedIndex = -1;
4212      }
4213    }
4214    else if (type !== 'submit' && type !== 'button') {
4215      input.value = (type === 'color') ? '#000000' : '';
4216    }
4217
4218    // Clear required.
4219    $input.prop('required', false);
4220  }
4221
4222})(jQuery, Drupal);
4223;
4224/**
4225 * @file
4226 * JavaScript behaviors for custom webform #states.
4227 */
4228
4229(function ($, Drupal) {
4230
4231  'use strict';
4232
4233  $(document).on('state:required', function (e) {
4234    if (e.trigger && $(e.target).isWebform()) {
4235      var $target = $(e.target);
4236
4237      // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
4238      // Fix #required for fieldsets.
4239      if ($target.is('.js-form-wrapper.panel')) {
4240        if (e.value) {
4241          $target.find('.panel-heading .panel-title').addClass('js-form-required form-required');
4242        }
4243        else {
4244          $target.find('.panel-heading .panel-title').removeClass('js-form-required form-required');
4245        }
4246      }
4247
4248    }
4249  });
4250
4251})(jQuery, Drupal);
4252;
4253/**
4254 * @file
4255 * Bootstrap Popovers.
4256 */
4257
4258var Drupal = Drupal || {};
4259
4260(function ($, Drupal, Bootstrap) {
4261  "use strict";
4262
4263  var $document = $(document);
4264
4265  /**
4266   * Extend the Bootstrap Popover plugin constructor class.
4267   */
4268  Bootstrap.extendPlugin('popover', function (settings) {
4269    return {
4270      DEFAULTS: {
4271        animation: !!settings.popover_animation,
4272        autoClose: !!settings.popover_auto_close,
4273        enabled: settings.popover_enabled,
4274        html: !!settings.popover_html,
4275        placement: settings.popover_placement,
4276        selector: settings.popover_selector,
4277        trigger: settings.popover_trigger,
4278        title: settings.popover_title,
4279        content: settings.popover_content,
4280        delay: parseInt(settings.popover_delay, 10),
4281        container: settings.popover_container
4282      }
4283    };
4284  });
4285
4286  /**
4287   * Bootstrap Popovers.
4288   *
4289   * @todo This should really be properly delegated if selector option is set.
4290   */
4291  Drupal.behaviors.bootstrapPopovers = {
4292    $activePopover: null,
4293    attach: function (context) {
4294      // Immediately return if popovers are not available.
4295      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
4296        return;
4297      }
4298
4299      var _this = this;
4300
4301      $document
4302        .on('show.bs.popover', '[data-toggle=popover]', function () {
4303          var $trigger = $(this);
4304          var popover = $trigger.data('bs.popover');
4305
4306          // Only keep track of clicked triggers that we're manually handling.
4307          if (popover.options.originalTrigger === 'click') {
4308            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
4309              _this.$activePopover.popover('hide');
4310            }
4311            _this.$activePopover = $trigger;
4312          }
4313        })
4314        // Unfortunately, :focusable is only made available when using jQuery
4315        // UI. While this would be the most semantic pseudo selector to use
4316        // here, jQuery UI may not always be loaded. Instead, just use :visible
4317        // here as this just needs some sort of selector here. This activates
4318        // delegate binding to elements in jQuery so it can work it's bubbling
4319        // focus magic since elements don't really propagate their focus events.
4320        // @see https://www.drupal.org/project/bootstrap/issues/3013236
4321        .on('focus.bs.popover', ':visible', function (e) {
4322          var $target = $(e.target);
4323          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
4324            _this.$activePopover.popover('hide');
4325            _this.$activePopover = null;
4326          }
4327        })
4328        .on('click.bs.popover', function (e) {
4329          var $target = $(e.target);
4330          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
4331            _this.$activePopover.popover('hide');
4332            _this.$activePopover = null;
4333          }
4334        })
4335        .on('keyup.bs.popover', function (e) {
4336          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
4337            _this.$activePopover.popover('hide');
4338            _this.$activePopover = null;
4339          }
4340        })
4341      ;
4342
4343      var elements = $(context).find('[data-toggle=popover]').toArray();
4344      for (var i = 0; i < elements.length; i++) {
4345        var $element = $(elements[i]);
4346        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
4347
4348        // Store the original trigger.
4349        options.originalTrigger = options.trigger;
4350
4351        // If the trigger is "click", then we'll handle it manually here.
4352        if (options.trigger === 'click') {
4353          options.trigger = 'manual';
4354        }
4355
4356        // Retrieve content from a target element.
4357        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
4358        var $target = $document.find(target).clone();
4359        if (!options.content && $target[0]) {
4360          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
4361          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
4362        }
4363
4364        // Initialize the popover.
4365        $element.popover(options);
4366
4367        // Handle clicks manually.
4368        if (options.originalTrigger === 'click') {
4369          // To ensure the element is bound multiple times, remove any
4370          // previously set event handler before adding another one.
4371          $element
4372            .off('click.drupal.bootstrap.popover')
4373            .on('click.drupal.bootstrap.popover', function (e) {
4374              $(this).popover('toggle');
4375              e.preventDefault();
4376              e.stopPropagation();
4377            })
4378          ;
4379        }
4380      }
4381    },
4382    detach: function (context) {
4383      // Immediately return if popovers are not available.
4384      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
4385        return;
4386      }
4387
4388      // Destroy all popovers.
4389      $(context).find('[data-toggle="popover"]')
4390        .off('click.drupal.bootstrap.popover')
4391        .popover('destroy')
4392      ;
4393    },
4394    getOption: function(name, defaultValue, element) {
4395      var $element = element ? $(element) : this.$activePopover;
4396      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
4397      if (options[name] !== void 0) {
4398        return options[name];
4399      }
4400      return defaultValue !== void 0 ? defaultValue : void 0;
4401    }
4402  };
4403
4404})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
4405;
4406/**
4407 * @file
4408 * Bootstrap Tooltips.
4409 */
4410
4411var Drupal = Drupal || {};
4412
4413(function ($, Drupal, Bootstrap) {
4414  "use strict";
4415
4416  /**
4417   * Extend the Bootstrap Tooltip plugin constructor class.
4418   */
4419  Bootstrap.extendPlugin('tooltip', function (settings) {
4420    return {
4421      DEFAULTS: {
4422        animation: !!settings.tooltip_animation,
4423        html: !!settings.tooltip_html,
4424        placement: settings.tooltip_placement,
4425        selector: settings.tooltip_selector,
4426        trigger: settings.tooltip_trigger,
4427        delay: parseInt(settings.tooltip_delay, 10),
4428        container: settings.tooltip_container
4429      }
4430    };
4431  });
4432
4433  /**
4434   * Bootstrap Tooltips.
4435   *
4436   * @todo This should really be properly delegated if selector option is set.
4437   */
4438  Drupal.behaviors.bootstrapTooltips = {
4439    attach: function (context) {
4440      var elements = $(context).find('[data-toggle="tooltip"]').toArray();
4441      for (var i = 0; i < elements.length; i++) {
4442        var $element = $(elements[i]);
4443        var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
4444        $element.tooltip(options);
4445      }
4446    },
4447    detach: function (context) {
4448      // Destroy all tooltips.
4449      $(context).find('[data-toggle="tooltip"]').tooltip('destroy');
4450    }
4451  };
4452
4453})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
4454;
4455/*! jQuery UI - v1.12.1 - 2017-03-31
4456* http://jqueryui.com
4457* Copyright jQuery Foundation and other contributors; Licensed  */
4458!function(a){"function"==typeof define&&define.amd?define(["jquery","../keycode","../position","../safe-active-element","../unique-id","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"}
vendor: 4,255 bytes, line 4458
4458,role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target),d=a(a.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&d.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.target).closest(".ui-menu-item"),d=a(b.currentTarget);c[0]===d[0]&&(this._removeClass(d.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(b,d))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){var c=!a.contains(this.element[0],a.ui.safeActiveElement(this.document[0]));c&&this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){var b=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),c=b.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),c.children().each(function(){var b=a(this);b.data("ui-menu-submenu-caret")&&b.remove()})},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",f=!1,e=b.keyCode>=96&&b.keyCode<=105?(b.keyCode-96).toString():String.fromCharCode(b.keyCode),clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&c.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var b,c,d,e,f,g=this,h=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),d=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.prev(),d=a("<span>").data("ui-menu-submenu-caret",!0);g._addClass(d,"ui-menu-icon","ui-icon "+h),c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),this._addClass(d,"ui-menu","ui-widget ui-widget-content ui-front"),b=i.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);g._isDivider(b)&&g._addClass(b,"ui-menu-divider","ui-widget-content")}),e=c.not(".ui-menu-item, .ui-menu-divider"),f=e.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(f,"ui-menu-item-wrapper"),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!
vendor: 4,888 bytes, line 4458
4458a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){if("icons"===a){var c=this.element.find(".ui-menu-icon");this._removeClass(c,null,this.options.icons.submenu)._addClass(c,null,b.submenu)}this._super(a,b)},_setOptionDisabled:function(a){this._super(a),this.element.attr("aria-disabled",String(a)),this._toggleClass(null,"ui-state-disabled",!!a)},focus:function(a,b){var c,d,e;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.children(".ui-menu-item-wrapper"),this._addClass(d,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),e=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(e,null,"ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),e<0?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",a,{item:this.active}),this.active=null)},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this._removeClass(d.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=new RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).children(".ui-menu-item-wrapper").text()))})}})});;
vendor: 5,092 bytes, lines 4459-4462
4459/*! jQuery UI - v1.12.1 - 2017-03-31
4460* http://jqueryui.com
4461* Copyright jQuery Foundation and other contributors; Licensed  */
4462!function(a){"function"==typeof define&&define.amd?define(["jquery","./menu","../keycode","../position","../safe-active-element","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=f||!g&&this._isContentEditable(this.element),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==a.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(b,c){var d=c.item.data("ui-autocomplete-item"),e=this.previous;this.element[0]!==a.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e,this.selectedItem=d})),!1!==this._trigger("select",b,{item:d})&&this._value(d.value),this.term=this._value(),this.close(b),this.selectedItem=d}}),this.liveRegion=a("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(b){var c=this.menu.element[0];return b.target===this.element[0]||b.target===c||a.contains(c,b.target)},_closeOnClickOutside:function(a){this._isEventTargetInWidget(a)||this.close()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front, dialog")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(
4462),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;b&&(!b||c||d)||(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").append(a("<div>").text(c.label)).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(a,b),b.preventDefault())},_isContentEditable:function(a){if(!a.length)return!1;var b=a.prop("contentEditable");return"inherit"===b?this._isContentEditable(a.parent()):"true"===b}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete});;
4463/**
4464 * @file
4465 * Extends autocomplete based on jQuery UI.
4466 *
4467 * @todo Remove once jQuery UI is no longer used?
4468 */
4469
4470(function ($, Drupal) {
4471  'use strict';
4472
4473  // Ensure the input element has a "change" event triggered. This is important
4474  // so that summaries in vertical tabs can be updated properly.
4475  // @see Drupal.behaviors.formUpdated
4476  $(document).on('autocompleteselect', '.form-autocomplete', function (e) {
4477    $(e.target).trigger('change.formUpdated');
4478  });
4479
4480  // Extend ui.autocomplete widget so it triggers the glyphicon throbber.
4481  $.widget('ui.autocomplete', $.ui.autocomplete, {
4482    _search: function (value) {
4483      this.pending++;
4484      Drupal.Ajax.prototype.glyphiconStart(this.element);
4485      this.cancelSearch = false;
4486      this.source({term: value}, this._response());
4487    },
4488    _response: function () {
4489      var index = ++this.requestIndex;
4490      return $.proxy(function (content) {
4491        if (index === this.requestIndex) this.__response(content);
4492        this.pending--;
4493        if (!this.pending) Drupal.Ajax.prototype.glyphiconStop(this.element);
4494      }, this);
4495    }
4496  });
4497
4498})(jQuery, Drupal);
4499;
4500/*
4501 * jQuery UI Autocomplete HTML Extension
4502 *
4503 * Copyright 2010, Scott González (http://scottgonzalez.com)
4504 * Dual licensed under the MIT or GPL Version 2 licenses.
4505 *
4506 * http://github.com/scottgonzalez/jquery-ui-extensions
4507 */
4508(function( $ ) {
4509
4510	var proto = $.ui.autocomplete.prototype,
4511		initSource = proto._initSource;
4512	
4513	function filter( array, term ) {
4514		var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
4515		return $.grep( array, function(value) {
4516			return matcher.test( $( "<div>" ).html( value.label || value.value || value ).text() );
4517		});
4518	}
4519	
4520	$.extend( proto, {
4521		_initSource: function() {
4522			if ( this.options.html && $.isArray(this.options.source) ) {
4523				this.source = function( request, response ) {
4524					response( filter( this.options.source, request.term ) );
4525				};
4526			} else {
4527				initSource.call( this );
4528			}
4529		},
4530	
4531		_renderItem: function( ul, item) {
4532			return $( "<li></li>" )
4533				.data( "item.autocomplete", item )
4534				//.append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( item.label ) )
4535				.append( $( "<span></span>" )[ this.options.html ? "html" : "text" ]( item.label ) )
4536				.appendTo( ul );
4537		}
4538	});
4539	
4540	})( jQuery );;
4541//Storage mechanism for the OC
4542function sqStorage()
4543{
4544    var localStorageName = 'oneSQFullResult';
4545
4546    function get() {
4547        return window.localStorage.getItem(localStorageName);
4548    }
4549
4550    function set(oneSqResult) {
4551        window.localStorage.setItem(localStorageName, JSON.stringify(oneSqResult));
4552    }
4553
4554    function remove() {
4555        return window.localStorage.removeItem(localStorageName);
4556    }
4557
4558    return {
4559        get: get,
4560        set: set,
4561        remove: remove
4562    }
4563}
4564;
4565function sqToggle() {
4566    // Remember to enter pages in SQAddressFieldFormatter.php as well for non-dynamic content types
4567    var availablePages = ['/nbn/high-speed-nbn', '/services/internet-plans', '/nbn', '/', '/ftth', '/fttb', '/fttb_new'];
4568
4569    function isNewVersionAvailable() {
4570        return availablePages.filter(function(page) {
4571            return window.location.pathname === page;
4572        }).length > 0;
4573    }
4574
4575    return {
4576        isNewVersion: isNewVersionAvailable,
4577    };
4578}
4579;
4580var savedSQRes = {}, previousRes = false;
4581var res1Counter = 0, res2Counter = 0;
4582var showSQLoading;
4583
4584(function($, sqStorage, sqToggle) {
4585
4586    var storage = new sqStorage();
4587    var webformSQ = false;
4588    //integrate SQ with webform
4589    if(typeof webformSQGlobal !== 'undefined'){
4590        webformSQ = webformSQGlobal;
4591        // console.log(webformSQ);
4592    }
4593
4594    document.tpgSqPlugin = this;
4595    var confirmAddr = [];
4596    var address_not_found = {label: "Can't find your address? <br class='visible-xs' /><a href='#'>Enter your address manually</a>", value: $('.sq-address-input').val() };
4597    var addressFields = $("#address, #addressRegInt");
4598    var sqSection = '#section2';
4599    var sqResultTempaltes = '#sqResultTempaltes';
4600
4601    if(webformSQ){
4602        addressFields = $(".webform-submission-form input[name=address]");
4603        addressFields.on('blur', function() {
4604            if($(this).val() != $('input[name=webform-address]').val()){
4605                confirmAddr = [];
4606                $(this).val('');
4607                $('input[name=tech]').val('').removeClass('ui-autocomplete-loading');
4608            }
4609        });
4610    }
4611
4612    $('#address').on('blur', function() {
4613        confirmAddr = [];
4614        $(this).autocomplete("option", "minLength", 1);
4615        $(this).autocomplete("search", "");
4616    });
4617    
4618    this.invalidAddressForm = function(data) {
4619        showAddressForm(function(){ populateAddressForm(data.Address); });
4620        showSQLoading(true);
4621        displaySQModal(false);
4622    };
4623    
4624    function initNbnMessages() {
4625        // adding element to DOM and attaching event handler
4626        if ($(sqSection + ' ' + sqResultTempaltes).length < 1) { 
4627            $(sqResultTempaltes).detach().prependTo(sqSection);
4628            $(sqResultTempaltes).on("click", "a.change-address", function(e) {
4629                storage.remove();
4630                e.preventDefault();
4631                $('#address').val('');
4632                $(sqSection + ' > .inside_container').show();
4633                $(sqResultTempaltes).hide();
4634            });
4635        }
4636    };
4637    
4638    this.showNbnSuccess = function(action) {
4639        if (!action) {
4640            action = 'Success';
4641        }
4642        initNbnMessages();
4643        if( $(sqResultTempaltes).is(':hidden') ) {
4644            $(sqSection + ' > .inside_container').hide();
4645            var address = $('#address').val();
4646            var el = $(sqResultTempaltes + ' .sqNbn' + action);
4647            el.find('span.sqAddress').text(address);
4648            el.siblings().hide();
4649            el.show();
4650            el.parent().show();
4651        }
4652    };
4653    
4654    this.showNbnPreorder = function() {
4655        this.showNbnSuccess('Preorder');
4656    };
4657    
4658    this.isNbn = function(data) {
4659        return data.Services && data.Services.nbn && data.Services.nbn > 0;
4660    };
4661    
4662    this.isNbnPreorder = function(data) {
4663        return this.isNbn(data) && data.NBN.res === 12;
4664    };
4665    
4666    this.isFttb = function(data) {
4667        return data.Services && data.Services.fttb && data.Services.fttb > 0;
4668    };
4669    
4670    addressFields.autocomplete({
4671        appendTo: "#sq-wrapper",
4672        html: true,
4673        position: { my : "left top", at: "left bottom", of: "#sq-wrapper" },
4674        source: function(request, response) {
4675            var addressField = $(this.element);
4676            addressField.addClass('ui-autocomplete-loading');
4677
4678            if (confirmAddr.length !== 0) {
4679                response($.ui.autocomplete.filter(confirmAddr, request.term));
4680                addressField.removeClass('ui-autocomplete-loading');
4681            }
4682            else {
4683                var addressObj = [];
4684                $.ajax({
4685                    url: '/api/sq',
4686                    data: request,
4687                    dataType: "json",
4688                    success: function(data) {
4689                        if (data.length > 0) {
4690                            data.forEach(function(v, i) {
4691                                addressObj.push({'label': v, 'value': v});
4692                            }) 
4693                        }
4694                        if (addressField.data('nomatch') == 'dialog') {
4695                            addressObj.push(address_not_found);
4696                        }
4697                        response(addressObj);
4698                    },
4699                    error: function() {
4700                        if (addressField.data('nomatch') == 'dialog') {
4701                            addressObj.push(address_not_found);
4702                        }
4703                        response(addressObj);
4704                    },
4705                    complete: function() {
4706                        addressField.removeClass('ui-autocomplete-loading');
4707                    }
4708                });
4709            }
4710        },
4711        select: function(event, ui) {
4712            if (ui.item.label === address_not_found.label) {
4713                $(addressFields).val();
4714                clearAndDisable('all');
4715                showAddressForm();
4716                return false;
4717            }
4718
4719            if(webformSQ){
4720                $('input[name=webform-address]').val(ui.item.value);
4721                $('input[name=webform-tech]').val('');
4722                $('input[name=tech]').val('').addClass('ui-autocomplete-loading');
4723            }
4724
4725            $(this).data('fullAddrSelected', true);
4726            if ($(this).data('lock-address') == "yes") {
4727                qasSelected(this, ui.item.value);
4728            }
4729            showSQLoading(true);
4730            if (confirmAddr.length) {
4731                displaySQModal(true); // blur will set confirmAddr = []
4732                $(this).autocomplete("option", "minLength", 1);
4733
4734                $.ajax({
4735                    url: '/api/address_checker',
4736                    type: 'POST',
4737                    dataType: "json",
4738                    timeout: "200000",
4739                    data: 'locid=' + ui.item.locid + '&fullAddress=' + ui.item.value + '&searchtype=sq&onesq=1',
4740                    success: function(data) {
4741                        postProcessSQResult('success', data);
4742                    },
4743                    error: function() {
4744                        postProcessSQResult("error", []);
4745                    }
4746                });
4747            }
4748            else {
4749                displaySQModal(true);
4750
4751                $.ajax({
4752                    url: '/api/sq',
4753                    type: 'GET',
4754                    dataType: "json",
4755                    timeout: "200000",
4756                    data: 'addr=' + ui.item.value + '&onesq=1&searchtype=sq',
4757                    success: function(data) {
4758                        postProcessSQResult('success', data);
4759                    },
4760                    error: function() {
4761                        postProcessSQResult("error", []);
4762                    }
4763                });
4764            }
4765        },
4766        open: function() {
4767            $(this).data('fullAddrSelected', false);
4768            $('.ui-autocomplete').css('width', $(this).css('width'));
4769        },
4770    });
4771    // fix for iOS >= 8.1
4772    addressFields.autocomplete('widget').off('menufocus hover mouseover mouseenter');
4773
4774    this.pushGADatalayer = function (data) {
4775        if (typeof dataLayer !== undefined && data.NBN !== undefined) {
4776            // process service list
4777            var serviceList = [];
4778            if (data.Services !== undefined) {
4779                for (var serv in data.Services) {
4780                    if (data.Services[serv] > 0) {
4781                        serviceList.push(serv);
4782                    }
4783                }
4784            }
4785            services = serviceList.join(',') || 'none';
4786
4787            dataLayer.push({'event': 'sqFire', 'resStatus': data.NBN.res, 'resServices': services });
4788        }
4789    }
4790
4791    function postProcessSQResult(status, data) {
4792
4793        var sqVersion = new sqToggle();
4794
4795        if (sqVersion.isNewVersion()) {
4796            this.pushGADatalayer(data);
4797
4798            if (data.NBN === undefined || data.NBN.hasOwnProperty('addr_list')) {
4799                confirmIncompleteAddr(data.NBN.addr_list);
4800            } else {
4801                displaySQModal(false);
4802                var ngSq = angular.element('#ng-sqresult').scope();
4803                ngSq.setSqResult(data);
4804            }
4805            return false;
4806        }
4807
4808        /*
4809        0	NBN Pre-order (expired)		UNIT 4, 37 EDNA ST, LILYFIELD NSW 2040
4810        1	DSL Onnet					7 Watarrka avenue, Fitzgibbon  QLD  4018
4811        2	DSL Offnet					6 Selwyn Circuit, TRINITY PARK  QLD  4879
4812        3	Invalid						Unit 3 36 THREADFIN LOOP SOUTH HEDLAND 6722 WA
4813        4	Incomplete					U5 33 ULTIMO RD, HAYMARKET NSW 2000
4814        5	NBN Pre-order (FTTP)		1 McLellan Court, WYE RIVER VIC 3234 
4815        6 	NBN Pre-order (FTTN)		House 1 4 Greyjack Court, WORONGARY QLD 4213
4816        */
4817        //data = results[0];
4818
4819        var hw = new homeWireless(data);
4820
4821        savedSQRes = data; // copy to global
4822
4823        if (status == 'error') {
4824            data = {"Address":{},"Services":{"nbn":-1,"fttb":-1,"adsl":-1, "fwa_4g":-1, "fwa_5g":-1},"NBN":{"res":7},"FTTB":{},"ADSL":{}};
4825        }
4826        
4827        storage.set(data);
4828
4829        if (data.NBN === undefined) {
4830            data.NBN = { res: 7 };
4831        }
4832
4833        // GA tracking
4834        this.pushGADatalayer(data);
4835
4836        var msg ='<h4>Unfortunately an error has occurred when processing your request.</h4>';
4837        var page = '', action = 'noRedirect';
4838
4839        /*
4840            Codes below relate to the following explanations:
4841
4842            From NBN Co:
4843            'res'=>0, 'data'=>'serviceable'
4844            'res'=>1, 'data'=>'Invalid address' / API error or timeout
4845            'res'=>2, 'data'=>'POI cannot be found' / No CVC data returned
4846            'res'=>3, 'data'=>'POI not active' / POI not found
4847            'res'=>4, 'data'=>'NBN not ready'
4848            'res'=>7, 'data'=>'B2B Exception'
4849            'res'=>8, 'data'=>'Timeout Error'
4850            'res'=>9, 'data'=>'Incorrect input
4851
4852            From TPG offline SQ data:
4853            'res'=>10 OSQ_SERVICEABLE             
4854            'res'=>11 OSQ_SERVICEABILITY_UNKNOWN
4855            'res'=>12 OSQ_SERVICEABLE_SOON         
4856            'res'=>13 OSQ_INCOMPLETE_ADDRESS     
4857            'res'=>14 OSQ_NOT_SERVICEABLE         
4858        */
4859
4860        if (status == 'success') {
4861            if (data.Services && data.Services.fttb > 0) {
4862                action = 'reseller';
4863                if (data.FTTB.technology == 'FTTH') {
4864                    msg = "<h4>CONGRATULATIONS!</h4>You can get TPG High Speed Broadband with Fibre To The Home Technology.";
4865                    page = '/ftth';
4866                }
4867                else {
4868                    msg = "<h4>CONGRATULATIONS!</h4>You can get TPG High Speed Broadband with Fibre To The Building Technology.";
4869                    page = '/fttb';
4870                }
4871                // showSQLoading(false);
4872                showSQResult(status, msg, action, page, data);
4873            } else {
4874                switch (data.NBN.res) {
4875                    case 0:
4876                    case 10:
4877                        msg = "<h4>CONGRATULATIONS!</h4>We can provide you with a NBN Bundle.";
4878                        action = 'nbnpass';
4879                        if (data.NBN.technology !== 'Wireless') {
4880                            page = hw.getUrl();
4881                        }
4882                        else {
4883                            page = '/nbn#fixed-wireless';
4884                        }
4885                        break;
4886                    case 12:
4887                        var nbnEtaOverdue = new Date(data.NBN.readyForService).getTime() < new Date().getTime();
4888                        if (nbnEtaOverdue) {
4889                            msg = '<h4>NBN ROLLOUT TO YOUR ADDRESS HAS BEEN DELAYED</h4><p>NBN is expected to be serviceable in your area but your home is not ready yet. Pre-order now and we will connect your home when NBN arrives.</p>';
4890                        }
4891                        else {
4892                            msg = "<h4>CONGRATULATIONS!</h4> NBN is coming soon to your area</b> <br/> Pre-order now and we will connect your home when NBN arrives. Your <br/> address is expected to be NBN ready on ";
4893                            var d = new Date(data.NBN.readyForService);
4894                            var a = d.toDateString().substr(4).split(' ');
4895                            var b = [a[1],a[0],a[2]];
4896                            msg += b.join('-')+ "<br/>";
4897                        }
4898                        action = 'nbnofflpass';
4899                        page = '/nbn#preorder';
4900                        break;
4901                    case 1:     // Invalid address
4902                    case 13:    // Incomplete address
4903                    case 2:     // POI cannot be found / No CVC data returned
4904                    case 999:     // SQ Failed
4905                        if (previousRes == 2 || previousRes == 13 || previousRes === false) {
4906                            res2Counter += 1;
4907                        }
4908                    case 3:     // POI not active / POI not found
4909                    case 4:     // NBN not ready (former ADSL?)
4910                    case 14:    // SQ_NOT_SERVICEABLE
4911                        if (data.Services.fwa_4g === 1 || data.Services.fwa_5g === 1) {
4912                            msg = "<h4></h4>";
4913                            action = '';
4914
4915                            page = hw.getUrl();
4916                        }
4917                        else {
4918                            msg = "<h4>TPG services are not yet available in your area.</h4>";
4919                            action = 'waitADSL';
4920                            page = '/nbn#waitlist';
4921                        }
4922                        break;
4923                    case 5:
4924                    case 7:
4925                    case 8:
4926                    default:
4927                        break;
4928                }
4929                // showSQLoading(false);
4930
4931                if (data.NBN.addr_list !== undefined && res2Counter < 2) {
4932                    confirmIncompleteAddr(data.NBN.addr_list);
4933                } else if ((data.NBN.res == 2 || data.NBN.res == 13) && res2Counter < 2) {
4934                    displaySQModal(false);
4935                    $('.sq-msg').empty();
4936                    showAddressForm(function(){ populateAddressForm(data.Address); });
4937                } else {
4938                    showSQResult(status, msg, action, page, data);
4939                    res2Counter = 0;
4940                }
4941            }
4942            previousRes = data.NBN.res;
4943        }
4944    }
4945
4946    /* Address form */
4947
4948    /* load the form via ajax call */
4949    function showAddressForm(fn) {
4950        if(webformSQ){//if webform, show the divided address inputs
4951            $('input[name=show_sq]').val(0).trigger("change");
4952            return;
4953        }
4954        displaySQModal(false);
4955        if($('#addressFormModal').find('#addressEntry').length == 0){
4956            $('#addressFormModal').find(".modal-body").load('/api/sq_modal_content', function (){
4957                addressFormModalBindEvents();
4958                if(typeof(fn)==='function') {
4959                    fn();
4960                }
4961            });
4962        }
4963        else {
4964            if(typeof(fn)==='function') {
4965                fn();
4966            }
4967        }
4968        $('#addressFormModal').modal('show');
4969    };
4970
4971
4972    $('.editAddress').on('click', function() {
4973        qasUnselected($(this).prev('input'));
4974    });
4975
4976    /* Bind all the events to elements of SQ address form Modal,
4977       to be called after the modal content is loaded */
4978    function addressFormModalBindEvents(){
4979        $(document).on('change',"#state",function(e) {
4980            clearAndDisable(this.id);
4981            if ($("#state").val()) {
4982                $("#suburb").prop('disabled', false);
4983            } else {
4984                $("#suburb").prop('disabled', true);
4985            }
4986        });
4987        $("#suburb").keyup(function() {
4988            if (!$("#suburb").val()) {
4989                //disable texts if Suburb is Empty
4990                $("#addressFormModal input:text:not(#suburb)").prop('disabled', true);
4991                $("#addressFormModal select:not(#state)").prop('disabled', true);
4992                $("#street").val("");
4993                $("#streetType").val("");
4994                $("#streetNumber").val("");
4995                $("#unitNumber").val("");
4996                clearAndDisable(this.id);
4997            } else {
4998                $("#street").prop('disabled', false);
4999                $("#postcode").prop('disabled', false);
5000            }
5001        });
5002        $("#suburb").change(function() {
5003            clearAndDisable(this.id);
5004        });
5005        $("#postcode").change(function() {
5006            clearAndDisable(this.id);
5007        });
5008        $("#street").keyup(function(e) {
5009            if (!$("#street").val()) {
5010                //disable texts if Suburb is Empty
5011                $("#streetType").val("");
5012                $("#addressFormModal input:text:not(#suburb,#street,#postcode)").prop('disabled', true);
5013                $("#addressFormModal select:not(#state)").prop('disabled', true);
5014                // optional info
5015                clearAndDisable(this.id);
5016            } else {
5017                $("#addressFormModal input:text").prop('disabled', false);
5018                $("#addressFormModal select:not(#state)").prop('disabled', false);
5019                if ($("#postcode").val().trim() !== '' && $('#checkAvailableSubmit').hasClass('disabled')) {
5020                    enableButton($('#checkAvailableSubmit'));
5021                }
5022            }
5023        });
5024        $("#streetType").change(function() {
5025            $("#addressFormModal input:text").prop('disabled', false);
5026            $("#addressFormModal select:not(#state)").prop('disabled', false);
5027        });
5028        // autocomplete
5029        $("#suburb").autocomplete({
5030            source: function(request, response) {
5031                $("#suburb").addClass('ui-autocomplete-loading');
5032
5033                $.ajax({
5034                    url: "/api/address_checker",
5035                    type: "POST",
5036                    dataType: "json",
5037                    data: $("#addressEntry").serialize() + "&searchtype=suburb",
5038                    success: function(data) {
5039                        if (data) {
5040                            response($.map(data.response, function(c) {
5041                                return {
5042                                    label: c.label,
5043                                    value: c.value
5044                                };
5045                            }));
5046                        }
5047                    },
5048                    complete: function() {
5049                        $("#suburb").removeClass('ui-autocomplete-loading');
5050                    }
5051                });
5052            },
5053            minLength: 1,
5054            open: function() {
5055                $('.ui-autocomplete').css('width', $(this).css('width'));
5056            }
5057        });
5058        $("#suburb").autocomplete('widget').off('menufocus hover mouseover mouseenter'); // iOS >= 8.1 fix
5059
5060        $("#street").autocomplete({
5061            source: function(request, response) {
5062                $("#street").addClass('ui-autocomplete-loading');
5063
5064                $.ajax({
5065                    url: "/api/address_checker",
5066                    type: "POST",
5067                    dataType: "json",
5068                    data: $("#addressEntry").serialize() + "&searchtype=street",
5069                    success: function(data) {
5070                        if (data) {
5071                            response($.map(data.response, function(c) {
5072                                return {
5073                                    label: c.label,
5074                                    value: c.value,
5075                                    streettype: c.streettype
5076                                };
5077                            }));
5078                        }
5079                    },
5080                    complete: function() {
5081                        $("#street").removeClass('ui-autocomplete-loading');
5082                    }
5083                });
5084            },
5085            select: function(event, ui) {
5086                $("#streetType").val(ui.item.streettype);
5087                if ($("#postcode").val().trim() !== '' && $('#checkAvailableSubmit').hasClass('disabled')) {
5088                    enableButton($('#checkAvailableSubmit'));
5089                }
5090            },
5091            minLength: 1,
5092            open: function() {
5093                $('.ui-autocomplete').css('width', $(this).css('width'));
5094            }
5095        });
5096        $("#street").autocomplete('widget').off('menufocus hover mouseover mouseenter'); // iOS >= 8.1 fix
5097
5098        $("#postcode").autocomplete({
5099            source: function(request, response) {
5100                $("#postcode").addClass('ui-autocomplete-loading');
5101
5102                $.ajax({
5103                    url: "/api/address_checker",
5104                    type: "POST",
5105                    dataType: "json",
5106                    data: $("#addressEntry").serialize() + "&searchtype=postcode",
5107                    success: function(data) {
5108                        if (data) {
5109                            response($.map(data.response, function(c) {
5110                                return {
5111                                    label: c.label,
5112                                    value: c.value
5113                                };
5114                            }));
5115                        }
5116                    },
5117                    complete: function() {
5118                        $("#postcode").removeClass('ui-autocomplete-loading');
5119                    }
5120                });
5121            },
5122            select: function(event, ui) {
5123                if ($("#street").val().trim() !== '' && $('#checkAvailableSubmit').hasClass('disabled')) {
5124                    enableButton($('#checkAvailableSubmit'));
5125                }
5126            },
5127            minLength: 1,
5128            open: function() {
5129                $('.ui-autocomplete').css('width', $(this).css('width'));
5130            }
5131        });
5132        $("#postcode").autocomplete('widget').off('menufocus hover mouseover mouseenter'); // iOS >= 8.1 fix
5133
5134        $('#checkAvailableSubmit').click(function() {
5135            disableButton($(this));
5136
5137            // breakdown form submit
5138            $('#addressFormModal').modal('hide');
5139            displaySQModal(true);
5140            // showSQLoading(true);
5141
5142            $.ajax({
5143                url: '/api/address_checker',
5144                type: 'POST',
5145                dataType: "json",
5146                timeout: "200000",
5147                data: $("#addressEntry").serialize() + '&onesq=1&searchtype=sq',
5148                success: function(data) {
5149                    postProcessSQResult('success', data, false);
5150                },
5151                error: function() {
5152                    // showSQLoading(false);
5153                    $(this).text('Check Availability');
5154                    $(this).closest('.modal').modal('show');
5155                    postProcessSQResult("error", [], false);
5156                },
5157            });
5158        });
5159    }
5160
5161    this.addressFormModalBindEvents = function() {
5162        return addressFormModalBindEvents();
5163    }
5164
5165    function displaySQModal(state) {
5166        // do nothing if there is no sq modal or request for one
5167        if (!$('#address').data('splash') || !$('#sqModal').length || webformSQ) {
5168            return;
5169        }
5170
5171        if (state) {
5172            $('#sqModal').modal('show');
5173        }
5174        else {
5175            $('#sqModal').modal('hide');
5176        }
5177    }
5178
5179    function showSQLoading(state) {
5180        if (state) {
5181            $('.sq-result').hide();
5182            $('.sq-processing').show();
5183        }
5184        else {
5185            $('.sq-processing').hide();
5186        }
5187    }
5188
5189    function qasSelected(element, value) {
5190        $('#addressRegInt').val(value);
5191        // chrome blurs input on disable, copy confirmAddr gbl to tmp
5192        var tmp = confirmAddr,
5193            addressField = getJQueryObj(element);
5194        addressField.prop('disabled', true);
5195        confirmAddr = tmp;
5196        addressField.parent().addClass('input-group');
5197        addressField.next('.editAddress').removeClass('hidden');
5198        if (typeof(qasLockActions) == 'function') {
5199            qasLockActions($, value);
5200        }
5201    }
5202
5203    function qasUnselected(element) {
5204        var addressField = getJQueryObj(element);
5205        addressField.val('').prop('disabled', false);
5206        addressField.parent().removeClass('input-group');
5207        addressField.next('.editAddress').addClass('hidden');
5208        $('#sqSkip').val('false');
5209        $('#sqSkip').data('res', false);
5210        if (typeof(qasUnlockActions) == 'function') {
5211            qasUnlockActions($);
5212        }
5213        clearAndDisable('all');
5214    }
5215
5216    function getJQueryObj(obj) {
5217        if (obj instanceof jQuery) {
5218            return obj;
5219        }
5220
5221        return $(obj);
5222    }
5223
5224    function disableButton(button) {
5225        button = getJQueryObj(button);
5226
5227        if (!button.hasClass('disabled')) {
5228            button.addClass('disabled');
5229        }
5230        button.prop('disabled', true);
5231    }
5232
5233    function enableButton(button) {
5234        button = getJQueryObj(button);
5235
5236        button.removeClass('disabled');
5237        button.prop('disabled', false);
5238    }
5239
5240    function showSQResult(status, msg, action, page, data) {
5241        // heres some default elements you can make use of
5242        showSQLoading(false);
5243        $('.address-result').text(data.formed_fulladdress);
5244        $('.nbn-disconnection').hide();
5245
5246        // for any custom logic simply define the sqActions function in your code
5247        var show_result = true;
5248        if (typeof(sqActionsOverride) == 'function') {
5249            show_result = sqActionsOverride(status, msg, action, page, data);
5250        } else if (typeof(sqActions) == 'function') {
5251            if (action === 'noRedirect') {
5252                if (typeof(msg) == 'object') {
5253                    var m = msg;
5254                    var output = '<div class="sq-msg">\n<h2 class="lead">' + m.title + '</h2>\n<p>' + m.body + '</p>\n'
5255                    + (m.cta ? '<div class="button-wrapper">\n'
5256                        + m.cta.map(function (btn) {
5257                            return '<div>\n<a class="clickable btn btn-yframe sq-action ' + btn.class + '" href="' + btn.link + '" ' + btn.attr + '>\n<div class="action-head">' + btn.title + '</div>\n<div class="action-info">' + btn.body + '</div>\n</a>\n</div>\n';
5258                        }).join('')
5259                    + '</div>\n' : '')
5260                + '</div>\n';
5261                            $('.sq-result .sq-msg').replaceWith(output);
5262                }
5263            } else {
5264				if (typeof(msg) === 'object') {
5265					var m = '<h4>'+msg.title+'</h4>'+msg.body;
5266					msg = m;
5267				}
5268                show_result = sqActions(status, msg, action, page, data);
5269            }
5270        } else {
5271            // default action
5272            $('.sq-msg').html(msg);
5273        }
5274
5275        if (!show_result) {
5276            displaySQModal(false);
5277            return;
5278        }
5279
5280        $('.sq-result').show();
5281    }
5282
5283    // migrated from web-novus-drupal clearNDisable
5284    function clearAndDisable(pointOfReset) {
5285        var toDisable = true;
5286        var toClear = true;
5287        var toClearOptional = false;
5288        var notToDisableText = [];
5289        var notToDisableSelect = ['#state'];
5290        switch (pointOfReset) {
5291            case 'street':
5292                toDisable = false;
5293                toClearOptional = true;
5294                break;
5295            case 'suburb':
5296                toClearOptional = true;
5297                $('#postcode').val("");
5298                $('#street').val("");
5299                notToDisableText.push('#suburb');
5300                notToDisableText.push('#postcode');
5301                notToDisableText.push('#street');
5302                break;
5303            case 'postcode':
5304                $('#street').val("");
5305                $('#streetType').val("");
5306                toClear = false;
5307                toDisable = false;
5308                notToDisableText.push('#suburb');
5309                notToDisableText.push('#postcode');
5310                notToDisableText.push('#street');
5311                break;
5312            case 'state':
5313                toClearOptional = true;
5314                $('#suburb').val("");
5315                $('#streetType').val("");
5316                $('#street').val("");
5317                $('#postcode').val("");
5318                notToDisableText.push('#suburb');
5319                break;
5320            case 'all':
5321                $('#state').val("");
5322                $('#suburb').val("");
5323                $('#streetType').val("");
5324                $('#street').val("");
5325                $('#postcode').val("");
5326                break;
5327        }
5328        if (toDisable) {
5329            $("#addressFormModal input:text:not(" + notToDisableText.join() + ")").prop('disabled', 'true');
5330            $("#addressFormModal select:not(" + notToDisableSelect.join() + ")").prop('disabled', 'true');
5331        }
5332        if (toClear) {
5333            $('#unitTypeCode').val("");
5334            $('#levelTypeCode').val("");
5335            $('#streetSuffix').val("");
5336            $('#streetNumber').val("");
5337            $('#unitNumber').val("");
5338            $('#lotNumber').val("");
5339            $('#levelNumber').val("");
5340            $('#siteName').val("");
5341            $('#complexBldgName').val("");
5342            $('#complexStreetName').val("");
5343            $('#complexStreetType').val("");
5344            $('#complexStreetNumber').val("");
5345            $('#complexStreetSuffix').val("");
5346        }
5347        if (toClearOptional){
5348            $("#addressFormModal select:not(#state)").val("");
5349            $("#optionalInfo input").val("");
5350        }
5351        disableButton($('#checkAvailableSubmit'));
5352    }
5353
5354    function populateAddressForm(address) {
5355        $('.sq-form input, .sq-form select').prop('disabled', false);
5356        $('#state').val(address.state);
5357        $('#suburb').val(address.locality);
5358        if (address.unitNumber !== undefined) {
5359            $('#unitNumber').val(address.unitNumber);
5360        }
5361        if (address.roadNumber2 !== undefined && address.roadNumber2) {
5362            $('#streetNumber').val(address.roadNumber1 + '-' + address.roadNumber2);
5363        }
5364        else {
5365            $('#streetNumber').val(address.roadNumber1);
5366        }
5367        if (address.streetSuffix !== undefined) {
5368            $('#streetSuffix').val(address.streetSuffix);
5369        }
5370        if (address.hasOwnProperty('roadType')) {
5371            $('#streetType').val(address.roadType.toUpperCase());
5372        }
5373        $('#street').val(address.roadName);
5374        $('#postcode').val(address.postcode);
5375        enableButton($('#checkAvailableSubmit'));
5376    }
5377
5378    this.populateAddressForm = function(address) {
5379        return populateAddressForm(address);
5380    }
5381
5382    function confirmIncompleteAddr(addr_list) {
5383        // higher priority for incomplete address case for double confirm
5384        $.each(addr_list, function(idx, addr) {
5385            var suburb = addr.locality;
5386            var streetName = addr.roadName;
5387            var roadName = addr.roadType ? addr.roadType : '';
5388            var streetNumber = addr.roadNumber1;
5389
5390            var formed_addr = addr.lotNumber ? 'Lot ' + addr.lotNumber + ', ' : '';
5391            formed_addr += addr.unitNumber ? addr.unitTypeCode + ' ' + addr.unitNumber + ', ' : '';
5392            formed_addr += streetNumber ? streetNumber + " " : '';
5393            formed_addr += streetName + (roadName ? " " + roadName + ", " : ', ');
5394            formed_addr += suburb + ", ";
5395            formed_addr += addr.state;
5396            formed_addr += ' ' + addr.postcode;
5397            confirmAddr.push({
5398                'label': formed_addr,
5399                'value': formed_addr,
5400                'locid': addr.ID
5401            });
5402        });
5403
5404        confirmAddr.push({
5405            'label': address_not_found,
5406            'value': address_not_found,
5407            'locid': 0
5408        });
5409        if(webformSQ) {
5410            $('input[name="webform-address"]').val('');
5411            addressFields.autocomplete("option", "minLength", 0);
5412            addressFields.autocomplete("search", "");
5413        }else{
5414            $("#address").autocomplete("option", "minLength", 0);
5415            $("#address").autocomplete("search", "");
5416        }
5417
5418
5419        displaySQModal(false);
5420        return;
5421    }
5422
5423    function getADSLpage(data) {
5424        var adslRes = 1, page = '/adsl'; // default to /adsl
5425
5426        if(data.Services.adsl > 0 && data.ADSL.homephone == 'Not Available'){
5427            adslRes = data.ADSL.adsl2plus !== 'Not Available' ? 2 : 3;
5428        }
5429
5430        switch(adslRes) {
5431            case 2:
5432                page = '/products_services/adsl2-standalone';
5433                break;
5434            case 3:
5435                page = '/products_services/broadband-offnet';
5436                break;
5437            default:
5438                page = '/adsl';
5439        }
5440
5441        return page;
5442    }
5443
5444    $('.close').click(function() {
5445        var thisModal = $(this).closest('.modal');
5446        if (thisModal.attr('id') == 'addressFormModal') {
5447            $('#address').focus();
5448        }
5449
5450        thisModal.modal('hide');
5451    });
5452    $('.sq-modal .modal-dialog').on('click tap', function(e) {
5453        if ($(e.target).hasClass('modal-dialog')) {
5454            $('.modal').modal('hide');
5455        }
5456    });
5457
5458    $('.sq-address-input').focus(function () {
5459        $('#sq-wrapper').addClass('focus');
5460    }).blur(function () {
5461        $('#sq-wrapper').removeClass('focus');
5462    });
5463    $('#sq-wrapper').on('click', function () {
5464        $('.sq-address-input').focus();
5465    });
5466
5467    $('#sq-modal').on('shown.bs.modal', function() {
5468        var maxTime = 1000, // 5 seconds
5469        startTime = Date.now();
5470
5471        var interval = setInterval(function () {
5472            if ($('.sq-modal a.btn').is(':visible')) {
5473                $('.sq-modal a.btn').each(function () {
5474                    var r = $(this).outerHeight() / 2;
5475                    $(this).css({'border-radius': r + 'px' });
5476                    
5477                });
5478                clearInterval(interval);
5479            } else {
5480                // still hidden
5481                if (Date.now() - startTime > maxTime) {
5482                    // hidden even after 'maxTime'. stop checking.
5483                    clearInterval(interval);
5484                }
5485            }
5486        }, 100); // 0.1 second (wait time between checks)
5487    });
5488})(jQuery, sqStorage, sqToggle);
5489;
5490function homeWireless(sqResult) {
5491
5492    var SQResult;
5493    var urls = {
5494        'nbn' : '/nbn',
5495        'fwa_4g': '/home-wireless-broadband',
5496        'fwa_5g': '/5g-home-broadband'
5497    };
5498
5499    function redirectUrl() {
5500        // RETURN ORDER BY PRECEDENCE
5501        if (SQResult.Services.nbn === 1) {
5502            return returnUrlByTech('nbn');
5503        }
5504        else if (SQResult.Services.fwa_4g === 1) {
5505            return returnUrlByTech('fwa_4g');
5506        }
5507        else if (SQResult.Services.fwa_5g === 1) {
5508            return returnUrlByTech('fwa_5g');
5509        }
5510    }
5511
5512    function returnUrlByTech(tech) {
5513        switch (tech) {
5514            case 'nbn':
5515                return urls.nbn;
5516                break;
5517            case 'fwa_4g':
5518                return urls.fwa_4g;
5519                break;
5520            case 'fwa_5g':
5521                return urls.fwa_5g;
5522                break;
5523            default:
5524                return urls.nbn;
5525        }
5526    }
5527
5528    function init(sqResult) {
5529        SQResult = sqResult;
5530    }
5531
5532    init(sqResult);
5533
5534    return {
5535        getUrl: redirectUrl
5536    }
5537}
5538;
5539document.addEventListener("DOMContentLoaded", () => {
5540  const menuOverlay = document.createElement("div");
5541  menuOverlay.id = "menu-overlay";
5542  menuOverlay.style.display = "none";
5543  const header = document.querySelector("header");
5544
5545  if (header) {
5546      header.insertAdjacentElement("afterend", menuOverlay);
5547  } else {
5548      console.error("<header> is missing in the DOM.");
5549  }
5550
5551  menuOverlay.addEventListener("click", () => {
5552      document.querySelectorAll("li.sfHover").forEach((li) => {
5553          li.classList.remove("sfHover");
5554          li.querySelector("ul")?.classList.add("sf-hidden");
5555      });
5556      menuOverlay.style.display = "none";
5557      document.body.classList.remove("no-scroll");
5558  });
5559});
5560
5561(function($) {
5562  $.fn.superfish = function(op) {
5563      var sf = $.fn.superfish,
5564          c = sf.c;
5565
5566      function toggleMenu($li) {
5567          const menuOverlay = document.getElementById("menu-overlay");
5568          if ($li.hasClass(c.hoverClass)) {
5569              $li.removeClass(c.hoverClass);
5570              $li.children("ul").addClass("sf-hidden");
5571              menuOverlay.style.display = "none";
5572              document.body.classList.remove("no-scroll");
5573          } else {
5574              $li.addClass(c.hoverClass);
5575              $li.children("ul").removeClass("sf-hidden");
5576              // Close sibling menus
5577              $li.siblings("li").each(function() {
5578                  $(this).removeClass(c.hoverClass);
5579                  $(this).children("ul").addClass("sf-hidden");
5580              });
5581              // Show overlay
5582              menuOverlay.style.display = "block";
5583              document.body.classList.add("no-scroll");
5584          }
5585      }
5586
5587      function handleClick(e) {
5588          const $li = $(this).closest("li");
5589          if ($li.children("ul").length > 0) {
5590              e.preventDefault();
5591              toggleMenu($li);
5592          }
5593      }
5594
5595      function handleKeydown(e) {
5596          const $li = $(this).closest("li");
5597          const $link = $(this);
5598          if (e.key === "Enter") {
5599              if ($li.children("ul").length > 0) {
5600                  // If it has a submenu, toggle it
5601                  e.preventDefault();
5602                  toggleMenu($li);
5603              } else {
5604                  // If it's a normal link, follow it
5605                  $link[0].click(); 
5606              }
5607          }
5608      }
5609
5610      return this.each(function() {
5611          const o = $.extend({}, sf.defaults, op);
5612
5613          $(this)
5614              .addClass(sf.c.menuClass)
5615              .find("li")
5616              .each(function() {
5617                  const $li = $(this);
5618                  const $link = $li.children("a, span.nolink");
5619                  if (!$link.attr("tabindex")) {
5620                      $link.attr("tabindex", "0");
5621                  }
5622                  $link.on("click", handleClick);
5623                  $link.on("keydown", handleKeydown);
5624                  $li.children("ul").addClass("sf-hidden");
5625                  $li.find("a").removeAttr("target");
5626              });
5627      });
5628  };
5629  var sf = $.fn.superfish;
5630  sf.c = {
5631      menuClass: "sf-js-enabled",
5632      hoverClass: "sfHover",
5633  };
5634  sf.defaults = {
5635      hoverClass: "sfHover",
5636  };
5637})(jQuery);
5638;
5639/*!
5640 * hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+
5641 * http://cherne.net/brian/resources/jquery.hoverIntent.html
5642 *
5643 * You may use hoverIntent under the terms of the MIT license. Basically that
5644 * means you are free to use hoverIntent as long as this header is left intact.
5645 * Copyright 2007, 2014 Brian Cherne
5646 */
5647(function($){$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var cfg={interval:100,sensitivity:6,timeout:0};if(typeof handlerIn==="object"){cfg=$.extend(cfg,handlerIn)}else{if($.isFunction(handlerOut)){cfg=$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector})}else{cfg=$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut})}}var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(Math.sqrt((pX-cX)*(pX-cX)+(pY-cY)*(pY-cY))<cfg.sensitivity){$(ob).off("mousemove.hoverIntent",track);ob.hoverIntent_s=true;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=false;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=$.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type==="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).on("mousemove.hoverIntent",track);if(!ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).off("mousemove.hoverIntent",track);if(ob.hoverIntent_s){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}})(jQuery);;
5648/*
5649 * sf-Touchscreen v1.3b - Provides touchscreen compatibility for the jQuery Superfish plugin.
5650 *
5651 * Developer's note:
5652 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish)
5653 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact
5654 *
5655 * jQuery version: 1.3.x or higher.
5656 *
5657 * Dual licensed under the MIT and GPL licenses:
5658 *  http://www.opensource.org/licenses/mit-license.php
5659 *  http://www.gnu.org/licenses/gpl.html
5660 */
5661
5662(function($){
5663  $.fn.sftouchscreen = function(options){
5664    options = $.extend({
5665      mode: 'inactive',
5666      breakpoint: 768,
5667      breakpointUnit: 'px',
5668      useragent: '',
5669      behaviour: 2,
5670      disableHover: false
5671    }, options);
5672
5673    function activate(menu){
5674      var eventHandler = (('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) ? ['click touchstart','mouseup touchend'] : ['click','mouseup'];
5675      // Select hyperlinks from parent menu items.
5676      menu.find('li:has(ul)').children('a,span.nolink').each(function(){
5677        var item = $(this),
5678        parent = item.closest('li');
5679        if (options.disableHover){
5680          parent.unbind('mouseenter mouseleave');
5681        }
5682        if (options.behaviour == 2){
5683          if (parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('.sf-clone-parent').length == 0){
5684            var
5685            // Cloning the hyperlink of the parent menu item.
5686            cloneLink = parent.children('a.menuparent').clone(),
5687            // Wrapping the hyerplinks in <li>.
5688            cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink);
5689            // Removing unnecessary stuff.
5690            cloneLink.find('.sf-sub-indicator').remove(),
5691            // Adding a helper class and attaching them to the sub-menus.
5692            parent.children('ul').addClass('sf-has-clone-parent').prepend(clone
5692Link);
5693          }
5694        }
5695        // No .toggle() here as it's not possible to reset it.
5696        item.bind(eventHandler[0], function(event){
5697          // Already clicked?
5698          if (item.hasClass('sf-clicked')){
5699            // Depending on the preferred behaviour, either proceed to the URL.
5700            if (options.behaviour == 0){
5701              url = item.attr('href');
5702              if (typeof(url) != 'undefined'){
5703                window.location = url;
5704              }
5705            }
5706            // or collapse the sub-menu.
5707            else if (options.behaviour == 1 || options.behaviour == 2){
5708              event.preventDefault();
5709              item.removeClass('sf-clicked');
5710              parent.hideSuperfishUl().find('a,span.nolink').removeClass('sf-clicked');
5711            }
5712          }
5713          // Prevent the default action otherwise.
5714          else {
5715            event.preventDefault();
5716            item.addClass('sf-clicked');
5717            parent.showSuperfishUl().siblings('li:has(ul)').hideSuperfishUl().find('.sf-clicked').removeClass('sf-clicked');
5718          }
5719        });
5720      });
5721
5722      $(document).bind(eventHandler[1], function(event){
5723        if (menu.not(event.target) && menu.has(event.target).length === 0){
5724          menu.find('.sf-clicked').removeClass('sf-clicked');
5725          menu.find('li:has(ul)').hideSuperfishUl();
5726        }
5727      });
5728    }
5729    // Return original object to support chaining.
5730    // This is not necessary actually because of the way the module uses these plugins.
5731    for (var b = 0; b < this.length; b++) {
5732      var menu = $(this).eq(b),
5733      mode = options.mode;
5734      // The rest is crystal clear, isn't it? :)
5735      if (mode == 'always_active'){
5736        activate(menu);
5737      }
5738      else if (mode == 'window_width'){
5739        var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint,
5740        windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
5741        timer;
5742        if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
5743          activate(menu);
5744        }
5745        else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
5746          activate(menu);
5747        }
5748        $(window).resize(function(){
5749          clearTimeout(timer);
5750          timer = setTimeout(function(){
5751            var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
5752            if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
5753              activate(menu);
5754            }
5755            else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
5756              activate(menu);
5757            }
5758          }, 50);
5759        });
5760      }
5761      else if (mode == 'useragent_custom'){
5762        if (options.useragent != ''){
5763          var ua = RegExp(options.useragent, 'i');
5764          if (navigator.userAgent.match(ua)){
5765            activate(menu);
5766          }
5767        }
5768      }
5769      else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego)|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|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|phone)|xda|xiino/i)){
5770        activate(menu);
5771      }
5772    }
5773    return this;
5774  }
5775})(jQuery);
5776;
5777/*
5778 * sf-Smallscreen v1.3b - Provides small-screen compatibility for the jQuery Superfish plugin.
5779 *
5780 * Developer's note:
5781 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish)
5782 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact
5783 *
5784 * jQuery version: 1.3.x or higher.
5785 *
5786 * Dual licensed under the MIT and GPL licenses:
5787 *  http://www.opensource.org/licenses/mit-license.php
5788 *  http://www.gnu.org/licenses/gpl.html
5789  */
5790
5791(function($){
5792  $.fn.sfsmallscreen = function(options){
5793    options = $.extend({
5794      mode: 'inactive',
5795      type: 'accordion',
5796      breakpoint: 768,
5797      breakpointUnit: 'px',
5798      useragent: '',
5799      title: '',
5800      addSelected: false,
5801      menuClasses: false,
5802      hyperlinkClasses: false,
5803      excludeClass_menu: '',
5804      excludeClass_hyperlink: '',
5805      includeClass_menu: '',
5806      includeClass_hyperlink: '',
5807      accordionButton: 1,
5808      expandText: 'Expand',
5809      collapseText: 'Collapse'
5810    }, options);
5811
5812    // We need to clean up the menu from anything unnecessary.
5813    function refine(menu){
5814      var
5815      refined = menu.clone(),
5816      // Things that should not be in the small-screen menus.
5817      rm = refined.find('span.sf-sub-indicator'),
5818      // This is a helper class for those who need to add extra markup that shouldn't exist
5819      // in the small-screen versions.
5820      rh = refined.find('.sf-smallscreen-remove'),
5821      // Mega-menus has to be removed too.
5822      mm = refined.find('ul.sf-multicolumn');
5823      for (var a = 0; a < rh.length; a++){
5824        rh.eq(a).replaceWith(rh.eq(a).html());
5825      }
5826      if (options.accordionButton == 2 || options.type == 'select'){
5827        for (var b = 0; b < rm.length; b++){
5828          rm.eq(b).remove();
5829        }
5830      }
5831      if (mm.length > 0){
5832        mm.removeClass('sf-multicolumn');
5833        var ol = refined.find('div.sf-multicolumn-column > ol');
5834        for (var o = 0; o < ol.length; o++){
5835          ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>');
5836        }
5837        var elements = ['div.sf-multicolumn-column','.sf-multicolumn-wrapper > ol','li.sf-multicolumn-wrapper'];
5838        for (var i = 0; i < elements.length; i++){
5839          obj = refined.find(elements[i]);
5840          for (var t = 0; t < obj.length; t++){
5841            obj.eq(t).replaceWith(obj.eq(t).html());
5842          }
5843        }
5844        refined.find('.sf-multicolumn-column').removeClass('sf-multicolumn-column');
5845      }
5846      refined.add(refined.find('*')).css({width:''});
5847      return refined;
5848    }
5849
5850    // Creating <option> elements out of the menu.
5851    function toSelect(menu, level){
5852      var
5853      items = '',
5854      childLI = $(menu).children('li');
5855      for (var a = 0; a < childLI.length; a++){
5856        var list = childLI.eq(a), parent = list.children('a, span');
5857        for (var b = 0; b < parent.length; b++){
5858          var
5859          item = parent.eq(b),
5860          path = (item.is('a') && !!item.attr('href')) ? item.attr('href') : '',
5861          // Class names modification.
5862          itemClone = item.clone(),
5863          classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '',
5864          classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes;
5865          // Retaining the active class if requested.
5866          if (options.addSelected && item.hasClass('active')){
5867            classes += ' active';
5868          }
5869          classes = (classes) ? ' class="' + classes + '"' : '';
5870          // <option> has to be disabled if the item is not a link.
5871          disable = (path == '') || (path == '#') ? ' disabled="disabled"' : '',
5872          // Crystal clear.
5873          subIndicator = 1 < level ? Array(level).join('-') + ' ' : '';
5874          // Preparing the <option> element.
5875          items += '<option value="' + path + '"' + classes + disable + '>' + subIndicator + $.trim(item.text()) +'</option>',
5876          childUL = list.find('> ul');
5877          // Using the function for the sub-menu of this item.
5878          for (var u = 0; u < childUL.length; u++){
5879            items += toSelect(childUL.eq(u), level + 1);
5880          }
5881        }
5882      }
5883      return items;
5884    }
5885
5886    // Create the new version, hide the original.
5887    function convert(menu){
5888      var menuID = menu.attr('id'),
5889      // Creating a refined version of the menu.
5890      refinedMenu = refine(menu);
5891      // Currently the plugin provides two reactions to small screens.
5892      // Converting the menu to a <select>
5892 element, and converting to an accordion version of the menu.
5893      if (options.type == 'accordion'){
5894        var
5895        toggleID = menuID + '-toggle',
5896        accordionID = menuID + '-accordion';
5897        // Making sure the accordion does not exist.
5898        if ($('#' + accordionID).length == 0){
5899          var
5900          // Getting the style class.
5901          styleClass = menu.attr('class').split(' ').filter(function(item){
5902            return item.indexOf('sf-style-') > -1 ? item : '';
5903          }),
5904          // Creating the accordion.
5905          accordion = $(refinedMenu).attr('id', accordionID);
5906          // Removing unnecessary classes.
5907          accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled');
5908          // Adding necessary classes.
5909          accordion.addClass('sf-accordion sf-hidden');
5910          // Removing style attributes and any unnecessary class.
5911          accordion.find('li').each(function(){
5912            $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion');
5913          });
5914          // Doing the same and making sure all the sub-menus are off-screen (hidden).
5915          accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden');
5916          // Creating the accordion toggle switch.
5917          var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>';
5918
5919          // Adding Expand\Collapse buttons if requested.
5920          if (options.accordionButton == 2){
5921            accordion.addClass('sf-accordion-with-buttons');
5922            var parent = accordion.find('li.menuparent');
5923            for (var i = 0; i < parent.length; i++){
5924              parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>');
5925            }
5926          }
5927          // Inserting the according and hiding the original menu.
5928          menu.before(toggle).before(accordion).hide();
5929
5930          var
5931          accordionElement = $('#' + accordionID),
5932          // Deciding what should be used as accordion buttons.
5933          buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button',
5934          button = accordionElement.find(buttonElement);
5935
5936          // Attaching a click event to the toggle switch.
5937          $('#' + toggleID).on('click', function(e){
5938            // Preventing the click.
5939            e.preventDefault();
5940            // Adding the sf-expanded class.
5941            $(this).toggleClass('sf-expanded');
5942
5943            if (accordionElement.hasClass('sf-expanded')){
5944              // If the accordion is already expanded:
5945              // Hiding its expanded sub-menus and then the accordion itself as well.
5946              accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded')
5947              .end().children('ul').hide()
5948              // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time.
5949              // Basically we'll add a class that keeps the sub-menu off-screen and still visible,
5950              // and make it invisible and removing the class one moment before showing or hiding it.
5951              // This helps screen reader software access all the menu items.
5952              .end().hide().addClass('sf-hidden').show();
5953              // Changing the caption of any existing accordion buttons to 'Expand'.
5954              if (options.accordionButton == 2){
5955                accordionElement.find('a.sf-accordion-button').text(options.expandText);
5956              }
5957            }
5958            else {
5959              // But if it's collapsed,
5960              accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show();
5961            }
5962          });
5963
5964          // Attaching a click event to the buttons.
5965          button.on('click', function(e){
5966            // Making sure the buttons does not exist already.
5967            if ($(this).closest('li').children('ul').length > 0){
5968              e.preventDefault();
5969              // Selecting the parent menu items.
5970              var parent = $(this).closest('li');
5971              // Creating and inserting Expand\Collapse buttons to the parent menu items,
5972              // of course only if not already happened.
5973              if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){
5974                var
5975                // Cloning the hyperlink of the parent menu item.
5976                cloneLink = parent.children('a.menuparent').clone();
5977                // Removing unnecessary classes and element(s).
5978                cloneLink.removeClass('menuparent sf-with-ul').children('.sf-sub-indicator').remove();
5979                // Wrapping the hyerplinks in <li>.
5980                cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink);
5981                // Adding a helper class and attaching them to the sub-menus.
5982                parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink);
5983              }
5984              // Once the button is clicked, collapse the sub-menu if it's expanded.
5985              if (parent.hasClass('sf-expanded')){
5986                parent.children('ul').slideUp('fast', function(){
5987                  // Doing the accessibility trick after hiding the sub-menu.
5988                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
5989                });
5990                // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted.
5991                if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){
5992                  parent.children('.sf-accordion-button').text(options.expandText);
5993                }
5994              }
5995              // Otherwise, expand the sub-menu.
5996              else {
5997                // Doing the accessibility trick and then showing the sub-menu.
5998                parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast')
5999                // Changing the caption of the inserted Expand link to 'Collape', if any is inserted.
6000                .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText)
6001                // Hiding any expanded sub-menu of the same level.
6002                .end().siblings('li.sf-expanded').children('ul')
6003                .slideUp('fast', function(){
6004                  // Doing the accessibility trick after hiding it.
6005                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
6006                })
6007                // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus.
6008                .parent().children('a.sf-accordion-button').text(options.expandText);
6009              }
6010            }
6011          });
6012        }
6013      }
6014      else {
6015        var
6016        // Class names modification.
6017        menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '',
6018        classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes,
6019        classes = (classes) ? ' class="' + classes + '"' : '';
6020
6021        // Making sure the <select> element does not exist already.
6022        if ($('#' + menuID + '-select').length == 0){
6023          // Creating the <option> elements.
6024          var newMenu = toSelect(refinedMenu, 1),
6025          // Creating the <select> element and assigning an ID and class name.
6026          selectList = $('<select' + classes + ' id="' + menuID + '-select"/>')
6027          // Attaching the title and the items to the <select> element.
6028          .html('<option>' + options.title + '</option>' + newMenu)
6029          // Attaching an event then.
6030          .change(function(){
6031            // Except for the first option that is the menu title and not a real menu item.
6032            if ($('option:selected', this).index()){
6033              window.location = selectList.val();
6034            }
6035          });
6036          // Applying the addSelected option to it.
6037          if (options.addSelected){
6038            selectList.find('.active').attr('selected', !0);
6039          }
6040          // Finally inserting the <select> element into the document then hiding the original menu.
6041          menu.before(selectList).hide();
6042        }
6043      }
6044    }
6045
6046    // Turn everything back to normal.
6047    function turnBack(menu){
6048      var
6049      id = '#' + menu.attr('id');
6050      // Removing the small screen version.
6051      $(id + '-' + options.type).remove();
6052      // Removing the accordion toggle switch as well.
6053      if (options.type == 'accordion'){
6054        $(id + '-toggle').parent('div').remove();
6055      }
6056      // Remove inline CSS display property; less clear than simply using .show(), but respects stylesheet
6057      $(id).css('display', '');
6058    }
6059
6060    // Return original object to support chaining.
6061    // Although this is unnecessary because of the way the module uses these plugins.
6062    for (var s = 0; s < this.length; s++){
6063      var
6064      menu = $(this).eq(s),
6065      mode = options.mode;
6066      // The rest is crystal clear, isn't it? :)
6067      if (menu.children('li').length == 0){
6068        // Skip empty menu which will not be visible and don't want to suddenly make it visible.
6069      }
6070      else if (mode == 'always_active'){
6071        convert(menu);
6072      }
6073      else if (mode == 'window_width'){
6074        var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint,
6075        windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
6076        timer;
6077        if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
6078          convert(menu);
6079        }
6080        else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
6081          convert(menu);
6082        }
6083        $(window).resize(function(){
6084          clearTimeout(timer);
6085          timer = setTimeout(function(){
6086            var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
6087            if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
6088              convert(menu);
6089            }
6090            else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
6091              convert(menu);
6092            }
6093            else {
6094              turnBack(menu);
6095            }
6096          }, 50);
6097        });
6098      }
6099      else if (mode == 'useragent_custom'){
6100        if (options.useragent != ''){
6101          var ua = RegExp(options.useragent, 'i');
6102          if (navigator.userAgent.match(ua)){
6103            convert(menu);
6104          }
6105        }
6106      }
6107      else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|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|phone)|xda|xiino/i)){
6108        convert(menu);
6109      }
6110    }
6111    return this;
6112  }
6113})(jQuery);
6114;
6115/*
6116 * Supersubs v0.4b - jQuery plugin
6117 * Copyright (c) 2013 Joel Birch
6118 *
6119 * Dual licensed under the MIT and GPL licenses:
6120 *  http://www.opensource.org/licenses/mit-license.php
6121 *  http://www.gnu.org/licenses/gpl.html
6122 *
6123 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
6124 * their longest list item children. If you use this, please expect bugs and report them
6125 * to the jQuery Google Group with the word 'Superfish' in the subject line.
6126 *
6127 */
6128/*
6129 * This is not the original jQuery Supersubs plugin.
6130 * Please refer to the README for more information.
6131 */
6132
6133(function($){ // $ will refer to jQuery within this closure
6134  $.fn.supersubs = function(options){
6135    var opts = $.extend({}, $.fn.supersubs.defaults, options);
6136    // return original object to support chaining
6137    // Although this is unnecessary due to the way the module uses these plugins.
6138    for (var a = 0; a < this.length; a++) {
6139      // cache selections
6140      var $$ = $(this).eq(a),
6141      // support metadata
6142      o = $.meta ? $.extend({}, opts, $$.data()) : opts;
6143      // Jump one level if it's a "NavBar"
6144      if ($$.hasClass('sf-navbar')) {
6145        $$ = $$.children('li').children('ul');
6146      }
6147      // cache all ul elements
6148      var $ULs = $$.find('ul');
6149      if ($ULs.length) {
6150        // get the font size of menu.
6151        // .css('fontSize') returns various results cross-browser, so measure an em dash instead
6152        var fontsize = $('<li id="menu-fontsize">&#8212;</li>'),
6153        size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;')
6154        .appendTo($$)[0].clientWidth; //clientWidth is faster than width()
6155        // remove em dash
6156        fontsize.remove();
6157
6158        // loop through each ul in menu
6159        for (var b = 0; b < $ULs.length; b++) {
6160          var
6161          // cache this ul
6162          $ul = $ULs.eq(b);
6163          // If a multi-column sub-menu, and only if correctly configured.
6164          if (o.multicolumn && $ul.hasClass('sf-multicolumn') && $ul.find('.sf-multicolumn-column').length > 0){
6165            // Look through each column.
6166            var $column = $ul.find('div.sf-multicolumn-column > ol'),
6167            // Overall width.
6168            mwWidth = 0;
6169            for (var d = 0; d < $column.length; d++){
6170              resize($column.eq(d));
6171              // New column width, in pixels.
6172              var colWidth = $column.width();
6173              // Just a trick to convert em unit to px.
6174              $column.css({width:colWidth})
6175              // Making column parents the same size.
6176              .parents('.sf-multicolumn-column').css({width:colWidth});
6177              // Overall width.
6178              mwWidth += parseInt(colWidth);
6179            }
6180            // Resizing the columns container too.
6181            $ul.add($ul.find('li.sf-multicolumn-wrapper, li.sf-multicolumn-wrapper > ol')).css({width:mwWidth});
6182          }
6183          else {
6184            resize($ul);
6185          }
6186        }
6187      }
6188    }
6189    function resize($ul){
6190      var
6191      // get all (li) children of this ul
6192      $LIs = $ul.children(),
6193      // get all anchor grand-children
6194      $As = $LIs.children('a');
6195      // force content to one line and save current float property
6196      $LIs.css('white-space','nowrap');
6197      // remove width restrictions and floats so elements remain vertically stacked
6198      $ul.add($LIs).add($As).css({float:'none',width:'auto'});
6199      // this ul will now be shrink-wrapped to longest li due to position:absolute
6200      // so save its width as ems.
6201      var emWidth = $ul.get(0).clientWidth / size;
6202      // add more width to ensure lines don't turn over at certain sizes in various browsers
6203      emWidth += o.extraWidth;
6204      // restrict to at least minWidth and at most maxWidth
6205      if (emWidth > o.maxWidth) {emWidth = o.maxWidth;}
6206      else if (emWidth < o.minWidth) {emWidth = o.minWidth;}
6207      emWidth += 'em';
6208      // set ul to width in ems
6209      $ul.css({width:emWidth});
6210      // restore li floats to avoid IE bugs
6211      // set li width to full width of this ul
6212      // revert white-space to normal
6213      $LIs.add($As).css({float:'',width:'',whiteSpace:''});
6214      // update offset position of descendant ul to reflect new width of parent.
6215      // set it to 100% in case it isn't already set to this in the CSS
6216      for (var c = 0; c < $LIs.length; c++) {
6217        var $childUl = $LIs.eq(c).children('ul');
6218        var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right';
6219        $childUl.css(offsetDirection,'100%');
6220      }
6221    }
6222    return this;
6223  };
6224  // expose defaults
6225  $.fn.supersubs.defaults = {
6226    multicolumn: true, // define width for multi-column sub-menus and their columns.
6227    minWidth: 12, // requires em unit.
6228    maxWidth: 27, // requires em unit.
6229    extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
6230  };
6231})(jQuery); // plugin code ends
6232;
6233(function ($) {
6234	// time in UTC
6235	var countDownEndDate = new Date("2024-09-24T23:59:59+11:00").getTime();
6236  
6237	// Update the count down every 1 second
6238	var x = setInterval(function () {
6239	  // Get today's date and time
6240	  var now = new Date().getTime();
6241  
6242	  // Find the distance between now and the count down date
6243	  var distance = countDownEndDate - now;
6244  
6245	  // Time calculations for days, hours, minutes and seconds
6246	  var days = Math.floor(distance / (1000 * 60 * 60 * 24));
6247	  var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
6248	  var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
6249	  var seconds = Math.floor((distance % (1000 * 60)) / 1000);
6250  
6251	  if (days < 10) days = "0" + days;
6252	  if (hours < 10) hours = "0" + hours;
6253	  if (minutes < 10) minutes = "0" + minutes;
6254	  if (seconds < 10) seconds = "0" + seconds;
6255  
6256	  // Display the result in the element with id="demo"
6257	  $(".wrap_days .numerator").text(days);
6258	  $(".wrap_hrs .numerator").text(hours);
6259	  $(".wrap_mins .numerator").text(minutes);
6260	  $(".wrap_secs .numerator").text(seconds);
6261  
6262	  // If the count down is finished, write some text
6263	  if (distance > 0) {
6264		$(".countdown-wrapper").slideDown();
6265	  } else {
6266		clearInterval(x);
6267	  }
6268	}, 1000);
6269  })(jQuery);;
6270document.addEventListener("DOMContentLoaded", function () {
6271  var acc = document.getElementsByClassName("accordion");
6272
6273  Array.prototype.forEach.call(document.querySelectorAll(".accordion"), function (element) {
6274    element.classList.remove("active");
6275  });
6276
6277  Array.prototype.forEach.call(document.querySelectorAll(".panel"), function (element) {
6278    element.classList.remove("show");
6279  });
6280
6281  function click_action() {
6282    Array.prototype.forEach.call(acc, function (element) {
6283      element.classList.remove("active");
6284      element.nextElementSibling.classList.remove("show");
6285    });
6286    
6287    this.classList.add("active");
6288    this.nextElementSibling.classList.add("show");
6289  }
6290
6291  for (var i = 0; i < acc.length; i++) {
6292    acc[i].onclick = click_action;
6293  }
6294});
6295;
6296/*
6297 AngularJS v1.8.0
6298 (c) 2010-2020 Google, Inc. http://angularjs.org
6299 License: MIT
6300*/
6301(function(z){'use strict';function ve(a){if(D(a))w(a.objectMaxDepth)&&(Xb.objectMaxDepth=Yb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParam
6301sEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Xb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Xb}function Yb(a){return X(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.8.0
vendor: 13,480 bytes, lines 6301-6327
6301/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
6302f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function za(a){if(null==a||$a(a))return!1;if(H(a)||C(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return X(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)||
6303za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Pc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Qc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Zb(a){return function(b,d){a(d,b)}}function we(){return++qb}
6304function $b(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):ac(p)?a[m]=p.clone():"__proto__"!==m&&(D(a[m])||(a[m]=H(p)?[]:{}),$b(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return $b(a,Ha.call(arguments,1),!1)}function xe(a){return $b(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
630510)}function bc(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function cc(a){return B(a.toString)&&a.toString!==la}function A(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Pc(a){return null!==a&&"object"===typeof a&&!Rc(a)}function C(a){return"string"===typeof a}function X(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
6306function H(a){return Array.isArray(a)||a instanceof Array}function dc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ye(a){return a&&X(a.length)&&ze.test(la.call(a))}
6307function ac(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Pc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&
6308(b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw oa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Rc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer),
6309a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)}
6310var g=[],k=[];d=Yb(d)?d:NaN;if(b){if(ye(b)||"[object ArrayBuffer]"===la.call(b))throw oa("cpta");if(a===b)throw oa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function ec(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c],
6311b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?ec(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof
6312RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Sc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&z.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!A(a))return X(b)||(b=b?2:null),JSON.stringify(a,Sc,b)}function Tc(a){return C(a)?JSON.parse(a):a}function fc(a,b){a=a.replace(Be,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
6313a)/6E4;return Y(d)?b:d}function Uc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function gc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=fc(b,c);return Uc(a,d*(b-c))}function Aa(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"),
6314function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
6315b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,C(d=a.getAttribute(d)))return d;return null}function Ee(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});
6316d&&(Fe?(e.strictDi=null!==De(d,"strict-di"),b(d,c?[c]:[],e)):z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
6317function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
6318ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
6319x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname",
6320b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function ub(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function jc(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!cc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function Me(a){function b(a,
6321b,c){return a[b]||(a[b]=c())}var d=F("$injector"),c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod",
6322f);var e=[],n=[],s=[],G=a("$injector","invoke","push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider",
6323"register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ne(a,b){var d=[];Yb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Sc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}
6324function Oe(a){S(a,{errorHandlingConfig:ve,bootstrap:Wc,copy:Ia,extend:S,merge:xe,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Tc,identity:Ta,isUndefined:A,isDefined:w,isString:C,isFunction:B,isObject:D,isNumber:X,isElement:ac,isArray:H,version:Pe,isDate:ha,callbacks:{$$counter:0},getTestability:He,reloadWithDebugInfo:Ge,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:Ke,$$minErr:F,$$csp:Ba,$$encodeUriSegment:ic,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:jc,$$uppercase:vb});
6325lc=Me(z);lc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Qe});a.provider("$compile",Zc).directive({a:Re,input:$c,textarea:$c,form:Se,script:Te,select:Ue,option:Ve,ngBind:We,ngBindHtml:Xe,ngBindTemplate:Ye,ngClass:Ze,ngClassEven:$e,ngClassOdd:af,ngCloak:bf,ngController:cf,ngForm:df,ngHide:ef,ngIf:ff,ngInclude:gf,ngInit:hf,ngNonBindable:jf,ngPluralize:kf,ngRef:lf,ngRepeat:mf,ngShow:nf,ngStyle:of,ngSwitch:pf,ngSwitchWhen:qf,ngSwitchDefault:rf,ngOptions:sf,ngTransclude:tf,ngModel:uf,
6326ngList:vf,ngChange:wf,pattern:ad,ngPattern:ad,required:bd,ngRequired:bd,minlength:cd,ngMinlength:cd,maxlength:dd,ngMaxlength:dd,ngValue:xf,ngModelOptions:yf}).directive({ngInclude:zf,input:Af}).directive(wb).directive(ed);a.provider({$anchorScroll:Bf,$animate:Cf,$animateCss:Df,$$animateJs:Ef,$$animateQueue:Ff,$$AnimateRunner:Gf,$$animateAsyncRun:Hf,$browser:If,$cacheFactory:Jf,$controller:Kf,$document:Lf,$$isDocumentHidden:Mf,$exceptionHandler:Nf,$filter:fd,$$forceReflow:Of,$interpolate:Pf,$interval:Qf,
6327$$intervalFactory:Rf,$http:Sf,$httpParamSerializer:Tf,$httpParamSerializerJQLike:Uf,$httpBackend:Vf,$xhrFactory:Wf,$jsonpCallbacks:Xf,$location:Yf,$log:Zf,$parse:$f,$rootScope:ag,$q:bg,$$q:cg,$sce:dg,$sceDelegate:eg,$sniffer:fg,$$taskTrackerFactory:gg,$templateCache:hg,$templateRequest:ig,$$testability:jg,$timeout:kg,$window:lg,$$rAF:mg,$$jqLite:ng,$$Map:og,$$cookieReader:pg})}]).info({angularVersion:"1.8.
63270
vendor: 13,410 bytes, lines 6327-6354
6327"})}function xb(a,b){return b.toUpperCase()}function yb(a){return a.replace(qg,xb)}function mc(a){a=
6328a.nodeType;return 1===a||!a||9===a}function gd(a,b){var d,c,e,f=b.createDocumentFragment(),g=[],k;if(nc.test(a)){d=f.appendChild(b.createElement("div"));c=(rg.exec(a)||["",""])[1].toLowerCase();e=U.legacyXHTMLReplacement?a.replace(sg,"<$1></$2>"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a));
6329f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1;
6330return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Bb[a]&&g(Bb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];jd(a)}}function rc(a,b){var d=a.ng339;if(d=
6331d&&Ka[d])b?delete d.data[b]:d.data={},jd(a)}function Ab(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++ug,d=Ka[d]={events:{},data:{},handle:void 0});return d}function sc(a,b,d){if(mc(a)){var c,e=w(d),f=!e&&b&&!D(b),g=!b;a=(a=Ab(a,!f))&&a.data;if(e)a[yb(b)]=d;else{if(g)return a;if(f)return a&&a[yb(b)];for(c in b)a[yb(c)]=b[c]}}}function Cb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Db(a,b){if(b&&a.setAttribute){var d=
6332(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",V(c))}}function Eb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",V(c))}}function pc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=
63330;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function ld(a,b){return Fb(a,"$"+(b||"ngController")+"Controller")}function Fb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function md(a){for(zb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Gb(a,b){b||zb(a);var d=a.parentNode;d&&d.removeChild(a)}function vg(a,b){b=b||z;if("complete"===b.document.readyState)b.setTimeout(a);
6334else x(b).on("load",a)}function hd(a){function b(){z.document.removeEventListener("DOMContentLoaded",b);z.removeEventListener("load",b);a()}"complete"===z.document.readyState?z.setTimeout(a):(z.document.addEventListener("DOMContentLoaded",b),z.addEventListener("load",b))}function nd(a,b){var d=Hb[b.toLowerCase()];return d&&od[ua(a)]&&d}function wg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(A(c.immediatePropagationStopped)){var k=
6335c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=f.specialHandlerWrapper||xg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function xg(a,b,d){d.call(a,b)}function yg(a,b,d){var c=b.relatedTarget;c&&(c===a||zg.call(a,c))||d.call(a,b)}function ng(){this.$get=
6336function(){return S(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Eb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||we)():d+":"+a}function pd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function qd(a){a=Function.prototype.toString.call(a).replace(Ag,
6337"");return a.match(Bg)||a.match(Cg)}function Dg(a){return(a=qd(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Zb(a));else return a(b,c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ca("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(A(c))throw Ca("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(A(a)||
6338H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{C(a)?(c=lc(a),t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ca("modulerr",
6339a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ca("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ca("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&
6340(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(wa||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}
6341b=!0===b;var h={},l=[],m=new Ib,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ca("unpr",l.join(" <- "));}),s={},
6342G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function Bf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===
6343ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():ac(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):X(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=C(a)?a:X(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===
6344b&&""===a||vg(function(){c.$evalAsync(g)})});return g}]}function ib(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function Eg(a){C(a)&&(a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Fg(a,b,d,c,e){function f(){pa=null;k()}function g(){t=y();t=A(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})}
6345var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=G.notifyWhenNoPendingTasks;var t,N,v=l.href,kc=b.find("base"),pa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){A(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h;
6346var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(pa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(pa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());pa&&(pa=b);return h}return(pa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate",
6347f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=kc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function If(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Fg(a,
6348c,b,d,e)}]}function Jf(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!A(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=
6349m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function hg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}
6350function Zc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&&
6351a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=Ae("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function pa(b,d){gb(b,"name");Ja(b,"directive");C(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f,
6352g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!C(l)||!/[EACM]/.test(l)))throw $("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Zb(pa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:
6353b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Gg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!C(a))return r(a,Zb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,
6354c)};this.aHrefSanitization
vendor: 6,795 bytes, lines 6354-6367
6354Whitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=
6355function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(W.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(W.CSS,["*|style"]);a(W.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));
6356a(W.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));a(W.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=
6357void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua=void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!C(a))throw $("srcset",b,a.toString());for(var c="",d=V(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(V(d[g])),c=c+(" "+V(d[g+1]));d=V(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(V(d[0]));2===d.length&&(c+=" "+V(d[1]));return c}function w(a,
6358b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&
6359(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,
6360k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m<p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===wa&&jb(a,t,k);m=tc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):
6361null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function jb(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,
6362k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function tc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);Y(b,xa(h),"E",e,f);for(var l,m,n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=xa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],
6363u="On"===J[1],m=m.replace(rd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})):(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(sd(p,L,c,n,m,!1));else{n=xa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=t,nd(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);Y(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=
6364a.className;D(g)&&(g=g.animVal);if(C(g)&&""!==g)for(;a=k.exec(g);)n=xa(a[2]),Y(b,n,"C",e,f)&&(d[n]=V(a[3])),g=g.substr(a.index+a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=xa(f[1]);Y(b,h,"M",d,e)&&(c[h]=V(f[2]))}}catch(k){}}function U(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&
6365e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function W(a,b,c){return function(d,e,f,g,h){e=U(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=W(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Ba(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=W(b,c,d));b.require=u.require;b.directiveName=
6366Q;if(s===u||u.$$isolateScope)b=Ba(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)||(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(A(f))throw $("noslot",d,Aa(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,
6367y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings,
vendor: 15,729 bytes, lines 6367-6397
6367u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Hg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);L.bindingInfo=Da(G,g,L.instance,Hg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,X(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&&
6368(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,
6369t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,M,R=e,q,ma=!1,Jb=!1,O,sa=0,C=a.length;sa<C;sa++){u=a[sa];var E=u.$$start,jb=u.$$end;E&&(y=U(b,E,jb));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&
6370!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa=
6371T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=
6372!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==
6373u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length);
6374var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"===
6375p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=bc(a[d],{$$isolateScope:b,$$newScope:c})}function Y(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(A(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};
6376D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c=
6377b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=bc(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e,
6378I;c=Na(c);if(u.replace){c=nc.test(c)?td(ja(L,V(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};oa(f,b,e);var v=tc(e,[],c);D(u.scope)&&fa(v,!0);a=v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=qc(e));oa(y,
6379x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){dc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),
6380a,Aa(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=z.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"===
6381b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,
6382d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,
6383compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&
6384(a.context=c);break}f&&f.replaceChild(c,d);a=z.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Ba(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ca(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,Aa(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&&
6385!ec(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Kb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(C(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];C(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Kb(uc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m,
6386f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:ec;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Kb(uc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t,
6387function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=z.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&
63880<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ud(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=ud(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=nd(this.$$element[0],a),g=vd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Xc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||A(b)?this.$$element.removeAttr(e):
6389Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||A(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra=
6390/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,"ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return z.document.createComment(c)};
6391return da}]}function Kb(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return a.replace(rd,"").replace(Jg,function(a,d,c){return c?d.toUpperCase():d})}function ud(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function td(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a}
6392function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope,
6393h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;
6394a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get=
6395function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a}
6396function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&&
6397"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrf
vendor: 29,198 bytes, lines 6397-6454
6397WhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader",
6398"$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=Bd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",
6399b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");
6400var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,
6401"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),
6402a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,
6403s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Lb("badjsonp",a);c=hc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===
6404c)throw Lb("badjsonp",a);if(d===b)throw Lb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=C(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var v=[];r(d,function(a){v.unshift(C(a)?m.get(a):m.invoke(a))});var kc=Og(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]=function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,
6405c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Wf(){this.$get=function(){return function(){return new z.XMLHttpRequest}}}function Vf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Pg(a,c,a.defer,b,d[0])}]}function Pg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",
6406m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;pa&&pa();y&&y.abort()}function v(a,b,c,e,f,g){w(P)&&d.cancel(P);pa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),pa=f(k,q,function(a,
6407b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||"",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")};y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,
6408-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==s)throw I;}y.send(A(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Pf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=
6409["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:jc(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length||-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=
6410k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b=0,c=I.length;b<c;b++){if(p&&A(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&
64111<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Qf(){this.$get=
6412["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Qg("badprom");if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled");c(a);return!0};return e}]}function Rf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,
6413f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==
6414a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0,b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:
6415a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))?b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);
6416this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=
6417function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=
6418a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",
6419m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===
6420f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",
6421a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,
6422g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,
6423b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a:b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==
6424a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=
6425a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&
6426(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;
6427a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===
6428q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=
6429function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];
6430return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Bc(k)}b&&(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||
6431d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant?a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;
6432return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs?a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Hd?function(b){return a(b)}:a})));return p(d)}var G={csp:Ba().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&
6433c};f.$$getAst=function(a){var b=new Ob(G);return(new Nb(b,e,G)).getAst(a).ast};return f}]}function bg(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Nd(function(a){b.$evalAsync(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function cg(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Nd(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Nd(a,b,d){function c(){return new e}
6434function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):A(c)?"undefined":"string"!==typeof c?Ne(c,void 0):c);dc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&
6435a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=!0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f,p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||
6436(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c,d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,
6437a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b}var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(A(a)&&A(b)&&A(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);
64380<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c=0,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});
6439return b.promise};return q}function mg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function ag(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;
6440this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++qb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===wa&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=
6441a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++qb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=
6442b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):
6443c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=
6444!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a,b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,
6445g,h;if(!A(e)){if(D(e))if(za(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,
6446function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(za(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],A,z;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e),t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{z=w[n],l=z.fn,l(z.scope,z.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=
6447n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):Y(g)&&Y(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);
6448}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===
6449this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||
6450w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=
64510),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=
6452null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=
6453null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Qe(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Xg(a){if("self"===
6454a)return a;if(C(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Od(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");}function Pd(a){var b=[];w(a)&&r(a,function(a){b.push(Xg(a))});return b}function eg(){this.SCE_CONTEXTS=W;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=Pd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Pd(a));return b};
vendor: 23,078 bytes, lines 6455-6500
6455this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Cc(b,Qd))||(z.document.baseURI?c=z.document.baseURI:(Na||(Na=z.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),c=Cc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};
6456return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[W.HTML]=f(k);h[W.CSS]=f(k);h[W.MEDIA_URL]=f(k);h[W.URL]=f(h[W.MEDIA_URL]);h[W.JS]=f(k);h[W.RESOURCE_URL]=f(h[W.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||A(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||A(f)||""===f)return f;var k=h.hasOwnProperty(d)?
6457h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===W.MEDIA_URL||d===W.URL)return c(f.toString(),d===W.MEDIA_URL);if(d===W.RESOURCE_URL){var k=ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===W.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():
6458a}}}]}function dg(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>wa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W,
6459function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||
6460[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&&
6461a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):
6462a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},
6463function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-",
6464"data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function kg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r;
6465r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw $g("badprom");if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!C(a))return a;wa&&(aa.setAttribute("href",
6466a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!ah&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Og(a){var b=[Qd].concat(a.map(ga));return function(a){a=ga(a);return b.some(Cc.bind(null,a))}}function Cc(a,b){a=ga(a);b=ga(b);return a.protocol===
6467b.protocol&&a.host===b.host}function lg(){this.$get=ia(z)}function Rd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),A(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function pg(){this.$get=Rd}function fd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+
6468"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Sd);b("date",Td);b("filter",bh);b("json",ch);b("limitTo",dh);b("lowercase",eh);b("number",Ud);b("orderBy",Vd);b("uppercase",fh)}function bh(){return function(a,b,d,c){if(!za(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Ec(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=gh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,
6469b)}}function gh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(A(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!cc(a))return!1;a=K(""+a);b=K(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Ec(a),k=Ec(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&&
6470"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!A(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function Ec(a){return null===a?"null":typeof a}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){A(c)&&(c=b.CURRENCY_SYM);A(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Wd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,
6471c)}}function Ud(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Wd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function hh(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Xd))&&(a=a.replace(Xd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a,
6472b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Wd(a,b,d,c,e){if(!C(a)&&!X(a)||isNaN(a))return"";
6473var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=hh(k);ih(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},!0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+
6474h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Fc+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d=
6475Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+
6476(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS,
6477m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c=
64781,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=
6479h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!za(a))throw F("orderBy")("notarray",a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a;
6480cc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Qb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name||
6481b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=mb;this.$$element=a;this.$$animate=c;ae(this)}function ae(a){a.$$classCache={};a.$$classCache[be]=!(a.$$classCache[nb]=a.$$element.hasClass(nb))}function ce(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Xc(c,"-"):"";b(a,nb+
6482c,!0===d);b(a,be+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){A(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,a,k),de(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid=
6483de(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,g,this)}}function de(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Ic(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate",
6484function(a){if(A(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||
6485m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-
64861)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function ob(a,b,d,c){return function(e,f,g,k,h,l,m,
6487p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b=
6488k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)||
6489g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt",
6490b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a=
6491a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):C(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g,
6492k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1),
6493c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function sd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Sb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=
6494[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=mb;this.$options=Tb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=
6495null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;ae(this);oh(this)}function oh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Mc(a){this.$$options=a}function ie(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})}
6496function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function je(a,b,d){if(a){C(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",b,a,Aa(d));return a}}function Ub(a){a=fa(a);return Y(a)?-1:a}var Xb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ke=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return C(a)?a.toLowerCase():a},vb=function(a){return C(a)?a.toUpperCase():a},wa,x,sb,Ha=[].slice,Kg=[].splice,ph=[].push,la=Object.prototype.toString,Rc=Object.getPrototypeOf,
6497oa=F("ng"),ca=z.angular||(z.angular={}),lc,qb=0;wa=z.document.documentMode;var Y=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=[];var ze=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,V=function(a){return C(a)?a.trim():a},Od=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=z.document.querySelector("[ng-csp]")||z.document.querySelector("[data-ng-csp]");if(a){var b=
6498a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=z.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},Be=/:/g,Qa=["ng-",
6499"data-ng-","ng:","x-ng-"],Fe=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof z.HTMLScriptElement||b instanceof z.SVGScriptElement))return!1;b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(z.document),
6500Ie=/[A-Z]/g,Yc=!1,Pa=3,Pe={full:"1.8.
65000",major:1,minor:8,dot:0,codeName:"nested-vaccination
vendor: 74,250 bytes, lines 6500-6644
6500"};U.expando="ng339";var Ka=U.cache={},ug=1;U._data=function(a){return this.cache[a[this.expando]]||{}};var qg=/-([a-z])/g,qh=/^-ms-/,Bb={mouseleave:"mouseout",mouseenter:"mouseover"},oc=F("jqLite"),tg=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr",
6501"tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'<select multiple="multiple">',"</select>"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">","</"+le.join("></")+">"]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+
6502"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0;
6503return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)rc(a[b]),kd(a[b])}},function(a,b){U[b]=a});r({data:sc,inheritedData:Fb,scope:function(a){return x.data(a,"$scope")||Fb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:ld,injector:function(a){return Fb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Cb,css:function(a,b,d){b=yb(b.replace(qh,"ms-"));if(w(d))a.style[b]=
6504d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Hb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(A(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(A(b)){if(a.multiple&&"select"===
6505ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(A(b))return a.innerHTML;zb(a,!0);a.innerHTML=b},empty:md},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==md&&A(2===a.length&&a!==Cb&&a!==ld?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===sc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=A(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e],
6506b,c);return this}});r({removeData:rc,on:function(a,b,d,c){if(w(c))throw oc("onargs");if(mc(a)){c=Ab(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=wg(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Bb[b]?(k(Bb[b],yg),k(b,void 0,!0)):k(b)}},off:kd,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,
6507b){var d,c=a.parentNode;zb(a);r(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new U(b),function(b){a.insertBefore(b,d)})}},
6508wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Gb,detach:function(a){Gb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Eb,removeClass:Db,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;A(e)&&(e=!Cb(a,b));(e?Eb:Db)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},
6509find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:qc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=Ab(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c,
6510b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<k;g++)A(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):pc(f,a(this[g],b,c,e));return w(f)?f:this}});U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off;var rh=Object.create(null);pd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return Y(a)?
6511rh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Ib=pd,og=[function(){this.$get=
6512[function(){return Ib}]}],Bg=/^([^(]+?)=>/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"),
6513Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,
6514k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,
6515d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,
6516off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=ib(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=ib(d.removeClass,
6517c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=ib(f.addClass,c);f.removeClass=ib(f.removeClass,d);return a.push(b,"setClass",f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=ib(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Hf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=
6518!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Gf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})};
6519f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&
6520this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Df=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&
6521(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),uc=new function(){};Zc.$inject=["$provide","$$sanitizeUriProvider"];Kb.prototype.isFirstChange=function(){return this.previousValue===uc};var rd=/^((?:x|data)[:\-_])/i,Jg=
6522/[:\-_]+(.)/g,xd=F("$controller"),wd=/^(\S+)(\s+as\s+([\w$]+))?$/,Of=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},yd="application/json",xc={"Content-Type":yd+";charset=utf-8"},Mg=/^\[|^\{(?!\{)/,Ng={"[":/]$/,"{":/}$/},Lg=/^\)]\}',?\n/,Lb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())};
6523var Qg=F("$interval"),Xf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},uh=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Rg={http:80,https:443,ftp:21},kb=F("$location"),
6524Sg=/^\s*[\\/]{2,}/,vh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=Ce(this.$$search),b=b?"#"+ic(b):"",a=a.split("/"),c=a.length;c--;)a[c]=ic(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Mb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var b=uh.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||
6525"");this.hash(b[5]||"");return this},protocol:Mb("$$protocol"),host:Mb("$$host"),port:Mb("$$port"),path:Fd("$$path",function(a){a=null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(C(a)||X(a))a=a.toString(),this.$$search=hc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw kb("isrcharg");break;default:A(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();
6526return this},hash:Fd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};r([Ed,Ac,zc],function(a){a.prototype=Object.create(vh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==zc||!this.$$html5)throw kb("nostate");this.$$state=A(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Wg={}.constructor.prototype.valueOf,Vb=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Vb[a]=
6527!0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,
6528text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Vb[b],e=Vb[d];Vb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===
6529typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},
6530isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=
6531w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,
6532text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+
65331,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=wh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression=
6534"ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text=
6535a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},
6536expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Jd(a))throw Ya("lval");a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression,
6537operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text,
6538left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},
6539primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",
6540this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());
6541return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");
6542return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),
6543b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",
6544this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],
6545body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage=
6546"main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+
6547";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},
6548recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,
6549void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,
6550b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),
6551h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,
6552m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):
6553(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,
6554g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();
6555h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+
6556b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,
6557b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,
6558b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1===
6559a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,
6560function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),
6561e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,
6562e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b?
6563{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):
6564g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,
6565c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Gd(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b,
6566d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,
6567e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=
6568a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=
6569e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,
6570c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),
6571oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),
6572MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0<a?"floor":"ceil"](a/60),2)+Pb(Math.abs(a%60),2))},
6573ww:$d(2),w:$d(1),G:Gc,GG:Gc,GGG:Gc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";
6574b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1],
6575c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,
6576b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},
6577$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,
6578Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,
6579"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb);
6580var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));
6581d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,
6582nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")),
6583"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a,
6584b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||
6585A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=
6586V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s=
6587na(a);Y(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Jc(a,b,d,c,"range");fe(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(p)||b>=p},g("min",k));
6588e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=
6589function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};
6590return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,
6591function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}],
6592Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a,
6593b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0,
6594transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",
6595controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",
6596f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a,
6597b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");
6598Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)||
6599""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,
6600Za);this.$$animate.addClass(this.$$element,Wb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!Y(this.$modelValue)){var a=
6601this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,
6602g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,
6603b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=
6604A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),A(a)){this.$$parserValid=!1;break}Y(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue=
6605d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");X(b[a])?b=b[a]:X(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?
6606b=b["default"]:X(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},$overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue=
6607a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,
6608this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ce({clazz:Sb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var uf=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(nb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g);
6609e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Tb,Bh=/(\s+|^)default(\s+|$)/;Mc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]=
6610this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=V(d.replace(Bh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ie(a,this.$$options));ie(a,Tb.$$options);return new Mc(a)}};Tb=new Mc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var yf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a=
6611this.parentCtrl?this.parentCtrl.$options:Tb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},jf=Ra({terminal:!0,priority:1E3}),Ch=F("ngOptions"),Dh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
6612sf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(Dh);if(!p)throw Ch("iexp",a,Aa(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)},
6613x=function(a,b){return v(a,B(a,b))},A=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),z={},B=r?function(a,b){z[r]=b;z[n]=a;return z}:function(a){z[n]=a;return z};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=B(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=A(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d===
6614g?n:g[n],r=B(d[p],p),s=t(c,r),p=v(s,r),w=A(c,r),z=y(c,r),r=J(c,r),s=new e(p,s,w,z,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}var e=z.document.createElement("option"),f=z.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&&
6615a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],A=h.multiple;l=0;for(var t=k.children(),z=t.length;l<z;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,B=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};A?(n.writeValue=
6616function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},B.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return B.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex],
6617c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},B.trackBy&&d.$watch(function(){return B.getTrackByValue(q.$viewValue)},function(){q.$render()}));
6618l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(B.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c=
6619v.items[b];w(c.group)?Gb(c.element.parentNode):Gb(c.element)}v=B.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(B.trackBy||A?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],kf=["$locale","$interpolate","$log",
6620function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+p+t,v=ca.noop,z;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=Y(c);e||c in n||(c=a.pluralCat(c-p));c===z||e&&Y(z)||(v(),e=q[c],A(e)?
6621(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),z=c)})}}}],ue=F("ngRef"),lf=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=xa(ua(b)),e=a(d.ngRef),f=e.assign||function(){throw ue("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw ue("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l=
6622l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],mf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat",
6623l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var A;if(t){var z={$id:La},y=a(t);A=function(a,b,c,d){v&&
6624(z[v]=b);z[x]=c;z.$index=d;return y(a,z)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(za(h))H=h,q=A||f;else for(K in q=A||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}z&&(z[x]=void 0);
6625for(s in p){F=p[s];D=ub(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==s&&b.move(ub(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],nf=["$animate",function(a){return{restrict:"A",
6626multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ef=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],of=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,c){b.css(c,"")});a&&b.css(a)})}),pf=["$animate","$compile",function(a,
6627b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=ub(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");
6628k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],qf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),rf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,
6629element:b})}}),Eh=F("ngTransclude"),tf=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw Eh("orphan",Aa(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())},
6630null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Te=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Fh={$setViewValue:E,$render:E},Gh=["$element","$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Ib;e.selectValueMap=
6631{};e.ngModelCtrl=Fh;e.multiple=!1;e.unknownOption=x(z.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&&
6632e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap?
6633c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]===
6634e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r],
6635d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())});
6636b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Ue=function(){return{restrict:"E",require:["select","?ngModel"],controller:Gh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&&
6637(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e=
6638c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Ve=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||(w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],bd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=
6639c.hasOwnProperty("required")||a(c.ngRequired)(b);c.ngRequired||(c.required=!0);e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ke.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern;
6640var m=je(l,c,b);d.$observe("pattern",function(a){var d=m;m=je(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||A(m)||m.test(b)}}}}}}],dd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Ub(f);c.$observe("maxlength",function(a){f!==a&&(g=Ub(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],cd=
6641["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==
6642b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),
6643WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,
6644c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("<style>").text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
vendor: 4,917 bytes, lines 6645-6659
6645
6646;
6647/*
6648 AngularJS v1.8.0
6649 (c) 2010-2020 Google, Inc. http://angularjs.org
6650 License: MIT
6651*/
6652(function(s,c){'use strict';function P(c){var h=[];C(h,E).chars(c);return h.join("")}var D=c.$$minErr("$sanitize"),F,h,G,H,I,q,E,J,K,C;c.module("ngSanitize",[]).provider("$sanitize",function(){function f(a,e){return B(a.split(","),e)}function B(a,e){var d={},b;for(b=0;b<a.length;b++)d[e?q(a[b]):a[b]]=!0;return d}function t(a,e){e&&e.length&&h(a,B(e))}function Q(a){for(var e={},d=0,b=a.length;d<b;d++){var k=a[d];e[k.name]=k.value}return e}function L(a){return a.replace(/&/g,"&amp;").replace(z,function(a){var d=
6653a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(u,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function A(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var e=a.attributes,d=0,b=e.length;d<b;d++){var k=e[d],g=k.name.toLowerCase();if("xmlns:ns1"===g||0===g.lastIndexOf("ns1:",0))a.removeAttributeNode(k),d--,b--}(e=a.firstChild)&&A(e);a=v("nextSibling",a)}}function v(a,e){var d=e[a];if(d&&J.call(e,d))throw D("elclob",
6654e.outerHTML||e.outerText);return d}var y=!1,g=!1;this.$get=["$$sanitizeUri",function(a){y=!0;g&&h(m,l);return function(e){var d=[];K(e,C(d,function(b,d){return!/^unsafe:/.test(a(b,d))}));return d.join("")}}];this.enableSvg=function(a){return I(a)?(g=a,this):g};this.addValidElements=function(a){y||(H(a)&&(a={htmlElements:a}),t(l,a.svgElements),t(r,a.htmlVoidElements),t(m,a.htmlVoidElements),t(m,a.htmlElements));return this};this.addValidAttrs=function(a){y||h(M,B(a,!0));return this};F=c.bind;h=c.extend;
6655G=c.forEach;H=c.isArray;I=c.isDefined;q=c.$$lowercase;E=c.noop;K=function(a,e){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);var d=N(a);if(!d)return"";var b=5;do{if(0===b)throw D("uinput");b--;a=d.innerHTML;d=N(a)}while(a!==d.innerHTML);for(b=d.firstChild;b;){switch(b.nodeType){case 1:e.start(b.nodeName.toLowerCase(),Q(b.attributes));break;case 3:e.chars(b.textContent)}var k;if(!(k=b.firstChild)&&(1===b.nodeType&&e.end(b.nodeName.toLowerCase()),k=v("nextSibling",b),!k))for(;null==k;){b=
6656v("parentNode",b);if(b===d)break;k=v("nextSibling",b);1===b.nodeType&&e.end(b.nodeName.toLowerCase())}b=k}for(;b=d.firstChild;)d.removeChild(b)};C=function(a,e){var d=!1,b=F(a,a.push);return{start:function(a,g){a=q(a);!d&&w[a]&&(d=a);d||!0!==m[a]||(b("<"),b(a),G(g,function(d,g){var c=q(g),f="img"===a&&"src"===c||"background"===c;!0!==M[c]||!0===O[c]&&!e(d,f)||(b(" "),b(g),b('="'),b(L(d)),b('"'))}),b(">"))},end:function(a){a=q(a);d||!0!==m[a]||!0===r[a]||(b("</"),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||
6657b(L(a))}}};J=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var z=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=f("area,br,col,hr,img,wbr"),x=f("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=f("rp,rt"),n=h({},p,x),x=h({},x,f("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=h({},p,f("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
6658l=f("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=f("script,style"),m=h({},r,x,p,n),O=f("background,cite,href,longdesc,src,xlink:href,xml:base"),n=f("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),
6659p=f("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode
6659-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
6660!0),M=h({},O,p,n),N=function(a,e){function d(b){b="<remove></remove>"+b;try{var d=(new a.DOMParser).parseFromString(b,"text/html").body;d.firstChild.remove();return d}catch(e){}}function b(a){c.innerHTML=a;e.documentMode&&A(c);return c}var g;if(e&&e.implementation)g=e.implementation.createHTMLDocument("inert");else throw D("noinert");var c=(g.documentElement||g.getDocumentElement()).querySelector("body");c.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>';return c.querySelector("svg")?
6661(c.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',c.querySelector("svg img")?d:b):function(b){b="<remove></remove>"+b;try{b=encodeURI(b)}catch(d){return}var e=new a.XMLHttpRequest;e.responseType="document";e.open("GET","data:text/html;charset=utf-8,"+b,!1);e.send(null);b=e.response.body;b.firstChild.remove();return b}}(s,s.document)}).info({angularVersion:"1.8.0"});c.module("ngSanitize").filter("linky",["$sanitize",function(f){var h=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
6662t=/^mailto:/i,q=c.$$minErr("linky"),s=c.isDefined,A=c.isFunction,v=c.isObject,y=c.isString;return function(c,z,u){function r(c){c&&l.push(P(c))}function x(c,g){var f,a=p(c);l.push("<a ");for(f in a)l.push(f+'="'+a[f]+'" ');!s(z)||"target"in a||l.push('target="',z,'" ');l.push('href="',c.replace(/"/g,"&quot;"),'">');r(g);l.push("</a>")}if(null==c||""===c)return c;if(!y(c))throw q("notstring",c);for(var p=A(u)?u:v(u)?function(){return u}:function(){return{}},n=c,l=[],w,m;c=n.match(h);)w=c[0],c[2]||
6663c[4]||(w=(c[3]?"http://":"mailto:")+w),m=c.index,r(n.substr(0,m)),x(w,c[0].replace(t,"")),n=n.substring(m+c[0].length);r(n);return f(l.join(""))}}])})(window,window.angular);
6664
6665;
6666angular.module('productApp', ['ngSanitize'])
6667.config(function ($interpolateProvider, $sceDelegateProvider) {
6668  $interpolateProvider.startSymbol('{*').endSymbol('*}');
6669  $sceDelegateProvider.resourceUrlWhitelist([
6670    'self'
6671  ]);
6672});
6673;
6674// class TpgProductCommon
6675
6676function TpgProductCommon() {
6677    
6678    var self=this, $=jQuery;
6679    
6680    this.confirmAddr = [];
6681    
6682    // Migrate old javascript for SQ and post actions here. Need be cleaned up later.
6683    this.sqResult = {};
6684        
6685    this.__construct = function() {
6686        this.initEvents();
6687        jQuery('#address').val('');
6688    };
6689    
6690    this.initEvents = function() {
6691         /* register your interest binding */
6692        $('#nbnContactNo').on('keydown', function(e) {
6693            // Allow: backspace, delete, tab, escape, enter and .
6694            if ($.inArray(e.which, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
6695                // Allow: Ctrl+A, Command+A
6696                (e.which === 65 && (e.ctrlKey === true || e.metaKey === true)) ||
6697                // Allow: home, end, left, right, down, up
6698                (e.which >= 35 && e.which <= 40)) {
6699                // let it happen, don't do anything
6700                return;
6701            }
6702            // Ensure that it is a number and stop the keypress
6703            if ((e.shiftKey || (e.which < 48 || e.which > 57)) && (e.which < 96 || e.which > 105)) {
6704                e.preventDefault();
6705            }
6706        }).on('keyup', function(e) {
6707            if ($(this).val() === '0') {
6708                return;
6709            }
6710            if ($(this).val().indexOf('02') !== 0 &&
6711                $(this).val().indexOf('03') !== 0 &&
6712                $(this).val().indexOf('04') !== 0 &&
6713                $(this).val().indexOf('07') !== 0 &&
6714                $(this).val().indexOf('08') !== 0) {
6715                $(this).val('0');
6716            }
6717        });
6718        
6719        $('#nbnConfirmEmail').on('paste', function(e) { e.preventDefault(); }); // prevent paste
6720        
6721        $("#fulladdress_regint").autocomplete({
6722            source: "/nbn/qas",
6723            select: function(event, ui) {
6724                $(this).data('fullAddrSelected', true);
6725            },
6726            open: function() {
6727                $(this).data('fullAddrSelected', false);
6728                $('.ui-autocomplete').css('width', $(this).css('width'));
6729            },
6730            appendTo: '#regint_addr_result'
6731        });
6732        $("#fulladdress_regint").autocomplete('widget').off('menufocus hover mouseover mouseenter'); // iOS >= 8.1 fix
6733        
6734        $('.editAddress').on('click', function() { self.qasUnselected(); });
6735        
6736        $('.lucyBtn').on('click', function(e) {
6737            e.preventDefault();
6738            self.showRegisterYourInterestModal('contact', false);
6739        });
6740        
6741        $('.buyBtn').on('click', function(e) { self.buyNowClick(e); });
6742        $('.buyBtnWithoutPopup').on('click', function(e) {
6743            e.preventDefault();
6744            $('#buynow').click();
6745        });
6746
6747        $('#is_tpg_customer').on('change', function() {
6748            if($("#upgrade_to_nbn_container").length){
6749                if($("#is_tpg_customer option:selected").val()==1){
6750                    $("#upgrade_to_nbn_container").show();
6751                }else{
6752                    $("#upgrade_to_nbn_container").hide();
6753                    jQuery('#upgrade_to_nbn').val(1).change();
6754                }
6755            }
6756
6757        });
6758
6759        $('#upgrade_to_nbn').on('change', function() {
6760            if($("#upgrade_to_nbn option:selected").val()==1){
6761                $(".upgrade_to_nbn_toggle_show").show();
6762                $(".upgrade_to_nbn_toggle_hide").hide();
6763            }else{
6764                $(".upgrade_to_nbn_toggle_show").hide();
6765                $(".upgrade_to_nbn_toggle_hide").show();
6766            }
6767        });
6768    };
6769    
6770    this.errMessageAdd = function(target, msg) {
6771        jQuery(target).after('<span class="text-danger fonts9 validator-error">' + msg + '</span>');
6772    };
6773
6774    this.clearValidatorError = function() {
6775        jQuery('#RegInterestModal .successMsg').hide();
6776        jQuery('#RegInterestModal .errorMsg').hide();
6777        jQuery('.validator-error').remove();
6778    };
6779
6780    this.validateEmail = function(email) {
6781        var re = /^(([^<>()\[\]\\.,;:\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,}))$/;
6782        return re.test(email);
6783    };
6784    
6785    this.showModal = function(id) {
6786        if (id === 'RegInterestModal') {
6787            this.showRegisterYourInterestModal('direct');
6788        }
6789        else {
6790            jQuery("#"+id).modal('show');
6791        }
6792    };
6793    
6794    this.resetLUCYForm = function(preserveCurrentTitle) {
6795        var h2 = jQuery('#RegInterestModal h2');
6796        var p = jQuery('#RegInterestModal p');
6797        if (!h2.data('orgtitle')) {
6798            var origTitle = h2.text(),
6799                origHint = p.text();
6800            h2.data('orgtitle', origTitle);
6801            p.data('orghint', origHint);
6802        }
6803        else if (!preserveCurrentTitle) {
6804            h2.text(h2.data('orgtitle'));
6805            p.text(p.data('orghint'));
6806        }
6807        $('#RegInterestModal .successMsg').hide();
6808        $('#RegInterestModal .errorMsg').hide();
6809        p.show();
6810        $('#RegInterestModal form').show();
6811        if (jQuery('#fulladdress_regint').length > 0 && jQuery('#address').val() !== '') {
6812            jQuery('#fulladdress_regint').val(jQuery('#address').val());
6813        }
6814        $('#RegInterestSubmit').show();
6815    };
6816    
6817    this.showRegisterYourInterestModal = function(src, update_only, params) {
6818        $('#regInterestForm #lastSelectedPlan').val('');
6819        if (src == 'direct') {
6820            this.resetLUCYForm();
6821            jQuery('#RegInterestSubmit').show();
6822            jQuery('#RegInterestSubmit').data('contact', false);
6823            this.clearValidatorError();
6824        } else if (src == 'passSQ') {
6825            var passSQ = $('#RegInterestSubmit').data('passSQ');
6826            if (passSQ == 'pass') {
6827                $('#RegInterestModal .hint-message').hide();
6828                $('#RegInterestModal form').hide();
6829                $('#RegInterestModal .successMsg').show();
6830            } else if (passSQ == 'fail') {
6831                $('#RegInterestSubmit').show();
6832                var errorMsg = $('#RegInterestSubmit').data('errormsg');
6833                if (errorMsg != false) {
6834                    var origMsg = $('#RegInterestModal .errorMsg').text();
6835                    $('#RegInterestModal .errorMsg').data('orgmsg', origMsg);
6836                    $('#RegInterestModal .errorMsg').text(errorMsg);
6837                }
6838                $('#RegInterestModal .errorMsg').show();
6839            }
6840            // clear passSQ info
6841            $('#RegInterestSubmit').data('passSQ', false);
6842        } else if (src == 'emailSent') {
6843            var emailSent = jQuery('#RegInterestSubmit').data('emailSent');
6844            if (emailSent == 'success') {
6845                jQuery('#RegInterestModal .hint-message').hide();
6846                jQuery('#RegInterestModal form').hide();
6847                jQuery('#RegInterestModal .successMsg').show();
6848            } else {
6849                jQuery('#RegInterestSubmit').show();
6850                jQuery('#RegInterestModal .errorMsg').show();
6851            }
6852        } else if (src == 'contact') {
6853            this.resetLUCYForm(true);
6854            jQuery('#RegInterestSubmit').data('contact', 'newForm');
6855            jQuery('#RegInterestModal h2').text('Let Us Contact You');
6856            jQuery('#RegInterestModal p').text('Leave your details below and we will c
6856ontact you as soon as possible.');
6857            jQuery('#RegInterestModal .editAddress').addClass('hidden');
6858            jQuery('#fulladdress_regint').parent().removeClass('input-group');
6859            jQuery('#RegInterestSubmit').show();
6860            if(this.sqResult.formed_fulladdress!==undefined) {
6861                jQuery('#fulladdress_regint').val(this.sqResult.formed_fulladdress);
6862            }
6863            this.clearValidatorError();
6864        } else if (src == 'ftth') {
6865            this.resetLUCYForm(true);
6866            // update modal text
6867            var plandesc = params.plan.description + ' plan code: ' + params.plan.package_code;
6868            $('#regInterestForm #lastSelectedPlan').val(plandesc);
6869            $('#RegInterestModal h2').text('Let Us Contact You');
6870            $('#RegInterestModal p').text('Leave your details below and we will contact you as soon as possible.');
6871            $('#RegInterestModal .editAddress').addClass('hidden');
6872            $('#fulladdress_regint').parent().removeClass('input-group');
6873            $('#RegInterestSubmit').show();
6874
6875            // Lets mockup a SQ result, essentially let the customer request this service anyway
6876            $('#sqSkip').val('true').data('res', 2);
6877            $('#regInterestForm #technology').val('FTTH');
6878            this.sqResult = { Services: { fttb: 1 } };
6879        }
6880        
6881        //src == direct | passSQ <sqSkip-Y|sqNoSkip-N> | contact
6882        if (update_only !== true) {
6883            setTimeout(function(){
6884                jQuery('#RegInterestModal').modal('show');
6885           }, 500);
6886        }
6887        else {
6888            jQuery('#RegInterestModal').modal('show');
6889        }
6890    };
6891    
6892    this.regInterestValidated = function() {
6893        var validationPass = true;
6894        this.clearValidatorError();
6895        if (!jQuery('#nbnFirstName').val()) {
6896            this.errMessageAdd('#nbnFirstName', "First Name is required");
6897            validationPass = false;
6898        }
6899        if (!jQuery('#nbnLastName').val()) {
6900            this.errMessageAdd('#nbnLastName', "Last Name is required");
6901            validationPass = false;
6902        }
6903        if (!jQuery('#nbnContactNo').val()) {
6904            this.errMessageAdd('#nbnContactNo', "Contact Number is required");
6905            validationPass = false;
6906        } else if (jQuery('#nbnContactNo').val().length < 10) {
6907            this.errMessageAdd('#nbnContactNo', "Contact Number is invalid");
6908            validationPass = false;
6909        }
6910        if (!jQuery('#nbnEmailAddress').val()) {
6911            this.errMessageAdd('#nbnEmailAddress', "Email Address is required");
6912            validationPass = false;
6913        } else if (!this.validateEmail(jQuery('#nbnEmailAddress').val())) {
6914            this.errMessageAdd('#nbnEmailAddress', "Email Address format is invalid");
6915            validationPass = false;
6916        }
6917        if (jQuery('#nbnEmailAddress').val().trim() !== jQuery('#nbnConfirmEmail').val().trim()) {
6918            this.errMessageAdd('#nbnConfirmEmail', "Please verify Email address");
6919            validationPass = false;
6920        }
6921        if (!jQuery('#is_tpg_customer').val()) {
6922            this.errMessageAdd('#is_tpg_customer', "Please select Are you an Existing TPG Customer");
6923            validationPass = false;
6924        }
6925        if (jQuery('#fulladdress_regint').length > 0 && !jQuery('#fulladdress_regint').val()) {
6926            this.errMessageAdd('#fulladdress_regint', "Please Type and select your address");
6927            validationPass = false;
6928        }
6929        return validationPass;
6930    };
6931    
6932    this.showSQLoading = function() {
6933        $("#sqModal button").css("visibility", "hidden");
6934        $("#sqModal .sq-action").hide();
6935        $("#sqModal .sq-result>p").html('');
6936        $('#sqModal .info-img .spinner').show();
6937        $('#sqModal .info-img .padding-div').hide();
6938        if (!$('#buynow').hasClass('disabled')) {
6939            $("#buynow").addClass("disabled");
6940        }
6941        $("#sqModal").modal("show");
6942    };
6943    
6944    this.hideSQmodal = function() {
6945        $("#sqModal button").css("visibility", "visible");
6946        $("#sqModal").modal("hide");
6947    };
6948    
6949    /**
6950     * Updates and disables the address field on forms after SQ response
6951     * Only fields with class .nbnFullAddress are affected.
6952     * 
6953     * @param {string} address
6954     */
6955    this.qasSelected = function(address) {
6956        $('.nbnFullAddress').val(address);
6957         // chrome blurs input on disable
6958        var tmp = this.confirmAddr;
6959        $('.nbnFullAddress').prop('disabled', true);
6960        this.confirmAddr = tmp;
6961        $('.nbnFullAddress').parent().addClass('input-group');
6962        $('.editAddress').removeClass('hidden');
6963        $('#section2 .pull-right').hide();
6964        jQuery('.sq-address-input').val(address);
6965    };
6966    
6967    /**
6968     * Enables address field for edit and updates some other elements
6969     */
6970    this.qasUnselected = function() {
6971        $('.nbnFullAddress').val('');
6972        jQuery('.sq-address-input').val('');
6973        $('.nbnFullAddress').prop('disabled', false);
6974        $('.nbnFullAddress').parent().removeClass('input-group');
6975        $('.editAddress').addClass('hidden');
6976        $('#sqSkip').val('false');
6977        $('#sqSkip').data('res', false);
6978        if (!$('#buynow').hasClass('disabled')) {
6979            $("#buynow").addClass("disabled");
6980        }
6981        //clearNDisable('all');
6982        $('#section2 .pull-right').show();
6983        $('#section2 input').focus();
6984    };
6985    
6986    this.regInterestSubmit = function(product) {
6987        
6988        if (!this.regInterestValidated()) {
6989            return;
6990        }
6991        
6992        if (jQuery('#fulladdress_regint').length > 0) {
6993            //$('#address').addClass('nbnFullAddress'); // should be added to paste the address into #address field
6994            this.qasSelected($("#fulladdress_regint").val());
6995        }
6996        
6997        jQuery('#RegInterestSubmit').hide();
6998        var endpoint_url = "/nbn/register_interest",
6999            sqSkip = true,
7000            callbackForm = false,
7001            req_data = jQuery("#regInterestForm").serialize() + '&product=' + product;
7002        if (jQuery("#fulladdress_regint").length > 0) {
7003            req_data += '&onesq=1&nbnFullAddress=' + jQuery("#fulladdress_regint").val();
7004            if ($('#RegInterestSubmit').data('contact') == 'newForm') {
7005                // assertion sqSkip == true
7006                callbackForm = true;
7007                endpoint_url = "/nbn/emailer_reg";
7008                req_data += '&prevres=' + $('#sqSkip').data('res');
7009            } else if ($('#sqSkip').val() == 'false') {
7010                sqSkip = false;
7011                $('#RegInterestModal').modal('hide');
7012                this.showSQLoading();
7013            } else {
7014                req_data += '&prevres=' + $('#sqSkip').data('res');
7015            }
7016        }
7017
7018        jQuery.ajax({
7019            url: endpoint_url,
7020            type: "POST",
7021            dataType: "json",
7022            timeout: "2000000",
7023            data: req_data,
7024            success: function(data) {
7025                if (jQuery("#fulladdress_regint").length === 0) { // mobile page
7026                    jQuery('#RegInterestSubmit').data('emailSent', data.sendStatus);
7027                    self.showRegisterYourInterestModal('emailSent', true);
7028                }
7029                
7030                else if (callbackForm) {
7031                    $('#RegInterestSubmit').data('contact', false);
7032                    $('#RegInterestSubmit').data('emailSent', data.emailSent);
7033                    self.showRegisterYourInterestModal('emailSent', true);
7034                } else {
7035                    if (data.status == 'success') {
7036                        $('#RegInterestSubmit').data('passSQ', 'pass');
7037                    } else if (data.errmsg) {
7038                        $('#RegInterestSubmit').data('passSQ', 'fail');
7039                        $('#RegInterestSubmit').data('errormsg', data.errmsg);
7040                    }
7041                    if (sqSkip) {
7042                        self.showRegisterYourInterestModal('passSQ', true);
7043                    } else {
7044                        self.hideSQmodal();
7045                        self.showRegisterYourInterestModal('passSQ', false);
7046                    }
7047                }
7048            },
7049            error: function() {
7050                jQuery('#RegInterestSubmit').data('emailSent', 'failed');
7051                self.hideSQmodal();
7052                self.showRegisterYourInterestModal('emailSent', false);
7053            }
7054        });
7055    };
7056    
7057    this.focusWithPopoverMessage = function() {
7058        jQuery('.sq-address-input').val('');
7059        angular.element('#section2 input').popover({
7060            trigger: 'focus',
7061            template: '<div class="popover addressPopover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',
7062            content: "Please Enter Your Address.",
7063            placement: 'bottom'
7064        }).on('keypress', function() {
7065            angular.element(this).popover('destroy');
7066        });
7067        jQuery(document).scrollTop( jQuery("#section2").offset().top);
7068        angular.element('#section2 input').focus();
7069    };
7070
7071    this.newSQPopupMessage = function() {
7072        jQuery('.sq-address-input').val('');
7073        angular.element('#ng-sqresult input').popover({
7074            trigger: 'focus',
7075            template: '<div class="popover addressPopover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',
7076            content: "Please Enter Your Address.",
7077            placement: 'bottom'
7078        }).on('keypress', function() {
7079            angular.element(this).popover('destroy');
7080        });
7081        jQuery(document).scrollTop( jQuery("#section2").offset().top);
7082        angular.element('#ng-sqresult input').focus();
7083    };
7084    
7085    /* buy now click binding */
7086    this.buyNowClick = function(e) {
7087        e.preventDefault();
7088        if (angular.element("#buynow").hasClass("disabled")) {
7089            this.focusWithPopoverMessage();
7090            return;
7091        }
7092        this.showModal('checkExistingTPGModal');
7093    };
7094    
7095    this.jumpToHash = function(place) {
7096        if(history.pushState) {
7097            history.pushState(null, null, '#'+place);
7098        }
7099        else {
7100            location.hash = '#'+place;
7101        };
7102    };
7103    
7104    this.showRes = function(template, res, params) {
7105        var el = template.find(".next-link .sq-action[data-res='" + res + "']").closest("div").clone();
7106        if (params && params.class) {
7107            el.addClass(params.class);
7108        }
7109        if (jQuery('.sq-msg > div.button-wrapper').length === 0) {
7110            jQuery('.sq-msg').append('<div class="button-wrapper"></div>');
7111        }
7112        jQuery('.sq-msg > div.button-wrapper').append(el);
7113    };
7114    
7115    this.sqActionsOverride = function(status, msg, action, page, data) {
7116        var product = '';
7117        this.sqResult = data;
7118
7119        // add sq skip for address bar in register interest form for first time sq
7120        jQuery('#sqSkip').val('true');
7121        jQuery('#regInterestForm #technology').val('');
7122        if (data.Services.fttb == 1) {
7123            jQuery('#sqSkip').data('res', '2');
7124            if (data.FTTB.technology == 'FTTH') {
7125                jQuery('#regInterestForm #technology').val('FTTH');
7126            }
7127        } else {
7128            jQuery('#sqSkip').data('res', data.Services.nbn);
7129        }
7130
7131        if(data.Services.fttb>0){
7132            product = data.FTTB.technology==='FTTH' ? 'FTTH' : 'FTTB';
7133        }
7134        else if(data.Services.nbn>0 && data.NBN.res<10){
7135            product = 'NBN';
7136        }
7137        else if(data.Services.adsl>0){
7138            product = 'ADSL';
7139        }
7140        else if(data.Services.nbn>0 && data.NBN.res>10){
7141            product = 'NBN-PRE';
7142        }
7143
7144        if (product === 'FTTH') {
7145            msg = '<h4>CONGRATULATIONS!</h4><p>You can get TPG High Speed Broadband with Fibre To The Home Technology.</p>';
7146        }
7147        else if (product === 'FTTB') {
7148            msg = '<h4>CONGRATULATIONS!</h4><p>You can get TPG High Speed Broadband with Fibre To The Building Technology.</p>';
7149        }
7150        else if (product === 'NBN') {
7151            msg = '<h4>CONGRATULATIONS!</h4><p>We can provide you with an NBN plan.</p>';
7152        }
7153        else if (product === 'NBN-PRE') {
7154            var nbnEtaOverdue = new Date(data.NBN.readyForService).getTime() < new Date().getTime();
7155            if (nbnEtaOverdue) {
7156                msg = '<h4>NBN ROLLOUT TO YOUR ADDRESS HAS BEEN DELAYED</h4><p>NBN is expected to be serviceable in your area but your home is not ready yet. Pre-order now and we will c
7156onnect your home when NBN arrives.</p>';
7157            }
7158            else {
7159                msg = '<h4>NBN IS COMING SOON</h4>Pre-order now and we will connect your home when NBN arrives. Your <br/> address is expected to be NBN ready on ';
7160                var d = new Date(data.NBN.readyForService);
7161                var a = d.toDateString().substr(4).split(' ');
7162                var b = [a[1],a[0],a[2]];
7163                msg += b.join('-')+ ".<br/>";
7164            }
7165        } else if (product === 'ADSL') {
7166            if (data.ADSL.homephone==='Available') {
7167                msg = '<h4>CONGRATULATIONS!</h4><p>We can provide you with ADSL2+ plan.</p>';
7168            }
7169            else if (data.ADSL.adsl2plus==='Available') {
7170                msg = '<h4>CONGRATULATIONS!</h4><p>We can provide you with ADSL2+ plan.</p>';
7171            }
7172            else {
7173                msg = '<h4>CONGRATULATIONS!</h4><p>We can provide you with ADSL plan.</p>';
7174            }
7175        }
7176        
7177        jQuery('.sq-msg').html(msg);
7178        if (product === 'NBN-PRE') {
7179            jQuery('.sq-msg').append('<span class="sq-note">Note: Expected NBN ready date is based on information provided by nbn<sup>TM</sup> and is subject to change</span>');
7180        }
7181        jQuery('.sq-msg').append('<div><a class="clickable btn btn-yframe sq-action" data-res="choose"><p>Choose Your Plan</p></a></div>');
7182        jQuery('.sq-msg').append('<div><a class="clickable btn btn-yframe sq-action" data-res="contact"><p>Let Us Contact You</p></a></div>');
7183
7184        jQuery('.sq-modal').off('click.sq-action');
7185        jQuery('.sq-modal').on('click.sq-action', '.sq-action', function(e) {
7186            var jqThis = jQuery(this);
7187            jqThis.closest('.modal').modal('hide');
7188            if (jqThis.data('res') === 'choose') {
7189                var newLocation = '';
7190                if (product === 'FTTH') {
7191                    self.redirect('/ftth', {'adrdata':JSON.stringify(data)});
7192                } else if (product === 'FTTB') {
7193                    self.redirect('/fttb', {'adrdata':JSON.stringify(data)});
7194                } else if (product === 'NBN' || product === 'NBN-PRE') {
7195                    self.redirect('/nbn', {'adrdata':JSON.stringify(data)});
7196                } else if (product === 'ADSL' && data.ADSL.homephone === 'Not Available') {
7197                    if (data.ADSL.adsl2plus !== 'Not Available') {
7198                        newLocation = 'https://www.tpg.com.au/products_services/adsl2-standalone';
7199                    } else {
7200                        newLocation = 'https://www.tpg.com.au/products_services/broadband-offnet';
7201                    }
7202                    setTimeout(function() {
7203                        window.location = newLocation;
7204                    }, 500);
7205                } else {
7206                    self.redirect('/adsl', {'adrdata':JSON.stringify(data)});
7207                }
7208            } else if (jqThis.data('res') == 'reg') {
7209                self.showRegisterYourInterestModal('direct', false);
7210            } else if (jqThis.data('res') == 'contact') {
7211                self.showRegisterYourInterestModal('contact', false);
7212            }
7213        });
7214
7215        return true;
7216    };
7217    
7218    this.redirect = function(path, params) {        
7219        if (document.location.pathname === path) {
7220            jQuery(document).scrollTop(jQuery("#layout_container").offset().top);
7221        }
7222        else {
7223            window.localStorage.setItem('adrdata', params.adrdata);
7224            postRedirect(path, params); // compatibility with old pages
7225            //window.location = path;
7226        }
7227    };
7228
7229    this.__construct();
7230    
7231}
7232;
7233// Generic Rules
7234var whenNbnIsAvailable = {
7235    isMatched: function (sq) {
7236        return sq.Services.nbn === 1 && sq.NBN.technology !== "Satellite";
7237    },
7238    view: function () {
7239        return 'whenNbnIsAvailable';
7240    },
7241    modalView: function () {
7242        return 'modal-whenNbnIsAvailable';
7243    },
7244    redirectURL: function () {
7245        return false;
7246    }
7247};
7248
7249var whenFttbIsAvailable = {
7250    isMatched: function (sq) {
7251        return sq.FTTB.res === 1;
7252    },
7253    view: function () {
7254        return 'whenFttbIsAvailable';
7255    },
7256    modalView: function () {
7257        return 'modal-whenFttbIsAvailable';
7258    },
7259    redirectURL: function () {
7260        return false;
7261    }
7262};
7263
7264var when5gIsAvailable = {
7265    isMatched: function (sq) {
7266        return sq.Services.fwa_5g === 1;
7267    },
7268    view: function () {
7269        return 'when5gIsAvailable';
7270    },
7271    modalView: function () {
7272        return 'modal-when5gIsAvailable';
7273    },
7274    redirectURL: function () {
7275        return false;
7276    }
7277};
7278
7279var whenHWIsAvailable = {
7280    isMatched: function (sq) {
7281        return sq.Services.fwa_4g === 1;
7282    },
7283    view: function () {
7284        return 'whenHWIsAvailable';
7285    },
7286    modalView: function () {
7287        return 'modal-whenHWIsAvailable';
7288    },
7289    redirectURL: function () {
7290        return false;
7291    }
7292};
7293
7294var whenNbnAndHwIsAvailable = {
7295    isMatched: function (sq) {
7296        return (sq.Services.nbn === 1 && (sq.NBN.res === 0 || sq.NBN.res === 10) && sq.NBN.technology !== "Wireless") && (sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1);
7297    },
7298    view: function () {
7299        return 'whenNbnAndHwIsAvailable';
7300    },
7301    modalView: function () {
7302        return 'modal-whenNbnAndHwIsAvailable';
7303    },
7304    redirectURL: function () {
7305        return false;
7306    }
7307};
7308
7309var whenIncompleteInvalid = {
7310    counter: 1,
7311    invalid: false,
7312    incomplete: false,
7313    isMatched: function (sq) {
7314        if (this.counter > 2) {
7315            this.reset();
7316        }
7317
7318        if (sq.NBN.res === 1) {
7319            this.invalid = true;
7320            return true;
7321        }
7322        if ((sq.NBN.res === 3 || sq.NBN.res === 13 || sq.NBN.res === 2)
7323          && (!Array.isArray(sq.NBN.addr_list) || sq.NBN.addr_list.length === 0))
7324        {
7325            this.incomplete = true;
7326            this.counter++;
7327            return true;
7328        }
7329        return false;
7330    },
7331    reset: function () {
7332        this.invalid = false;
7333        this.incomplete = false;
7334        this.counter = 1;
7335    },
7336    requireAddressRefinementCheck: function () {
7337        if (this.invalid) {
7338            return false;
7339        }
7340        if (this.incomplete && this.counter <= 2) {
7341            return true;
7342        }
7343        return false;
7344    },
7345    view: function () {
7346        return 'whenIncompleteInvalid';
7347    },
7348    modalView: function () {
7349        if (!this.requireAddressRefinementCheck()) {
7350            this.reset();
7351            return 'modal-whenIncompleteInvalid';
7352        } else {
7353            return 'modal-addressRefinementChecker';
7354        }
7355    },
7356    redirectURL: function () {
7357        return false;
7358    }
7359};
7360
7361var whenNbnIsNotServiceable = {
7362    isMatched: function (sq) {
7363        return (sq.NBN.res !== 1 &&
7364            (sq.NBN.res === 3 || sq.NBN.res === 4 || sq.NBN.res === 14)) || sq.NBN.technology === "Satellite";
7365    },
7366    modalView: function () {
7367        return 'modal-whenNbnIsNotServiceable';
7368    },
7369    view: function () {
7370        return 'whenNbnIsNotServiceable';
7371    },
7372    redirectURL: function () {
7373        return false;
7374    }
7375};
7376
7377// Superfast NBN Page Rules
7378
7379var whenHighSpeedIsAvailable = {
7380    isMatched: function (sq) {
7381        return sq.Services.nbn === 1
7382            && (sq.NBN.res === 0 || sq.NBN.res === 10)
7383            && (sq.NBN.nbn250Available === 'Yes' || (sq.NBN.nbn250Available === 'Yes'));
7384    },
7385    view: function () {
7386        return 'whenHighSpeedIsAvailable';
7387    },
7388    modalView: function () {
7389        return 'modal-whenHighSpeedIsAvailable';
7390    },
7391    redirectURL: function () {
7392        return false;
7393    }
7394};
7395
7396var whenHighSpeedIsNotAvailable = {
7397    isMatched: function (sq) {
7398        return sq.Services.nbn === 1
7399            && (sq.NBN.res === 0 || sq.NBN.res === 10)
7400            && (sq.NBN.nbn250Available !== 'Yes' && (sq.NBN.nbn250Available !== 'Yes'));
7401    },
7402    view: function () {
7403        return 'whenHighSpeedIsNotAvailable';
7404    },
7405    modalView: function () {
7406        return 'modal-whenHighSpeedIsNotAvailable';
7407    },
7408    redirectURL: function () {
7409        return false;
7410    }
7411};
7412
7413var whenNoNbnButHW = {
7414    isMatched: function (sq) {
7415        return sq.NBN.res !== 0 && sq.NBN.res !== 3 && sq.NBN.res !== 4 && sq.NBN.res !== 10 && sq.NBN.res !== 12 && sq.NBN.res !== 14 && (sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1);
7416        // This is matching NBN page where it won't show HW is positive if NBN is on the way
7417    },
7418    modalView: function () {
7419        return 'modal-whenNbnIsNotAvailableButHwIsAvailable';
7420    },
7421    view: function () {
7422        return 'whenNbnIsNotAvailableButHwIsAvailable';
7423    },
7424    redirectURL: function () {
7425        return false;
7426    }
7427};
7428;
7429var failedSq= {
7430    isMatched: function (sq) {
7431        return sq.Services === undefined || sq.Services.length == 0;
7432    },
7433    modalView: function () {
7434        return 'modal-failedSq';
7435    },
7436    view: function () {
7437        return 'failedSq';
7438    },
7439    redirectURL: function () {
7440        return false;
7441    },
7442};
7443
7444var whenNbnIsAvailableWithAltTechs = {
7445    isMatched: function (sq) {
7446        return sq.Services.nbn === 1 && sq.NBN.technology !== "Satellite" && (sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1 || sq.Services.fttb === 1);
7447    },
7448    modalView: function () {
7449        return 'modal-whenNbnIsAvailableWithAltTechs';
7450    },
7451    view: function () {
7452        return 'whenNbnIsAvailableWithAltTechs';
7453    },
7454    redirectURL: function () {
7455        return false;
7456    },
7457};
7458
7459var whenNoNbnButAltTechsAvailable = {
7460    isMatched: function (sq) {
7461        return (sq.Services.nbn !== 1 || sq.NBN.technology === "Satellite") &&
7462            (sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1 || sq.Services.fttb === 1) && (sq.NBN.res !== 3 && sq.NBN.res !== 4 && sq.NBN.res !== 14);
7463    },
7464    modalView: function () {
7465        return 'modal-whenNoNbnButAltTechsAvailable';
7466    },
7467    view: function () {
7468        return 'whenNoNbnButAltTechsAvailable';
7469    },
7470    redirectURL: function () {
7471        return false;
7472    },
7473};
7474
7475var whenFttbIsAvailableWithAltTechs = {
7476    isHomepage: function() {
7477      return window.location.pathname === '/';
7478    },
7479    isMatched: function (sq) {
7480        return sq.FTTB.res === 1 && sq.FTTB.technology !== "FTTH";
7481    },
7482    modalView: function () {
7483        return this.isHomepage() ? 'modal-whenFttbRedirect' : 'modal-whenFttbIsAvailableWithAltTechs';
7484    },
7485    view: function () {
7486        return 'whenFttbIsAvailableWithAltTechs';
7487    },
7488    redirectURL: function () {
7489        let fttbUrl =  '/fttb';
7490        return this.isHomepage() ? fttbUrl : false;
7491    },
7492};
7493
7494var whenFtthIsAvailableWithAltTechs = {
7495    isMatched: function (sq) {
7496        return sq.FTTB.res === 1 && sq.FTTB.technology === "FTTH";
7497    },
7498    modalView: function () {
7499        return false;
7500    },
7501    view: function () {
7502        return 'whenFtthIsAvailableWithAltTechs';
7503    },
7504    redirectURL: function () {
7505        return false;
7506    },
7507};
7508
7509var whenNoFttbButAltTechsAvailable  = {
7510    isMatched: function (sq) {
7511        return sq.FTTB.technology === "FTTH" || sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1 || (sq.Services.nbn === 1 && sq.NBN.technology !== "Satellite");
7512    },
7513    modalView: function () {
7514        return false;
7515    },
7516    view: function () {
7517        return 'whenNoFttbButAltTechsAvailable';
7518    },
7519    redirectURL: function () {
7520        return false;
7521    },
7522};
7523
7524var whenNoFtthButAltTechsAvailable  = {
7525    isMatched: function (sq) {
7526        return (sq.FTTB.res === 1 && sq.FTTB.technology !== "FTTH") || sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1 || (sq.Services.nbn === 1 && sq.NBN.technology !== "Satellite");
7527    },
7528    modalView: function () {
7529        return false
7530    },
7531    view: function () {
7532        return 'whenNoFtthButAltTechsAvailable';
7533    },
7534    redirectURL: function () {
7535        return false;
7536    },
7537};
7538
7539var whenListOfAltTechsAvailable  = {
7540    isMatched: function (sq) {
7541        return  sq.FTTB.res === 1 || sq.Services.fwa_4g === 1 || sq.Services.fwa_5g === 1 || (sq.Services.nbn === 1 && sq.NBN.technology !== "Satellite");
7542    },
7543    modalView: function () {
7544        return 'modal-whenListOfAltTechsAvailable';
7545    },
7546    view: function () {
7547        return 'whenListOfAltTechsAvailable';
7548    },
7549    redirectURL: function () {
7550        return false;
7551    },
7552};
7553;
7554var whenFttbIsAvailableRedirect = {
7555    isMatched: function (sq) {
7556        return sq.FTTB.res === 1 || sq.Services.fttb === 1;
7557    },
7558    view: function () {
7559        return false;
7560    },
7561    modalView: function () {
7562        return 'modal-whenFttbRedirect';
7563    },
7564    redirectURL: function () {
7565        return "/fttb";
7566    }
7567};
7568;
7569var productInfo = {
7570    "nbn": {
7571        "name": "nbn&reg;",
7572        "url": "/nbn",
7573        "nbnAltText": "CONNECT TO THE nbn® NETWORK"
7574    },
7575    "nbn_preorder": {
7576        "name": "Pre-order NBN",
7577        "url": "/nbn"
7578    },
7579    "nbn_wireless": {
7580        "name": "nbn® Fixed Wireless",
7581        "url": "/nbn",
7582        "nbnAltText": "CONNECT TO THE nbn® NETWORK"
7583    },
7584    "fttb": {
7585        "name": "Fibre to the Building",
7586        "url": "/fttb",
7587        "nbnAltText": "NBN100 ALTERNATIVE"
7588    },
7589    "ftth": {
7590        "name": "Fibre to the Home",
7591        "url": "/ftth",
7592        "nbnAltText": "NBN100 ALTERNATIVE"
7593    },
7594    "fwa_4g": {
7595        "name": "Home Wireless Broadband",
7596        "url": "/home-wireless-broadband",
7597        "nbnAltText": "NBN12 ALTERNATIVE"
7598    },
7599    "fwa_5g": {
7600        "name": "5G Home Broadband",
7601        "url": "/5g-home-broadband",
7602        "nbnAltText": "NBN25 - NBN100 ALTERNATIVE"
7603    },
7604    "fwa_5g_preorder": {
7605        "name": "Pre-order 5G Home Broadband*",
7606        "url": "/5g-home-broadband",
7607        "nbnAltText": "NBN25 - NBN100 ALTERNATIVE"
7608    }
7609};
7610;
7611angular.module('productApp')
7612    .controller('SqController', ['$scope', 'sqResultService', 'sqUIService', 'sqRuleService', 'sqStorage', 'sqDebugService', '$rootScope', 'sqAltTech', '$http',
7613        function ($scope, sqResult, sqUI, sqRuleService, sqStorage, sqDebugService, $rootScope, sqAltTech, $http) {
7614            var showModal = false;
7615            var isPersistentSQ = false;
7616            var filterAltTech = null;
7617
7618            $scope.sq = sqResult.get();
7619            sqDebugService.enableDebug();
7620            $scope.productInfo = productInfo;
7621
7622            $scope.isHomePage = function () {
7623                return window.location.pathname === "/";
7624            };
7625
7626            $scope.isNbnPage = function () {
7627                return window.location.pathname === "/nbn";
7628            }
7629
7630            $scope.$watch('sq', function (newVal, oldVal) {
7631                if (newVal !== undefined && Object.keys(newVal).length > 0) {
7632                    if (showModal) {
7633                        sqUI.showSqModal();
7634                    }
7635                    sqUI.showSqResult();
7636
7637                    if (filterAltTech !== null) {
7638                        $scope.altTechs = sqAltTech.compileAltTechs($scope.sq, filterAltTech);
7639                    }
7640                }
7641            });
7642
7643            $scope.bindAddressRefinementForm = function () {
7644                sqUI.bindAddressRefinementEvents();
7645            };
7646
7647            $scope.populateAddressForm = function (address) {
7648                if ($scope.hasSqResult()) {
7649                    sqUI.populateAddress(address);
7650                }
7651            };
7652
7653            function update() {
7654                $scope.sq = sqResult.get();
7655                $rootScope.sqResult = $scope.sq;
7656
7657                if ($scope.hasSqResult()) {
7658                    sqRuleService.run();
7659                    sqStorage.set();
7660                    let section2 = document.getElementById('section2');
7661                    if (section2) {
7662                        section2.style.backgroundColor = '#F2F2F2';
7663                    }
7664                }
7665
7666                if (sqRuleService.isShowModal() && isPersistentSQ !== true) {
7667                    showModal = true;
7668                }
7669
7670                $scope.view = sqRuleService.view();
7671                $scope.modalView = sqRuleService.modalView();
7672
7673                if (sqDebugService.isDebug()) {
7674                    sqDebugService.showDebugInfo();
7675                }
7676
7677                if (sqRuleService.redirectURL() !== false) {
7678                    window.location.href = sqRuleService.redirectURL();
7679                }
7680
7681                isPersistentSQ = false;
7682            }
7683
7684            $scope.setSqResult = function (sq) {
7685                sqResult.set(sq);
7686                update();
7687                $scope.$apply();
7688            };
7689
7690            $scope.resetSq = function () {
7691                sqResult.reset();
7692                sqRuleService.reset();
7693                sqStorage.clear();
7694                sqUI.hideSqModal();
7695                let section2 = document.getElementById('section2');
7696                if (section2) {
7697                    section2.style.backgroundColor = 'white';
7698                }
7699
7700                sqUI.emptySqInput();
7701
7702                update();
7703            };
7704
7705            $scope.hasSqResult = function () {
7706                return JSON.stringify($scope.sq) !== "{}";
7707            };
7708
7709            // Persistent SQ - Also disables modal from showing again due to persistent SQ
7710            if (sqStorage.get() !== null && !$scope.isHomePage()) {
7711                isPersistentSQ = true;
7712                sqResult.set(sqStorage.get());
7713                update();
7714            }
7715
7716            $scope.showCommonsRegisterYourInterest = function (modal, updateOnly) {
7717                updateOnly = updateOnly || false;
7718                sqUI.hideSqModal();
7719                sqUI.showRegisterYourInterestModal(modal, updateOnly);
7720            };
7721
7722            $scope.dateFn = {
7723                formatDate: function (dateString) {
7724                    var date = new Date(dateString);
7725                    var dateParts = date.toDateString().substr(4).split(' ');
7726                    var dateGlue = [dateParts[1], dateParts[0], dateParts[2]];
7727
7728                    return dateGlue.join('-');
7729                },
7730                isOverdue: function (dateString) {
7731                    return new Date(dateString).getTime() < new Date().getTime();
7732                }
7733            };
7734
7735            $scope.getTechnologyName = function (technology) {
7736                var technologyName = {
7737                    FTTC: "Fibre to the Curb",
7738                    Fibre: "Fibre to the Premises",
7739                    FTTN: "Fibre to the Node",
7740                    FTTB: "Fibre to the Building",
7741                    HFC: "Hybrid Fibre Coaxial"
7742                };
7743                var fullTechnologyName = technologyName[technology];
7744                return fullTechnologyName !== undefined ? "(" + fullTechnologyName + ")" : "";
7745            };
7746
7747            $scope.getAltTechs = function (productToFilter) {
7748                filterAltTech = productToFilter;
7749                $scope.altTechs = sqAltTech.compileAltTechs($scope.sq, filterAltTech);
7750            };
7751
7752            $scope.is5GPreorder = function () {
7753                return $scope.sq.WIRELESS5G.hasOwnProperty("readyForService");
7754            };
7755
7756            $scope.isFibreConnectAvailable = function () {
7757                return $scope.sq.NBN.hasOwnProperty('nbnAlternativeAccessTechnology') && $scope.sq.NBN.nbnAlternativeAccessTechnology.type === 'Fibre';
7758            }
7759        }]);
7760;
7761angular.module('productApp')
7762    .service('sqResultService', function() {
7763        var sqResult = {};
7764
7765        function set(result) {
7766            sqResult = JSON.parse(JSON.stringify(result));
7767        }
7768
7769        function get() {
7770            return sqResult;
7771        }
7772
7773        function reset() {
7774            sqResult = {};
7775        }
7776
7777        return {
7778            set: set,
7779            get: get,
7780            reset: reset
7781        }
7782    });;
7783angular.module('productApp')
7784    .service('sqRuleManager', function () {
7785
7786        var defaultSqRule = ['whenFttbIsAvailable', 'whenNbnAndHwIsAvailable', 'when5gIsAvailable', 'whenHWIsAvailable', 'whenNbnIsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid'];
7787        var superFastSqRule = ['whenFttbIsAvailable', 'whenNoNbnButHW', 'whenIncompleteInvalid', 'whenHighSpeedIsAvailable', 'whenHighSpeedIsNotAvailable', 'whenNoNbnButAltTechsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid'];
7788        var nbnSqRule = ['whenNbnIsAvailableWithAltTechs', 'whenNbnIsAvailable', 'whenNoNbnButAltTechsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid','failedSq'];
7789        var fttbSqRule = ['whenFttbIsAvailableWithAltTechs', 'whenNoFttbButAltTechsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid'];
7790        var ftthSqRule = ['whenFtthIsAvailableWithAltTechs', 'whenNoFtthButAltTechsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid'];
7791        var homeSqRule = ['whenFttbIsAvailableWithAltTechs', 'whenListOfAltTechsAvailable', 'whenNbnIsNotServiceable', 'whenIncompleteInvalid','failedSq'];
7792
7793        var currentPath = window.location.pathname;
7794        var matchingRule = [];
7795        var rules = [
7796            {
7797                'sqType': 'highSpeedNbn',
7798                'pageUrl': '/nbn/high-speed-nbn',
7799                'rule': superFastSqRule,
7800                'displayModal': true
7801            },
7802            {
7803                'sqType': 'default',
7804                'pageUrl': '/services/internet-plans',
7805                'rule': defaultSqRule,
7806                'displayModal': true
7807            },
7808            {
7809                'sqType': 'nbn',
7810                'pageUrl': '/nbn',
7811                'rule': nbnSqRule,
7812                'displayModal': false
7813            },
7814            {
7815                'sqType': 'home',
7816                'pageUrl': '/',
7817                'rule': homeSqRule,
7818                'displayModal': true
7819            },
7820            {
7821                'sqType': 'fttb',
7822                'pageUrl': '/fttb',
7823                'rule': fttbSqRule,
7824                'displayModal': false
7825            },
7826            {
7827              'sqType': 'fttb',
7828              'pageUrl': '/fttb_new',
7829              'rule': fttbSqRule,
7830              'displayModal': false
7831            },
7832            {
7833                'sqType': 'ftth',
7834                'pageUrl': '/ftth',
7835                'rule': ftthSqRule,
7836                'displayModal': false
7837            }
7838        ];
7839
7840
7841        function loadRules() {
7842            matchingRule = rules.filter(function (rule, offset) {
7843                if (currentPath === rule.pageUrl) {
7844                    return rule;
7845                }
7846
7847                //return default value
7848                if ((rules.length - 1) === offset) {
7849                    return rule;
7850                }
7851            })[0];
7852
7853            return matchingRule;
7854        }
7855
7856        function debug() {
7857            console.groupCollapsed('sqRuleManager - rule group');
7858            console.log(matchingRule);
7859            console.groupEnd();
7860        }
7861
7862        return {
7863            getRules: loadRules,
7864            debug: debug
7865        }
7866
7867    });
7868;
7869angular.module('productApp')
7870    .service('sqRuleService', function($window, sqRuleManager, sqResultService) {
7871        var rules = {};
7872        var matchedRule = {
7873            rule: null,
7874            view: null,
7875            modalView: null,
7876            redirectURL: false,
7877        };
7878
7879        function execute() {
7880            var sqData = sqResultService.get();
7881            var alreadyMatched = false;
7882            rules = sqRuleManager.getRules();
7883
7884            rules.rule.forEach(function(rule) {
7885                var ruleFn = $window[rule];
7886                if (typeof ruleFn === "object") {
7887                    if (ruleFn.isMatched(sqData) && !alreadyMatched) {
7888                        matchedRule.rule = rule;
7889                        if (ruleFn.redirectURL() !== false) {
7890                            matchedRule.redirectURL = ruleFn.redirectURL();
7891                            matchedRule.modalView = rules.displayModal === true ? ruleFn.modalView() : true;
7892                        } else {
7893                            matchedRule.view = ruleFn.view();
7894                            matchedRule.modalView = rules.displayModal === true ? ruleFn.modalView() : false;
7895                        }
7896                        alreadyMatched = true;
7897                    }
7898                }
7899                else {
7900                    console.error(rule + ' rule not found');
7901                }
7902            });
7903        }
7904
7905        function getView() {
7906            return matchedRule.view;
7907        }
7908
7909        function getModalView() {
7910            return matchedRule.modalView;
7911        }
7912
7913        function getRedirectURL() {
7914            return matchedRule.redirectURL;
7915        }
7916
7917        function getIsShowModal() {
7918            return rules.displayModal;
7919        }
7920
7921        function reset() {
7922            matchedRule = {
7923                rule: null,
7924                view: null,
7925                modalView: null,
7926                redirectURL: false
7927            };
7928        }
7929
7930        function debug() {
7931            console.groupCollapsed('SqRuleService - matched rule');
7932            console.log(rules);
7933            console.log(matchedRule);
7934            console.groupEnd();
7935        }
7936
7937        return {
7938            run: execute,
7939            view: getView,
7940            modalView: getModalView,
7941            reset: reset,
7942            debug: debug,
7943            redirectURL: getRedirectURL,
7944            isShowModal: getIsShowModal
7945        };
7946    });
7947;
7948angular.module('productApp')
7949    .service('sqStorage', function ($window, sqResultService) {
7950
7951        var storageName = 'adrdata';
7952        var OCStorageName = 'oneSQFullResult';
7953
7954        function set() {
7955            $window.localStorage.setItem(storageName, JSON.stringify(sqResultService.get()));
7956            $window.sessionStorage.setItem(OCStorageName, JSON.stringify(sqResultService.get()));
7957        }
7958
7959        function get() {
7960            if (window.sessionStorage.getItem(OCStorageName)) {
7961                return JSON.parse($window.sessionStorage.getItem(OCStorageName));
7962            } else {
7963                return JSON.parse($window.localStorage.getItem(storageName));
7964            }
7965        }
7966
7967        function clear() {
7968            $window.sessionStorage.removeItem(OCStorageName);
7969            $window.localStorage.removeItem(storageName);
7970        }
7971
7972        return {
7973            set: set,
7974            get: get,
7975            clear: clear
7976        };
7977    });
7978;
7979angular.module('productApp')
7980    .service('sqUIService', function() {
7981        var $ = jQuery;
7982        var common = new TpgProductCommon();
7983
7984        function emptySqInput() {
7985            $('#address').val('');
7986            $('#sq-title').show();
7987        }
7988
7989        function showSqModal() {
7990            $('#sq-modal').modal('show');
7991        }
7992
7993        function hideSqModal() {
7994            $('#sq-modal').modal('hide');
7995        }
7996
7997        function showSqResult() {
7998            $('.sq-result').show();
7999            $('#sq-title').hide();
8000        }
8001
8002        function showRegisterYourInterestModal(modal, updateOnly) {
8003            common.showRegisterYourInterestModal(modal, updateOnly);
8004        }
8005
8006        function bindAddressRefinementEvents() {
8007            if (typeof addressFormModalBindEvents == 'function') {
8008                addressFormModalBindEvents();
8009            }
8010            else {
8011                console.error('addressFormModalBindEvents is not function');
8012            }
8013        }
8014
8015        function populateAddress(address) {
8016            if (typeof populateAddressForm == 'function') {
8017                populateAddressForm(address);
8018            }
8019            else {
8020                console.error('populateAddressForm is not function');
8021            }
8022        }
8023
8024        return {
8025            emptySqInput: emptySqInput,
8026            showSqModal: showSqModal,
8027            hideSqModal: hideSqModal,
8028            showSqResult: showSqResult,
8029            showRegisterYourInterestModal: showRegisterYourInterestModal,
8030            bindAddressRefinementEvents: bindAddressRefinementEvents,
8031            populateAddress: populateAddress
8032        }
8033    });
8034;
8035angular.module('productApp')
8036    .service('sqDebugService', function(sqRuleManager, sqRuleService) {
8037        var debug = false;
8038
8039        function enableSqDebug() {
8040            debug = true;
8041        }
8042
8043        function isDebug() {
8044            return debug;
8045        }
8046
8047        function showDebugInfo() {
8048            sqRuleManager.debug();
8049            sqRuleService.debug();
8050        }
8051
8052        return {
8053            enableDebug: enableSqDebug,
8054            isDebug: isDebug,
8055            showDebugInfo: showDebugInfo
8056
8057        }
8058    });;
8059angular.module('productApp')
8060    .service('sqAltTech', function () {
8061            var sqPriority = ["fttb", "fwa_5g", "nbn", "fwa_4g", "nbn_wireless", "ftth"];
8062
8063            function checkFTTB(sq) {
8064                return sq.FTTB.technology === "FTTH" ? "ftth" : "fttb";
8065            }
8066
8067            function check5GPreorder(sq) {
8068                return sq.WIRELESS5G.hasOwnProperty("readyForService") ? "fwa_5g_preorder" : "fwa_5g";
8069            }
8070
8071            function checkNBN(sq) {
8072                if (sq.NBN.technology === "Wireless") {
8073                    return "nbn_wireless";
8074                } else if (sq.NBN.res === 12) {
8075                    return "nbn_preorder";
8076                } else {
8077                    return "nbn";
8078                }
8079            }
8080
8081            function checkTechnologyBehaviour(tech, sq) {
8082                switch (tech) {
8083                    case "fttb":
8084                        return checkFTTB(sq);
8085                    case "fwa_5g":
8086                        return check5GPreorder(sq);
8087                    case "nbn":
8088                        return checkNBN(sq);
8089                    default:
8090                        return false;
8091                }
8092            }
8093
8094            function compileAltTechs(sq, productPage) {
8095                const maxTechsToShow = 3;
8096
8097                let availableTechsFromSq = Object.keys(sq.Services).filter(key => sq.Services[key] === 1);
8098                let fttbPageWithFTTHException = function (sq, productPage) {
8099                  return productPage.toLowerCase() === "fttb" && sq.FTTB.technology === "FTTH";
8100                }
8101
8102                return availableTechsFromSq
8103                  //remove tech in question and not in sqPriority i.e fwa_4g_backup
8104                  .filter(tech => sqPriority.includes(tech) && (tech !== productPage.toLowerCase() || fttbPageWithFTTHException(sq, productPage)))
8105                  //secondary mapping of oneSq Tech Results
8106                  .map(tech => {
8107                    let mappedTech = checkTechnologyBehaviour(tech, sq);
8108                    return mappedTech !== false ? mappedTech : tech;
8109                  })
8110                  //sort according to sqPriority
8111                  .sort( (a,b) => sqPriority.indexOf(a) - sqPriority.indexOf(b) )
8112                  //display up to maximum allowed tech
8113                  .slice(0, maxTechsToShow);
8114            }
8115
8116            return {
8117                compileAltTechs: compileAltTechs
8118            };
8119        }
8120    );
8121;
8122(function($, _win) {
8123
8124        var ipCheckEndpoint = '/internet-product/broadband/nbn/ip-check';
8125        function init() {
8126            $.ajax(ipCheckEndpoint)
8127                .done(function(result) {
8128                    _win.ipCheck = result || {};
8129                    gtmDatalayerInit();
8130                });
8131        }
8132
8133        function gtmDatalayerInit() {
8134            var onStaffNetwork = window.ipCheck.onStaffNetwork === 'true' ? true : false;
8135            var isCustomer = window.ipCheck.isCustomer === 'true' ? true : false;
8136
8137            if (dataLayer !== undefined) {
8138                dataLayer.push({
8139                    'onStaffNetwork': onStaffNetwork,
8140                    'isCustomer': isCustomer
8141                })
8142            }
8143        }
8144
8145        function TPGIpChecker() {
8146
8147            var onStaffNetwork = typeof(window.ipCheck) === 'object' ? window.ipCheck.internal : false;
8148
8149            function onStaffnetwork() {
8150                return onStaffNetwork;
8151            }
8152
8153            return {
8154                isAssistedSale: onStaffnetwork
8155            }
8156        }
8157
8158        init();
8159        _win.tpgIpCheck = TPGIpChecker;
8160
8161
8162})(jQuery, window || {});
8163;
8164/**
8165 * @file
8166 * Overrides core/misc/vertical-tabs.js.
8167 */
8168
8169(function ($, window, Drupal, drupalSettings) {
8170  "use strict";
8171
8172  /**
8173   * This script transforms a set of details into a stack of vertical
8174   * tabs. Another tab pane can be selected by clicking on the respective
8175   * tab.
8176   *
8177   * Each tab may have a summary which can be updated by another
8178   * script. For that to work, each details element has an associated
8179   * 'verticalTabCallback' (with jQuery.data() attached to the details),
8180   * which is called every time the user performs an update to a form
8181   * element inside the tab pane.
8182   */
8183  Drupal.behaviors.verticalTabs = {
8184    attach: function (context) {
8185      
8186
8187      $(context).find('[data-vertical-tabs-panes]').once('vertical-tabs').each(function () {
8188        var $this = $(this).addClass('tab-content vertical-tabs-panes');
8189
8190        var focusID = $(':hidden.vertical-tabs__active-tab', this).val();
8191        if (typeof focusID === 'undefined' || !focusID.length) {
8192          focusID = false;
8193        }
8194        var tab_focus;
8195
8196        // Check if there are some details that can be converted to vertical-tabs
8197        var $details = $this.find('> .panel');
8198        if ($details.length === 0) {
8199          return;
8200        }
8201
8202        // Create the tab column.
8203        var tab_list = $('<ul class="nav nav-tabs vertical-tabs-list"></ul>');
8204        $this.wrap('<div class="tabbable tabs-left vertical-tabs clearfix"></div>').before(tab_list);
8205
8206        // Transform each details into a tab.
8207        $details.each(function () {
8208          var $that = $(this);
8209          var vertical_tab = new Drupal.verticalTab({
8210            title: $that.find('> .panel-heading > .panel-title, > .panel-heading').last().html(),
8211            details: $that
8212          });
8213          tab_list.append(vertical_tab.item);
8214          $that
8215            .removeClass('collapsed')
8216            // prop() can't be used on browsers not supporting details element,
8217            // the style won't apply to them if prop() is used.
8218            .attr('open', true)
8219            .removeClass('collapsible collapsed panel panel-default')
8220            .addClass('tab-pane vertical-tabs-pane')
8221            .data('verticalTab', vertical_tab)
8222            .find('> .panel-heading').remove();
8223          if (this.id === focusID) {
8224            tab_focus = $that;
8225          }
8226        });
8227
8228        $(tab_list).find('> li:first').addClass('first');
8229        $(tab_list).find('> li:last').addClass('last');
8230
8231        if (!tab_focus) {
8232          // If the current URL has a fragment and one of the tabs contains an
8233          // element that matches the URL fragment, activate that tab.
8234          var $locationHash = $this.find(window.location.hash);
8235          if (window.location.hash && $locationHash.length) {
8236            tab_focus = $locationHash.closest('.vertical-tabs-pane');
8237          }
8238          else {
8239            tab_focus = $this.find('> .vertical-tabs-pane:first');
8240          }
8241        }
8242        if (tab_focus.length) {
8243          tab_focus.data('verticalTab').focus();
8244        }
8245      });
8246
8247      // Provide some Bootstrap tab/Drupal integration.
8248      // @todo merge this into the above code from core.
8249      $(context).find('.tabbable').once('bootstrap-tabs').each(function () {
8250        var $wrapper = $(this);
8251        var $tabs = $wrapper.find('.nav-tabs');
8252        var $content = $wrapper.find('.tab-content');
8253        var borderRadius = parseInt($content.css('borderBottomRightRadius'), 10);
8254        var bootstrapTabResize = function() {
8255          if ($wrapper.hasClass('tabs-left') || $wrapper.hasClass('tabs-right')) {
8256            $content.css('min-height', $tabs.outerHeight());
8257          }
8258        };
8259        // Add min-height on content for left and right tabs.
8260        bootstrapTabResize();
8261        // Detect tab switch.
8262        if ($wrapper.hasClass('tabs-left') || $wrapper.hasClass('tabs-right')) {
8263          $tabs.on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) {
8264            bootstrapTabResize();
8265            if ($wrapper.hasClass('tabs-left')) {
8266              if ($(e.target).parent().is(':first-child')) {
8267                $content.css('borderTopLeftRadius', '0');
8268              }
8269              else {
8270                $content.css('borderTopLeftRadius', borderRadius + 'px');
8271              }
8272            }
8273            else {
8274              if ($(e.target).parent().is(':first-child')) {
8275                $content.css('borderTopRightRadius', '0');
8276              }
8277              else {
8278                $content.css('borderTopRightRadius', borderRadius + 'px');
8279              }
8280            }
8281          });
8282        }
8283      });
8284    }
8285  };
8286
8287  /**
8288   * The vertical tab object represents a single tab within a tab group.
8289   *
8290   * @param settings
8291   *   An object with the following keys:
8292   *   - title: The name of the tab.
8293   *   - details: The jQuery object of the details element that is the tab pane.
8294   */
8295  Drupal.verticalTab = function (settings) {
8296    var self = this;
8297    $.extend(this, settings, Drupal.theme('verticalTab', settings));
8298
8299    this.link.attr('href', '#' + settings.details.attr('id'));
8300
8301    this.link.on('click', function (e) {
8302      e.preventDefault();
8303      self.focus();
8304    });
8305
8306    // Keyboard events added:
8307    // Pressing the Enter key will open the tab pane.
8308    this.link.on('keydown', function (event) {
8309      event.preventDefault();
8310      if (event.keyCode === 13) {
8311        self.focus();
8312        // Set focus on the first input field of the visible details/tab pane.
8313        $(".vertical-tabs-pane :input:visible:enabled:first").trigger('focus');
8314      }
8315    });
8316
8317    this.details
8318      .on('summaryUpdated', function () {
8319        self.updateSummary();
8320      })
8321      .trigger('summaryUpdated');
8322  };
8323
8324  Drupal.verticalTab.prototype = {
8325    /**
8326     * Displays the tab's content pane.
8327     */
8328    focus: function () {
8329      this.details
8330        .siblings('.vertical-tabs-pane')
8331        .each(function () {
8332          $(this).removeClass('active').find('> div').removeClass('in');
8333          var tab = $(this).data('verticalTab');
8334          tab.item.removeClass('selected');
8335        })
8336        .end()
8337        .addClass('active')
8338        .siblings(':hidden.vertical-tabs-active-tab')
8339        .val(this.details.attr('id'));
8340      this.details.find('> div').addClass('in');
8341      this.details.data('verticalTab').item.find('a').tab('show');
8342      this.item.addClass('selected');
8343      // Mark the active tab for screen readers.
8344      $('#active-vertical-tab').remove();
8345      this.link.append('<span id="active-vertical-tab" class="visually-hidden">' + Drupal.t('(active tab)') + '</span>');
8346    },
8347
8348    /**
8349     * Updates the tab's summary.
8350     */
8351    updateSummary: function () {
8352      this.summary.html(this.details.drupalGetSummary());
8353    },
8354
8355    /**
8356     * Shows a vertical tab pane.
8357     */
8358    tabShow: function () {
8359      // Display the tab.
8360      this.item.show();
8361      // Show the vertical tabs.
8362      this.item.closest('.form-type-vertical-tabs').show();
8363      // Update .first marker for items. We need recurse from parent to retain the
8364      // actual DOM element order as jQuery implements sortOrder, but not as public
8365      // method.
8366      this.item.parent().children('.vertical-tab-button').removeClass('first')
8367        .filter(':visible:first').addClass('first');
8368      // Display the details element.
8369      this.details.removeClass('vertical-tab-hidden').show();
8370      // Focus this tab.
8371      this.focus();
8372      return this;
8373    },
8374
8375    /**
8376     * Hides a vertical tab pane.
8377     */
8378    tabHide: function () {
8379      // Hide this tab.
8380      this.item.hide();
8381      // Update .first marker for items. We need recurse from parent to retain the
8382      // actual DOM element order as jQuery implements sortOrder, but not as public
8383      // method.
8384      this.item.parent().children('.vertical-tab-button').removeClass('first')
8385        .filter(':visible:first').addClass('first');
8386      // Hide the details element.
8387      this.details.addClass('vertical-tab-hidden').hide();
8388      // Focus the first visible tab (if there is one).
8389      var $firstTab = this.details.siblings('.vertical-tabs-pane:not(.vertical-tab-hidden):first');
8390      if ($firstTab.length) {
8391        $firstTab.data('verticalTab').focus();
8392      }
8393      // Hide the vertical tabs (if no tabs remain).
8394      else {
8395        this.item.closest('.form-type-vertical-tabs').hide();
8396      }
8397      return this;
8398    }
8399  };
8400
8401  /**
8402   * Theme function for a vertical tab.
8403   *
8404   * @param settings
8405   *   An object with the following keys:
8406   *   - title: The name of the tab.
8407   * @return
8408   *   This function has to return an object with at least these keys:
8409   *   - item: The root tab jQuery element
8410   *   - link: The anchor tag that acts as the clickable area of the tab
8411   *       (jQuery version)
8412   *   - summary: The jQuery element that contains the tab summary
8413   */
8414  Drupal.theme.verticalTab = function (settings) {
8415    var tab = {};
8416    tab.item = $('<li class="vertical-tab-button" tabindex="-1"></li>')
8417      .append(tab.link = $('<a href="#' + settings.details[0].id + '" data-toggle="tab"></a>')
8418        .append(tab.title = $('<h3></h3>').html(settings.title))
8419        .append(tab.summary = $('<div class="summary"></div>')
8420      )
8421    );
8422    return tab;
8423  };
8424
8425})(jQuery, this, Drupal, drupalSettings);
8426;
8427(function($) {
8428
8429    $.fn.visible = function(partial) {   
8430        var $t            = $(this),
8431            $w            = $(window),
8432            viewTop       = $w.scrollTop(),
8433            viewBottom    = viewTop + $w.height(),
8434            _top          = $t.offset().top,
8435            _bottom       = _top + $t.height(),
8436            compareTop    = partial === true ? _bottom : _top,
8437            compareBottom = partial === true ? _top : _bottom;
8438
8439        return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
8440    };
8441  
8442    $(document).ready(function(){   
8443        $(".reveal").each(function(i, el) {
8444            var el = $(el);
8445            if (el.visible(true)) {
8446                el.removeClass("element-to-hide");
8447                el.addClass("element-to-show"); 
8448            } 
8449        });
8450    });
8451  
8452    $(window).scroll(function(event) {
8453        $(".reveal").each(function(i, el) {
8454            var el = $(el);
8455            if (el.visible(true)) {
8456                el.removeClass("element-to-hide");
8457                el.addClass("element-to-show"); 
8458            } 
8459        });
8460    });
8461
8462})(jQuery);;
8463function sqActions(status, msg, action, page, data) {
8464    $ = jQuery;
8465
8466    if (data.Services.nbn === 1 && data.Services.fwa_5g === 1 && data.Services.fttb !== 1) {
8467        displayTechOptionsModal(data, msg);
8468    } else if (page) {
8469        if ($('#sqModal').is(':visible')) {
8470            window.localStorage.setItem('adrdata', JSON.stringify(data));
8471            postRedirect(page, { 'adrdata': JSON.stringify(data), 'msg': msg });
8472        }
8473        return false;
8474    }
8475
8476    return true;
8477}
8478
8479function displayTechOptionsModal(data, msg) {
8480    $ = jQuery;
8481    
8482    $('#sqModal').modal('hide');
8483    $('#chooseNbN5gModal').modal('show');
8484
8485    $('.fwa_4g-available').hide();
8486    $('.fwa_5g-available').show();
8487    $('.fwa_5g_preorder-available').hide();
8488    $('.fwa_5g_preorder-unavailable').show();
8489    $('.nbn-available').show();
8490    $('.nbn-preorder-available').hide();
8491    $('.nbn-ready-available').show();
8492
8493    if (data.Services.fwa_4g === 1)  {
8494        $('.fwa_4g-available').show();
8495        $('.hw-contact').show();
8496    }
8497
8498    if (data.NBN['readyForService']) {
8499        $('.nbn-preorder-available').show();
8500        $('.nbn-ready-available').hide();
8501        var date = new Date(data.NBN['readyForService']);
8502        var dateFormat = { day: 'numeric', month: 'long', year: 'numeric' };
8503        var dateFormatted = date.toLocaleDateString("en-GB", dateFormat);
8504        $('.nbn-preorder-date').text(dateFormatted);
8505     }
8506    if (data.Services.fwa_5g === 1 && data.WIRELESS5G['readyForService']) {
8507        $('.fwa_5g_preorder-available').show();
8508        $('.fwa_5g_preorder-unavailable').hide();
8509        var date = new Date(data.WIRELESS5G['readyForService']);
8510        var dateFormat = { day: 'numeric', month: 'long', year: 'numeric' };
8511        var dateFormatted = date.toLocaleDateString("en-GB", dateFormat);
8512        $('.fw5g-preorder-date').text(dateFormatted);
8513    }
8514
8515    $('#chooseNbN5gModal a.btn').click(function (e) {
8516        e.preventDefault();
8517        window.localStorage.setItem('adrdata', JSON.stringify(data));
8518        var page = $(this).attr('href');
8519        postRedirect(page, { 'adrdata': JSON.stringify(data), 'msg': msg });
8520        return false;
8521    })
8522};
8523/*
8524 * jQuery mmenu v5.7.8
8525 * @requires jQuery 1.7.0 or later
8526 *
8527 * mmenu.frebsite.nl
8528 *	
8529 * Copyright (c) Fred Heusschen
8530 * www.frebsite.nl
8531 *
8532 * License: CC-BY-NC-4.0
8533 * http://creativecommons.org/licenses/by-nc/4.0/
8534 */
8535!function(e){function n(){e[t].glbl||(r={$wndw:e(window),$docu:e(document),$html:e("html"),$body:e("body")},s={},a={},o={}
8535,e.each([s,a,o],function(e,n){n.add=function(e){e=e.split(" ");for(var t=0,i=e.length;t<i;t++)n[e[t]]=n.mm(e[t])}}),s.mm=function(e){return"mm-"+e},s.add("wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),s.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return"mm-"+e},a.add("parent child"),o.mm=function(e){return e+".mm"},o.add("transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange"),e[t]._c=s,e[t]._d=a,e[t]._e=o,e[t].glbl=r)}var t="mmenu",i="5.7.8";if(!(e[t]&&e[t].version>i)){e[t]=function(e,n,t){this.$menu=e,this._api=["bind","getInstance","update","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=n,this.conf=t,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var i=this.$pnls.children();return this._initAddons(),this.initPanels(i),"function"==typeof this.___debug&&this.___debug(),this},e[t].version=i,e[t].addons={},e[t].uniqueId=0,e[t].defaults={extensions:[],initMenu:function(){},initPanels:function(){},navbar:{add:!0,title:" ",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[t].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[t].prototype={init:function(e){this.initPanels(e)},getInstance:function(){return this},update:function(){this.trigger("update")},initPanels:function(e){e=e.not("."+s.nopanel),e=this._initPanels(e),this.opts.initPanels.call(this,e),this.trigger("initPanels",e),this.trigger("update")},openPanel:function(n){var i=n.parent(),a=this;if(i.hasClass(s.vertical)){var o=i.parents("."+s.subopened);if(o.length)return void this.openPanel(o.first());i.addClass(s.opened),this.trigger("openPanel",n),this.trigger("openingPanel",n),this.trigger("openedPanel",n)}else{if(n.hasClass(s.current))return;var r=this.$pnls.children("."+s.panel),l=r.filter("."+s.current);r.removeClass(s.highest).removeClass(s.current).not(n).not(l).not("."+s.vertical).addClass(s.hidden),e[t].support.csstransitions||l.addClass(s.hidden),n.hasClass(s.opened)?n.nextAll("."+s.opened).addClass(s.highest).removeClass(s.opened).removeClass(s.subopened):(n.addClass(s.highest),l.addClass(s.subopened)),n.removeClass(s.hidden).addClass(s.current),a.trigger("openPanel",n),setTimeout(function(){n.removeClass(s.subopened).addClass(s.opened),a.trigger("openingPanel",n),a.__transitionend(n,function(){a.trigger("openedPanel",n)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var n=e.parent();n.hasClass(s.vertical)&&(n.removeClass(s.opened),this.trigger("closePanel",e),this.trigger("closingPanel",e),this.trigger("closedPanel",e))},closeAllPanels:function(){this.$menu.find("."+s.listview).children().removeClass(s.selected).filter("."+s.vertical).removeClass(s.opened);var e=this.$pnls.children("."+s.panel),n=e.first();this.$pnls.children("."+s.panel).not(n).removeClass(s.subopened).removeClass(s.opened).removeClass(s.current).removeClass(s.highest).addClass(s.hidden),this.openPanel(n)},togglePanel:function(e){var n=e.parent();n.hasClass(s.vertical)&&this[n.hasClass(s.opened)?"closePanel":"openPanel"](e)},setSelected:function(e){this.$menu.find("."+s.listview).children("."+s.selected).removeClass(s.selected),e.addClass(s.selected),this.trigger("setSelected",e)},bind:function(e,n){e="init"==e?"initPanels":e,this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(n)},trigger:function(){var e=this,n=Array.prototype.slice.call(arguments),t=n.shift();if(t="init"==t?"initPanels":t,this.cbck[t])for(var i=0,s=this.cbck[t].length;i<s;i++)this.cbck[t][i].apply(e,n)},_initMenu:function(){this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",s.mm(e(this).attr("id")))})),this.opts.initMenu.call(this,this.$menu,this.$orig),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=e('<div class="'+s.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(s.wrapper);var n=[s.menu];this.opts.slidingSubmenus||n.push(s.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addClass(n.join(" ")),this.trigger("_initMenu")},_initPanels:function(n){var i=this,o=this.__findAddBack(n,"ul, ol");this.__refactorClass(o,this.conf.classNames.inset,"inset").addClass(s.nolistview+" "+s.nopanel),o.not("."+s.nolistview).addClass(s.listview);var r=this.__findAddBack(n,"."+s.listview).children();this.__refactorClass(r,this.conf.classNames.selected,"selected"),this.__refactorClass(r,this.conf.classNames.divider,"divider"),this.__refactorClass(r,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(n,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var l=e(),d=n.add(n.find("."+s.panel)).add(this.__findAddBack(n,"."+s.listview).children().children(this.conf.panelNodetype)).not("."+s.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(s.vertical),d.each(function(){var n=e(this),t=n;n.is("ul, ol")?(n.wrap('<div class="'+s.panel+'" />'),t=n.parent()):t.addClass(s.panel);var a=n.attr("id");n.removeAttr("id"),t.attr("id",a||i.__getUniqueId()),n.hasClass(s.vertical)&&(n.removeClass(i.
8535conf.classNames.vertical),t.add(t.parent()).addClass(s.vertical)),l=l.add(t)});var c=e("."+s.panel,this.$menu);l.each(function(n){var o,r,l=e(this),d=l.parent(),c=d.children("a, span").first();if(d.is("."+s.panels)||(d.data(a.child,l),l.data(a.parent,d)),d.children("."+s.next).length||d.parent().is("."+s.listview)&&(o=l.attr("id"),r=e('<a class="'+s.next+'" href="#'+o+'" data-target="#'+o+'" />').insertBefore(c),c.is("span")&&r.addClass(s.fullsubopen)),!l.children("."+s.navbar).length&&!d.hasClass(s.vertical)){d.parent().is("."+s.listview)?d=d.closest("."+s.panel):(c=d.closest("."+s.panel).find('a[href="#'+l.attr("id")+'"]').first(),d=c.closest("."+s.panel));var h=!1,u=e('<div class="'+s.navbar+'" />');if(i.opts.navbar.add&&l.addClass(s.hasnavbar),d.length){switch(o=d.attr("id"),i.opts.navbar.titleLink){case"anchor":h=c.attr("href");break;case"panel":case"parent":h="#"+o;break;default:h=!1}u.append('<a class="'+s.btn+" "+s.prev+'" href="#'+o+'" data-target="#'+o+'" />').append(e('<a class="'+s.title+'"'+(h?' href="'+h+'"':"")+" />").text(c.text())).prependTo(l)}else i.opts.navbar.title&&u.append('<a class="'+s.title+'">'+e[t].i18n(i.opts.navbar.title)+"</a>").prependTo(l)}});var h=this.__findAddBack(n,"."+s.listview).children("."+s.selected).removeClass(s.selected).last().addClass(s.selected);h.add(h.parentsUntil("."+s.menu,"li")).filter("."+s.vertical).addClass(s.opened).end().each(function(){e(this).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).addClass(s.subopened)}),h.children("."+s.panel).not("."+s.vertical).addClass(s.opened).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).addClass(s.subopened);var u=c.filter("."+s.opened);return u.length||(u=l.first()),u.addClass(s.opened).last().addClass(s.current),l.not("."+s.vertical).not(u.last()).addClass(s.hidden).end().filter(function(){return!e(this).parent().hasClass(s.panels)}).appendTo(this.$pnls),this.trigger("_initPanels",l),l},_initAnchors:function(){var n=this;r.$body.on(o.click+"-oncanvas","a[href]",function(i){var a=e(this),o=!1,r=n.$menu.find(a).length;for(var l in e[t].addons)if(e[t].addons[l].clickAnchor.call(n,a,r)){o=!0;break}var d=a.attr("href");if(!o&&r&&d.length>1&&"#"==d.slice(0,1))try{var c=e(d,n.$menu);c.is("."+s.panel)&&(o=!0,n[a.parent().hasClass(s.vertical)?"togglePanel":"openPanel"](c))}catch(h){}if(o&&i.preventDefault(),!o&&r&&a.is("."+s.listview+" > li > a")&&!a.is('[rel="external"]')&&!a.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,a)&&n.setSelected(e(i.target).parent());var u=n.__valueOrFn(n.opts.onClick.preventDefault,a,"#"==d.slice(0,1));u&&i.preventDefault(),n.__valueOrFn(n.opts.onClick.close,a,u)&&n.close()}}),this.trigger("_initAnchors")},_initAddons:function(){var n;for(n in e[t].addons)e[t].addons[n].add.call(this),e[t].addons[n].add=function(){};for(n in e[t].addons)e[t].addons[n].setup.call(this);this.trigger("_initAddons")},_getOriginalMenuId:function(){var e=this.$menu.attr("id");return e&&e.length&&this.conf.clone&&(e=s.umm(e)),e},__api:function(){var n=this,t={};return e.each(this._api,function(e){var i=this;t[i]=function(){var e=n[i].apply(n,arguments);return"undefined"==typeof e?t:e}}),t},__valueOrFn:function(e,n,t){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof t?t:e},__refactorClass:function(e,n,t){return e.filter("."+n).removeClass(n).addClass(s[t])},__findAddBack:function(e,n){return e.find(n).add(e.filter(n))},__filterListItems:function(e){return e.not("."+s.divider).not("."+s.hidden)},__transitionend:function(n,t,i){var s=!1,a=function(i){if("undefined"!=typeof i){if(!e(i.target).is(n))return!1;n.unbind(o.transitionend),n.unbind(o.webkitTransitionEnd)}s||t.call(n[0]),s=!0};n.on(o.transitionend,a),n.on(o.webkitTransitionEnd,a),setTimeout(a,1.1*i)},__getUniqueId:function(){return s.mm(e[t].uniqueId++)}},e.fn[t]=function(i,s){n(),i=e.extend(!0,{},e[t].defaults,i),s=e.extend(!0,{},e[t].configuration,s);var a=e();return this.each(function(){var n=e(this);if(!n.data(t)){var o=new e[t](n,i,s);o.$menu.data(t,o.__api()),a=a.add(o.$menu)}}),a},e[t].i18n=function(){var n={};return function(t){switch(typeof t){case"object":return e.extend(n,t),n;case"string":return n[t]||t;case"undefined":default:return n}}}(),e[t].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if("undefined"!=typeof Modernizr&&"undefined"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,n=e.style,t="transition";if("string"==typeof n[t])return!0;var i=["Moz","webkit","Webkit","Khtml","O","ms"];t=t.charAt(0).toUpperCase()+t.substr(1);for(var s=0;s<i.length;s++)if("string"==typeof n[i[s]+t])return!0;return!1}(),csstransforms:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms||Modernizr.csstransforms}(),csstransforms3d:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms3d||Modernizr.csstransforms3d}()};var s,a,o,r}}(jQuery),/*	
8536 * jQuery mmenu offCanvas add-on
8537 * mmenu.frebsite.nl
8538 *
8539 * Copyright (c) Fred Heusschen
8540 */
8541function(e){var n="mmenu",t="offCanvas";e[n].addons[t]={setup:function(){if(this.opts[t]){var s=this.opts[t],a=this.conf[t];o=e[n].glbl,this._api=e.merge(this._api,["open","close","setPage"]),"top"!=s.position&&"bottom"!=s.position||(s.zposition="front"),"string"!=typeof a.pageSelector&&(a.pageSelector="> "+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[i.offcanvas];"left"!=s.position&&r.push(i.mm(s.position)),"back"!=s.zposition&&r.push(i.mm(s.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(i.wrapper),e[n].support.csstransforms||this.$menu.addClass(i["no-csstransforms"]),e[n].support.csstransforms3d||this.$menu.addClass(i["no-csstransforms3d"]),this.setPage(o.$page),this._initBlocker(),this["_initWindow_"+t](),this.$menu[a.menuInjectMethod+"To"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("offcanvas slideout blocking modal background opening blocker page no-csstransforms3d"),s.add("style"),a.add("resize")},clickAnchor:function(e,n){var s=this;if(this.opts[t]){var a=this._getOriginalMenuId();if(a&&e.is('[href="#'+a+'"]')){if(n)return!0;var r=e.closest("."+i.menu);
8541if(r.length){var l=r.data("mmenu");if(l&&l.close)return l.close(),s.__transitionend(r,function(){s.open()},s.conf.transitionDuration),!0}return this.open(),!0}if(o.$page)return a=o.$page.first().attr("id"),a&&e.is('[href="#'+a+'"]')?(this.close(),!0):void 0}}},e[n].defaults[t]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},e[n].configuration[t]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},e[n].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open")}},e[n].prototype._openSetup=function(){var n=this,r=this.opts[t];this.closeAllOthers(),o.$page.each(function(){e(this).data(s.style,e(this).attr("style")||"")}),o.$wndw.trigger(a.resize+"-"+t,[!0]);var l=[i.opened];r.blockUI&&l.push(i.blocking),"modal"==r.blockUI&&l.push(i.modal),r.moveBackground&&l.push(i.background),"left"!=r.position&&l.push(i.mm(this.opts[t].position)),"back"!=r.zposition&&l.push(i.mm(this.opts[t].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(" ")),setTimeout(function(){n.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(i.current+" "+i.opened)},e[n].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger("opened")},this.conf.transitionDuration),o.$html.addClass(i.opening),this.trigger("opening")},e[n].prototype.close=function(){if(this.vars.opened){var n=this;this.__transitionend(o.$page.first(),function(){n.$menu.removeClass(i.current+" "+i.opened);var a=[i.opened,i.blocking,i.modal,i.background,i.mm(n.opts[t].position),i.mm(n.opts[t].zposition)];n.opts.extensions&&a.push(n.opts.extensions),o.$html.removeClass(a.join(" ")),o.$page.each(function(){e(this).attr("style",e(this).data(s.style))}),n.vars.opened=!1,n.trigger("closed")},this.conf.transitionDuration),o.$html.removeClass(i.opening),this.trigger("close"),this.trigger("closing")}},e[n].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var t=e(this).data(n);t&&t.close&&t.close()})},e[n].prototype.setPage=function(n){var s=this,a=this.conf[t];n&&n.length||(n=o.$body.find(a.pageSelector),a.noPageSelector.length&&(n=n.not(a.noPageSelector.join(", "))),n.length>1&&a.wrapPageIfNeeded&&(n=n.wrapAll("<"+this.conf[t].pageNodetype+" />").parent())),n.each(function(){e(this).attr("id",e(this).attr("id")||s.__getUniqueId())}),n.addClass(i.page+" "+i.slideout),o.$page=n,this.trigger("setPage",n)},e[n].prototype["_initWindow_"+t]=function(){o.$wndw.off(a.keydown+"-"+t).on(a.keydown+"-"+t,function(e){if(o.$html.hasClass(i.opened)&&9==e.keyCode)return e.preventDefault(),!1});var e=0;o.$wndw.off(a.resize+"-"+t).on(a.resize+"-"+t,function(n,t){if(1==o.$page.length&&(t||o.$html.hasClass(i.opened))){var s=o.$wndw.height();(t||s!=e)&&(e=s,o.$page.css("minHeight",s))}})},e[n].prototype._initBlocker=function(){var n=this;this.opts[t].blockUI&&(o.$blck||(o.$blck=e('<div id="'+i.blocker+'" class="'+i.slideout+'" />')),o.$blck.appendTo(o.$body).off(a.touchstart+"-"+t+" "+a.touchmove+"-"+t).on(a.touchstart+"-"+t+" "+a.touchmove+"-"+t,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+"-"+t)}).off(a.mousedown+"-"+t).on(a.mousedown+"-"+t,function(e){e.preventDefault(),o.$html.hasClass(i.modal)||(n.closeAllOthers(),n.close())}))};var i,s,a,o}(jQuery),/*	
8542 * jQuery mmenu scrollBugFix add-on
8543 * mmenu.frebsite.nl
8544 *
8545 * Copyright (c) Fred Heusschen
8546 */
8547function(e){var n="mmenu",t="scrollBugFix";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,e[n].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof r&&(r={fix:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),r.fix)){var l=this.$menu.attr("id"),d=!1;this.bind("opening",function(){this.$pnls.children("."+i.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){s.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,"#"+l+"> ."+i.panels+"> ."+i.current,function(e){s.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,"#"+l+"> ."+i.panels+"> ."+i.current,function(n){s.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&n.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){s.$pnls.children("."+i.current).scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e},clickAnchor:function(e,n){}},e[n].defaults[t]={fix:!0};var i,s,a,o}
8547(jQuery),/*	
8548 * jQuery mmenu autoHeight add-on
8549 * mmenu.frebsite.nl
8550 *
8551 * Copyright (c) Fred Heusschen
8552 */
8553function(e){var n="mmenu",t="autoHeight";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var s=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof s&&s&&(s={height:"auto"}),"string"==typeof s&&(s={height:s}),"object"!=typeof s&&(s={}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),"auto"==s.height||"highest"==s.height){this.$menu.addClass(i.autoheight);var a=function(n){if(this.vars.opened){var t=parseInt(this.$pnls.css("top"),10)||0,a=parseInt(this.$pnls.css("bottom"),10)||0,o=0;this.$menu.addClass(i.measureheight),"auto"==s.height?(n=n||this.$pnls.children("."+i.current),n.is("."+i.vertical)&&(n=n.parents("."+i.panel).not("."+i.vertical).first()),o=n.outerHeight()):"highest"==s.height&&this.$pnls.children().each(function(){var n=e(this);n.is("."+i.vertical)&&(n=n.parents("."+i.panel).not("."+i.vertical).first()),o=Math.max(o,n.outerHeight())}),this.$menu.height(o+t+a).removeClass(i.measureheight)}};this.bind("opening",a),"highest"==s.height&&this.bind("initPanels",a),"auto"==s.height&&(this.bind("update",a),this.bind("openPanel",a),this.bind("closePanel",a))}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(e,n){}},e[n].defaults[t]={height:"default"};var i,s,a,o}(jQuery),/*	
8554 * jQuery mmenu backButton add-on
8555 * mmenu.frebsite.nl
8556 *
8557 * Copyright (c) Fred Heusschen
8558 */
8559function(e){var n="mmenu",t="backButton";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var s=this,a=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof a&&(a={close:a}),"object"!=typeof a&&(a={}),a=e.extend(!0,{},e[n].defaults[t],a),a.close){var r="#"+s.$menu.attr("id");this.bind("opened",function(e){location.hash!=r&&history.pushState(null,document.title,r)}),e(window).on("popstate",function(e){o.$html.hasClass(i.opened)?(e.stopPropagation(),s.close()):location.hash==r&&(e.stopPropagation(),s.open())})}}},add:function(){return window.history&&window.history.pushState?(i=e[n]._c,s=e[n]._d,void(a=e[n]._e)):void(e[n].addons[t].setup=function(){})},clickAnchor:function(e,n){}},e[n].defaults[t]={close:!1};var i,s,a,o}(jQuery),/*	
8560 * jQuery mmenu columns add-on
8561 * mmenu.frebsite.nl
8562 *
8563 * Copyright (c) Fred Heusschen
8564 */
8565function(e){var n="mmenu",t="columns";e[n].addons[t]={setup:function(){var s=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof s&&(s={add:s}),"number"==typeof s&&(s={add:!0,visible:s}),"object"!=typeof s&&(s={}),"number"==typeof s.visible&&(s.visible={min:s.visible,max:s.visible}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),s.add){s.visible.min=Math.max(1,Math.min(6,s.visible.min)),s.visible.max=Math.max(s.visible.min,Math.min(6,s.visible.max)),this.$menu.addClass(i.columns);for(var a=this.opts.offCanvas?this.$menu.add(o.$html):this.$menu,r=[],l=0;l<=s.visible.max;l++)r.push(i.columns+"-"+l);r=r.join(" ");var d=function(e){u.call(this,this.$pnls.children("."+i.current))},c=function(){var e=this.$pnls.children("."+i.panel).filter("."+i.opened).length;e=Math.min(s.visible.max,Math.max(s.visible.min,e)),a.removeClass(r).addClass(i.columns+"-"+e)},h=function(){this.opts.offCanvas&&o.$html.removeClass(r)},u=function(n){this.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(n).slice(-s.visible.max).each(function(n){e(this).addClass(i.columns+"-"+n)})};this.bind("open",c),this.bind("close",h),this.bind("initPanels",d),this.bind("openPanel",u),this.bind("openingPanel",c),this.bind("openedPanel",c),this.opts.offCanvas||c.call(this)}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("columns")},clickAnchor:function(n,s){if(!this.opts[t].add)return!1;if(s){var a=n.attr("href");if(a.length>1&&"#"==a.slice(0,1))try{var o=e(a,this.$menu);if(o.is("."+i.panel))for(var r=parseInt(n.closest("."+i.panel).attr("class").split(i.columns+"-")[1].split(" ")[0],10)+1;r!==!1;){var l=this.$pnls.children("."+i.columns+"-"+r);if(!l.length){r=!1;break}r++,l.removeClass(i.subopened).removeClass(i.opened).removeClass(i.
8565current).removeClass(i.highest).addClass(i.hidden)}}catch(d){}}}},e[n].defaults[t]={add:!1,visible:{min:1,max:3}};var i,s,a,o}(jQuery),/*	
8566 * jQuery mmenu counters add-on
8567 * mmenu.frebsite.nl
8568 *
8569 * Copyright (c) Fred Heusschen
8570 */
8571function(e){var n="mmenu",t="counters";e[n].addons[t]={setup:function(){var a=this,r=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){this.__refactorClass(e("em",n),this.conf.classNames[t].counter,"counter")}),r.add&&this.bind("initPanels",function(n){var t;switch(r.addTo){case"panels":t=n;break;default:t=n.filter(r.addTo)}t.each(function(){var n=e(this).data(s.parent);n&&(n.children("em."+i.counter).length||n.prepend(e('<em class="'+i.counter+'" />')))})}),r.update&&this.bind("update",function(){this.$pnls.find("."+i.panel).each(function(){var n=e(this),t=n.data(s.parent);if(t){var o=t.children("em."+i.counter);o.length&&(n=n.children("."+i.listview),n.length&&o.html(a.__filterListItems(n.children()).length))}})})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(e,n){}},e[n].defaults[t]={add:!1,addTo:"panels",update:!1},e[n].configuration.classNames[t]={counter:"Counter"};var i,s,a,o}(jQuery),/*	
8572 * jQuery mmenu dividers add-on
8573 * mmenu.frebsite.nl
8574 *
8575 * Copyright (c) Fred Heusschen
8576 */
8577function(e){var n="mmenu",t="dividers";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof r&&(r={add:r,fixed:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){this.__refactorClass(e("li",this.$menu),this.conf.classNames[t].collapsed,"collapsed")}),r.add&&this.bind("initPanels",function(n){var t;switch(r.addTo){case"panels":t=n;break;default:t=n.filter(r.addTo)}e("."+i.divider,t).remove(),t.find("."+i.listview).not("."+i.vertical).each(function(){var n="";s.__filterListItems(e(this).children()).each(function(){var t=e.trim(e(this).children("a, span").text()).slice(0,1).toLowerCase();t!=n&&t.length&&(n=t,e('<li class="'+i.divider+'">'+t+"</li>").insertBefore(this))})})}),r.collapse&&this.bind("initPanels",function(n){e("."+i.divider,n).each(function(){var n=e(this),t=n.nextUntil("."+i.divider,"."+i.collapsed);t.length&&(n.children("."+i.subopen).length||(n.wrapInner("<span />"),n.prepend('<a href="#" class="'+i.subopen+" "+i.fullsubopen+'" />')))})}),r.fixed){var l=function(n){n=n||this.$pnls.children("."+i.current);var t=n.find("."+i.divider).not("."+i.hidden);if(t.length){this.$menu.addClass(i.hasdividers);var s=n.scrollTop()||0,a="";n.is(":visible")&&n.find("."+i.divider).not("."+i.hidden).each(function(){e(this).position().top+s<s+1&&(a=e(this).text())}),this.$fixeddivider.text(a)}else this.$menu.removeClass(i.hasdividers)};this.$fixeddivider=e('<ul class="'+i.listview+" "+i.fixeddivider+'"><li class="'+i.divider+'"></li></ul>').prependTo(this.$pnls).children(),this.bind("openPanel",l),this.bind("update",l),this.bind("initPanels",function(n){n.off(a.scroll+"-dividers "+a.touchmove+"-dividers").on(a.scroll+"-dividers "+a.touchmove+"-dividers",function(n){l.call(s,e(this))})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("collapsed uncollapsed fixeddivider hasdividers"),a.add("scroll")},clickAnchor:function(e,n){if(this.opts[t].collapse&&n){var s=e.parent();if(s.is("."+i.divider)){var a=s.nextUntil("."+i.divider,"."+i.collapsed);return s.toggleClass(i.opened),a[s.hasClass(i.opened)?"addClass":"removeClass"](i.uncollapsed),!0}}return!1}},e[n].defaults[t]={add:!1,addTo:"panels",fixed:!1,collapse:!1},e[n].configuration.classNames[t]={collapsed:"Collapsed"};var i,s,a,o}(jQuery),/*	
8578 * jQuery mmenu drag add-on
8579 * mmenu.frebsite.nl
8580 *
8581 * Copyright (c) Fred Heusschen
8582 */
8583function(e){function n(e,n,t){return e<n&&(e=n),e>t&&(e=t),e}function t(t,i,s){var r,l,d,c,h,u=this,f={},p=0,v=!1,m=!1,g=0,b=0;switch(this.opts.offCanvas.position){case"left":case"right":f.events="panleft panright",f.typeLower="x",f.typeUpper="X",m="width";break;case"top":case"bottom":f.events="panup pandown",f.typeLower="y",f.typeUpper="Y",m="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":f.
8583negative=!0,c=function(e){e>=s.$wndw[m]()-t.maxStartPos&&(p=1)};break;default:f.negative=!1,c=function(e){e<=t.maxStartPos&&(p=1)}}switch(this.opts.offCanvas.position){case"left":f.open_dir="right",f.close_dir="left";break;case"right":f.open_dir="left",f.close_dir="right";break;case"top":f.open_dir="down",f.close_dir="up";break;case"bottom":f.open_dir="up",f.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+o.slideout)}}var _=this.__valueOrFn(t.node,this.$menu,s.$page);"string"==typeof _&&(_=e(_));var C=new Hammer(_[0],this.opts[a].vendors.hammer);C.on("panstart",function(e){c(e.center[f.typeLower]),s.$slideOutNodes=h(),v=f.open_dir}).on(f.events+" panend",function(e){p>0&&e.preventDefault()}).on(f.events,function(e){if(r=e["delta"+f.typeUpper],f.negative&&(r=-r),r!=g&&(v=r>=g?f.open_dir:f.close_dir),g=r,g>t.threshold&&1==p){if(s.$html.hasClass(o.opened))return;p=2,u._openSetup(),u.trigger("opening"),s.$html.addClass(o.dragging),b=n(s.$wndw[m]()*i[m].perc,i[m].min,i[m].max)}2==p&&(l=n(g,10,b)-("front"==u.opts.offCanvas.zposition?b:0),f.negative&&(l=-l),d="translate"+f.typeUpper+"("+l+"px )",s.$slideOutNodes.css({"-webkit-transform":"-webkit-"+d,transform:d}))}).on("panend",function(e){2==p&&(s.$html.removeClass(o.dragging),s.$slideOutNodes.css("transform",""),u[v==f.open_dir?"_openFinish":"close"]()),p=0})}function i(n,t,i,s){var l=this;n.each(function(){var n=e(this),t=n.data(r.parent);if(t&&(t=t.closest("."+o.panel),t.length)){var i=new Hammer(n[0],l.opts[a].vendors.hammer);i.on("panright",function(e){l.openPanel(t)})}})}var s="mmenu",a="drag";e[s].addons[a]={setup:function(){if(this.opts.offCanvas){var n=this.opts[a],o=this.conf[a
8583];d=e[s].glbl,"boolean"==typeof n&&(n={menu:n,panels:n}),"object"!=typeof n&&(n={}),"boolean"==typeof n.menu&&(n.menu={open:n.menu}),"object"!=typeof n.menu&&(n.menu={}),"boolean"==typeof n.panels&&(n.panels={close:n.panels}),"object"!=typeof n.panels&&(n.panels={}),n=this.opts[a]=e.extend(!0,{},e[s].defaults[a],n),n.menu.open&&t.call(this,n.menu,o.menu,d),n.panels.close&&this.bind("initPanels",function(e){i.call(this,e,n.panels,o.panels,d)})}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?void(e[s].addons[a].setup=function(){}):(o=e[s]._c,r=e[s]._d,l=e[s]._e,void o.add("dragging"))},clickAnchor:function(e,n){}},e[s].defaults[a]={menu:{open:!1,maxStartPos:100,threshold:50},panels:{close:!1},vendors:{hammer:{}}},e[s].configuration[a]={menu:{width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},panels:{}};var o,r,l,d}(jQuery),/*	
8584 * jQuery mmenu fixedElements add-on
8585 * mmenu.frebsite.nl
8586 *
8587 * Copyright (c) Fred Heusschen
8588 */
8589function(e){var n="mmenu",t="fixedElements";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var i=this.opts[t];this.conf[t];o=e[n].glbl,i=this.opts[t]=e.extend(!0,{},e[n].defaults[t],i);var s=function(e){var n=this.conf.classNames[t].fixed;this.__refactorClass(e.find("."+n),n,"slideout").appendTo(o.$body)};s.call(this,o.$page),this.bind("setPage",s)}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("fixed")},clickAnchor:function(e,n){}},e[n].configuration.classNames[t]={fixed:"Fixed"};var i,s,a,o}(jQuery),/*	
8590 * jQuery mmenu dropdown add-on
8591 * mmenu.frebsite.nl
8592 *
8593 * Copyright (c) Fred Heusschen
8594 */
8595function(e){var n="mmenu",t="dropdown";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var r=this,l=this.opts[t],d=this.conf[t];if(o=e[n].glbl,"boolean"==typeof l&&l&&(l={drop:l}),"object"!=typeof l&&(l={}),"string"==typeof l.position&&(l.position={of:l.position}),l=this.opts[t]=e.extend(!0,{},e[n].defaults[t],l),l.drop){if("string"!=typeof l.position.of){var c=this.$menu.attr("id");c&&c.length&&(this.conf.clone&&(c=i.umm(c)),l.position.of='[href="#'+c+'"]')}if("string"==typeof l.position.of){var h=e(l.position.of);if(h.length){this.$menu.addClass(i.dropdown),l.tip&&this.$menu.addClass(i.tip),l.event=l.event.split(" "),1==l.event.length&&(l.event[1]=l.event[0]),"hover"==l.event[0]&&h.on(a.mouseenter+"-dropdown",function(){r.open()}),"hover"==l.event[1]&&this.$menu.on(a.mouseleave+"-dropdown",function(){r.close()}),this.bind("opening",function(){this.$menu.data(s.style,this.$menu.attr("style")||""),o.$html.addClass(i.dropdown)}),this.bind("closed",function(){this.$menu.attr("style",this.$menu.data(s.style)),o.$html.removeClass(i.dropdown)});var u=function(s,a){var r=a[0],c=a[1],u="x"==s?"scrollLeft":"scrollTop",f="x"==s?"outerWidth":"outerHeight",p="x"==s?"left":"top",v="x"==s?"right":"bottom",m="x"==s?"width":"height",g="x"==s?"maxWidth":"maxHeight",b=null,_=o.$wndw[u](),C=h.offset()[p]-=_,y=C+h[f](),$=o.$wndw[m](),w=d.offset.button[s]+d.offset.viewport[s];if(l.position[s])switch(l.position[s]){case"left":case"bottom":b="after";break;case"right":case"top":b="before"}null===b&&(b=C+(y-C)/2<$/2?"after":"before");var x,k;return"after"==b?(x="x"==s?C:y,k=$-(x+w),r[p]=x+d.offset.button[s],r[v]="auto",c.push(i["x"==s?"tipleft":"tiptop"])):(x="x"==s?y:C,k=x-w,r[v]="calc( 100% - "+(x-d.offset.button[s])+"px )",r[p]="auto",c.push(i["x"==s?"tipright":"tipbottom"])),r[g]=Math.min(e[n].configuration[t][m].max,k),[r,c]},f=function(e){if(this.vars.opened){this.$menu.attr("style",this.$menu.data(s.style));var n=[{},[]];n=u.call(this,"y",n),n=u.call(this,"x",n),this.$menu.css(n[0]),l.tip&&this.$menu.removeClass(i.tipleft+" "+i.tipright+" "+i.tiptop+" "+i.tipbottom).addClass(n[1].join(" "))}};this.bind("opening",f),o.$wndw.on(a.resize+"-dropdown",function(e){f.call(r)}),this.opts.offCanvas.blockUI||o.$wndw.on(a.scroll+"-dropdown",function(e){f.call(r)})}}}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("dropdown tip tipleft tipright tiptop tipbottom"),a.add("mouseenter mouseleave resize scroll")},clickAnchor:function(e,n){}},e[n].defaults[t]={drop:!1,event:"click",position:{},tip:!0},e[n].configuration[t]={offset:{button:{x:-10,y:10},viewport:{x:20,y:20}},height:{max:880},width:{max:440}};var i,s,a,o}
8595(jQuery),/*	
8596 * jQuery mmenu iconPanels add-on
8597 * mmenu.frebsite.nl
8598 *
8599 * Copyright (c) Fred Heusschen
8600 */
8601function(e){var n="mmenu",t="iconPanels";e[n].addons[t]={setup:function(){var s=this,a=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof a&&(a={add:a}),"number"==typeof a&&(a={add:!0,visible:a}),"object"!=typeof a&&(a={}),a=this.opts[t]=e.extend(!0,{},e[n].defaults[t],a),a.visible++,a.add){this.$menu.addClass(i.iconpanel);for(var r=[],l=0;l<=a.visible;l++)r.push(i.iconpanel+"-"+l);r=r.join(" ");var d=function(n){n.hasClass(i.vertical)||s.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(n).not("."+i.vertical).slice(-a.visible).each(function(n){e(this).addClass(i.iconpanel+"-"+n)})};this.bind("openPanel",d),this.bind("initPanels",function(n){d.call(s,s.$pnls.children("."+i.current)),n.not("."+i.vertical).each(function(){e(this).children("."+i.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+i.panel).attr("id")+'" class="'+i.subblocker+'" />')})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("iconpanel subblocker")},clickAnchor:function(e,n){}},e[n].defaults[t]={add:!1,visible:3};var i,s,a,o}(jQuery),/*	
8602 * jQuery mmenu keyboardNavigation add-on
8603 * mmenu.frebsite.nl
8604 *
8605 * Copyright (c) Fred Heusschen
8606 */
8607function(e){function n(n,t){n||(n=this.$pnls.children("."+a.current));var i=e();"default"==t&&(i=n.children("."+a.listview).find("a[href]").not(":hidden"),i.length||(i=n.find(d).not(":hidden")),i.length||(i=this.$menu.children("."+a.navbar).find(d).not(":hidden"))),i.length||(i=this.$menu.children("."+a.tabstart)),i.first().focus()}function t(e){e||(e=this.$pnls.children("."+a.current));var n=this.$pnls.children("."+a.panel),t=n.not(e);t.find(d).attr("tabindex",-1),e.find(d).attr("tabindex",0),e.find("input.mm-toggle, input.mm-check").attr("tabindex",-1)}var i="mmenu",s="keyboardNavigation";e[i].addons[s]={setup:function(){var o=this,r=this.opts[s];this.conf[s];if(l=e[i].glbl,"boolean"!=typeof r&&"string"!=typeof r||(r={enable:r}),"object"!=typeof r&&(r={}),r=this.opts[s]=e.extend(!0,{},e[i].defaults[s],r),r.enable){r.enhance&&this.$menu.addClass(a.keyboardfocus);var c=e('<button aria-hidden="true" class="'+a.tabstart+'" tabindex="0" type="button" aria-label="Trigger Menu" title="Trigger Menu Start">Trigger Menu</button>'),h=e('<button aria-hidden="true" class="'+a.tabend+'" tabindex="0" type="button" aria-label="Trigger Menu" title="Trigger Menu End">End Menu</button>');this.bind("initPanels",function(){this.$menu.prepend(c).append(h).children("."+a.navbar).find(d).attr("tabindex",0)}),this.bind("open",function(){t.call(this),this.__transitionend(this.$menu,function(){n.call(o,null,r.enable)},this.conf.transitionDuration)}),this.bind("openPanel",function(e){t.call(this,e),this.__transitionend(e,function(){n.call(o,e,r.enable)},this.conf.transitionDuration)}),this["_initWindow_"+s](r.enhance)}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("tabstart tabend keyboardfocus"),r.add("focusin keydown")},clickAnchor:function(e,n){}},e[i].defaults[s]={enable:!1,enhance:!1},e[i].configuration[s]={},e[i].prototype["_initWindow_"+s]=function(n){l.$wndw.off(r.keydown+"-offCanvas"),l.$wndw.off(r.focusin+"-"+s).on(r.focusin+"-"+s,function(n){if(l.$html.hasClass(a.opened)){var t=e(n.target);t.is("."+a.tabend)&&t.parent().find("."+a.tabstart).focus()}}),l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(n){var t=e(n.target),i=t.closest("."+a.menu);if(i.length){i.data("mmenu");if(t.is("input, textarea"));else switch(n.keyCode){case 13:(t.is(".mm-toggle")||t.is(".mm-check"))&&t.trigger(r.click);break;case 32:case 37:case 38:case 39:case 40:n.preventDefault()}}}),n&&l.$wndw.on(r.keydown+"-"+s,function(n){var t=e(n.target),i=t.closest("."+a.menu);if(i.length){var s=i.data("mmenu");if(t.is("input, textarea"))switch(n.keyCode){case 27:t.val("")}else switch(n.keyCode){case 8:var r=t.closest("."+a.panel).data(o.parent);r&&r.length&&s.openPanel(r.closest("."+a.panel));break;case 27:i.hasClass(a.offcanvas)&&s.close()}}})};var a,o,r,l,d="input, select, textarea, button, label, a[href]"}(jQuery),/*	
8608 * jQuery mmenu lazySubmenus add-on
8609 * mmenu.frebsite.nl
8610 *
8611 * Copyright (c) Fred Heusschen
8612 */
8613function(e){var n="mmenu",t="lazySubmenus";e[n].addons[t]={setup:function(){var a=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof a&&(a={load:a}),"object"!=typeof a&&(a={}),a=this.opts[t]=e.extend(!0,{},e[n].defaults[t],a),a.load&&(this.$menu.find("li").find("li").children(this.conf.panelNodetype).each(function(){e(this).parent().addClass(i.lazysubmenu).data(s.lazysubmenu,this).end().remove()}),this.bind("openingPanel",function(n){var t=n.find("."+i.lazysubmenu);t.length&&(t.each(function(){e(this).append(e(this).data(s.lazysubmenu)).removeData(s.lazysubmenu).removeClass(i.lazysubmenu)}),this.initPanels(n))}))},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("lazysubmenu"),s.add("lazysubmenu")},clickAnchor:function(e,n){}},e[n].defaults[t]={load:!1},e[n].configuration[t]={};var i,s,a,o}
8613(jQuery),/*	
8614 * jQuery mmenu navbar add-on
8615 * mmenu.frebsite.nl
8616 *
8617 * Copyright (c) Fred Heusschen
8618 */
8619function(e){var n="mmenu",t="navbars";e[n].addons[t]={setup:function(){var s=this,a=this.opts[t],r=this.conf[t];if(o=e[n].glbl,"undefined"!=typeof a){a instanceof Array||(a=[a]);var l={};if(a.length){e.each(a,function(o){var d=a[o];"boolean"==typeof d&&d&&(d={}),"object"!=typeof d&&(d={}),"undefined"==typeof d.content&&(d.content=["prev","title"]),d.content instanceof Array||(d.content=[d.content]),d=e.extend(!0,{},s.opts.navbar,d);var c=d.position,h=d.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=c&&(c="top"),l[c]||(l[c]=0),l[c]++;var u=e("<div />").addClass(i.navbar+" "+i.navbar+"-"+c+" "+i.navbar+"-"+c+"-"+l[c]+" "+i.navbar+"-size-"+h);l[c]+=h-1;for(var f=0,p=0,v=d.content.length;p<v;p++){var m=e[n].addons[t][d.content[p]]||!1;m?f+=m.call(s,u,d,r):(m=d.content[p],m instanceof e||(m=e(d.content[p])),u.append(m))}f+=Math.ceil(u.children().not("."+i.btn).length/h),f>1&&u.addClass(i.navbar+"-content-"+f),u.children("."+i.btn).length&&u.addClass(i.hasbtns),u.prependTo(s.$menu)});for(var d in l)s.$menu.addClass(i.hasnavbar+"-"+d+"-"+l[d])}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("close hasbtns")},clickAnchor:function(e,n){}},e[n].configuration[t]={breadcrumbSeparator:"/"},e[n].configuration.classNames[t]={};var i,s,a,o}(jQuery),/*	
8620 * jQuery mmenu navbar add-on breadcrumbs content
8621 * mmenu.frebsite.nl
8622 *
8623 * Copyright (c) Fred Heusschen
8624 */
8625function(e){var n="mmenu",t="navbars",i="breadcrumbs";e[n].addons[t][i]=function(t,i,s){var a=e[n]._c,o=e[n]._d;a.add("breadcrumbs separator");var r=e('<span class="'+a.breadcrumbs+'" />').appendTo(t);this.bind("initPanels",function(n){n.removeClass(a.hasnavbar).each(function(){for(var n=[],t=e(this),i=e('<span class="'+a.breadcrumbs+'"></span>'),r=e(this).children().first(),l=!0;r&&r.length;){r.is("."+a.panel)||(r=r.closest("."+a.panel));var d=r.children("."+a.navbar).children("."+a.title).text();n.unshift(l?"<span>"+d+"</span>":'<a href="#'+r.attr("id")+'">'+d+"</a>"),l=!1,r=r.data(o.parent)}i.append(n.join('<span class="'+a.separator+'">'+s.breadcrumbSeparator+"</span>")).appendTo(t.children("."+a.navbar))})});var l=function(){r.html(this.$pnls.children("."+a.current).children("."+a.navbar).children("."+a.breadcrumbs).html())};return this.bind("openPanel",l),this.bind("initPanels",l),0}}(jQuery),/*	
8626 * jQuery mmenu navbar add-on close content
8627 * mmenu.frebsite.nl
8628 *
8629 * Copyright (c) Fred Heusschen
8630 */
8631function(e){var n="mmenu",t="navbars",i="close";e[n].addons[t][i]=function(t,i){var s=e[n]._c,a=e[n].glbl,o=e('<a class="'+s.close+" "+s.btn+'" href="#" />').appendTo(t),r=function(e){o.attr("href","#"+e.attr("id"))};return r.call(this,a.$page),this.bind("setPage",r),-1}}(jQuery),/*
8632 * jQuery mmenu navbar add-on next content
8633 * mmenu.frebsite.nl
8634 *
8635 * Copyright (c) Fred Heusschen
8636 */
8637function(e){var n="mmenu",t="navbars",i="next";e[n].addons[t][i]=function(i,s){var a,o,r,l=e[n]._c,d=e('<a class="'+l.next+" "+l.btn+'" href="#" />').appendTo(i),c=function(e){e=e||this.$pnls.children("."+l.current);var n=e.find("."+this.conf.classNames[t].panelNext);a=n.attr("href"),r=n.attr("aria-owns"),o=n.html(),d[a?"attr":"removeAttr"]("href",a),d[r?"attr":"removeAttr"]("aria-owns",r),d[a||o?"removeClass":"addClass"](l.hidden),d.html(o)};return this.bind("openPanel",c),this.bind("initPanels",function(){c.call(this)}),-1},e[n].configuration.classNames[t].panelNext="Next"}(jQuery),/*
8638 * jQuery mmenu navbar add-on prev content
8639 * mmenu.frebsite.nl
8640 *
8641 * Copyright (c) Fred Heusschen
8642 */
8643function(e){var n="mmenu",t="navbars",i="prev";e[n].addons[t][i]=function(i,s){var a=e[n]._c,o=e('<a class="'+a.prev+" "+a.btn+'" href="#" />').appendTo(i);this.bind("initPanels",function(e){e.removeClass(a.hasnavbar).children("."+a.navbar).addClass(a.hidden)});var r,l,d,c=function(e){if(e=e||this.$pnls.children("."+a.current),!e.hasClass(a.vertical)){var n=e.find("."+this.conf.classNames[t].panelPrev);n.length||(n=e.children("."+a.navbar).children("."+a.prev)),r=n.attr("href"),d=n.attr("aria-owns"),l=n.html(),o[r?"attr":"removeAttr"]("href",r),o[d?"attr":"removeAttr"]("aria-owns",d),o[r||l?"removeClass":"addClass"](a.hidden),o.html(l)}};return this.bind("openPanel",c),this.bind("initPanels",function(){c.call(this)}),-1},e[n].configuration.classNames[t].panelPrev="Prev"}(jQuery),/*	
8644 * jQuery mmenu navbar add-on searchfield content
8645 * mmenu.frebsite.nl
8646 *
8647 * Copyright (c) Fred Heusschen
8648 */
8649function(e){var n="mmenu",t="navbars",i="searchfield";e[n].addons[t][i]=function(t,i){var s=e[n]._c,a=e('<div class="'+s.search+'" />').appendTo(t);return"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=a,0}}(jQuery),/*	
8650 * jQuery mmenu navbar add-on title content
8651 * mmenu.frebsite.nl
8652 *
8653 * Copyright (c) Fred Heusschen
8654 */
8655function(e){var n="mmenu",t="navbars",i="title";e[n].addons[t][i]=function(i,s){var a,o,r=e[n]._c,l=e('<a class="'+r.title+'" />').appendTo(i),d=function(e){if(e=e||this.$pnls.children("."+r.current),!e.hasClass(r.vertical)){var n=e.find("."+this.conf.classNames[t].panelTitle);n.length||(n=e.children("."+r.navbar).children("."+r.title)),a=n.attr("href"),o=n.html()||s.title,l[a?"attr":"removeAttr"]("href",a),l[a||o?"removeClass":"addClass"](r.hidden),l.html(o)}};return this.bind("openPanel",d),this.bind("initPanels",function(e){d.call(this)}),0},e[n].configuration.classNames[t].panelTitle="Title"}(jQuery),/*	
8656 * jQuery mmenu RTL add-on
8657 * mmenu.frebsite.nl
8658 *
8659 * Copyright (c) Fred Heusschen
8660 */
8661function(e){var n="mmenu",t="rtl";e[n].addons[t]={setup:function(){var s=this.opts[t];this.conf[t];o=e[n].glbl,"object"!=typeof s&&(s={use:s}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),"boolean"!=typeof s.use&&(s.use="rtl"==(o.$html.attr("dir")||"").toLowerCase()),s.use&&this.$menu.addClass(i.rtl)},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("rtl")},clickAnchor:function(e,n){}},e[n].defaults[t]={use:"detect"};var i,s,a,o}
8661(jQuery),/*
8662 * jQuery mmenu screenReader add-on
8663 * mmenu.frebsite.nl
8664 *
8665 * Copyright (c) Fred Heusschen
8666 */
8667function(e){function n(e,n,t){e.prop("aria-"+n,t)[t?"attr":"removeAttr"]("aria-"+n,t)}function t(e){return'<span class="'+a.sronly+'">'+e+"</span>"}var i="mmenu",s="screenReader";e[i].addons[s]={setup:function(){var o=this.opts[s],r=this.conf[s];if(l=e[i].glbl,"boolean"==typeof o&&(o={aria:o,text:o}),"object"!=typeof o&&(o={}),o=this.opts[s]=e.extend(!0,{},e[i].defaults[s],o),o.aria){if(this.opts.offCanvas){var d=function(){n(this.$menu,"hidden",!1)},c=function(){n(this.$menu,"hidden",!0)};this.bind("open",d),this.bind("close",c),n(this.$menu,"hidden",!0)}var h=function(){},u=function(e){var t=this.$menu.children("."+a.navbar),i=t.children("."+a.prev),s=t.children("."+a.next),r=t.children("."+a.title);n(i,"hidden",i.is("."+a.hidden)),n(s,"hidden",s.is("."+a.hidden)),o.text&&n(r,"hidden",!i.is("."+a.hidden)),n(this.$pnls.children("."+a.panel).not(e),"hidden",!0),n(e,"hidden",!1)};this.bind("update",h),this.bind("openPanel",h),this.bind("openPanel",u);var f=function(t){var i;t=t||this.$menu;var s=t.children("."+a.navbar),r=s.children("."+a.prev),l=s.children("."+a.next);s.children("."+a.title);n(r,"haspopup",!0),n(l,"haspopup",!0),i=t.is("."+a.panel)?t.find("."+a.prev+", ."+a.next):r.add(l),i.each(function(){n(e(this),"owns",e(this).attr("href").replace("#",""))}),o.text&&t.is("."+a.panel)&&(i=t.find("."+a.listview).find("."+a.fullsubopen).parent().children("span"),n(i,"hidden",!0))};this.bind("initPanels",f),this.bind("_initAddons",f)}if(o.text){var p=function(n){var s;n=n||this.$menu;var o=n.children("."+a.navbar);o.each(function(){var n=e(this),o=e[i].i18n(r.text.closeSubmenu);s=n.children("."+a.title),s.length&&(o+=" ("+s.text()+")"),n.children("."+a.prev).html(t(o))}),o.children("."+a.close).html(t(e[i].i18n(r.text.closeMenu))),n.is("."+a.panel)&&n.find("."+a.listview).children("li").children("."+a.next).each(function(){var n=e(this),o=e[i].i18n(r.text[n.parent().is("."+a.vertical)?"toggleSubmenu":"openSubmenu"]);s=n.nextAll("span, a").first(),s.length&&(o+=" ("+s.text()+")"),n.html(t(o))})};this.bind("initPanels",p),this.bind("_initAddons",p)}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("sronly")},clickAnchor:function(e,n){}},e[i].defaults[s]={aria:!1,text:!1},e[i].configuration[s]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}};var a,o,r,l}(jQuery),/*	
8668 * jQuery mmenu searchfield add-on
8669 * mmenu.frebsite.nl
8670 *
8671 * Copyright (c) Fred Heusschen
8672 */
8673function(e){function n(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var t="mmenu",i="searchfield";e[t].addons[i]={setup:function(){var l=this,d=this.opts[i],c=this.conf[i];r=e[t].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),"boolean"==typeof d.resultsPanel&&(d.resultsPanel={add:d.resultsPanel}),d=this.opts[i]=e.extend(!0,{},e[t].defaults[i],d),c=this.conf[i]=e.extend(!0,{},e[t].configuration[i],c),this.bind("close",function(){this.$menu.find("."+s.search).find("input").blur()}),this.bind("initPanels",function(r){if(d.add){var h;switch(d.addTo){case"panels":h=r;break;default:h=this.$menu.find(d.addTo)}if(h.each(function(){var n=e(this);if(!n.is("."+s.panel)||!n.is("."+s.vertical)){if(!n.children("."+s.search).length){var i=l.__valueOrFn(c.clear,n),a=l.__valueOrFn(c.form,n),r=l.__valueOrFn(c.input,n),h=l.__valueOrFn(c.submit,n),u=e("
8673<"+(a?"form":"div")+' class="'+s.search+'" />'),f=e('<input placeholder="'+e[t].i18n(d.placeholder)+'" type="text" autocomplete="off" />');u.append(f);var p;if(r)for(p in r)f.attr(p,r[p]);if(i&&e('<a class="'+s.btn+" "+s.clear+'" href="#" />').appendTo(u).on(o.click+"-searchfield",function(e){e.preventDefault(),f.val("").trigger(o.keyup+"-searchfield")}),a){for(p in a)u.attr(p,a[p]);h&&!i&&e('<a class="'+s.btn+" "+s.next+'" href="#" />').appendTo(u).on(o.click+"-searchfield",function(e){e.preventDefault(),u.submit()})}n.hasClass(s.search)?n.replaceWith(u):n.prepend(u).addClass(s.hassearch)}if(d.noResults){var v=n.closest("."+s.panel).length;if(v||(n=l.$pnls.children("."+s.panel).first()),!n.children("."+s.noresultsmsg).length){var m=n.children("."+s.listview).first();e('<div class="'+s.noresultsmsg+" "+s.hidden+'" />').append(e[t].i18n(d.noResults))[m.length?"insertAfter":"prependTo"](m.length?m:n)}}}}),d.search){if(d.resultsPanel.add){d.showSubPanels=!1;var u=this.$pnls.children("."+s.resultspanel);u.length||(u=e('<div class="'+s.panel+" "+s.resultspanel+" "+s.hidden+'" />').appendTo(this.$pnls).append('<div class="'+s.navbar+" "+s.hidden+'"><a class="'+s.title+'">'+e[t].i18n(d.resultsPanel.title)+"</a></div>").append('<ul class="'+s.listview+'" />').append(this.$pnls.find("."+s.noresultsmsg).first().clone()),this.initPanels(u))}this.$menu.find("."+s.search).each(function(){var t,r,c=e(this),h=c.closest("."+s.panel).length;h?(t=c.closest("."+s.panel),r=t):(t=e("."+s.panel,l.$menu),r=l.$menu),d.resultsPanel.add&&(t=t.not(u));var f=c.children("input"),p=l.__findAddBack(t,"."+s.listview).children("li"),v=p.filter("."+s.divider),m=l.__filterListItems(p),g="a",b=g+", span",_="",C=function(){var n=f.val().toLowerCase();if(n!=_){if(_=n,d.resultsPanel.add&&u.children("."+s.listview).empty(),t.scrollTop(0),m.add(v).addClass(s.hidden).find("."+s.fullsubopensearch).removeClass(s.fullsubopen+" "+s.fullsubopensearch),m.each(function(){var n=e(this),t=g;(d.showTextItems||d.showSubPanels&&n.find("."+s.next))&&(t=b);var i=n.data(a.searchtext)||n.children(t).text();i.toLowerCase().indexOf(_)>-1&&n.add(n.prevAll("."+s.divider).first()).removeClass(s.hidden)}),d.showSubPanels&&t.each(function(n){var t=e(this);l.__filterListItems(t.find("."+s.listview).children()).each(function(){var n=e(this),t=n.data(a.child);n.removeClass(s.nosubresults),t&&t.find("."+s.listview).children().removeClass(s.hidden)})}),d.resultsPanel.add)if(""===_)this.closeAllPanels(),this.openPanel(this.$pnls.children("."+s.subopened).last());else{var i=e();t.each(function(){var n=l.__filterListItems(e(this).find("."+s.listview).children()).not("."+s.hidden).clone(!0);n.length&&(d.resultsPanel.dividers&&(i=i.add('<li class="'+s.divider+'">'+e(this).children("."+s.navbar).text()+"</li>")),i=i.add(n))}),i.find("."+s.next).remove(),u.children("."+s.listview).append(i),this.openPanel(u)}else e(t.get().reverse()).each(function(n){var t=e(this),i=t.data(a.parent);i&&(l.__filterListItems(t.find("."+s.listview).children()).length?(i.hasClass(s.hidden)&&i.children("."+s.next).not("."+s.fullsubopen).addClass(s.fullsubopen).addClass(s.fullsubopensearch),i.removeClass(s.hidden).removeClass(s.nosubresults).prevAll("."+s.divider).first().removeClass(s.hidden)):h||(t.hasClass(s.opened)&&setTimeout(function(){l.openPanel(i.closest("."+s.panel))},(n+1)*(1.5*l.conf.openingInterval)),i.addClass(s.nosubresults)))});r.find("."+s.noresultsmsg)[m.not("."+s.hidden).length?"addClass":"removeClass"](s.hidden),this.update()}};f.off(o.keyup+"-"+i+" "+o.change+"-"+i).on(o.keyup+"-"+i,function(e){n(e.keyCode)||C.call(l)}).on(o.change+"-"+i,function(e){C.call(l)});var y=c.children("."+s.btn);y.length&&f.on(o.keyup+"-"+i,function(e){y[f.val().length?"removeClass":"addClass"](s.hidden)}),f.trigger(o.keyup+"-"+i)})}}})},add:function(){s=e[t]._c,a=e[t]._d,o=e[t]._e,s.add("clear search hassearch resultspanel noresultsmsg noresults nosubresults fullsubopensearch"),a.add("searchtext"),o.add("change keyup")},clickAnchor:function(e,n){}},e[t].defaults[i]={add:!1,addTo:"panels",placeholder:"Search",noResults:"No results found.",resultsPanel:{add:!1,dividers:!0,title:"Search results"},search:!0,showTextItems:!1,showSubPanels:!0},e[t].configuration[i]={clear:!1,form:!1,input:!1,submit:!1};var s,a,o,r}(jQuery),/*	
8674 * jQuery mmenu sectionIndexer add-on
8675 * mmenu.frebsite.nl
8676 *
8677 * Copyright (c) Fred Heusschen
8678 */
8679function(e){var n="mmenu",t="sectionIndexer";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof r&&(r={add:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){if(r.add){var t;switch(r.addTo){case"panels":t=n;break;default:t=e(r.addTo,this.$menu).filter("."+i.panel)}t.find("."+i.divider).closest("."+i.panel).addClass(i.hasindexer)}if(!this.$indexer&&this.$pnls.children("."+i.hasindexer).length){this.$indexer=e('<div class="'+i.indexer+'" />').prependTo(this.$pnls).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(a.mouseover+"-sectionindexer "+i.touchstart+"-sectionindexer",function(n){var t=e(this).attr("href").slice(1),a=s.$pnls.children("."+i.current),o=a.find("."+i.listview),r=!1,l=a.scrollTop();a.scrollTop(0),o.children("."+i.divider).not("."+i.hidden).each(function(){r===!1&&t==e(this).text().slice(0,1).toLowerCase()&&(r=e(this).position().top)}),a.scrollTop(r!==!1?r:l)}
8679);var o=function(e){s.$menu[(e.hasClass(i.hasindexer)?"add":"remove")+"Class"](i.hasindexer)};this.bind("openPanel",o),o.call(this,this.$pnls.children("."+i.current))}})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("indexer hasindexer"),a.add("mouseover touchstart")},clickAnchor:function(e,n){if(e.parent().is("."+i.indexer))return!0}},e[n].defaults[t]={add:!1,addTo:"panels"};var i,s,a,o}(jQuery),/*	
8680 * jQuery mmenu setSelected add-on
8681 * mmenu.frebsite.nl
8682 *
8683 * Copyright (c) Fred Heusschen
8684 */
8685function(e){var n="mmenu",t="setSelected";e[n].addons[t]={setup:function(){var a=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof r&&(r={hover:r,parent:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),"detect"==r.current){var l=function(e){e=e.split("?")[0].split("#")[0];var n=a.$menu.find('a[href="'+e+'"], a[href="'+e+'/"]');n.length?a.setSelected(n.parent(),!0):(e=e.split("/").slice(0,-1),e.length&&l(e.join("/")))};l(window.location.href)}else r.current||this.bind("initPanels",function(e){e.find("."+i.listview).children("."+i.selected).removeClass(i.selected)});if(r.hover&&this.$menu.addClass(i.hoverselected),r.parent){this.$menu.addClass(i.parentselected);var d=function(e){this.$pnls.find("."+i.listview).find("."+i.next).removeClass(i.selected);for(var n=e.data(s.parent);n&&n.length;)n=n.not("."+i.vertical).children("."+i.next).addClass(i.selected).end().closest("."+i.panel).data(s.parent)};this.bind("openedPanel",d),this.bind("initPanels",function(e){d.call(this,this.$pnls.children("."+i.current))})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("hoverselected parentselected")},clickAnchor:function(e,n){}},e[n].defaults[t]={current:!0,hover:!1,parent:!1};var i,s,a,o}(jQuery),/*	
8686 * jQuery mmenu toggles add-on
8687 * mmenu.frebsite.nl
8688 *
8689 * Copyright (c) Fred Heusschen
8690 */
8691function(e){var n="mmenu",t="toggles";e[n].addons[t]={setup:function(){var s=this;this.opts[t],this.conf[t];o=e[n].glbl,this.bind("initPanels",function(n){this.__refactorClass(e("input",n),this.conf.classNames[t].toggle,"toggle"),this.__refactorClass(e("input",n),this.conf.classNames[t].check,"check"),e("input."+i.toggle+", input."+i.check,n).each(function(){var n=e(this),t=n.closest("li"),a=n.hasClass(i.toggle)?"toggle":"check",o=n.attr("id")||s.__getUniqueId();t.children('label[for="'+o+'"]').length||(n.attr("id",o),t.prepend(n),e('<label for="'+o+'" class="'+i[a]+'"></label>').insertBefore(t.children("a, span").last()))})})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("toggle check")},clickAnchor:function(e,n){}},e[n].configuration.classNames[t]={toggle:"Toggle",check:"Check"};var i,s,a,o}(jQuery);;
8692/**
8693 * TPG Page Redirect
8694 */
8695
8696function postRedirect(url, params) {
8697    var form = document.createElement('form');
8698    form.setAttribute("method", 'POST');
8699    form.setAttribute("action", url);
8700
8701    for (var key in params) {
8702        if (params.hasOwnProperty(key)) {
8703            var hiddenField = document.createElement("input");
8704            hiddenField.setAttribute("type", "hidden");
8705            hiddenField.setAttribute("name", key);
8706            hiddenField.setAttribute("value", params[key]);
8707 
8708            form.appendChild(hiddenField);
8709        }
8710    }
8711
8712    document.body.appendChild(form);
8713    form.submit();
8714};

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.