PageSourceSearch

https://arce.org/wp-content/themes/arce/assets/js/main.js?ver=1790120227

js arce.org collected 2026-09-24 08:44:21 UTC 42,102 bytes, 599 lines download raw bytes

1
2
3/** Facets */
4(function($) {
5  document.addEventListener('facetwp-loaded', function() {
6      // var query_string = window.location.search;
7      // if ( '' === query_string ) { // no facets are selected
8      //     document.querySelector('.facet-reset').style.display = 'none';
9      // }
10      // else {
11      //   document.querySelector('.facet-reset').style.display = 'inline-block';
12      // }
13      $(".filter-drop").removeClass("open");
14      console.log("facet loaded event");
15  });
16})(jQuery);
17
18/**
19 * Accordion-folding functionality.
20 */
21
22 ( function( $ ){
23
24	$( function () {
25
26		// Expand/Collapse accordion sections on click.
27		$( '.c-accordion__list-item .c-accordion__header' ).on( 'click keydown', function( e ) {
28			if ( e.type === 'keydown' && 13 !== e.which ) { // "Return" key.
29				return;
30			}
31
32			// if user is clicking on a link tag let it do its thing
33			if ( e.target.tagName.toLowerCase() === 'a' ) {
34				return;
35			}
36
37			// if parent of clicked element is a tag then just return
38			if ( e.target.parentElement.tagName.toLowerCase() === 'a' ) {
39				return;
40			}
41
42			e.preventDefault(); // Keep this AFTER the key filter above.
43
44			accordionSwitch( $( this ) );
45		});
46
47	});
48
49	/**
50	 * Close the current accordion section and open a new one.
51	 *
52	 * @param {Object} el Title element of the accordion section to toggle.
53	 * @since 3.6.0
54	 */
55	function accordionSwitch ( el ) {
56		// section is the parent div of el
57		var section = el.parent(),
58			sectionToggleControl = section.find( '[aria-expanded]' ).first(),
59			container = section.closest( '.accordion-container' ),
60			siblings = container.find( '.open' ),
61			siblingsToggleControl = siblings.find( '[aria-expanded]' ).first(),
62			content = section.find( '.accordion__body' );
63
64		// This section has no content and cannot be expanded.
65		if ( section.hasClass( 'cannot-expand' ) ) {
66			return;
67		}
68
69		// Add a class to the container to let us know something is happening inside.
70		// This helps in cases such as hiding a scrollbar while animations are executing.
71		container.addClass( 'opening' );
72
73		if ( section.hasClass( 'open' ) ) {
74			section.toggleClass( 'open' );
75			content.toggle( true ).slideToggle( 150 );
76		} else {
77			siblingsToggleControl.attr( 'aria-expanded', 'false' );
78			siblings.removeClass( 'open' );
79			siblings.find( '.accordion__body' ).show().slideUp( 150 );
80			content.toggle( false ).slideToggle( 150 );
81			section.toggleClass( 'open' );
82		}
83
84		// We have to wait for the animations to finish.
85		setTimeout(function(){
86		    container.removeClass( 'opening' );
87		}, 150);
88
89		// If there's an element with an aria-expanded attribute, assume it's a toggle control and toggle the aria-expanded value.
90		if ( sectionToggleControl ) {
91			sectionToggleControl.attr( 'aria-expanded', String( sectionToggleControl.attr( 'aria-expanded' ) === 'false' ) );
92		}
93	}
94
95})(jQuery);
96
97
98
99(function($) {
100
101  /**
102   * On page load, check if there is a hash in the URL and if it matches an accordion item, open that item.
103   */
104  document.addEventListener('DOMContentLoaded', function () {
105    var urlParams = new URLSearchParams(window.location.search);
106
107    // Check if 'tab' parameter exists
108    if (urlParams.has('tab')) {
109      var tabValue = urlParams.get('tab') || 1;
110      var tabindex = tabValue;
111
112      jQuery(".full-tab-buttons-fellowship button").removeClass("active");
113      jQuery(".tab-content-fellowship > div").removeClass("active");
114      jQuery(".full-tab-buttons-fellowship button:eq(" + (tabindex - 1) + ")").addClass("active");
115      jQuery(".tab-content-fellowship > div:eq(" + (tabindex - 1) + ")").addClass("active");
116
117    }
118
119    // Check if 'accordion' parameter exists
120    if (urlParams.has('accordion')) {
121      var accordionValue = urlParams.get('accordion') || 1;
122      // Replace this with your logic for handling the 'accordion' parameter
123      console.log('Accordion parameter is:', accordionValue);
124
125      var index = parseInt(accordionValue, 10) - 1; // Convert to zero-based index
126
127      // If there is defined tab target the accordion item within that tab, else target the first accordion item
128      if (urlParams.has('tab')) {
129        var tabValue = urlParams.get('tab') || 1;
130        var tabindex = tabValue;
131        var firstAccordion = jQuery('.tab-content-fellowship > div').eq(tabindex - 1);
132        var accordionItem = firstAccordion.find('.c-accordion__list-item').eq(index);
133      } else {
134        var firstAccordion = jQuery('.accordian-container').first();
135        var accordionItem = firstAccordion.find('.c-accordion__list-item').eq(index);
136      }
137
138      // Check if the item exists
139      if (accordionItem.length) {
140        var accordionHeader = accordionItem.find('.c-accordion__header');
141        setTimeout(function() {
142            accordionHeader.trigger('click'); // Open the accordion item
143            // Scroll to the accordion item with 75px offset
144            jQuery('html, body').animate({
145                scrollTop: accordionItem.offset().top - 75
146            }, 500);
147        }, 500); // Adjust the timeout as needed
148      }
149    }
150
151  });
152
153   $('#navBtn').on('click', function(e){
154      $(".nav-group").toggleClass('open');
155      $("#navBtn").toggleClass('active');
156  });
157  
158   $('.filter-btn').on('click', function(e){
159      e.preventDefault();
160      if (!($(".filter-drop").hasClass("open"))){
161         $(".js-facets-checkbox-links").css("display","none");
162      }
163      $(".filter-drop").toggleClass('open');
164      $(".cal-controls .filters > ul").toggleClass('open');
165      $(".controls").toggleClass('open');
166      $(".filter-btn").toggleClass('active');
167  });
168  
169   $('.proj-controls ul li.top a').on('click', function(e){
170      e.preventDefault();
171      if ($(".filter-drop").hasClass("open")){
172         
173         if (!($(".filter-drop .block-facets-ajax:eq("+($(this).parent().prevAll().length - 1)+")").length>0) || $(".filter-drop .block-facets-ajax:eq("+($(this).parent().prevAll().length - 1)+")").hasClass('facet-active') ){
174            $(".filter-drop").toggleClass('open');
175            $(".proj-controls ul li a").removeClass("active");
176            $(".filter-drop .block-facets-ajax").removeClass("facet-active").addClass("facet-inactive");
177            $(".controls").toggleClass('open');
178
179         } else {
180            $(".proj-controls ul li a").removeClass("active");
181            $(this).toggleClass('active');
182            $(".filter-drop .block-facets-ajax").removeClass("facet-active").addClass("facet-inactive");
183            $(".filter-drop .block-facets-ajax:eq("+($(this).parent().prevAll().length - 1)+")").removeClass("facet-inactive").addClass("facet-active");
184         }
185      }
186      else {
187         /** Open nav */
188         $(this).toggleClass('active');
189         $('.filters ul li a').not($(this)).removeClass('active');
190         $(".filter-drop .block-facets-ajax").removeClass("facet-active").addClass("facet-inactive");
191         $(".filter-drop").toggleClass('open');
192         $(".filter-drop .block-facets-ajax:eq("+($(this).parent().prevAll().length - 1)+")").removeClass("facet-inactive").addClass("facet-active");
193         $(".controls").toggleClass('open');
194      }
195  });
196  
197   $('.cal-controls ul li a').on('click', function(e){
198     $(this).toggleClass('active');
199     $('.cal-controls ul li a').not($(this)).removeClass('active');
200     $(this).next(".sub").toggleClass('open');
201     $('.sub').not($(this).next()).removeClass('open');
202  });
203  
204   $('.cal-item .lt .add').on('click', function(e){
205      e.preventDefault();
206      $(this).toggleClass('open');
207      $(this).next(".cal-item .lt ul").toggleClass('open');
208  });
209  
210  if ($(".toggle .switch").length > 0){
211      $('.toggle .switch').on('click', function(e){
212         e.preventDefault();
213         $(this).parent().find('.switch').removeClass("active");
214         $(this).addClass("active");
215         if ($(this).hasClass("map")){
216            $(".proj-controls .filters").css("visibility","hidden");
217            $(".proj-grid, .pagination, .filter-toolbar").css("display","none");
218            $(".map-wrap").css("display","block");
219         }
220         else {
221            $(".proj-controls .filters").css("visibility","visible");
222            $(".proj-grid, .pagination").css("display","block");
223            if ($(".showing.filter-toolbar ul li").length > 1){
224               $(".filter-toolbar").css("display","initial");
225            }
226            $(".map-wrap").css("display","none");
227         }
228      });
229  }
230  
231   $('.grid .contain').each(function(){
232      var highestBox = 0;
233      $('.cont', this).each(function(){
234         if($(this).height() > highestBox) {
235         highestBox = $(this).height();
236         }
237      });
238      if (!$(this).hasClass("noautoheight")) $('.cont',this).height(highestBox);
239   });
240
241   const previous_arrow_svg = '<svg width="24px" height="36px" viewBox="0 0 24 36" class="slick-arrow prev"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(12.736842, 18.000000) scale(-1, 1) translate(-12.736842, -18.000000) translate(2.000000, 1.000000)" stroke="#FFFFFF" stroke-width="1.5"><polyline points="0 0 21.4736842 17 21.4736842 17 0 34"></polyline></g></g></svg>';
242	 const next_arrow_svg = '<svg width="24px" height="36px" viewBox="0 0 24 36" class="slick-arrow next"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(1.000000, 1.000000)" stroke="#FFFFFF" stroke-width="1.5"><polyline points="0 0 21.4736842 17 21.4736842 17 0 34"></polyline></g></g></svg>';
243	 const events_arrow_svg = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 38 38" xml:space="preserve"><style>path{fill:#fff}</style><path d="M21.7 30.1 9.5 19 21.7 7.9l2 2.5-9.4 8.6 9.5 8.6-2.1 2.5z"/></svg>';
244  
245  $('.feat-slider-wrap .slider').slick({
246      infinite: true,
247      slidesToShow: 3,
248      slidesToScroll: 1,
249      autoplay: true,
250      autoplaySpeed: 5000,
251      responsive: [
252         {
253            breakpoint: 992,
254            settings: {
255               slidesToShow: 2
256            }
257         },
258         {
259            breakpoint: 600,
260            settings: {
261               slidesToShow: 1
262            }
263         }
264      ]
265   }); 
266
267   $('.research-programs-slider').slick({
268		infinite: false,
269		arrows: false,
270		dots: false,
271		slidesToShow: 1,
272		slidesToScroll: 1,
273		autoplay: false,
274		variableWidth: true,
275		mobileFirst: true,
276		responsive: [
277			{
278				breakpoint: 767,
279				settings: 'unslick',
280			},
281		],
282	});
283  
284   $('.hero-slider').slick({
285      infinite: true,
286      arrows: true,
287      dots: true,
288      slidesToShow: 1,
289      slidesToScroll: 1,
290      autoplay: true,
291      autoplaySpeed: 5000,
292      prevArrow:'<svg width="24px" height="36px" viewBox="0 0 24 36" class="slick-arrow prev"> <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Group-14-Copy-3" transform="translate(12.736842, 18.000000) scale(-1, 1) translate(-12.736842, -18.000000) translate(2.000000, 1.000000)" stroke="#FFFFFF" stroke-width="1.5"> <polyline id="Triangle-2" points="0 0 21.4736842 17 21.4736842 17 0 34"></polyline> </g> </g> </svg>',
293      nextArrow:'<svg width="24px" height="36px" viewBox="0 0 24 36" class="slick-arrow next"> <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Group-9" transform="translate(1.000000, 1.000000)" stroke="#FFFFFF" stroke-width="1.5"> <g id="Group-14-Copy-2"> <polyline id="Triangle-2" points="0 0 21.4736842 17 21.4736842 17 0 34"></polyline> </g> </g> </g> </svg>'
294   }); 
295
296   $('.upcoming-events-slider').slick({
297    infinite: false,
298    arrows: true,
299    dots: false,
300    slidesToShow: 1,
301    slidesToScroll: 1,
302    autoplay: false,
303    variableWidth: true,
304    prevArrow: events_arrow_svg,
305    nextArrow: events_arrow_svg,
306    appendArrows: '.events-arrows',
307  });
308 
309   /* site share links */
310   $('#shareFacebook').on('click', function(e){
311      e.preventDefault();
312      var url = $(this).data('url') ? $(this).data('url') : encodeURIComponent(window.location.href);
313      window.open('https://www.facebook.com/sharer/sharer.php?u='+url);
314   });
315
316   $('#shareTwitter').on('click', function(e){
317      e.preventDefault();
318      var url = $(this).data('url') ? $(this).data('url') : encodeURIComponent(window.location.href);
319      var msg = $(this).data('msg')
320      window.open('https://twitter.com/home?status='+msg+' - '+url+'&url='+url);
321   });
322
323   $('#shareMail').on('click', function(e){
324      e.preventDefault();
325      var url = $(this).data('url') ? $(this).data('url') : encodeURIComponent(window.location.href);
326      var msg = $(this).data('msg')
327      location.href = 'mailto:?subject='+msg+'&body='+url;
328   });
329
330   var getTimeZone = function () {
331      var offset = new Date().getTimezoneOffset(), o = Math.abs(offset);
332      return (offset < 0 ? "+" : "-") + ("00" + Math.floor(o / 60)).slice(-2) + ":" + ("00" + (o % 60)).slice(-2);
333   };
334
335   /* calendar share links */
336   $( ".add.caption" ).each(function( index ) {
337      var thisTime = moment($(this).data('time')?$(this).data('time').toLowerCase().replace('a.m.','am').replace('p.m.','pm'):'', ["h:mm A"]).format('HH:mm:ss');
338      $(this).addcalevent({ 
339         'data': {
340           "title":$(this).data('title'),
341           "desc":$(this).data('desc'), 
342           "location": $(this).data('location'),
343           "url": $(this).data('url'),
344           "time":{
345           "start":$(this).data('start')+' '+thisTime,
346           "end":$(this).data('end')+' '+thisTime,
347           "zone":getTimeZone()
348         },
349         },
350         });
351    });
352  
353
354   //  $(".facet-item .is-active").each(function(){
355   //      var tid = $(this).parent().find('a').data('drupal-facet-item-id');
356   //      if ($('.controls .showing ul li[rel='+tid+']').length == 0){
357   //        $(".controls .showing ul").append('<li style="cursor:pointer;" rel='+tid+'>'+$(this).parent().find('.facet-item__value').html()+' <span><img src="/themes/custom/arce/img/close-icon.svg"></span></li>');
358   //      }
359   //  }, function(){
360   //  });
361
362  
363  $('.proj-controls').delegate('.facets-widget-checkbox .top', 'click', function(){
364      var band = $(this).parent().find('.js-facets-checkbox-links');
365      band.slideToggle(300);
366      $('.band .cont').not(band).slideUp(300);
367      $(this).toggleClass('active');
368      $('.band .top').not($(this)).removeClass('active');
369   });
370
371    $('.showing ul').delegate('li', 'click', function () {
372         var id = $(this).attr("rel");
373         $("#"+id).click();
374   });
375
376   /* search box */
377   $("#search-close").on('click', function(e){
378      e.preventDefault();
379      $("#search-form").parent().removeClass("open");
380   });
381   $("#main-search-icon").on('click', function(e){
382      e.preventDefault();
383      $("#search-form").parent().addClass("open");
384      $("#search-field").focus();
385   });
386   // $( "#search-field" ).keyup(function() {
387   //    var $input = $("#search-field").val();
388   //    if ($input && $input.length>0){
389   //       $("li.search").addClass("open");
390   //    }
391   //  });
392
393   /** fellowship landing page */
394   $(".full-tab-buttons-fellowship button").on('click', function(e){
395      e.preventDefault();
396      if (!$(this).hasClass("external-link")) {
397        $(this).parent().children('button').removeClass("active");
398        $(".tab-content-fellowship > div").removeClass("active");
399        $(this).addClass("active");
400        $("#" + $(this).attr("id") + '-tab').addClass("active");
401        var tabindex = $(".tab-content-fellowship > div.active").index() + 1;
402        history.replaceState(null, null, '#tab' + tabindex);
403      }
404   });
405
406   // onload check if #tab-x is in url
407    if (window.location.hash) {
408      var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
409      if (hash.indexOf("tab") > -1) {
410        var tabindex = hash.replace("tab", "");
411        $(".full-tab-buttons-fellowship button").removeClass("active");
412        $(".tab-content-fellowship > div").removeClass("active");
413        $(".full-tab-buttons-fellowship button:eq(" + (tabindex - 1) + ")").addClass("active");
414        $(".tab-content-fellowship > div:eq(" + (tabindex - 1) + ")").addClass("active");
415      }
416    }
417
418  })(jQuery);
419
420/*!
421* Cookie Consent
422* https://cookieconsent.insites.com/
423* https://github.com/insites/cookieconsent
424*/
425"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()}
vendor: 1,299 bytes, line 425
425,setCookie:function(e,t,i,n,o,s){var r=new Date;r.setHours(r.getHours()+24*(i||365));var a=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t<i;++t)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){return e=this.normaliseHex(e),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"===_typeof(e)
vendor: 8,046 bytes, line 425
425&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"https://www.cookiesandyou.com",close:"&#x274c;",target:"_blank",policy:"Cookie Policy"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}">\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e</div>',revokeBtn:'<div class="cc-revoke {{classes}}">{{policy}}</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(n){var o=this.options,s=document.createElement("div"),r=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a)),a}function l(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}return o.prototype.initialise=function(i){this.options&&this.destroy(),t.deepExtend(this.options={},n),t.isPlainObject(i)&&t.deepExtend(this.options,i),function(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options,n="top"==i.position||"bottom"==i.position?"banner":"floating";t.isMobile()&&(n="floating");var o=["cc-"+n,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&o.push("cc-static");o.push.apply(o,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||l(a.background))]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var h=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++h)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&o.push(this.customStyleSelector);return o}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info);e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];o||(o=i.layouts.basic);return t.interpolateString(o,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var r=c.call(this,'<div class="cc-grower">'+o+"</div>");r.style.display="",this.element=r.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=c.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var r=function
425 t(o){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",t,{passive:!0}),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=r,window.addEventListener("scroll",r,{passive:!0}
vendor: 9,121 bytes, line 425
425))}var a=this.options.dismissOnWindowClick,c=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,r=o.path.length,a=c.length,u=0;u<r;u++)if(!s)for(var h=0;h<a;h++)s||(s=t.hasClass(o.path[u],c[h]));s||(i(e.status.dismiss),n(!0),window.removeEventListener("click",l),window.removeEventListener("touchend",l),this.onWindowClick=null)}.bind(this);this.options.enabled&&(this.onWindowClick=l,window.addEventListener("click",l),window.addEventListener("touchend",l))}}).call(this),function(){"info"!=this.options.type&&(this.options.revokable=!0);t.isMobile()&&(this.options.animateRevokable=!1);if(this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" ")).replace("{{policy}}",this.options.content.policy);this.revokeBtn=c.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<20&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>o&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen()},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&r.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex<this.options.services.length&&!e);return e},i.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},i.prototype.locate=function(e,t){var i=this.getNextService();i?(this.callbackComplete=e,this.callbackError=t,this.runService(i,this.runNextServiceOnError.bind(this))):t(new Error("No services to run"))},i.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},i.prototype.runService=function(e,t){var i=this;e&&e.url&&e.callback&&(e.isScript?n:o)(this.setupUrl(e),function(n){var o=n?n.responseText:"";e.__JSONP_DATA&&(o=e.__JSONP_DATA,delete e.__JSONP_DATA),i.runServiceCallback.call(i,t,e,o)},this.options.timeout,e.data,e.headers)},i.prototype.runServiceCallback=function(e,t,i){var n=this,o=t.callback(function(t){o||n.onServiceResult.call(n,e,t)},i);o&&this.onServiceResult.call(this,e,o)},i.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},i.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},i.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}:"function"==typeof e?e():t.isPlainObject(e)?e:{}},i.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},i.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.warn("The service["+t+"] ("+i.url+") responded with the following error",e)},i}(),e.Law=function(){var e={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","
425NO","PL","PT","SK","ES","SE","GB","UK","GR","EU","RO"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","NO","PT","ES"],explicitAction:["HR","IT","ES","NO"]};function i(e){this.initialise.apply(this,arguments)}return i.prototype.initialise=function(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i)},i.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);n||(n=function(){}),o||(o=function(){});var r=Object.keys(e.status),a=t.getCookie("cookieconsent_status");r.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});
426
427/*!
428* Initialization of Cookie Consent banner
429*/
430  window.addEventListener("load", function(){
431    function getCookie(name) {
432      let matches = document.cookie.match(new RegExp(
433        "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
434      ));
435      return matches ? decodeURIComponent(matches[1]) : undefined;
436    }
437
438    function hideBanner(){
439      try {
440        var banner = document.querySelector('.cc-revoke');
441        banner.style.display = 'none';
442      } catch(e){
443
444      }
445    }
446
447    window.cookieconsent.initialise({
448      "theme": "classic",
449      "type": "opt-in",
450      "palette": {
451        "popup": {
452          "background": "#374c91",
453          "text": "#ffffff"
454        },
455        "button": {
456          "background": "#fccf2d",
457          "text": "#000000"
458        }
459      },
460      "content": {
461          "href": "https://www.arce.org/privacy-policy"
462      },
463      "location": {
464        "serviceDefinitions": {
465          ipstack: function(options) {
466            return {
467              url: '//api.ipstack.com/check?access_key=77fa6f55e77d4bbeb5dfb8fb4ddf9140&fields=country_code',
468              callback: function(done, response) {
469                try {
470                  var json = JSON.parse(response);
471                  if (json.country_code) {
472                    // console.log(json.country_code);
473                    return {code: json.country_code};
474                  }
475                  throw 'Could not find a country code in the response';
476                } catch (err) {
477                  return new Error('Invalid response (' + err + ')');
478                }
479              },
480            };
481          },
482        },
483        "services": ['ipstack']
484      },
485      onInitialise: function (status) {
486        var type = this.options.type;
487        var didConsent = this.hasConsented();
488        if (type == 'opt-in' && didConsent) {
489          // enable cookies
490          // hide dataLayer.  Change to GA.
491          //dataLayer.push({'event':'allowcookies'});
492          enableTracking();
493        }
494        if (type == 'opt-out' && !didConsent) {
495          // disable cookies
496        }
497      },
498      onStatusChange: function(status, chosenBefore) {
499        var type = this.options.type;
500        var didConsent = this.hasConsented();
501        if (type == 'opt-in' && didConsent) {
502          // enable cookies
503          enableTracking();
504        }
505        if (type == 'opt-out' && !didConsent) {
506          // disable cookies
507        }
508      },
509      onRevokeChoice: function() {
510        var type = this.options.type;
511        if (type == 'opt-in') {
512          // disable cookies
513          disableTracking();
514        }
515        if (type == 'opt-out') {
516          // enable cookies
517          enableTracking();
518        }
519      },
520      onNoCookieLaw: function (countryCode, country) {
521        // No cookie laws - set an allow cookie
522        var d = new Date();
523        d.setTime(d.getTime() + (365*24*60*60*1000));
524        var expires = "expires="+ d.toUTCString();
525        document.cookie = 'cookieconsent_status' + "=" + 'allow' + ";" + expires + ";path=/";
526        document.cookie = 'cookieconsent_visibility' + "=" + 'hide' + ";" + expires + ";path=/";
527        hideBanner();
528      }
529    });
530
531    function disableTracking() {
532      gtag('consent', 'default', {
533         'ad_storage': 'denied',
534      });
535    }
536
537    function enableTracking() {
538      gtag('consent', 'update', {
539        'ad_storage': 'granted',
540      });
541    }
542
543    if(getCookie('cookieconsent_visibility')){
544      hideBanner();
545    }
546  });
547(function() {
548	tinymce.PluginManager.add('shortcodes_button', function( editor, url ) {
549		editor.addButton( 'shortcodes_button', {
550			title: 'Button',
551			type: 'menubutton',
552			icon: 'plus',
553			menu: [
554				{
555					text: 'Button',
556					onclick: function() {
557						editor.windowManager.open( {
558						title: 'Button',
559						icon: 'plus',
560						body: [
561						{
562							type: 'textbox',
563							name: 'text',
564							label: 'Text'
565						},
566						{
567							type: 'textbox',
568							name: 'link',
569							label: 'Link (URL)'
570						},
571						{
572							type: 'listbox',
573							name: 'target',
574							label: 'Open link in',
575							'values': [
576								{text: 'Same screen', value: '_self'},
577								{text: 'New tab', value: '_blank'},
578							]
579						},
580						{
581							type: 'listbox',
582							name: 'alignment',
583							label: 'Alignment',
584							'values': [
585								{text: 'Left', value: 'left'},
586								{text: 'Center', value: 'center'},
587								{text: 'Right', value: 'right'},
588							]
589						}],
590						onsubmit: function( e ) {
591							editor.insertContent( '[button link="' + e.data.link + '" target="' + e.data.target + '" alignment="' + e.data.alignment + '"]' + e.data.text + '[/button]');
592						}
593					});
594					}
595				}
596			]
597		});
598	});
599})();

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.