PageSourceSearch

https://www.doctorswithoutborders.org/sites/default/files/js/js_rN…6aYbFdD_EUq5JdYLmYf4KhGd7uz51wTFPYB_wHB-K5f

js doctorswithoutborders.org collected 2026-09-24 06:50:32 UTC 17,485 bytes, 6 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2!function(i,n){n.behaviors.quickSignup={attach:function(n,e){var c=i("#js-signup-close"),u=i("#js-signup-open"),l=i("#block-headeremailsignup"),a=i('#block-headeremailsignup input[type="email"]');i(u,n).unbind("click").click(function(i){i.preventDefault(),l.show(),a.focus()}),i(c,n).unbind("click").click(function(i){i.preventDefault(),l.hide()})}}}(jQuery,Drupal);;
3(function(Drupal,$){'use strict';Drupal.behaviors.sourceCookie={attach:function(context,settings){var source=GetURLParameter('source');var c_src=GetURLParameter('c_src');var c_src2=GetURLParameter('c_src2');var utm_source=GetURLParameter('utm_source');var utm_medium=GetURLParameter('utm_medium');var utm_campaign=GetURLParameter('utm_campaign');var utm_content=GetURLParameter('utm_content');var utm_term=GetURLParameter('utm_term');var gclid=GetURLParameter('gclid');var expireOn=getExpirationDate();var host=(undefined!==drupalSettings&&drupalSettings.hasOwnProperty('host'))?drupalSettings.host.replace('www',''):window.location.host.replace('www','');if(typeof source!=='undefined'&&source.length)document.cookie="MSFUSA_SOURCE="+source+"; expires="+expireOn+"; path=/; domain="+host;if(typeof c_src!=='undefined'&&c_src.length)document.cookie="MSFUSA_CLASSY_SOURCE="+c_src+"; expires="+expireOn+"; path=/; domain="+host;if(typeof c_src2!=='undefined'&&c_src2.length)document.cookie="MSFUSA_CLASSY_SOURCE2="+c_src2+"; expires="+expireOn+"; path=/; domain="+host;if(typeof utm_source!=='undefined'&&utm_source.length)document.cookie="MSFUSA_UTM_SOURCE="+utm_source+"; expires="+expireOn+"; path=/; domain="+host;if(typeof utm_medium!=='undefined'&&utm_medium.length)document.cookie="MSFUSA_UTM_MEDIUM="+utm_medium+"; expires="+expireOn+"; path=/; domain="+host;if(typeof utm_campaign!=='undefined'&&utm_campaign.length)document.cookie="MSFUSA_UTM_CAMPAIGN="+utm_campaign+"; expires="+expireOn+"; path=/; domain="+host;if(typeof utm_content!=='undefined'&&utm_content.length)document.cookie="MSFUSA_UTM_CONTENT="+utm_content+"; expires="+expireOn+"; path=/; domain="+host;if(typeof utm_term!=='undefined'&&utm_term.length)document.cookie="MSFUSA_UTM_TERM="+utm_term+"; expires="+expireOn+"; path=/; domain="+host;if(typeof gclid!=='undefined'&&gclid.length)document.cookie="MSFUSA_GCLID="+gclid+"; expires="+expireOn+"; path=/; domain="+host;}};var urlsList=['donate.doctorswithoutborders.org','give.doctorswithoutborders.org'],sourcingParams=['source','c_src','c_src2','utm_medium','utm_source','utm_campaign'],cookies=['MSFUSA_SOURCE','MSFUSA_CLASSY_SOURCE','MSFUSA_CLASSY_SOURCE2','MSFUSA_UTM_MEDIUM','MSFUSA_UTM_SOURCE','MSFUSA_UTM_CAMPAIGN'],boolParamsAppended=false;var links=document.querySelectorAll('a');for(var li=0;li<links.length;li++)for(var di=0;di<urlsList.length;di++)if(links[li].href.indexOf(urlsList[di])>-1&&links[li].href.indexOf("#")===-1)links[li].href=appendSourcingParams(links[li].href);function getExpirationDate(){var current=new Date();current.setDate(current.getDate()+14);return current;}function GetURLParameter(sParam){var sPageURL=window.location.search.substring(1);var sURLVariables=sPageURL.split('&');for(var i=0;i<sURLVariables.length;i++){var sParameterName=sURLVariables[i].split('=');if(sParameterName[0]===sParam)return sParameterName[1];}}function getCookieValue(cookieName){let name=cookieName+"=";let ca=document.cookie.split(';');for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)==' ')c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length);}return false;}function appendSourcingParams(appendToURL){appendToURL=(appendToURL.indexOf('?')===-1)?appendToURL+'?':appendToURL+'&';var sourcingParamsToHandOff=[];for(var qi=0;qi<sourcingParams.length;qi++)if(GetURLParameter(sourcingParams[qi])){sourcingParamsToHandOff.push(sourcingParams[qi]+'='+GetURLParameter(sourcingParams[qi]));boolParamsAppended=true;}if(boolParamsAppended)return appendToURL+sourcingParamsToHandOff.join('&');else return appendSourcingCookieValues(appendToURL);}function appendSourcingCookieValues(appendToURL){var sourcingParamsToHandOff=[];for(var qi=0;qi<cookies.length;
3qi++){let cookieValue=getCookieValue(cookies[qi]);if(cookieValue)sourcingParamsToHandOff.push(sourcingParams[qi]+'='+cookieValue);}return appendToURL+sourcingParamsToHandOff.join('&');}})(Drupal,jQuery);;
4(function(Drupal,$){'use strict';Drupal.behaviors.prefillFormAssemblyFields={attach:function(context,settings){$(document).ready(function(){if(jQuery('#fa-form').length){let fa_form=document.querySelector('#fa-form form');if(typeof fa_form!=='undefined'&&fa_form.length){document.getElementById("tfa_89").value=getCookie('MSFUSA_SOURCE');document.getElementById("tfa_93").value=getCookie('MSFUSA_UTM_SOURCE');document.getElementById("tfa_94").value=getCookie('MSFUSA_UTM_MEDIUM');document.getElementById("tfa_95").value=getCookie('MSFUSA_UTM_TERM');document.getElementById("tfa_96").value=getCookie('MSFUSA_UTM_CONTENT');document.getElementById("tfa_97").value=getCookie('MSFUSA_UTM_CAMPAIGN');document.getElementById("tfa_98").value=getCookie('MSFUSA_GCLID');}}});}};function getCookie(cname){let name=cname+"=";let decodedCookie=decodeURIComponent(document.cookie);let ca=decodedCookie.split(';');for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)==' ')c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length);}return "";}})(Drupal,jQuery);;
5(($)=>{let cachedScrollbarWidth=null;const {max,abs}=Math;const regexHorizontal=/left|center|right/;const regexVertical=/top|center|bottom/;const regexOffset=/[+-]\d+(\.[\d]+)?%?/;const regexPosition=/^\w+/;const _position=$.fn.position;function getOffsets(offsets,width,height){return [parseFloat(offsets[0])*(typeof offsets[0]==='string'&&offsets[0].endsWith('%')?width/100:1),parseFloat(offsets[1])*(typeof offsets[1]==='string'&&offsets[1].endsWith('%')?height/100:1)];}function parseCss(element,property){return parseInt(window.getComputedStyle(element)[property],10)||0;}function getDimensions(elem){const raw=elem[0];if(raw.nodeType===Node.DOCUMENT_NODE)return {width:elem.width(),height:elem.height(),offset:{top:0,left:0}};if(!!raw&&raw===raw.window)return {width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};if(raw.preventDefault)return {width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};return {width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}const collisions={fit:{left(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollLeft:within.offset.left;const outerWidth=within.width;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=withinOffset-collisionPosLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;let newOverRight;if(data.collisionWidth>outerWidth)if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0)position.left=withinOffset;else if(overLeft>overRight)position.left=withinOffset+outerWidth-data.collisionWidth;else position.left=withinOffset;else if(overLeft>0)position.left+=overLeft;else if(overRight>0)position.left-=overRight;else position.left=max(position.left-collisionPosLeft,position.left);},top(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollTop:within.offset.top;const outerHeight=data.within.height;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=withinOffset-collisionPosTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;let newOverBottom;if(data.collisionHeight>outerHeight)if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0)position.top=withinOffset;else if(overTop>overBottom)position.top=withinOffset+outerHeight-data.collisionHeight;else position.top=withinOffset;else if(overTop>0)position.top+=overTop;else if(overBottom>0)position.top-=overBottom;else position.top=max(position.top-collisionPosTop,position.top);}},flip:{left(position,data){const {within}=data;const withinOffset=within.offset.left+within.scrollLeft;const outerWidth=within.width;const offsetLeft=within.isWindow?within.scrollLeft:within.offset.left;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=collisionPosLeft-offsetLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft;const myOffset=data.my[0]==='left'?-data.elemWidth:data.my[0]==='right'?data.elemWidth:0;const atOffset=data.at[0]==='left'?data.targetWidth:data.at[0]==='right'?-data.targetWidth:0;const offset=-2*data.offset[0];let newOverRight;let newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft))position.left+=myOffset+atOffset+offset;}else{if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight)position.left+=myOffset+atOffset+offset;}}},top(position,data){const {within}=data;const withinOffset=within.offset.top+within.scrollTop;const outerHeight=within.height;const offsetTop=within.isWindow?within.scrollTop:within.offset.top;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=collisionPosTop-offsetTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop;const top=data.my[1]==='top';const myOffset=top?-data.elemHeight:data.my[1]==='bottom'?data.elemHeight:0;const atOffset=data.at[1]==='top'?data.targetHeight:data.at[1]==='bottom'?-data.targetHeight:0;const offset=-2*data.offset[1];let newOverTop;let newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop))position.top+=myOffset+atOffset+offset;}else{if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom)position.top+=myOffset+atOffset+offset;}}}},flipfit:{left(...args){collisions.flip.left.apply(this,args);collisions.fit.left.apply(this,args);},top(...args){collisions.flip.top.apply(this,args);collisions.fit.top.apply(this,args);}}};$.position={scrollbarWidth(){if(cachedScrollbarWidth!==undefined)return cachedScrollbarWidth;const div=$('<div '+"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>"+"<div style='height:100px;width:auto;'></div></div>");const innerDiv=div.children()[0];$('body').append(div);const w1=innerDiv.offsetWidth;div[0].style.overflow='scroll';let w2=innerDiv.offsetWidth;if(w1===w2)w2=div[0].clientWidth;div.remove();cachedScrollbarWidth=w1-w2;return cachedScrollbarWidth;},getScrollInfo(within){const overflowX=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-x'];const overflowY=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-y'];const hasOverflowX=overflowX==='scroll'||(overflowX==='auto'&&within.width<within.element[0].scrollWidth);const hasOverflowY=overflowY==='scroll'||(overflowY==='auto'&&within.height<within.element[0].scrollHeight);return {width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo(element){const withinElement=$(element||window);const isWindow=!!withinElement[0]&&withinElement[0]===withinElement[0].window;const isDocument=!!withinElement[0]&&withinElement[0].nodeType===Node.DOCUMENT_NODE;const hasOffset=!isWindow&&!isDocument;return {element:withinElement,isWindow,isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);const within=$.position.getWithinInfo(options.within);const scrollInfo=$.position.getScrollInfo(within);const collision=(options.collision||'flip').split(' ');const offsets={};const target=typeof options.of==='string'?$(document).find(options.of):$(options.of);const dimensions=getDimensions(target);const targetWidth=dimensions.width;const targetHeight=dimensions.height;const targetOffset=dimensions.offset;if(target[0].preventDefault)options.at='left top';const basePosition=$.extend({},targetOffset);$.each(['my','at'],function(){let pos=(options[this]||'').split(' ');
5if(pos.length===1)pos=regexHorizontal.test(pos[0])?pos.concat(['center']):regexVertical.test(pos[0])?['center'].concat(pos):['center','center'];pos[0]=regexHorizontal.test(pos[0])?pos[0]:'center';pos[1]=regexVertical.test(pos[1])?pos[1]:'center';const horizontalOffset=regexOffset.exec(pos[0]);const verticalOffset=regexOffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[regexPosition.exec(pos[0])[0],regexPosition.exec(pos[1])[0]];});if(collision.length===1)collision[1]=collision[0];if(options.at[0]==='right')basePosition.left+=targetWidth;else{if(options.at[0]==='center')basePosition.left+=targetWidth/2;}if(options.at[1]==='bottom')basePosition.top+=targetHeight;else{if(options.at[1]==='center')basePosition.top+=targetHeight/2;}const atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){let using;const elem=$(this);const elemWidth=elem.outerWidth();const elemHeight=elem.outerHeight();const marginLeft=parseCss(this,'marginLeft');const marginTop=parseCss(this,'marginTop');const collisionWidth=elemWidth+marginLeft+parseCss(this,'marginRight')+scrollInfo.width;const collisionHeight=elemHeight+marginTop+parseCss(this,'marginBottom')+scrollInfo.height;const position=$.extend({},basePosition);const myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==='right')position.left-=elemWidth;else{if(options.my[0]==='center')position.left-=elemWidth/2;}if(options.my[1]==='bottom')position.top-=elemHeight;else{if(options.my[1]==='center')position.top-=elemHeight/2;}position.left+=myOffset[0];position.top+=myOffset[1];const collisionPosition={marginLeft,marginTop};$.each(['left','top'],function(i,dir){if(collisions[collision[i]])collisions[collision[i]][dir](position,{targetWidth,targetHeight,elemWidth,elemHeight,collisionPosition,collisionWidth,collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within,elem});});if(options.using)using=function(props){const left=targetOffset.left-position.left;const right=left+targetWidth-elemWidth;const top=targetOffset.top-position.top;const bottom=top+targetHeight-elemHeight;const feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?'left':left>0?'right':'center',vertical:bottom<0?'top':top>0?'bottom':'middle'};if(targetWidth<elemWidth&&abs(left+right)<targetWidth)feedback.horizontal='center';if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight)feedback.vertical='middle';if(max(abs(left),abs(right))>max(abs(top),abs(bottom)))feedback.important='horizontal';else feedback.important='vertical';options.using.call(this,props,feedback);};elem.offset($.extend(position,{using}));});};if(!$.hasOwnProperty('ui'))$.ui={};$.ui.position=collisions;})(jQuery);;
6(($,Drupal,drupalSettings,once)=>{if(!Drupal.autocomplete)return;const autocomplete={};autocomplete.getSettings=(input,globalSettings)=>{globalSettings=globalSettings||drupalSettings||{};const settings={auto_submit:false,delay:0,min_length:1,selector:':submit'};const search=$(input).data('search-api-autocomplete-search');if(search&&globalSettings.search_api_autocomplete&&globalSettings.search_api_autocomplete[search])$.extend(settings,globalSettings.search_api_autocomplete[search]);return settings;};Drupal.behaviors.searchApiAutocomplete={attach(context,settings){const s='.ui-autocomplete-input[data-search-api-autocomplete-search]';$(once('search-api-autocomplete',s,context)).each(function foreach(){const uiAutocomplete=$(this).data('ui-autocomplete');if(!uiAutocomplete)return;const $element=uiAutocomplete.menu.element;$element.data('search-api-autocomplete-input-id',this.id);$element.addClass('search-api-autocomplete-search');$element.attr('tabindex','-1');const elementSettings=autocomplete.getSettings(this,settings);if(elementSettings.delay)uiAutocomplete.options.delay=elementSettings.delay;if(elementSettings.min_length)uiAutocomplete.options.minLength=elementSettings.min_length;const oldSelect=uiAutocomplete.options.select;uiAutocomplete.options.select=function select(event,ui,...args){if(ui.item.url){if(event.keyCode===9)return false;window.location.href=ui.item.url;return false;}const ret=oldSelect.apply(this,[event,ui,...args]);if(elementSettings.auto_submit&&elementSettings.selector)$(elementSettings.selector,this.form).trigger('click');return ret;};});}};Drupal.SearchApiAutocomplete=autocomplete;})(jQuery,Drupal,drupalSettings,once);;

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.