1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function(Drupal,drupalSettings,once){'use strict';const getCookie=(name)=>{const prefix=`${encodeURIComponent(name)}=`;const cookie=document.cookie.split(';').map((value)=>value.trim()).find((value)=>value.startsWith(prefix));return cookie?cookie.substring(prefix.length):'';};const parseGroupList=(value)=>new Set(String(value||'').split(',').map((group)=>group.trim()).filter(Boolean));const getPersistedGroups=()=>{const consentCookie=getCookie('OptanonConsent');const groups=new URLSearchParams(consentCookie).get('groups')||'';return new Set(groups.split(',').filter((group)=>group.endsWith(':1')).map((group)=>group.split(':',1)[0]));};const getActiveGroups=()=>{const globalGroups=window.OnetrustActiveGroups||window.OptanonActiveGroups;if(globalGroups)return parseGroupList(globalGroups);const consentUpdate=[...(window.dataLayer||[])].reverse().find((item)=>item?.OnetrustActiveGroups);if(consentUpdate)return parseGroupList(consentUpdate.OnetrustActiveGroups);return getPersistedGroups();};const hasGlobalPrivacyControl=()=>{const consentCookie=getCookie('OptanonConsent');const consent=new URLSearchParams(consentCookie);return navigator.globalPrivacyControl===true||consent.get('isGpcEnabled')==='1'||consent.get('browserGpcFlag')==='1';};const hasConsent=(requiredGroup)=>{if(hasGlobalPrivacyControl())return false;return !requiredGroup||(getActiveGroups().has(requiredGroup)&&getPersistedGroups().has(requiredGroup));};const USER_PATH=/^\/(?:[a-z]{2}\/)?user(?:\/|$)/i;const MAXIMUM_DECODE_PASSES=5;const decodeOnce=(value)=>value.replace(/%([0-9a-f]{2})/gi,(match,hex)=>String.fromCharCode(parseInt(hex,16)));const isUserPath=(path)=>{let candidate=path;for(let pass=0;pass<=MAXIMUM_DECODE_PASSES;pass++){if(USER_PATH.test(candidate))return true;const decoded=decodeOnce(candidate).replace(/\/+/g,'/');if(decoded===candidate)return false;candidate=decoded;}return true;};const getCompletionPath=()=>{const path=window.location.pathname||'/';return isUserPath(path)?'':path;};const sendReport=(settings,payload)=>{if(!hasConsent(settings.requiredConsentGroup))return;fetch(settings.endpoint,{method:'POST',credentials:'same-origin',headers:{'Content-Type':'application/json'},keepalive:true,body:JSON.stringify(payload)}).catch(()=>{});};Drupal.behaviors.pgiRoleReporting={attach(context){const settings=drupalSettings.pgiRoleReporting;if(!settings?.enabled)return;once('pgi-role-reporting','html',context).forEach(()=>{document.addEventListener('pgi:attestationComplete',(event)=>{const roleCode=event.detail?.role?.code;const regionCode=event.detail?.region?.code;const selectionContext=event.detail?.selectionContext;if(!roleCode||!regionCode||!selectionContext)return;sendReport(settings,{event_type:'completion',role_code:roleCode,region_code:regionCode,selection_context:selectionContext,completion_path:getCompletionPath()});});document.addEventListener('pgi:attestationValidationError',(event)=>{const errorCode=event.detail?.reason;const regionCode=event.detail?.region?.code;if(!errorCode||!regionCode)return;sendReport(settings,{event_type:'validation_error',region_code:regionCode,error_code:errorCode});});});}};})(Drupal,drupalSettings,once);; 3(function(Drupal){'use strict';const state={initialized:false,pendingRestore:false,scrollY:null,resetTimer:null};function getClosestTrigger(target){if(!target||typeof target.closest!=='function')return null;return target.closest('a, button, input[type="submit"], form');}function isLayoutAjaxUrl(url){if(!url)return false;return url.includes('/layout_builder/')||url.includes('/layout?')||url.includes('/layout/');}function isLayoutBuilderPage(){return !!(document.body&&(document.body.classList.contains('layout-builder')||window.location.pathname.includes('/layout')));}function collapseCategories(context){const wrappers=context.querySelectorAll('.js-layout-builder-categories');wrappers.forEach((wrapper)=>{const details=wrapper.querySelectorAll('details');details.forEach((item,index)=>{if(index!==1)item.removeAttribute('open');});});}function rememberScrollPosition(event){const trigger=getClosestTrigger(event.target);if(!trigger)return;const href=trigger.getAttribute('href')||trigger.getAttribute('action')||'';const inLayoutUI=!!trigger.closest('.layout-builder, #drupal-off-canvas, .ui-dialog');const isLayoutActionLink=isLayoutAjaxUrl(href);if(!inLayoutUI&&!isLayoutActionLink)return;state.scrollY=window.scrollY||window.pageYOffset||0;state.pendingRestore=true;}function restoreScrollPosition(){if(!state.pendingRestore||state.scrollY===null)return;const target=state.scrollY;window.requestAnimationFrame(()=>{window.scrollTo(0,target);});window.setTimeout(()=>{if(state.pendingRestore)window.scrollTo(0,target);},180);window.clearTimeout(state.resetTimer);state.resetTimer=window.setTimeout(()=>{state.pendingRestore=false;state.scrollY=null;},1200);}Drupal.behaviors.layoutBuilderBlockStyling={attach(context){if(!isLayoutBuilderPage())return;collapseCategories(context);if(state.initialized)return;state.initialized=true;document.addEventListener('click',rememberScrollPosition,true);document.addEventListener('submit',rememberScrollPosition,true);if(window.jQuery)window.jQuery(document).on('ajaxComplete.pgiLayoutBuilderScroll',()=>{if(!state.pendingRestore)return;restoreScrollPosition();collapseCategories(document);});}};})(Drupal);;
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.