PageSourceSearch

https://www.teamworldvision.org/resources/js/embed-donate-fetch.js?v=202609221533

js teamworldvision.org collected 2026-09-24 11:28:28 UTC 27,390 bytes, 12 lines download raw bytes

1if(!window.DonorDrive){DonorDrive={}}(function(){const donorDriveScript=document.currentScript,donorDriveBaseURL=donorDriveScript.src.replace(/resources\/js.*/,""),donorDriveDonationRemindersArray=[],donorDriveProgramID=donorDriveScript.getAttribute("data-program-id"),donorDriveButtonsOnInit=document.querySelectorAll("button[data-program-id='"+donorDriveProgramID+"'], a[data-program-id='"+donorDriveProgramID+"'], a[href*='"+donorDriveBaseURL+"'][href*='&programID="+donorDriveProgramID+"'][href*='fuseaction=embedDonate.modalEvent']"),donorDriveLoading=document.createElement("div"),donorDriveTemplate=document.createElement("dialog"),donorDrivePageContext=JSON.parse(document.querySelector("body").getAttribute("data-page-context")),referrerHostURLParams=new URLSearchParams(window.location.search),transformedURLParams=new URLSearchParams;let CSPNonce=donorDriveScript.getAttribute("nonce");if(!CSPNonce){const nonceElement=document.querySelector("[nonce]");if(nonceElement){CSPNonce=nonceElement.nonce||nonceElement.getAttribute("nonce")}}let reminderContextString="";if(donorDrivePageContext){if(donorDrivePageContext.reminderContext&&donorDrivePageContext.reminderContext!=="none"&&donorDrivePageContext.eventID){reminderContextString=donorDrivePageContext.eventID;if(donorDrivePageContext.reminderContext!=="event"&&donorDrivePageContext[donorDrivePageContext.reminderContext+"ID"]){reminderContextString+="-"+donorDrivePageContext[donorDrivePageContext.reminderContext+"ID"]}}}referrerHostURLParams.forEach((value,key)=>transformedURLParams.append(key.toLowerCase(),value));const donorDriveUrlEventID=transformedURLParams.get("donate");let $donorDrivePreselectedButton,donorDriveContext="embed",donorDriveGoogleTagManagerIDs=[];DonorDrive.Donate={registerButton:function(donorDriveButton){{if(typeof HTMLDialogElement==="function"){donorDriveButton.addEventListener("click",openDonorDriveDialog);if(donorDriveButton.getAttribute("data-event-id")==undefined){if(donorDriveButton.getAttribute("href")==undefined){donorDriveButton.removeEventListener("click",openDonorDriveDialog);return}donorDriveButtonURL=new URL(donorDriveButton.getAttribute("href"));donorDriveButton.setAttribute("href","javascript:void(0);");if(donorDriveButtonURL.searchParams.get("eventID")=="null"){donorDriveButton.removeEventListener("click",openDonorDriveDialog);return}donorDriveButton.setAttribute("data-event-id",donorDriveButtonURL.searchParams.get("eventID"));donorDriveButton.setAttribute("role","button")}if(reminderContextString==""){reminderContextString=donorDriveButton.getAttribute("data-event-id")}if(!donorDriveButton.classList.contains("dd-incentive-button")&&(donorDriveUrlEventID&&donorDriveUrlEventID==donorDriveButton.getAttribute("data-event-id")||location.hash&&location.hash=="#donate"||location.pathname&&location.pathname.split("/").length>2&&location.pathname.split("/").slice(-1)[0]=="donate")){$donorDrivePreselectedButton=donorDriveButton}if(document.querySelectorAll("button[data-program-id='"+donorDriveProgramID+"'], a[data-program-id='"+donorDriveProgramID+"'], a[href*='"+donorDriveBaseURL+"'][href*='&programID="+donorDriveProgramID+"'][href*='fuseaction=embedDonate.modalEvent']").length==1){let targetID=0;let target="event";let formModel=null;if(donorDriveButton.getAttribute("data-participant-id")){target="participant";targetID=donorDriveButton.getAttribute("data-participant-id");reminderContextString+="-"+targetID}else if(donorDriveButton.getAttribute("data-team-id")){target="team";targetID=donorDriveButton.getAttribute("data-team-id");reminderContextString+="-"+targetID}else{targetID=donorDriveButton.getAttribute("data-event-id")}const prefillAttributeRaw=donorDriveButton.getAttribute("data-prefill");if(prefillAttributeRaw&&prefillAttributeRaw.trim()!==""){const prefillAttributeDecoded=decodeURIComponent(prefillAttributeRaw);try{formModel=JSON.parse(prefillAttributeDecoded)}catch(error){}}if(donorDriveButton.hasAttribute("data-context")){donorDriveContext=donorDriveButton.getAttribute("data-context")}if(!$donorDrivePreselectedButton){createDonorDriveFrame(target=target,targetID=targetID,formModel=formModel)}}donorDriveButton.setAttribute("aria-haspopup","dialog");setDonorDriveDonationReminders(`donorDriveDonationReminder_${donorDriveProgramID}-${reminderContextString}`)}}}};Array.from(donorDriveButtonsOnInit).forEach(DonorDrive.Donate.registerButton);if(donorDrivePageContext){if(donorDrivePageContext.reminderContext==="all"){for(let i=0;i<localStorage.length;i++){const key=localStorage.key(i);if(key&&key.startsWith("donorDriveDonationReminder_")){setDonorDriveDonationReminders(key)}}}else if(donorDriveDonationRemindersArray.length===0&&reminderContextString){setDonorDriveDonationReminders(`donorDriveDonationReminder_${donorDriveProgramID}-${reminderContextString}`)}}if(donorDriveDonationRemindersArray.length>0){showMostRecentDonorDriveReminder()}
1donorDriveLoading.insertAdjacentHTML("afterbegin",`
2		<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" style="left: 50%; position: absolute; top: 50%; translate: -50% -50%;" viewBox="0 0 38 38" stroke="#fff">
3			<g fill="none" fill-rule="evenodd">
4				<g transform="translate(1 1)" stroke-width="2">
5					<circle stroke-opacity=".5" cx="18" cy="18" r="18"/>
6					<path d="M36  18c0-9.94-8.06-18-18-18">
7						<animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/>
8					</path>
9				</g>
10			</g>
11		</svg>
12	`);donorDriveTemplate.classList.add("js-donordrive-dialog-"+donorDriveProgramID);donorDriveTemplate.classList.add("dd-c-donordrive-embed-donate");donorDriveTemplate.setAttribute("id","donorDriveDialog"+donorDriveProgramID);document.body.appendChild(donorDriveTemplate);window.addEventListener("message",function(event){if(event.data.programID==donorDriveProgramID){switch(event.data.action){case"closeDonorDriveDialog":closeDonorDriveDialog(event);break;case"closeDonorDriveDonationReminder":closeDonorDriveDonationReminder(event.data.context);break;case"donateFromDonorDriveReminder":openDonorDriveDialog(event);break;case"donorDriveFrameContentLoaded":let donorDriveDialog=document.querySelector(".js-donordrive-dialog-"+donorDriveProgramID),donorDriveFrame=donorDriveDialog.querySelector(".js-donordrive-embed-iframe-"+donorDriveProgramID);if(donorDriveFrame&&donorDriveFrame.pendingFormState){donorDriveFrame.contentWindow.postMessage({action:"donorDriveSetCurrentStep",formState:donorDriveFrame.pendingFormState,programID:donorDriveProgramID},window.location.origin);delete donorDriveFrame.pendingFormState}donorDriveDialog.removeChild(donorDriveLoading);donorDriveFrame.setAttribute("aria-hidden","false");donorDriveFrame.style.removeProperty("visibility");break;case"donorDriveErrorMessage":displayDonorDriveErrorMessage(event.data.message);break;case"donorDriveExecuteRecaptcha":let targetWindow=window;if(event.data.context!="fullPage"&&event.data.context!="twitch"){const lookupID=event.data.targetID||event.data.eventID;const iframe=window[`donorDriveFrame-${donorDriveProgramID}-${lookupID}`];targetWindow=iframe?.contentWindow;if(!targetWindow){return}}if(typeof grecaptcha==="undefined"||!grecaptcha.enterprise){targetWindow.postMessage({action:"recaptchaTokenError",programID:donorDriveProgramID},window.location.origin);return}grecaptcha.enterprise.ready(async()=>{try{const token=await grecaptcha.enterprise.execute(event.data.siteKey,{action:event.data.label});targetWindow.postMessage({action:"recaptchaTokenSuccess",programID:donorDriveProgramID,token:token},window.location.origin)}catch(err){targetWindow.postMessage({action:"recaptchaTokenError",programID:donorDriveProgramID},window.location.origin)}});break;case"donorDriveInitializeReminder":const donationReminderElement=document.querySelector(`.js-donordrive-donation-reminder-${donorDriveProgramID}`);if(event.data.removeReminder==="1"){donationReminderElement.remove()}else if(donationReminderElement){donationReminderElement.classList.add(`dd-v-donation-reminder-${event.data.popupAlignment}`);if(event.data.height!==0){resizeDonorDriveReminder(event.data.height,event.data.eventID)}window.postMessage({action:"donorDrivePushDataLayer",programID:donorDriveProgramID,dataLayer:{event:"dd-donation-reminder-show"}},window.location.origin)}break;case"donorDriveLoadGTM":if(event.data.googleTagManagerIDs.length>0){Array.from(event.data.googleTagManagerIDs).forEach(function(googleTagManagerID){if(!donorDriveGoogleTagManagerIDs.includes(googleTagManagerID)){(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!="dataLayer"?"&l="+l:"";j.async=true;j.src="https://www.googletagmanager.com/gtm.js?id="+i+dl;var n=d.querySelector("[nonce]");n&&j.setAttribute("nonce",n.nonce||n.getAttribute("nonce"));f.parentNode.insertBefore(j,f)})(window,document,"script","dataLayer",googleTagManagerID);donorDriveGoogleTagManagerIDs.push(googleTagManagerID)}})}break;case"donorDriveLoadRecaptcha":document.body.appendChild(document.createElement("style")).insertAdjacentHTML("afterbegin",".grecaptcha-badge { visibility: hidden }");const captchaScript=document.createElement("script");captchaScript.setAttribute("src","https://www.google.com/recaptcha/enterprise.js?render="+event.data.siteKey);captchaScript.setAttribute("async","true");document.body.appendChild(captchaScript);break;case"donorDrivePushDataLayer":window.dataLayer=window.dataLayer||[];if(event.data.clear){dataLayer.push({donationOption:undefined,paymentMethod:undefined,donors:undefined,ecommerce:undefined})}if(event.data.dataLayer){dataLayer.push(event.data.dataLayer)}break;case"donorDriveResizeReminder":if(event.data.height!==0){resizeDonorDriveReminder(event.data.height,event.data.eventID)}break;case"showDonorDriveExitIntentAppeal":showDonorDriveExitIntentAppeal();break;case"donorDriveFrameSetTitle":if(event.data.type==="embed"){window[`donorDriveFrame-${donorDriveProgramID}-${event.data.eventID}`].setAttribute("title",event.data.title)}else if(event.data.type==="reminder"){window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${event.data.eventID}`].setAttribute("title",event.data.title)}}}});window.addEventListener("keydown",function(event){if(event.code==="Escape"||event.keyCode===27){closeDonorDriveDialog()}});
12function donorDriveProgramIDIsValid(){const programIDCheck=donorDriveProgramID.split("-");const programIDArrayLengthIsTwo=programIDCheck.length===2;if(programIDArrayLengthIsTwo){const programIDContainsTwoIntegers=!isNaN(programIDCheck[0])&&!isNaN(programIDCheck[1]);if(programIDContainsTwoIntegers){return true}else{return false}}else{return false}}function getDonorDriveLanguage(){let browserLanguagePropertyKeys_donorDrive=["language","browserLanguage","systemLanguage","userLanguage"],donorDriveAcceptedLanguages=["en","es","fr"],donorDriveLanguage=transformedURLParams.get("language"),donorDriveNavigator=window.navigator;if(donorDriveLanguage&&donorDriveLanguage.length>0&&donorDriveAcceptedLanguages.includes(donorDriveLanguage)){return donorDriveLanguage}else if(document.documentElement&&document.documentElement.lang&&document.documentElement.lang.length>0&&donorDriveAcceptedLanguages.includes(document.documentElement.lang.split("-")[0])){return document.documentElement.lang.split("-")[0]}if(Array.isArray(donorDriveNavigator.languages)){for(i=0;i<donorDriveNavigator.languages.length;i++){if(donorDriveNavigator.languages[i]&&donorDriveNavigator.languages[i].length&&donorDriveAcceptedLanguages.includes(donorDriveNavigator.languages[i].split("-")[0])){return donorDriveNavigator.languages[i].split("-")[0]}}}for(i=0;i<browserLanguagePropertyKeys_donorDrive.length;i++){if(donorDriveNavigator[browserLanguagePropertyKeys_donorDrive[i]]&&donorDriveNavigator[browserLanguagePropertyKeys_donorDrive[i]].length&&donorDriveAcceptedLanguages.includes(donorDriveNavigator[browserLanguagePropertyKeys_donorDrive[i]].split("-")[0])){return donorDriveNavigator[browserLanguagePropertyKeys_donorDrive[i]].split("-")[0]}}return""}function getDonorDriveParameters(formModel){const referrerHostURLParams=new URLSearchParams(window.location.search);const transformedURLParams=new URLSearchParams;referrerHostURLParams.forEach((value,key)=>transformedURLParams.append(key.toLowerCase(),value));let donorDriveParameters="",donorDriveReferrer=transformedURLParams.get("referrer");if(formModel){Object.keys(formModel).forEach(param=>{if(!transformedURLParams.get(param.toLowerCase())){transformedURLParams.append(param.toLowerCase(),formModel[param])}})}if(getDonorDriveLanguage().length>0){donorDriveParameters=donorDriveParameters+"&language="+encodeURIComponent(getDonorDriveLanguage())}if(window["donorDriveReferrer"+donorDriveProgramID]&&window["donorDriveReferrer"+donorDriveProgramID].length>0){donorDriveParameters=donorDriveParameters+"&referrer="+encodeURIComponent(window["donorDriveReferrer"+donorDriveProgramID])}else if(donorDriveReferrer&&donorDriveReferrer.length>0){donorDriveParameters=donorDriveParameters+"&referrer="+encodeURIComponent(donorDriveReferrer)}transformedURLParams.forEach(function(value,key){if(!["cspnonce","eventid","fuseaction","language","participantid","preview","referrer","teamid"].includes(key)){switch(key){case"activitypledgemaxamount":if(!isNaN(value)){donorDriveParameters+="&activityPledgeMaxAmount="+encodeURIComponent(value)}break;case"coverprocessingfee":if(["0","1"].includes(value)){donorDriveParameters+="&coverProcessingFee="+encodeURIComponent(value)}break;case"currency":if(["AUD","CAD","EUR","GBP","USD"].includes(value)){donorDriveParameters+="&currency="+encodeURIComponent(value)}break;case"currencysymbol":if(["$","€","£"].includes(value)){donorDriveParameters+="&currencySymbol="+encodeURIComponent(value)}break;case"displayname":if(value){donorDriveParameters+="&displayName="+encodeURIComponent(value)}break;case"donationamount":if(!isNaN(value)){donorDriveParameters+="&donationAmount="+encodeURIComponent(value)}break;case"donationoption":if(["single","monthly","annual","activityPledge"].includes(value)){donorDriveParameters+="&donationOption="+encodeURIComponent(value)}else if(value==""){donorDriveParameters+="&donationOption=single"}break;case"gifttype":if(["matchingGift","behalfOfCompany"].includes(value)){donorDriveParameters+="&giftType="+encodeURIComponent(value)}break;case"ismatchingeligible":if(["0","1"].includes(value)){donorDriveParameters+="&isMatchingEligible="+encodeURIComponent(value)}break;case"previewtheme":donorDriveParameters+="&previewTheme="+encodeURIComponent(value);break;
12case"recurringhastimelimit":if(["0","1"].includes(value)){donorDriveParameters+="&recurringHasTimeLimit="+encodeURIComponent(value)}break;case"recurringpaymentcount":if(!isNaN(value)){donorDriveParameters+="&recurringPaymentCount="+encodeURIComponent(value)}break;case"suggesteddonationid":donorDriveParameters+="&suggestedDonationID="+encodeURIComponent(value);break;case"type":if(["C","I"].includes(value)){donorDriveParameters+="&type="+encodeURIComponent(value)}break;default:donorDriveParameters+="&"+key+"="+encodeURIComponent(value);break}}});return donorDriveParameters}function cleanDonorDriveDialog(){let donorDriveDialog=document.querySelector(".js-donordrive-dialog-"+donorDriveProgramID),donorDriveFrame=donorDriveDialog.querySelector(".js-donordrive-embed-iframe-"+donorDriveProgramID);if(donorDriveDialog.contains(donorDriveFrame)){donorDriveFrame=donorDriveDialog.removeChild(donorDriveFrame);donorDriveFrame.style.display="none"}if(donorDriveDialog.contains(donorDriveLoading)){donorDriveDialog.removeChild(donorDriveLoading)}}function closeDonorDriveDialog(event){if(event?.data?.eventID){showMostRecentDonorDriveReminder(event.data.eventID,event.data.participantID,event.data.teamID)}cleanDonorDriveDialog();const openDialog=document.querySelector(".js-donordrive-dialog-"+donorDriveProgramID+"[open]");if(openDialog){openDialog.close()}let closeEvent=donorDriveContext==="modal"?"dd-donation-modal-close":"dd-donation-embed-close";window.postMessage({action:"donorDrivePushDataLayer",programID:donorDriveProgramID,dataLayer:{event:closeEvent}},window.location.origin)}function closeDonorDriveDonationReminder(context){const donationReminderString=window.localStorage.getItem(`donorDriveDonationReminder_${donorDriveProgramID}-${context}`);const donationReminderElement=document.querySelector(".js-donordrive-donation-reminder-"+donorDriveProgramID);if(donationReminderString&&donationReminderElement){window.localStorage.removeItem(`donorDriveDonationReminder_${donorDriveProgramID}-${context}`)}donationReminderElement.remove();window.postMessage({action:"donorDrivePushDataLayer",programID:donorDriveProgramID,dataLayer:{event:"dd-donation-reminder-close"}},window.location.origin)}function showDonorDriveExitIntentAppeal(){const openedDonorDriveDialog=document.querySelector(".js-donordrive-dialog-"+donorDriveProgramID+"[open]");const donorDriveEmbedIframe=openedDonorDriveDialog.querySelector(".js-donordrive-embed-iframe-"+donorDriveProgramID);donorDriveEmbedIframe.contentWindow.postMessage({action:"donorDriveShowExitIntentAppeal",programID:donorDriveProgramID},window.location.origin);window.postMessage({action:"donorDrivePushDataLayer",programID:donorDriveProgramID,dataLayer:{event:"dd-donation-appeal-show"}},window.location.origin)}async function showMostRecentDonorDriveReminder(eventID,participantID,teamID){if(eventID){const donationReminderForEventID=donorDriveDonationRemindersArray.find(donationReminder=>{return donationReminder.eventID==eventID&&(!participantID||donationReminder.participantID==participantID)&&(!teamID||donationReminder.teamID==teamID)});if(!donationReminderForEventID){let storageKey=`donorDriveDonationReminder_${donorDriveProgramID}-${eventID}`;if(participantID){storageKey+=`-${participantID}`}else if(teamID){storageKey+=`-${teamID}`}setDonorDriveDonationReminders(storageKey)}}donorDriveDonationRemindersArray.sort((a,b)=>a.createdAt-b.createdAt).reverse();const donorDriveMostRecentDonationReminder=donorDriveDonationRemindersArray[0];if(donorDriveMostRecentDonationReminder){reminderContextString=donorDriveMostRecentDonationReminder.eventID;if(donorDriveMostRecentDonationReminder.participantID){reminderContextString+="-"+donorDriveMostRecentDonationReminder.participantID}else if(donorDriveMostRecentDonationReminder.teamID){reminderContextString+="-"+donorDriveMostRecentDonationReminder.teamID}}if(donorDriveMostRecentDonationReminder&&window.localStorage.getItem(`donorDriveDonationReminder_${donorDriveProgramID}-${reminderContextString}`)&&!getDonorDriveParameters(donorDriveMostRecentDonationReminder.formModel).includes("previewTheme")){const target=donorDriveMostRecentDonationReminder.participantID?"participant":donorDriveMostRecentDonationReminder.teamID?"team":"event";let donorDriveDonationReminderURL=donorDriveBaseURL+"index.cfm?fuseaction="+(donorDriveContext==="embed"?"embed":"express")+"Donate.modalDonationReminder&eventID="+donorDriveMostRecentDonationReminder.eventID+"&target="+target+(target==="team"?"&teamID="+donorDriveMostRecentDonationReminder.teamID:"")+(target==="participant"?"&participantID="+donorDriveMostRecentDonationReminder.participantID:"")+(donorDriveContext==="embed"?"&isEmbedded=1&path="+encodeURIComponent(window.location.pathname):"")+"&host="+encodeURIComponent(window.location.host)+(CSPNonce?"&cspnonce="+encodeURIComponent(CSPNonce):"");donorDriveDonationReminderURL+=getDonorDriveParameters(donorDriveMostRecentDonationReminder.formModel);window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`]=document.createElement("iframe");window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`].className="dd-c-donation-reminder js-donordrive-donation-reminder-"+donorDriveProgramID;const donationReminderFrameAttributes={"data-event-id":donorDriveMostRecentDonationReminder.eventID,frameborder:"0",height:"208",popover:"manual",role:"region",width:"100%"};for(attribute in donationReminderFrameAttributes){window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`].setAttribute(attribute,donationReminderFrameAttributes[attribute])}fetch(donorDriveDonationReminderURL,{credentials:"include"}).then(response=>{return response.text()}).then(html=>{window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`].setAttribute("srcdoc",html);return window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`]}).catch(err=>{return window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`]});document.body.appendChild(window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`]);if(HTMLElement.prototype.hasOwnProperty("popover")){window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${donorDriveMostRecentDonationReminder.eventID}`].showPopover()}}}async function createDonorDriveFrame(target="event",targetID,formModel){if(donorDriveContext==="fullPage"){window.location.href=donorDriveBaseURL+"/"+target+"s/"+targetID+"/donate"+getDonorDriveParameters(formModel).replace("&","?")}else{let donorDriveURL=donorDriveBaseURL+"index.cfm?fuseaction="+(donorDriveContext==="modal"?"express":d
12onorDriveContext)+"Donate.modal"+target+"&"+target+"ID="+targetID+(donorDriveContext==="embed"?"&isEmbedded=1":"")+"&host="+encodeURIComponent(window.location.host)+(CSPNonce?"&cspnonce="+encodeURIComponent(CSPNonce):"")+getDonorDriveParameters(formModel);window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`]=document.createElement("iframe");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].className="dd-c-embed-iframe js-donordrive-embed-iframe-"+donorDriveProgramID;window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("aria-hidden","true");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].style.visibility="none";window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("height","0");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("width","100%");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("frameborder","0");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("title","Donate");window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("allow",`payment https://${window.location.host}`);window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("data-event-id",targetID);return fetch(donorDriveURL,{credentials:"include"}).then(response=>{return response.text()}).then(html=>{if(window[`onFetchDonorDriveHTMLContentFor${donorDriveProgramID}`]){window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("srcdoc",window[`onFetchDonorDriveHTMLContentFor${donorDriveProgramID}`](html))}else{window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`].setAttribute("srcdoc",html)}return window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`]}).catch(err=>{return window[`donorDriveFrame-${donorDriveProgramID}-${targetID}`]})}}function displayDonorDriveErrorMessage(errorText){window.alert(errorText);closeDonorDriveDialog()}async function openDonorDriveDialog(event){document.querySelectorAll('[class*="js-donordrive-donation-reminder-"]').forEach(donationReminder=>{donationReminder.remove()});let target="event";let targetID=0;let formModel=null;let formState=null;if(event.data){target=event.data.target;targetID=event.data.targetID;if(event.data.formModel){formModel=event.data.formModel}if(event.data.formState){formState=event.data.formState;if(formState.context){donorDriveContext=formState.context}}}else{if(this.getAttribute("data-participant-id")){target="participant";targetID=this.getAttribute("data-participant-id")}else if(this.getAttribute("data-team-id")){target="team";targetID=this.getAttribute("data-team-id")}else{targetID=this.getAttribute("data-event-id")}if(this.getAttribute("data-context")){donorDriveContext=this.getAttribute("data-context")}let prefillAttributeValue=this.getAttribute("data-prefill");if(prefillAttributeValue){const decodedPrefillAttribute=decodeURIComponent(prefillAttributeValue);if(decodedPrefillAttribute&&decodedPrefillAttribute.trim()!==""){try{formModel=JSON.parse(decodedPrefillAttribute)}catch(error){}}}if(this.getAttribute("data-referrer")!=undefined){window["donorDriveReferrer"+donorDriveProgramID]=this.getAttribute("data-referrer")}else{window["donorDriveReferrer"+donorDriveProgramID]=null}event.preventDefault()}let donorDriveDialog=document.querySelector(".js-donordrive-dialog-"+donorDriveProgramID);if(donorDriveContext!=="fullPage"){donorDriveDialog.appendChild(donorDriveLoading);donorDriveDialog.showModal()}const donorDriveFrame=await createDonorDriveFrame(target=target,targetID=targetID,formModel=formModel);if(donorDriveContext==="fullPage"){return}if(!donorDriveFrame.getAttribute("srcdoc")){donorDriveDialog.removeChild(donorDriveLoading);closeDonorDriveDialog();let errorMessage="We're having trouble displaying the donation form. Please try again later.";if(document.documentElement.lang.substring(0,2)==="es"){errorMessage="Estamos teniendo problemas para mostrar el formulario de donación. Por favor, inténtelo de nuevo más tarde."}else if(document.documentElement.lang.substring(0,2)==="fr"){errorMessage="Nous avons rencontré des difficultés lors de l’affichage du formulaire de dons. Veuillez réessayer ultérieurement."}window.alert(errorMessage)}else{if(formState){donorDriveFrame.pendingFormState=formState}donorDriveDialog.appendChild(donorDriveFrame)}}if($donorDrivePreselectedButton){$donorDrivePreselectedButton.focus();if($donorDrivePreselectedButton.getAttribute("data-context")){donorDriveContext=$donorDrivePreselectedButton.getAttribute("data-context")}if($donorDrivePreselectedButton.getAttribute("data-participant-id")){openDonorDriveDialog({data:{target:"participant",targetID:$donorDrivePreselectedButton.getAttribute("data-participant-id")}})}else if($donorDrivePreselectedButton.getAttribute("data-team-id")){openDonorDriveDialog({data:{target:"team",targetID:$donorDrivePreselectedButton.getAttribute("data-team-id")}})}else if($donorDrivePreselectedButton.getAttribute("data-event-id")){openDonorDriveDialog({data:{target:"event",targetID:$donorDrivePreselectedButton.getAttribute("data-event-id")}})}}function resizeDonorDriveReminder(height,eventID){if(window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${eventID}`]){window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${eventID}
12`].setAttribute("height",height);window[`donorDriveDonationReminderFrame-${donorDriveProgramID}-${eventID}`].style.height=height+"px"}}function setDonorDriveDonationReminders(localStorageKey){if(!localStorageKey){return}const donationReminderString=window.localStorage.getItem(localStorageKey);if(donationReminderString){const donationReminder=JSON.parse(donationReminderString);if(donationReminder.formState&&donationReminder.formModel){donorDriveDonationRemindersArray.push(donationReminder)}else{window.localStorage.removeItem(localStorageKey)}}}})();

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.