PageSourceSearch

https://www.appeon.com/sites/default/files/js/js_HkwXPGxIDFXAs11jiDajTD1_MSq0CGJ0HUQfnQ3Gtno.js

js appeon.com collected 2026-10-02 04:02:35 UTC 80,048 bytes, 1,823 lines download raw bytes

1/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/core/misc/jquery.cookie.shim.js. */
2/**
3* DO NOT EDIT THIS FILE.
4* See the following change record for more information,
5* https://www.drupal.org/node/2815083
6* @preserve
7**/
8
9function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
11function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
13function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
15(function ($, Drupal, cookies) {
16  var deprecatedMessageSuffix = "is deprecated in Drupal 9.0.0 and will be removed in Drupal 10.0.0. Use the core/js-cookie library instead. See https://www.drupal.org/node/3104677";
17
18  var isFunction = function isFunction(obj) {
19    return Object.prototype.toString.call(obj) === '[object Function]';
20  };
21
22  var parseCookieValue = function parseCookieValue(value, parseJson) {
23    if (value.indexOf('"') === 0) {
24      value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
25    }
26
27    try {
28      value = decodeURIComponent(value.replace(/\+/g, ' '));
29      return parseJson ? JSON.parse(value) : value;
30    } catch (e) {}
31  };
32
33  var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) {
34    var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson);
35
36    if (converter !== undefined && isFunction(converter)) {
37      return converter(value, cookieName);
38    }
39
40    return value;
41  };
42
43  $.cookie = function (key) {
44    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
45    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
46    Drupal.deprecationError({
47      message: "jQuery.cookie() ".concat(deprecatedMessageSuffix)
48    });
49
50    if (value !== undefined && !isFunction(value)) {
51      var attributes = _objectSpread(_objectSpread({}, $.cookie.defaults), options);
52
53      if (typeof attributes.expires === 'string' && attributes.expires !== '') {
54        attributes.expires = new Date(attributes.expires);
55      }
56
57      var cookieSetter = cookies.withConverter({
58        write: function write(cookieValue) {
59          return encodeURIComponent(cookieValue);
60        }
61      });
62      value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value);
63      return cookieSetter.set(key, value, attributes);
64    }
65
66    var userProvidedConverter = value;
67    var cookiesShim = cookies.withConverter({
68      read: function read(cookieValue, cookieName) {
69        return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json);
70      }
71    });
72
73    if (key !== undefined) {
74      return cookiesShim.get(key);
75    }
76
77    var results = cookiesShim.get();
78    Object.keys(results).forEach(function (resultKey) {
79      if (results[resultKey] === undefined) {
80        delete results[resultKey];
81      }
82    });
83    return results;
84  };
85
86  $.cookie.defaults = _objectSpread({
87    path: ''
88  }, cookies.defaults);
89  $.cookie.json = false;
90  $.cookie.raw = false;
91
92  $.removeCookie = function (key, options) {
93    Drupal.deprecationError({
94      message: "jQuery.removeCookie() ".concat(deprecatedMessageSuffix)
95    });
96    cookies.remove(key, _objectSpread(_objectSpread({}, $.cookie.defaults), options));
97    return !cookies.get(key);
98  };
99})(jQuery, Drupal, window.Cookies);
100/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/core/misc/jquery.cookie.shim.js. */;
101/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/custom/language_suggestion/assets/language_suggestion.js. */
102(function ($, Drupal, drupalSettings) {
103
104  'use strict';
105
106  $(document).ready(function() {
107
108    var current_lang = drupalSettings.language_suggestion.current_language.toLowerCase();
109    var settings = drupalSettings.language_suggestion.settings;
110    //语言选择
111    var lang_dropdown = drupalSettings.lang_dropdown.settings;
112
113    var lang_dropdown_html = '';
114    var lang_arr = lang_dropdown.mapping;
115
116
117    if (settings.enabled) {
118      if (settings.language_detection == 'browser') {
119        // Browser-based redirection
120        var browser_lang = window.navigator.userLanguage || window.navigator.language; // Set to 'de' for debugging.
121        languageSuggestionRoutine();
122      }else if(settings.language_detection == 'ip'){
123          var browser_lang = '';
124          var xhr = $.ajax({
125              type: "GET",
126              url: '/ip-country/get-language',
127              success: function(output) {
128                  if(output.code){
129                      browser_lang = output.code.toLowerCase();
130                  }else{
131                      browser_lang = 'en';
132                  }
133                  languageSuggestionRoutine();
134              },
135              error: function(output) {}
136          });
137      } else {
138        // HTTP header-based redirection
139        var browser_lang = '';
140        var xhr = $.ajax({
141          type: "GET",
142          url: '/language-suggestion/get-header-parameter',
143          success: function(output, status) { 
144            browser_lang = output;
145            languageSuggestionRoutine();
146          },
147          error: function(output) {}
148        });
149      }
150    }
151
152      //语言选择
153      var cr_icon = $('.ls-cr-icon');
154      var cr_box = $('#ls-cr-list');
155      //选择后不再出现提示框
156      var cr_date = new Date();
157      var cr_timestamp = cr_date.getTime();
158      //语言选择控制
159      cr_icon.mouseenter(function () {
160          cr_box.show();
161      });
162      cr_icon.mouseleave(function () {
163          cr_box.hide();
164      });
165
166      cr_box.mouseenter(function () {
167          cr_box.show();
168      });
169
170      cr_box.mouseleave(function () {
171          cr_box.hide();
172      });
173
174      cr_icon.on("touchstart", touchStart);
175      //选择后不再出现提示框
176      $('#ls-cr-list .language-link').on('click', function (e) {
177          var milliseconds = settings.cookie_dismiss_time * 60 * 60 * 1000;
178          $.cookie(settings.cookie_prefix + '.dismiss', cr_timestamp + milliseconds);
179      });
180
181      function touchStart(event) {
182          if (cr_box.css("display") == "none") {
183              cr_box.show();
184          } else {
185              cr_box.hide();
186          }
187      }
188
189    function languageSuggestionRoutine() {
190      var layoutContainer = $((settings.container_class !== undefined || settings.container_class !== '') ? settings.container_class : 'body');
191      var show_suggestion = false;
192      var lang_code = null;
193      var dismiss_button = null;
194      var continue_link = null;
195      var message = null;
196      var lang_cr = null;
197      var url = null;
198      var custom_url = null;
199      var default_url = null;
200      var dismissed = $.cookie(settings.cookie_prefix + '.dismiss');
201      var redrectLang = $.cookie(settings.cookie_prefix + '.always_redirect');
202      var redrectLangCode = $.cookie(settings.cookie_prefix + '.redirect_lang');
203
204      var date = new Date();
205      var timestamp = date.getTime();
206      // This code disables auto redirect when a visitor decides to switch languages in the UI.
207      if (settings.disable_redirect_class) {
208        $(settings.disable_redirect_class).on('click', function(e) {
209          $.removeCookie(settings.cookie_prefix + '.always_redirect');
210          $.removeCookie(settings.cookie_prefix + '.redirect_lang');
211        });
212      }
213      if (settings.disable_redirect_class) {
214        $(settings.disable_redirect_class).change(function(){
215          $.removeCookie(settings.cookie_prefix + '.always_redirect');
216          $.removeCookie(settings.cookie_prefix + '.redirect_lang');
217        });
218      }
219
220      // Auto redirect to previously selected langauge.
221      // Also making sure we are not creating a redirect loop when already switch to a language.
222      if (settings.always_redirect && redrectLangCode !== undefined && redrectLangCode !== current_lang) {
223        //window.location.href = redrectLangCode;
224      }
225
226      // Looping through available language mapping to find if any mapped languages matching to a visitors browser language.
227      for (var langcode in settings.mapping) {
228        if (settings.mapping.hasOwnProperty(langcode)) {
229          var langObject = settings.mapping[langcode];
230          var codeArr = langObject.browser_lang.split(',');
231          var index = 0;
232          if(codeArr.indexOf(current_lang) == -1) {
233              while (index < codeArr.length) {
234                  if (codeArr[index] != current_lang && codeArr[index] == browser_lang.toLowerCase()) {
235                      show_suggestion = true;
236                      lang_code = langcode;
237                      dismiss_button = langObject.dismiss_button;
238                      continue_link = langObject.continue_link;
239                      message = langObject.message;
240                      lang_cr = langObject.country_region;
241                      url = langObject.url;
242                      custom_url = langObject.custom_url;
243                      default_url = langObject.default_url;
244                  }
245                  index++;
246              }
247          }
248        }
249      }
250        if(lang_arr){
251            var link_num = 0;
252            for (var cr_lang in lang_arr){
253
254                if(lang_arr[cr_lang]['state'] == 'enable'){
255                    link_num++;
256                    lang_dropdown_html += '<li><a class="language-link" href="/'+lang_arr[cr_lang]['id']+'">'+lang_arr[cr_lang]['name']+'</a></li>';
257                }
258            }
259            var lsit_hieht = link_num * 41 + 'px';
260            lang_dropdown_html =
261                '<div class="ls-cr-menu" id="ls-cr-menu">' +
262                '<div id="ls-cr"><a class="ls-cr-icon">' +
263                ((isEmpty(lang_cr) == false) ? lang_cr : Drupal.t('Country/Region')) +
264                '<span></span></a>' +
265                '<div class="ls-cr-pop">' +
266                '<div id="ls-cr-list">' +
267                '<ul class="ls-cr-l1" style="height:'+lsit_hieht+';">'+lang_dropdown_html+'</ul>' +
268                '</div>' +
269                '</div>' +
270                '</div>' +
271                '</div>';
272        }
273
274      // Show the language suggestion box. Make sure user hasn't dismissed in the past or dismiss hasn't expired yet.
275      if (show_suggestion && message && (dismissed <= timestamp || dismissed === undefined)) {
276          layoutContainer.append('' +
277              '<div id="language-suggestion">' +
278              '<div class="ls-wrapper">' +
279              '<div class="ls-zcr-icon"><i></i></div>' +
280              '<div class="ls-z-message">' +
281              '<div class="ls-message">' + message + '</div>'
282              + lang_dropdown_html +
283              '</div>' +
284              '<div class="ls-z-button">' +
285              '<div class="ls-dismiss"><a class="btn btn-white-b" id="ls-dismiss">'
286              + ((isEmpty(dismiss_button) == false) ? dismiss_button : Drupal.t('Stay here')) + '</a></div>' +
287              '<div class="ls-continue"><a class="btn btn-white-b" id="ls-continue">'
288              + ((isEmpty(continue_link) == false) ? continue_link : Drupal.t('Continue'))+'</a></div>' +
289              '</div>' +
290              '</div>'
291              );
292          layoutContainer.find('#language-suggestion').delay(settings.show_delay * 1000).show('slow');
293      }
294
295      // Continue to the language suggested and make sure we add to autoredirect cookie if such option is enabled in the module settings.
296      layoutContainer.find('#ls-continue').on('click', function(e) {
297        var redirect = getRedirectUrl(url, custom_url, default_url);
298        if (settings.always_redirect) {
299          $.cookie(settings.cookie_prefix + '.always_redirect', redirect);
300          $.cookie(settings.cookie_prefix + '.redirect_lang', lang_code);
301        }
302        window.location.href = redirect;
303        e.disableDefault();
304      });
305
306      // Dismiss language suggestion box and make sure we keep it dismissed for some time. Time can be configured in the module settings.
307      layoutContainer.find('#ls-dismiss').on('click', function(e) {
308        layoutContainer.find('#language-suggestion').hide('slow');
309        var milliseconds = settings.cookie_dismiss_time * 60 * 60 *1000;
310        $.cookie(settings.cookie_prefix + '.dismiss', timestamp + milliseconds);
311        e.disableDefault();
312      });
313
314    }
315
316    function isEmpty(obj) {
317        if(typeof obj == "undefined" || obj == null || obj == ""){
318            return true;
319        }else{
320            return false;
321        }
322    }
323
324    function getRedirectUrl(type, custom_url, default_url) {
325      switch (type) {
326        case 'custom':
327          return custom_url;
328          break;
329        default:
330          return default_url;
331          break;
332      }
333    }
334
335  });
336
337})(jQuery, Drupal, drupalSettings);
338
339/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/custom/language_suggestion/assets/language_suggestion.js. */;
340/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/themes/contrib/bootstrap/js/popover.js. */
341/**
342 * @file
343 * Bootstrap Popovers.
344 */
345
346var Drupal = Drupal || {};
347
348(function ($, Drupal, Bootstrap) {
349  "use strict";
350
351  var $document = $(document);
352
353  /**
354   * Extend the Bootstrap Popover plugin constructor class.
355   */
356  Bootstrap.extendPlugin('popover', function (settings) {
357    return {
358      DEFAULTS: {
359        animation: !!settings.popover_animation,
360        autoClose: !!settings.popover_auto_close,
361        enabled: settings.popover_enabled,
362        html: !!settings.popover_html,
363        placement: settings.popover_placement,
364        selector: settings.popover_selector,
365        trigger: settings.popover_trigger,
366        title: settings.popover_title,
367        content: settings.popover_content,
368        delay: parseInt(settings.popover_delay, 10),
369        container: settings.popover_container
370      }
371    };
372  });
373
374  /**
375   * Bootstrap Popovers.
376   *
377   * @todo This should really be properly delegated if selector option is set.
378   */
379  Drupal.behaviors.bootstrapPopovers = {
380    $activePopover: null,
381    attach: function (context) {
382      // Immediately return if popovers are not available.
383      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
384        return;
385      }
386
387      var _this = this;
388
389      $document
390        .on('show.bs.popover', '[data-toggle=popover]', function () {
391          var $trigger = $(this);
392          var popover = $trigger.data('bs.popover');
393
394          // Only keep track of clicked triggers that we're manually handling.
395          if (popover.options.originalTrigger === 'click') {
396            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
397              _this.$activePopover.popover('hide');
398            }
399            _this.$activePopover = $trigger;
400          }
401        })
402        // Unfortunately, :focusable is only made available when using jQuery
403        // UI. While this would be the most semantic pseudo selector to use
404        // here, jQuery UI may not always be loaded. Instead, just use :visible
405        // here as this just needs some sort of selector here. This activates
406        // delegate binding to elements in jQuery so it can work it's bubbling
407        // focus magic since elements don't really propagate their focus events.
408        // @see https://www.drupal.org/project/bootstrap/issues/3013236
409        .on('focus.bs.popover', ':visible', function (e) {
410          var $target = $(e.target);
411          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
412            _this.$activePopover.popover('hide');
413            _this.$activePopover = null;
414          }
415        })
416        .on('click.bs.popover', function (e) {
417          var $target = $(e.target);
418          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
419            _this.$activePopover.popover('hide');
420            _this.$activePopover = null;
421          }
422        })
423        .on('keyup.bs.popover', function (e) {
424          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
425            _this.$activePopover.popover('hide');
426            _this.$activePopover = null;
427          }
428        })
429      ;
430
431      var elements = $(context).find('[data-toggle=popover]').toArray();
432      for (var i = 0; i < elements.length; i++) {
433        var $element = $(elements[i]);
434        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
435
436        // Store the original trigger.
437        options.originalTrigger = options.trigger;
438
439        // If the trigger is "click", then we'll handle it manually here.
440        if (options.trigger === 'click') {
441          options.trigger = 'manual';
442        }
443
444        // Retrieve content from a target element.
445        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
446        var $target = $document.find(target).clone();
447        if (!options.content && $target[0]) {
448          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
449          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
450        }
451
452        // Initialize the popover.
453        $element.popover(options);
454
455        // Handle clicks manually.
456        if (options.originalTrigger === 'click') {
457          // To ensure the element is bound multiple times, remove any
458          // previously set event handler before adding another one.
459          $element
460            .off('click.drupal.bootstrap.popover')
461            .on('click.drupal.bootstrap.popover', function (e) {
462              $(this).popover('toggle');
463              e.preventDefault();
464              e.stopPropagation();
465            })
466          ;
467        }
468      }
469    },
470    detach: function (context) {
471      // Immediately return if popovers are not available.
472      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
473        return;
474      }
475
476      // Destroy all popovers.
477      $(context).find('[data-toggle="popover"]')
478        .off('click.drupal.bootstrap.popover')
479        .popover('destroy')
480      ;
481    },
482    getOption: function(name, defaultValue, element) {
483      var $element = element ? $(element) : this.$activePopover;
484      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
485      if (options[name] !== void 0) {
486        return options[name];
487      }
488      return defaultValue !== void 0 ? defaultValue : void 0;
489    }
490  };
491
492})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
493
494/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/themes/contrib/bootstrap/js/popover.js. */;
495/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/custom/appeon_bugzilla/js/bugzillaSearch.js. */
496(function($,window,Drupal){
497  var component;
498  var advancedSearch;
499  var getAdvanced;
500  $(document).ready(function() {
501    component = window.component != null ? window.component : [];
502    advancedSearch = window.advancedSearch != null ? window.advancedSearch : [];
503    getAdvanced = window.getAdvanced != null ? window.getAdvanced : [];
504    if($('.region-content .wrap-messages .alert').length > 0){
505      $('.region-content .wrap-messages .alert').each(function(){
506        $(this).html($(this).html().replace(/(&lt;|&gt;|&amp;|&quot;)/g, function(c){
507          return {'&lt;':'<','&gt;':'>','&amp;':'&','&quot;':'"'}[c];
508        }));
509      });
510    }
511    if(!supportCss3('line-clamp')){
512      if(supportCss3('-moz-box-align')){
513        $('.bugzilla-summary').each(function(){
514          $clamp(this, {clamp: 3});
515        });
516      }else{
517        $('.bugzilla-summary').each(function(){
518          $clamp(this, {clamp: 2});
519        });
520      }
521    }
522    if(window.location.pathname.indexOf('ticketsearch') >= 0){
523      $('.sf-menu').find('a[href="/premiumsupport/ticketsearch"]').addClass('active').parent().addClass('active-trail');
524      $('.sf-accordion').find('a[href="/premiumsupport/ticketsearch"]').addClass('active').parent().addClass('active');
525    }
526    function supportCss3(style) {
527      var prefix = ['webkit', 'Moz', 'ms', 'o'],
528        i,
529        humpString = [],
530        htmlStyle = document.documentElement.style,
531        _toHumb = function (string) {
532          return string.replace(/-(\w)/g, function ($0, $1) {
533            return $1.toUpperCase();
534          });
535        };
536      for (i in prefix){
537        humpString.push(_toHumb(prefix[i] + '-' + style));
538      }
539      humpString.push(_toHumb(style));
540      for (i in humpString){
541        if (humpString[i] in htmlStyle){
542          return true;
543        }
544      }
545      return false;
546    }
547    $.each(getAdvanced, function(k, v){
548      newAdvancedSearch(k, v.field, v.value);
549    });
550    // $.get(window.location.href + (window.location.href.indexOf('?') > 0 ? '&' : '?') + 'op=getNextPageUrl', function(data){
551    //   if(data != ""){
552    //     $('.pagination').append('<li class="next"><a href="' + data + '"> ›</a></li>');
553    //   }
554    // });
555    $('#edit-comments').on('input change', function(){
556      if($(this).val() != ''){
557        $('.text-remove').removeClass('hidden');
558      }else{
559        $('.text-remove').addClass('hidden');
560      }
561    });
562    $('.text-remove').on('click', function(){
563      $('#edit-comments').val('');
564      $(this).addClass('hidden');
565    });
566    $('#edit-field-product').on('change', function(){
567      var product = $(this).val();
568      var html = '<option value="" selected="selected">- Any -</option>';
569      $.each(component.values, function(k, v){
570        var flag = false;
571        if(v.visibility_values.length == 0) {
572          flag = true;
573        }else{
574          $.each(v.visibility_values, function(kk, vv){
575            if(vv == product){
576              flag = true;
577            }
578          });
579        }
580        if(flag){
581          html += '<option value="' + v.name + '">' + v.name + '</option>';
582        }
583      });
584      $('#edit-field-component').html(html);
585      $('.advanced-search').each(function(){
586        $(this).trigger('product_change');
587      });
588    });
589    $('#advanced-button').on('click',function(){
590      if($('.views-widget-advanced').hasClass('hidden')){
591        $('.views-widget-advanced').removeClass('hidden');
592        $(this).removeClass('down').addClass('up');
593      }else{
594        $('.advanced-search').remove();
595        $('.views-widget-advanced').addClass('hidden');
596        $(this).removeClass('up').addClass('down');
597      }
598    });
599    $('#advanced-insert').on('click',function(){
600      newAdvancedSearch();
601    });
602  });
603  function getSearchFields() {
604    var product = $('#edit-field-product').val();
605    var fields = [];
606    $.each(advancedSearch, function(k, v){
607      var flag = false;
608      if(v.visibility_values.length == 0) {
609        flag = true;
610      }else if(v.visibility_field == 'product'){
611        $.each(v.visibility_values, function(kk, vv){
612          if(vv == product || vv == 'Other'){
613            flag = true;
614          }
615        });
616      }else if(v.visibility_field != null){
617        $.each(advancedSearch[v.visibility_field].visibility_values, function(kk, vv){
618          if(vv == product){
619            flag = true;
620          }
621        });
622      }else{
623        flag = true;
624      }
625      if(flag){
626        fields.push({
627          text: v.display_name,
628          value: v.name,
629        });
630      }
631    });
632    return fields;
633  }
634  function getSearchFieldValues(field) {
635    var product = $('#edit-field-product').val();
636    var values = [];
637    $.each(advancedSearch[field].values, function(k, v){
638      var flag = false;
639      if(v.visibility_values.length == 0) {
640        flag = true;
641      }else{
642        $.each(v.visibility_values, function(kk, vv){
643          if(vv == product || vv == 'Other'){
644            flag = true;
645          }
646        });
647      }
648      if(flag){
649        values.push({
650          text: (v.name != null && v.name != "") ? v.name : "- Any -",
651          value: (v.name != null && v.name != "") ? v.name : "",
652        });
653      }
654    });
655    return values;
656  }
657  function getSearchFieldOption(values) {
658    var option = values.length == 0 ? 'equals' : 'substring';
659    return option;
660  }
661  function getSearchFieldsHtml(fields, timestamp) {
662    var fields_html = '<div class="views-exposed-widget advanced-field"><div class="views-widget"><div class="form-item form-type-select form-group"><div class="select-wrapper"><select class="form-control form-select advanced-field-select" name="advanced[' + timestamp + '][field]">';
663    $.each(fields, function(k, v){
664      fields_html +=  '<option value="' + v.value + '">' + v.text + '</option>';
665    });
666    fields_html +=  '</select></div></div></div></div>';
667    return fields_html;
668  }
669  function getSearchFieldValuesHtml(values, timestamp) {
670    var values_html = "";
671    if(getSearchFieldOption(values) == 'equals'){
672      values_html = '<div class="views-exposed-widget advanced-value"><div class="views-widget"><div class="form-item form-type-textfield form-group"><input class="form-control form-text ctools-auto-submit-processed advanced-value-text" type="text" name="advanced[' + timestamp + '][value]" value="" size="30" maxlength="128"></div></div></div>';
673    }else{
674      values_html = '<div class="views-exposed-widget advanced-value"><div class="views-widget"><div class="form-item form-type-select form-group"><div class="select-wrapper"><select class="form-control form-select advanced-value-select" name="advanced[' + timestamp + '][value]">';
675      $.each(values, function(k, v){
676        values_html +=  '<option value="' + v.value + '">' + v.text + '</option>';
677      });
678      values_html += '</select></div></div></div></div>';
679    }
680    return values_html;
681  }
682  function newAdvancedSearch(timestamp, field, value){
683    var fields = getSearchFields();
684    var values = getSearchFieldValues(fields[0].value);
685    var option = getSearchFieldOption(values);
686    timestamp = timestamp != null ? timestamp : Date.parse(new Date());
687    var option_html = '<input type="hidden" name="advanced[' + timestamp + '][option]" value="' + option + '">';
688    var fields_html = getSearchFieldsHtml(fields, timestamp);
689    var values_html = getSearchFieldValuesHtml(values, timestamp);
690    var html = '<div class="views-exposed-widgets clearfix advanced-search" id="advanced-search-timestamp">';
691    html += option_html + fields_html + values_html + '<i class="fa fa-tras
691h-o advanced-delete"></i>';
692    html += '</div>';
693    var html_dom = $(html);
694    html_dom.appendTo('.views-widget-advanced').on('click', '.advanced-delete', function(){
695      $(this).parents('.advanced-search').remove();
696    }).on('change', '.advanced-field-select', function(){
697      values = getSearchFieldValues($(this).val());
698      $(this).parents('.advanced-search').find('.advanced-value').prop('outerHTML', getSearchFieldValuesHtml(values, timestamp));
699    }).on('product_change', function(){
700      var dom = $(this);
701      var new_fields = getSearchFields();
702      if(fields != new_fields){
703        var old_field_val = dom.find('.advanced-field-select').val();
704        fields = new_fields;
705        dom.find('.advanced-field').prop('outerHTML', getSearchFieldsHtml(fields, timestamp));
706        var flag = true;
707        $.each(fields, function(k, v){
708          if(v.value == old_field_val){
709            flag = false;
710            dom.find('.advanced-field-select').val(old_field_val);
711          }
712        });
713        if(flag){
714          values = getSearchFieldValues(fields[0].value);
715          dom.find('.advanced-value').prop('outerHTML', getSearchFieldValuesHtml(values, timestamp));
716        }else{
717          var new_values = getSearchFieldValues(old_field_val);
718          if(values != new_values){
719            var old_value_val = dom.find('.advanced-value-select').val();
720            old_value_val = old_value_val != null ? old_value_val : dom.find('.advanced-value-text').val();
721            values = new_values;
722            dom.find('.advanced-value').prop('outerHTML', getSearchFieldValuesHtml(values, timestamp));
723            dom.find('.advanced-value-text').val(old_value_val);
724            $.each(values, function(k, v){
725              if(v.value == old_value_val){
726                dom.find('.advanced-value-select').val(old_value_val);
727              }
728            });
729          }
730        }
731      }
732    });
733    if(field != null && value != null){
734      html_dom.find('.advanced-field-select').val(field).trigger('change');
735      html_dom.find('.advanced-value-select, .advanced-value-text').val(value);
736    }
737  }
738})(jQuery,window,Drupal);
739
740/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/custom/appeon_bugzilla/js/bugzillaSearch.js. */;
741/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/custom/appeon_bugzilla/js/clamp.min.js. */
742/*!
743* Clamp.js 0.5.1
744*
745* Copyright 2011-2013, Joseph Schmitt http://joe.sh
746* Released under the WTFPL license
747* http://sam.zoy.org/wtfpl/
748*/
749(function(){window.$clamp=function(c,d){function s(a,b){n.getComputedStyle||(n.getComputedStyle=function(a,b){this.el=a;this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;"float"==b&&(b="styleFloat");c.test(b)&&(b=b.replace(c,function(a,b,c){return c.toUpperCase()}));return a.currentStyle&&a.currentStyle[b]?a.currentStyle[b]:null};return this});return n.getComputedStyle(a,null).getPropertyValue(b)}function t(a){a=a||c.clientHeight;var b=u(c);return Math.max(Math.floor(a/b),0)}function x(a){return u(c)*
750a}function u(a){var b=s(a,"line-height");"normal"==b&&(b=1.2*parseInt(s(a,"font-size")));return parseInt(b)}function l(a){if(a.lastChild.children&&0<a.lastChild.children.length)return l(Array.prototype.slice.call(a.children).pop());if(a.lastChild&&a.lastChild.nodeValue&&""!=a.lastChild.nodeValue&&a.lastChild.nodeValue!=b.truncationChar)return a.lastChild;a.lastChild.parentNode.removeChild(a.lastChild);return l(c)}function p(a,d){if(d){var e=a.nodeValue.replace(b.truncationChar,"");f||(h=0<k.length?
751k.shift():"",f=e.split(h));1<f.length?(q=f.pop(),r(a,f.join(h))):f=null;m&&(a.nodeValue=a.nodeValue.replace(b.truncationChar,""),c.innerHTML=a.nodeValue+" "+m.innerHTML+b.truncationChar);if(f){if(c.clientHeight<=d)if(0<=k.length&&""!=h)r(a,f.join(h)+h+q),f=null;else return c.innerHTML}else""==h&&(r(a,""),a=l(c),k=b.splitOnChars.slice(0),h=k[0],q=f=null);if(b.animate)setTimeout(function(){p(a,d)},!0===b.animate?10:b.animate);else return p(a,d)}}function r(a,c){a.nodeValue=c+b.truncationChar}d=d||{};
752var n=window,b={clamp:d.clamp||2,useNativeClamp:"undefined"!=typeof d.useNativeClamp?d.useNativeClamp:!0,splitOnChars:d.splitOnChars||[".","-","\u2013","\u2014"," "],animate:d.animate||!1,truncationChar:d.truncationChar||"\u2026",truncationHTML:d.truncationHTML},e=c.style,y=c.innerHTML,z="undefined"!=typeof c.style.webkitLineClamp,g=b.clamp,v=g.indexOf&&(-1<g.indexOf("px")||-1<g.indexOf("em")),m;b.truncationHTML&&(m=document.createElement("span"),m.innerHTML=b.truncationHTML);var k=b.splitOnChars.slice(0),
753h=k[0],f,q;"auto"==g?g=t():v&&(g=t(parseInt(g)));var w;z&&b.useNativeClamp?(e.overflow="hidden",e.textOverflow="ellipsis",e.webkitBoxOrient="vertical",e.display="-webkit-box",e.webkitLineClamp=g,v&&(e.height=b.clamp+"px")):(e=x(g),e<=c.clientHeight&&(w=p(l(c),e)));return{original:y,clamped:w}}})();
754/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/custom/appeon_bugzilla/js/clamp.min.js. */;
755/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/libraries/drupal-superfish/superfish.js. */
756/*
757 * Superfish v1.4.8 - jQuery menu widget
758 * Copyright (c) 2008 Joel Birch
759 *
760 * Dual licensed under the MIT and GPL licenses:
761 *  http://www.opensource.org/licenses/mit-license.php
762 *  http://www.gnu.org/licenses/gpl.html
763 */
764/*
765 * This is not the original jQuery Superfish plugin.
766 * Please refer to the README for more information.
767 */
768
769(function($){
770  $.fn.superfish = function(options){
771    var sf = $.fn.superfish,
772      c = sf.c,
773      $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
774      over = function(){
775        var $$ = $(this), menu = getMenu($$);
776        clearTimeout(menu.sfTimer);
777        $$.showSuperfishUl().siblings().hideSuperfishUl();
778      },
779      out = function(){
780        var $$ = $(this), menu = getMenu($$), o = sf.op;
781        clearTimeout(menu.sfTimer);
782        menu.sfTimer = setTimeout(function(){
783          if ($$.children('.sf-clicked').length == 0){
784            o.retainPath = ($.inArray($$[0],o.$path)>-1);
785            $$.hideSuperfishUl();
786            if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length < 1){
787              over.call(o.$path);
788            }
789          }
790        },o.delay);
791      },
792      getMenu = function($menu){
793        var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
794        sf.op = sf.o[menu.serial];
795        return menu;
796      },
797      addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
798
799    return this.each(function() {
800      var s = this.serial = sf.o.length;
801      var o= $.extend({},sf.defaults,options);
802      o.$path = $('li.' + o.pathClass,this).slice(0,o.pathLevels);
803      var p = o.$path;
804      for (var l = 0; l < p.length; l++){
805        p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);
806      }
807      sf.o[s] = sf.op = o;
808
809      $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
810        if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') );
811      })
812      .not('.' + c.bcClass).hideSuperfishUl();
813
814      var $a = $('a, span.nolink',this);
815      $a.each(function(i){
816        var $li = $a.eq(i).parents('li');
817        $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
818      });
819      o.onInit.call(this);
820
821    }).each(function() {
822      var menuClasses = [c.menuClass];
823      if (sf.op.dropShadows){
824        menuClasses.push(c.shadowClass);
825      }
826      $(this).addClass(menuClasses.join(' '));
827    });
828  };
829
830  var sf = $.fn.superfish;
831  sf.o = [];
832  sf.op = {};
833
834  sf.c = {
835    bcClass: 'sf-breadcrumb',
836    menuClass: 'sf-js-enabled',
837    anchorClass: 'sf-with-ul',
838    arrowClass: 'sf-sub-indicator',
839    shadowClass: 'sf-shadow'
840  };
841  sf.defaults = {
842    hoverClass: 'sfHover',
843    pathClass: 'overideThisToUse',
844    pathLevels: 1,
845    delay: 800,
846    animation: {opacity: 'show'},
847    speed: 'fast',
848    autoArrows: true,
849    dropShadows: true,
850    disableHI: false, // true disables hoverIntent detection
851    onInit: function(){}, // callback functions
852    onBeforeShow: function(){},
853    onShow: function(){},
854    onHide: function(){}
855  };
856  $.fn.extend({
857    hideSuperfishUl : function(){
858      var o = sf.op;
859      var not = (o.retainPath === true) ? o.$path : '';
860      o.retainPath = false;
861      var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
862          .children('ul').addClass('sf-hidden');
863      o.onHide.call($ul);
864      return this;
865    },
866    showSuperfishUl : function(){
867      var o = sf.op,
868        sh = sf.c.shadowClass + '-off',
869        $ul = this.addClass(o.hoverClass).children('ul.sf-hidden').hide().removeClass('sf-hidden');
870      o.onBeforeShow.call($ul);
871      $ul.animate(o.animation, o.speed, function(){ o.onShow.call($ul); });
872      return this;
873    }
874  });
875})(jQuery);
876/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/libraries/drupal-superfish/superfish.js. */;
877/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/libraries/drupal-superfish/jquery.hoverIntent.minified.js. */
878/*!
879 * hoverIntent v1.10.1 // 2019.10.05 // jQuery v1.7.0+
880 * http://briancherne.github.io/jquery-hoverIntent/
881 *
882 * You may use hoverIntent under the terms of the MIT license. Basically that
883 * means you are free to use hoverIntent as long as this header is left intact.
884 * Copyright 2007-2019 Brian Cherne
885 */
886!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";function track(ev){cX=ev.pageX,cY=ev.pageY}var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)};$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var instanceId=INSTANCE_COUNT++,cfg=$.extend({},_cfg);$.isPlainObject(handlerIn)?(cfg=$.extend(cfg,handlerIn),(typeof cfg.out==="function")||(cfg.out=cfg.over)):cfg=(typeof handlerOut==="function")?$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector}):$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut});function handleHover(e){var ev=$.extend({},e),$el=$(this),hoverIntentData=$el.data("hoverIntent");hoverIntentData||$el.data("hoverIntent",hoverIntentData={});var state=hoverIntentData[instanceId];state||(hoverIntentData[instanceId]=state={id:instanceId}),state.timeoutId&&(state.timeoutId=clearTimeout(state.timeoutId));
886var mousemove=state.event="mousemove.hoverIntent.hoverIntent"+instanceId;if("mouseenter"===e.type){if(state.isActive)return;state.pX=ev.pageX,state.pY=ev.pageY,$el.off(mousemove,track).on(mousemove,track),state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg)},cfg.interval)}else{if(!state.isActive)return;$el.off(mousemove,track),state.timeoutId=setTimeout(function(){!function(ev,$el,s,out){var data=$el.data("hoverIntent");data&&delete data[s.id],out.apply($el[0],[ev])}(ev,$el,state,cfg.out)},cfg.timeout)}}return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}});
887/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/libraries/drupal-superfish/jquery.hoverIntent.minified.js. */;
888/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/libraries/drupal-superfish/sfsmallscreen.js. */
889/*
890 * sf-Smallscreen v1.3b - Provides small-screen compatibility for the jQuery Superfish plugin.
891 *
892 * Developer's note:
893 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish)
894 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact
895 *
896 * jQuery version: 1.3.x or higher.
897 *
898 * Dual licensed under the MIT and GPL licenses:
899 *  http://www.opensource.org/licenses/mit-license.php
900 *  http://www.gnu.org/licenses/gpl.html
901  */
902
903(function($){
904  $.fn.sfsmallscreen = function(options){
905    options = $.extend({
906      mode: 'inactive',
907      type: 'accordion',
908      breakpoint: 768,
909      breakpointUnit: 'px',
910      useragent: '',
911      title: '',
912      addSelected: false,
913      menuClasses: false,
914      hyperlinkClasses: false,
915      excludeClass_menu: '',
916      excludeClass_hyperlink: '',
917      includeClass_menu: '',
918      includeClass_hyperlink: '',
919      accordionButton: 1,
920      expandText: 'Expand',
921      collapseText: 'Collapse'
922    }, options);
923
924    // We need to clean up the menu from anything unnecessary.
925    function refine(menu){
926      var refined = menu.clone();
927      // Things that should not be in the small-screen menus.
928      var rm = refined.find('span.sf-sub-indicator');
929      // This is a helper class for those who need to add extra markup that shouldn't exist
930      // in the small-screen versions.
931      var rh = refined.find('.sf-smallscreen-remove');
932      // Mega-menus has to be removed too.
933      var mm = refined.find('ul.sf-multicolumn');
934      for (var a = 0; a < rh.length; a++){
935        rh.eq(a).replaceWith(rh.eq(a).html());
936      }
937      if (options.accordionButton == 2 || options.type == 'select'){
938        for (var b = 0; b < rm.length; b++){
939          rm.eq(b).remove();
940        }
941      }
942      if (mm.length > 0){
943        mm.removeClass('sf-multicolumn');
944        var ol = refined.find('div.sf-multicolumn-column > ol');
945        for (var o = 0; o < ol.length; o++){
946          ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>');
947        }
948        var elements = ['div.sf-multicolumn-column','.sf-multicolumn-wrapper > ol','li.sf-multicolumn-wrapper'];
949        for (var i = 0; i < elements.length; i++){
950          obj = refined.find(elements[i]);
951          for (var t = 0; t < obj.length; t++){
952            obj.eq(t).replaceWith(obj.eq(t).html());
953          }
954        }
955        refined.find('.sf-multicolumn-column').removeClass('sf-multicolumn-column');
956      }
957      refined.add(refined.find('*')).css({width:''});
958      return refined;
959    }
960
961    // Creating <option> elements out of the menu.
962    function toSelect(menu, level){
963      var items = '';
964      var childLI = $(menu).children('li');
965      for (var a = 0; a < childLI.length; a++){
966        var list = childLI.eq(a), parent = list.children('a, span');
967        for (var b = 0; b < parent.length; b++){
968          var
969          item = parent.eq(b),
970          path = (item.is('a') && !!item.attr('href')) ? item.attr('href') : '',
971          // Class names modification.
972          itemClone = item.clone(),
973          classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '',
974          classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes;
975          // Retaining the active class if requested.
976          if (options.addSelected && item.hasClass('active')){
977            classes += ' active';
978          }
979          classes = (classes) ? ' class="' + classes + '"' : '';
980          // <option> has to be disabled if the item is not a link.
981          disable = (path == '') || (path == '#') ? ' disabled="disabled"' : '',
982          // Crystal clear.
983          subIndicator = 1 < level ? Array(level).join('-') + ' ' : '';
984          // Preparing the <option> element.
985          items += '<option value="' + path + '"' + classes + disable + '>' + subIndicator + $.trim(item.text()) +'</option>',
986          childUL = list.find('> ul');
987          // Using the function for the sub-menu of this item.
988          for (var u = 0; u < childUL.length; u++){
989            items += toSelect(childUL.eq(u), level + 1);
990          }
991        }
992      }
993      return items;
994    }
995
996    // Create the new version, hide the original.
997    function convert(menu){
998      var menuID = menu.attr('id');
999      // Creating a refined version of the menu.
1000      var refinedMenu = refine(menu);
1001      // Currently the plugin provides two reactions to small screens.
1002      // Converting the menu to a <select> element, and converting to an accordion version of the menu.
1003      if (options.type == 'accordion'){
1004        var toggleID = menuID + '-toggle';
1005        var accordionID = menuID + '-accordion';
1006        // Making sure the accordion does not exist.
1007        if ($('#' + accordionID).length == 0){
1008          // Getting the style class.
1009          var styleClass = menu.attr('class').split(' ').filter(function(item){
1010            return item.indexOf('sf-style-') > -1 ? item : '';
1011          });
1012          // Creating the accordion.
1013          var accordion = $(refinedMenu).attr('id', accordionID);
1014          // Removing unnecessary classes.
1015          accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled');
1016          // Adding necessary classes.
1017          accordion.addClass('sf-accordion sf-hidden');
1018          // Removing style attributes and any unnecessary class.
1019          accordion.find('li').each(function(){
1020            $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion');
1021          });
1022          // Doing the same and making sure all the sub-menus are off-screen (hidden).
1023          accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden');
1024          accordion.find('ul').each(function(){
1025            $(this).removeAttr('style').not('.sf-hidden').addClass('sf-hidden');
1026          });
1027
1028          // Creating the accordion toggle switch.
1029          var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>';
1030
1031          // Adding Expand\Collapse buttons if requested.
1032          if (options.accordionButton == 2){
1033            accordion.addClass('sf-accordion-with-buttons');
1034            var parent = accordion.find('li.menuparent');
1035            for (var i = 0; i < parent.length; i++){
1036              parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>');
1037            }
1038          }
1039          // Inserting the according and hiding the original menu.
1040          menu.before(toggle).before(accordion).hide();
1041
1042          var accordionElement = $('#' + accordionID);
1043          // Deciding what should be used as accordion buttons.
1044          var buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button';
1045          var button = accordionElement.find(buttonElement);
1046
1047          // Attaching a click event to the toggle switch.
1048          $('#' + toggleID).on('click', function(e){
1049            // Preventing the click.
1050            e.preventDefault();
1051            // Adding the sf-expanded class.
1052            $(this).toggleClass('sf-expanded');
1053
1054            if (accordionElement.hasClass('sf-expanded')){
1055              // If the accordion is already expanded:
1056              // Hiding its expanded sub-menus and then the accordion itself as well.
1057              accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded')
1058              .end().children('ul').hide()
1059              // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time.
1060              // Basically we'll add a class that keeps the sub-menu off-screen and still visible,
1061              // and make it invisible and removing the class one moment before showing or hiding it.
1062              // This helps screen reader software access all the menu items.
1063              .end().hide().addClass('sf-hidden').show();
1064              // Changing the caption of any existing accordion buttons to 'Expand'.
1065              if (options.accordionButton == 2){
1066                accordionElement.find('a.sf-accordion-button').text(options.expandText);
1067              }
1068            }
1069            else {
1070              // But if it's collapsed,
1071              accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show();
1072            }
1073          });
1074
1075          // Attaching a click event to the buttons.
1076          button.on('click', function(e){
1077            // Making sure the buttons does not exist already.
1078            if ($(this).closest('li').children('ul').length > 0){
1079              e.preventDefault();
1080              // Selecting the parent menu items.
1081              var parent = $(this).closest('li');
1082              // Creating and inserting Expand\Collapse buttons to the parent menu items,
1083              // of course only if not already happened.
1084              if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){
1085                var
1086                // Cloning the hyperlink of the parent menu item.
1087                cloneLink = parent.children('a.menuparent').clone();
1088                // Removing unnecessary classes and element(s).
1089                cloneLink.removeClass('menuparent sf-with-ul').children('.sf-sub-indicator').remove();
1090                // Wrapping the hyerplinks in <li>.
1091                cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink);
1092                // Adding a helper class and attaching them to the sub-menus.
1093                parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink);
1094              }
1095              // Once the button is clicked, collapse the sub-menu if it's expanded.
1096              if (parent.hasClass('sf-expanded')){
1097                parent.children('ul').slideUp('fast', function(){
1098                  // Doing the accessibility trick after hiding the sub-menu.
1099                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
1100                });
1101                // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted.
1102                if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){
1103                  parent.children('.sf-accordion-button').text(options.expandText);
1104                }
1105              }
1106              // Otherwise, expand the sub-menu.
1107              else {
1108                // Doing the accessibility trick and then showing the sub-menu.
1109                parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast')
1110                // Changing the caption of the inserted Expand link to 'Collape', if any is inserted.
1111                .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText)
1112                // Hiding any expanded sub-menu of the same level.
1113                .end().siblings('li.sf-expanded').children('ul')
1114                .slideUp('fast', function(){
1115                  // Doing the accessibility trick after hiding it.
1116                  $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show();
1117                })
1118                // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus.
1119                .parent().children('a.sf-accordion-button').text(options.expandText);
1120              }
1121            }
1122          });
1123        }
1124      }
1125      else {
1126        var
1127        // Class names modification.
1128        menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '',
1129        classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes,
1130        classes = classes ? ' class="' + classes + '"' : '';
1131
1132        // Making sure the <select> element does not exist already.
1133        if ($('#' + menuID + '-select').length == 0){
1134          // Creating the <option> elements.
1135          var newMenu = toSelect(refinedMenu, 1);
1136          // Creating the <select> element and assigning an ID and class name.
1137          var selectList = $('<select ' + classes + ' id="' + menuID + '-select"/>')
1138          // Attaching the title and the items to the <select> element.
1139          .html('<option>' + options.title + '</option>' + newMenu)
1140          // Attaching an event then.
1141          .change(function(){
1142            // Except for the first option that is the menu title and not a real menu item.
1143            if ($('option:selected', this).index()){
1144              window.location = selectList.val();
1145            }
1146          });
1147          // Applying the addSelected option to it.
1148          if (options.addSelected){
1149            selectList.find('.active').attr('selected', !0);
1150          }
1151          // Finally inserting the <select> element into the document then hiding the original menu.
1152          menu.before(selectList).hide();
1153        }
1154      }
1155    }
1156
1157    // Turn everything back to normal.
1158    function turnBack(menu){
1159      var id = '#' + menu.attr('id');
1160      // Removing the small screen version.
1161      $(id + '-' + options.type).remove();
1162      // Removing the accordion toggle switch as well.
1163      if (options.type == 'accordion'){
1164        $(id + '-toggle').parent('div').remove();
1165      }
1166      // Remove inline CSS display property; less clear than simply using .show(), but respects stylesheet
1167      $(id).css('display', '');
1168    }
1169
1170    // Return original object to support chaining.
1171    // Although this is unnecessary because of the way the module uses these plugins.
1172    for (var s = 0; s < this.length; s++){
1173      var menu = $(this).eq(s);
1174      var mode = options.mode;
1175      // The rest is crystal clear, isn't it? :)
1176      if (menu.children('li').length == 0){
1177        // Skip empty menu which will not be visible and don't want to suddenly make it visible.
1178      }
1179      else if (mode == 'always_active'){
1180        convert(menu);
1181      }
1182      else if (mode == 'window_width'){
1183        var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint,
1184        windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
1185        timer;
1186        if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
1187          convert(menu);
1188        }
1189        else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
1190          convert(menu);
1191        }
1192        $(window).resize(function(){
1193          clearTimeout(timer);
1194          timer = setTimeout(function(){
1195            var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
1196            if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){
1197              convert(menu);
1198            }
1199            else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) {
1200              convert(menu);
1201            }
1202            else {
1203              turnBack(menu);
1204            }
1205          }, 50);
1206        });
1207      }
1208      else if (mode == 'useragent_custom'){
1209        if (options.useragent != ''){
1210          var ua = RegExp(options.useragent, 'i');
1211          if (navigator.userAgent.match(ua)){
1212            convert(menu);
1213          }
1214        }
1215      }
1216      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)){
1217        convert(menu);
1218      }
1219    }
1220    return this;
1221  }
1222})(jQuery);
1223
1224/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/libraries/drupal-superfish/sfsmallscreen.js. */;
1225/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/libraries/drupal-superfish/supposition.js. */
1226/*
1227 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget.
1228 *
1229 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him.
1230 * Special thanks to Karl Swedberg for valuable input.
1231 *
1232 * Dual licensed under the MIT and GPL licenses:
1233 *  http://www.opensource.org/licenses/mit-license.php
1234 *  http://www.gnu.org/licenses/gpl.html
1235 */
1236/*
1237 * This is not the original jQuery Supposition plugin.
1238 * Please refer to the README for more information.
1239 */
1240
1241(function($){
1242  $.fn.supposition = function(){
1243    var $w = $(window), /*do this once instead of every onBeforeShow call*/
1244    _offset = function(dir) {
1245      return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset']
1246      || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft']
1247      || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft'];
1248    },
1249    onHide = function(){
1250      this.css({bottom:''});
1251    },
1252    onBeforeShow = function(){
1253      this.each(function(){
1254        var $u = $(this);
1255        $u.css('display','block');
1256        var $mul = $u.closest('.sf-menu'),
1257        level = $u.parents('ul').length,
1258        menuWidth = $u.width(),
1259        menuParentWidth = $u.closest('li').outerWidth(true),
1260        menuParentLeft = $u.closest('li').offset().left,
1261        totalRight = $w.width() + _offset('x'),
1262        menuRight = $u.offset().left + menuWidth,
1263        exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth;
1264        if ($u.parents('.sf-js-enabled').hasClass('rtl')) {
1265          if (menuParentLeft < exactMenuWidth) {
1266            if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){
1267              $u.css({left:0,right:'auto'});
1268            }
1269            else {
1270              $u.css({left:menuParentWidth + 'px',right:'auto'});
1271            }
1272            $u.parent().addClass('sf-supposition-active');
1273          }
1274        }
1275        else {
1276          if (menuRight > totalRight && menuParentLeft > menuWidth) {
1277            if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){
1278              $u.css({right:0,left:'auto'});
1279            }
1280            else {
1281              $u.css({right:menuParentWidth + 'px',left:'auto'});
1282            }
1283            $u.parent().addClass('sf-supposition-active');
1284          }
1285        }
1286        var windowHeight = $w.height(),
1287        offsetTop = $u.offset().top,
1288        menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0,
1289        menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow,
1290        menuHeight = $u.height(),
1291        baseline = windowHeight + _offset('y');
1292        var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight));
1293        if (expandUp) {
1294          $u.css({bottom:menuParentHeight + 'px',top:'auto'});
1295        }
1296        $u.css('display','none');
1297      });
1298    };
1299
1300    return this.each(function() {
1301      var o = $.fn.superfish.o[this.serial]; /* get this menu's options */
1302
1303      /* if callbacks already set, store them */
1304      var _onBeforeShow = o.onBeforeShow,
1305      _onHide = o.onHide;
1306
1307      $.extend($.fn.superfish.o[this.serial],{
1308        onBeforeShow: function() {
1309          onBeforeShow.call(this); /* fire our Supposition callback */
1310          _onBeforeShow.call(this); /* fire stored callbacks */
1311        },
1312        onHide: function() {
1313          onHide.call(this); /* fire our Supposition callback */
1314          _onHide.call(this); /* fire stored callbacks */
1315        }
1316      });
1317    });
1318  };
1319})(jQuery);
1320/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/libraries/drupal-superfish/supposition.js. */;
1321/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/libraries/drupal-superfish/supersubs.js. */
1322/*
1323 * Supersubs v0.4b - jQuery plugin
1324 * Copyright (c) 2013 Joel Birch
1325 *
1326 * Dual licensed under the MIT and GPL licenses:
1327 *  http://www.opensource.org/licenses/mit-license.php
1328 *  http://www.gnu.org/licenses/gpl.html
1329 *
1330 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
1331 * their longest list item children. If you use this, please expect bugs and report them
1332 * to the jQuery Google Group with the word 'Superfish' in the subject line.
1333 *
1334 */
1335/*
1336 * This is not the original jQuery Supersubs plugin.
1337 * Please refer to the README for more information.
1338 */
1339
1340(function($){ // $ will refer to jQuery within this closure
1341  $.fn.supersubs = function(options){
1342    var opts = $.extend({}, $.fn.supersubs.defaults, options);
1343    // return original object to support chaining
1344    // Although this is unnecessary due to the way the module uses these plugins.
1345    for (var a = 0; a < this.length; a++) {
1346      // cache selections
1347      var $$ = $(this).eq(a);
1348      // support metadata
1349      var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
1350      // Jump one level if it's a "NavBar"
1351      if ($$.hasClass('sf-navbar')) {
1352        $$ = $$.children('li').children('ul');
1353      }
1354      // cache all ul elements
1355      var $ULs = $$.find('ul');
1356      if ($ULs.length) {
1357        // get the font size of menu.
1358        // .css('fontSize') returns various results cross-browser, so measure an em dash instead
1359        var fontsize = $('<li id="menu-fontsize">&#8212;</li>');
1360        var size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;')
1361        .appendTo($$)[0].clientWidth; //clientWidth is faster than width()
1362        // remove em dash
1363        fontsize.remove();
1364
1365        // loop through each ul in menu
1366        for (var b = 0; b < $ULs.length; b++) {
1367          // cache this ul
1368          var $ul = $ULs.eq(b);
1369          // If a multi-column sub-menu, and only if correctly configured.
1370          if (o.multicolumn && $ul.hasClass('sf-multicolumn') && $ul.find('.sf-multicolumn-column').length > 0){
1371            // Look through each column.
1372            var $column = $ul.find('div.sf-multicolumn-column > ol'),
1373            // Overall width.
1374            mwWidth = 0;
1375            for (var d = 0; d < $column.length; d++){
1376              resize($column.eq(d));
1377              // New column width, in pixels.
1378              var colWidth = Math.ceil($column.width());
1379              // Just a trick to convert em unit to px.
1380              $column.css({width:colWidth})
1381              // Making column parents the same size.
1382              .parents('.sf-multicolumn-column').css({width:colWidth});
1383              // Overall width.
1384              mwWidth += colWidth;
1385            }
1386            // Resizing the columns container too.
1387            $ul.add($ul.find('li.sf-multicolumn-wrapper, li.sf-multicolumn-wrapper > ol')).css({width:mwWidth});
1388          }
1389          else {
1390            resize($ul);
1391          }
1392        }
1393      }
1394    }
1395    function resize($ul){
1396      // get all (li) children of this ul
1397      var $LIs = $ul.children();
1398      // get all anchor grand-children
1399      var $As = $LIs.children('a');
1400      // force content to one line and save current float property
1401      $LIs.css('white-space','nowrap');
1402      // remove width restrictions and floats so elements remain vertically stacked
1403      $ul.add($LIs).add($As).css({float:'none',width:'auto'});
1404      // this ul will now be shrink-wrapped to longest li due to position:absolute
1405      // so save its width as ems.
1406      var emWidth = $ul.get(0).clientWidth / size;
1407      // add more width to ensure lines don't turn over at certain sizes in various browsers
1408      emWidth += o.extraWidth;
1409      // restrict to at least minWidth and at most maxWidth
1410      if (emWidth > o.maxWidth) {emWidth = o.maxWidth;}
1411      else if (emWidth < o.minWidth) {emWidth = o.minWidth;}
1412      emWidth += 'em';
1413      // set ul to width in ems
1414      $ul.css({width:emWidth});
1415      // restore li floats to avoid IE bugs
1416      // set li width to full width of this ul
1417      // revert white-space to normal
1418      $LIs.add($As).css({float:'',width:'',whiteSpace:''});
1419      // update offset position of descendant ul to reflect new width of parent.
1420      // set it to 100% in case it isn't already set to this in the CSS
1421      for (var c = 0; c < $LIs.length; c++) {
1422        var $childUl = $LIs.eq(c).children('ul');
1423        var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right';
1424        $childUl.css(offsetDirection,'100%');
1425      }
1426    }
1427    return this;
1428  };
1429  // expose defaults
1430  $.fn.supersubs.defaults = {
1431    multicolumn: true, // define width for multi-column sub-menus and their columns.
1432    minWidth: 12, // requires em unit.
1433    maxWidth: 27, // requires em unit.
1434    extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
1435  };
1436})(jQuery); // plugin code ends
1437
1438/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/libraries/drupal-superfish/supersubs.js. */;
1439/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/contrib/superfish/js/superfish.js. */
1440(function ($, Drupal, once) {
1441  Drupal.behaviors.superfish = {
1442    attach(context, drupalSettings) {
1443      // Take a look at each menu to apply Superfish to.
1444      $.each(drupalSettings.superfish || {}, function (index, options) {
1445        $(once('superfish', `ul#${options.id}`, context)).each(function () {
1446          const $menu = $(this);
1447
1448          // Check if we are to apply the Supersubs plug-in to it.
1449          if (options.plugins) {
1450            if (options.plugins.supersubs) {
1451              $menu.supersubs(options.plugins.supersubs);
1452            }
1453          }
1454
1455          // Apply Superfish to the menu.
1456          $menu.superfish(options.sf);
1457          // Check if we are to apply any other plug-in to it.
1458          if (options.plugins) {
1459            if (options.plugins.touchscreen) {
1460              $menu.sftouchscreen(options.plugins.touchscreen);
1461            }
1462            if (options.plugins.smallscreen) {
1463              $menu.sfsmallscreen(options.plugins.smallscreen);
1464            }
1465            if (options.plugins.supposition) {
1466              $menu.supposition();
1467            }
1468          }
1469        });
1470      });
1471    },
1472  };
1473})(jQuery, Drupal, once);
1474
1475/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/contrib/superfish/js/superfish.js. */;
1476/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/themes/contrib/dxpr_theme/js/minified/dxpr-theme-breadcrumbs.min.js. */
1477"use strict";!function(e,r,a){r.behaviors.dxpr_theme_breadcrumbs={attach:function(r,t){if(t.dxpr_themeSettings.breadcrumbsSeparator){var c=t.dxpr_themeSettings.breadcrumbsSeparator;e(a("dxpr_theme",".page-title-full-width-container .breadcrumb a",r)).after(' <span class="dxpr-theme-breadcrumb-spacer">
1477'.concat(c,"</span> "))}else e(a("dxpr_theme",".page-title-full-width-container .breadcrumb a",r)).after(' <span class="dxpr-theme-breadcrumb-spacer">/</span> ')}}}(jQuery,Drupal,once);
1478/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/themes/contrib/dxpr_theme/js/minified/dxpr-theme-breadcrumbs.min.js. */;
1479/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/contrib/antibot/js/antibot.js. */
1480/**
1481 * @file
1482 * Unlock protected forms.
1483 *
1484 * This works by resetting the form action to the path that It should be as well
1485 * as injecting the secret form key, only if the current user is verified to be
1486 * human which is done by waiting for a mousemove, swipe, or tab/enter key to be
1487 * pressed.
1488 */
1489
1490((Drupal, drupalSettings) => {
1491  drupalSettings.antibot = drupalSettings.antibot || {};
1492  Drupal.antibot = {};
1493
1494  Drupal.behaviors.antibot = {
1495    attach(context, settings) {
1496      drupalSettings = settings;
1497      // Assume the user is not human, despite JS being enabled.
1498      if (typeof drupalSettings.antibot !== 'undefined') {
1499        drupalSettings.antibot.human = false;
1500      }
1501
1502      // Wait for a mouse to move, indicating they are human.
1503      document.body.addEventListener('mousemove', () => {
1504        // Unlock the forms.
1505        Drupal.antibot.unlockForms();
1506      });
1507
1508      // Wait for a touch move event, indicating that they are human.
1509      document.body.addEventListener('touchmove', () => {
1510        // Unlock the forms.
1511        Drupal.antibot.unlockForms();
1512      });
1513
1514      // A tab or enter key pressed can also indicate they are human.
1515      document.body.addEventListener('keydown', (e) => {
1516        if (e.code === 'Tab' || e.code === 'Enter') {
1517          // Unlock the forms.
1518          Drupal.antibot.unlockForms();
1519        }
1520      });
1521    },
1522  };
1523
1524  /**
1525   * Unlock all locked forms.
1526   */
1527  Drupal.antibot.unlockForms = () => {
1528    // Act only if we haven't yet verified this user as being human.
1529    if (!drupalSettings.antibot.human) {
1530      // Check if there are forms to unlock.
1531      if (drupalSettings.antibot.forms !== undefined) {
1532        // Iterate all antibot forms that we need to unlock.
1533        Object.values(drupalSettings.antibot.forms).forEach((config) => {
1534          // Switch the action.
1535          const form = document.getElementById(config.id);
1536          if (form) {
1537            form.setAttribute('action', form.getAttribute('data-action'));
1538
1539            // Set the key.
1540            const input = form.querySelector('input[name="antibot_key"]');
1541            if (input) {
1542              input.value = config.key
1543                .split('')
1544                .reverse()
1545                .join('')
1546                .match(/.{1,2}/g)
1547                .map((value) => value.split('').reverse().join(''))
1548                .join('');
1549            }
1550          }
1551        });
1552      }
1553      // Mark this user as being human.
1554      drupalSettings.antibot.human = true;
1555    }
1556  };
1557})(Drupal, drupalSettings);
1558
1559/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/contrib/antibot/js/antibot.js. */;
1560/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/themes/contrib/dxpr_theme/js/minified/dxpr-theme-full-screen-search.min.js. */
1561"use strict";!function(e,s,c){s.behaviors.fullScreenSearch={attach:function(s,n){function o(){a.toggleClass("invisible"),e("body").toggleClass("body--full-screen-search"),setTimeout((function(){l.val("")}),350)}var t=e(".full-screen-search-button"),a=e(".full-screen-search-form"),l=a.find(".search-query");e(c("search-icon",t)).addClass("glyphicon glyphicon-search"),e(c("search-button",t)).on("touchstart click",(function(s){s.preventDefault(),a.toggleClass("invisible"),e("body").toggleClass("body--full-screen-search"),l.focus()})),e(c("search-form",a)).on("touchstart click",(function(s){e(s.target).hasClass("search-query")||o()})),e(document).keydown((function(e){27===e.which&&!a.hasClass("invisible")&&o()}))}}}(jQuery,Drupal,once);
1562/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/themes/contrib/dxpr_theme/js/minified/dxpr-theme-full-screen-search.min.js. */;
1563/* Source and licensing information for the line(s) below can be found at https://www.appeon.com/modules/custom/appeon_cookies/js/appeon_cookies.js. */
1564(function ($, Drupal, document) {
1565  $(document).ready(function () {
1566    var intervalBlockCookies;
1567    function deleteAllAppeonCookies() {
1568      // 遍历所有cookie
1569      $.each($.cookie(), function (key, value) {
1570        var remove = true;
1571        var hostname = window.location.hostname;
1572        var cookieRemoved = false;
1573        var index = 0;
1574        //request_a_quote和request_a_quote_fixed为store站点quote功能必须的Cookie
1575        var isAllowed = ['appeon_eu','request_a_quote','request_a_quote_fixed'];
1576        //SESS和SSESS Drupal 中的会话 Cookie  
1577        if(isAllowed.includes(key) || key.indexOf('SESS') === 0 || key.indexOf('SSESS') === 0){
1578          remove = false;
1579        }
1580        if (remove) {
1581          while (!cookieRemoved && hostname !== '') {
1582            // Attempt to remove.
1583            $.removeCookie(key, {domain: '.' + hostname, path: '/'});
1584            cookieRemoved = !$.cookie(key);
1585            if (!cookieRemoved) {
1586              $.removeCookie(key, {domain: hostname, path: '/'});
1587              cookieRemoved = !$.cookie(key);
1588            }
1589            index = hostname.indexOf('.');
1590            // We can be on a sub-domain, so keep checking the main domain as well.
1591            hostname = (index === -1) ? '' : hostname.substring(index + 1);
1592          }
1593          // Some jQuery Cookie versions don't remove cookies well.  Try again
1594          // using plain js.
1595          if (!cookieRemoved) {
1596            document.cookie = key + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;';
1597          }
1598        }
1599      });
1600    }
1601
1602    var blockCookies = function () {
1603      var cookieJson = $.cookie('appeon_cookies');
1604      if (typeof cookieJson !== 'undefined') {
1605        clearInterval(intervalBlockCookies);
1606        return false;
1607      } else {
1608        deleteAllAppeonCookies();
1609      }
1610    };
1611
1612    function initB() {
1613      gtag('consent', 'default', {
1614        'ad_storage': 'denied',
1615        'ad_user_data': 'denied',
1616        'ad_personalization': 'denied',
1617        'analytics_storage': 'denied',
1618        'functionality_storage': 'denied'
1619      });
1620
1621      var getEu = $.cookie('appeon_eu');
1622      if (typeof getEu === 'undefined') {
1623        $.get('/appeon_cookies/get-eu', function (json) {
1624          var is_get_eu = {is_eu: false};
1625          if (json.isEU) {
1626            is_get_eu.is_eu = true;
1627            eu_banner();
1628          } else {
1629            no_eu_banner();
1630          }
1631          $.cookie('appeon_eu', JSON.stringify(is_get_eu), {
1632            expires: 7,
1633            path: '/',
1634            domain: 'appeon.com',
1635            sameSite: 'strict'
1636          });
1637        });
1638      } else {
1639        var getEuData = JSON.parse(getEu);
1640        if (getEuData.is_eu) {
1641          eu_banner();
1642        } else {
1643          no_eu_banner();
1644        }
1645      }
1646
1647      var cookieJson = $.cookie('appeon_cookies');
1648      if (typeof cookieJson === 'undefined') {
1649        intervalBlockCookies = setInterval(blockCookies, 5000);
1650        bannerShow();
1651      } else {
1652        bannerHide();
1653        var cookiePre = JSON.parse(cookieJson);
1654        if (cookiePre.performance_cookies) {
1655          gtag('consent', 'update', {
1656            'analytics_storage': 'granted'
1657          });
1658          gtag('consent', 'update', {
1659            'functionality_storage': 'granted'
1660          });
1661        }
1662
1663        if (cookiePre.targeting_cookies) {
1664          gtag('consent', 'update', {
1665            'ad_storage': 'granted',
1666            'ad_user_data': 'granted',
1667            'ad_personalization': 'granted',
1668          });
1669        }
1670      }
1671
1672    }
1673
1674    function eu_banner() {
1675      $('.eu_banner.cookiesjsr-banner--text').css('display', 'block');
1676      $('.eu_banner.cookiesjsr-banner--action').css('display', 'flex');
1677      $('.no_eu_banner.cookiesjsr-banner--text').css('display', 'none');
1678      $('.no_eu_banner.cookiesjsr-banner--action').css('display', 'none');
1679    }
1680
1681    function no_eu_banner() {
1682      $('.no_eu_banner.cookiesjsr-banner--text').css('display', 'block');
1683      $('.no_eu_banner.cookiesjsr-banner--action').css('display', 'flex');
1684      $('.eu_banner.cookiesjsr-banner--text').css('display', 'none');
1685      $('.eu_banner.cookiesjsr-banner--action').css('display', 'none');
1686    }
1687
1688
1689    function bannerShow() {
1690      $('.cookiesjsr-banner ').addClass('active');
1691    }
1692
1693    function bannerHide() {
1694      $('.cookiesjsr-banner ').removeClass('active');
1695    }
1696
1697    function jsrLayerShow() {
1698      $('.cookiesjsr-layer--wrapper').show();
1699    }
1700
1701    function jsrLayerHide() {
1702      $('.cookiesjsr-layer--wrapper').hide();
1703    }
1704
1705
1706    function setAppeonCookies(json) {
1707      if (json.performance_cookies) {
1708        gtag('consent', 'update', {
1709          'analytics_storage': 'granted'
1710        });
1711        gtag('consent', 'update', {
1712          'functionality_storage': 'granted'
1713        });
1714      }
1715
1716      if (json.targeting_cookies) {
1717        gtag('consent', 'update', {
1718          'ad_storage': 'granted',
1719          'ad_user_data': 'granted',
1720          'ad_personalization': 'granted',
1721        });
1722      }
1723      clearInterval(intervalBlockCookies);
1724      var stringOb = JSON.stringify(json);
1725      $.cookie('appeon_cookies', stringOb, {expires: 7, path: '/', domain: 'appeon.com', sameSite: 'strict'});
1726
1727    }
1728
1729    initB();
1730
1731
1732    function requiredCookie() {
1733      var myJsonObject = {
1734        required_cookies: true,
1735        performance_cookies: false,
1736        functional_cookies: false,
1737        targeting_cookies: false
1738      };
1739      setAppeonCookies(myJsonObject)
1740    }
1741
1742    function allowAllCookie() {
1743      var myJsonObject = {
1744        required_cookies: true,
1745        performance_cookies: true,
1746        functional_cookies: true,
1747        targeting_cookies: true
1748      };
1749      setAppeonCookies(myJsonObject)
1750    }
1751
1752    function saveCookie() {
1753      var myJsonObject = {
1754        required_cookies: true,
1755        performance_cookies: false,
1756        functional_cookies: false,
1757        targeting_cookies: false
1758      };
1759      if ($('#performance_cookies').is(':checked')) {
1760        myJsonObject.performance_cookies = true;
1761        myJsonObject.functional_cookies = true;
1762      }
1763      if ($('#targeting_cookies').is(':checked')) {
1764        myJsonObject.targeting_cookies = true;
1765      }
1766      setAppeonCookies(myJsonObject)
1767    }
1768
1769    $('.cookiesjsr-service-group').on('click', function (event) {
1770      $('.cookiesjsr-service-group').removeClass('active');
1771      $(this).addClass('active');
1772    });
1773    $('.cookiesjsr-layer--close').on('click', function () {
1774      jsrLayerHide();
1775    });
1776    $('.cookiesjsr-layer--overlay').on('click', function () {
1777      jsrLayerHide();
1778    });
1779    $('.cookiesjsr-settings').on('click', function () {
1780      jsrLayerShow();
1781    });
1782
1783    //input id: targeting_cookies performance_cookies
1784    $('.cookiesjsr-switch').on('click', function (event) {
1785      event.preventDefault();
1786      var _this = $(this);
1787      if (_this.hasClass('active')) {
1788        _this.removeClass('active');
1789        _this.attr('title', 'Denied');
1790        _this.find('input').prop('checked', false);
1791      } else {
1792        _this.addClass('active');
1793        _this.attr('title', 'Allowed');
1794        _this.find('input').prop('checked', true);
1795      }
1796    });
1797
1798    //banner
1799    $('.cookiesjsr-banner--action .allowAll').on('click', function () {
1800      allowAllCookie();
1801      bannerHide();
1802    });
1803
1804    $('.allowRequired').on('click', function () {
1805      requiredCookie();
1806      bannerHide();
1807    });
1808
1809    //settings
1810    $('.cookiesjsr-layer--actions .allowAll').on('click', function () {
1811      allowAllCookie();
1812      jsrLayerHide();
1813      bannerHide();
1814    });
1815    $('.cookiesjsr-layer--actions .save').on('click', function () {
1816      saveCookie();
1817      jsrLayerHide();
1818      bannerHide();
1819    })
1820  })
1821})(jQuery, Drupal, this.document);
1822
1823/* Source and licensing information for the above line(s) can be found at https://www.appeon.com/modules/custom/appeon_cookies/js/appeon_cookies.js. */;

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.