PageSourceSearch

https://acceleratelearning.com/wp-content/cache/min/1/wp-content/p…/blocks/wistia-video/view.js?ver=1790091512

js acceleratelearning.com collected 2026-10-01 11:31:22 UTC 2,896 bytes, 11 lines download raw bytes

1(function(){function initPopups(){var popups=document.querySelectorAll('.wistia-custom-popup');popups.forEach(function(popup){if(popup.parentElement!==document.body){document.body.appendChild(popup)}})}
2if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',initPopups)}else{initPopups()}
3var activePopupPlayers={};var bgVideosMap={};var bgWasPlayingMap={};function getBgVideo(bgContainerId){if(!bgContainerId)return null;if(!window.Wistia)return null;var allVideos=window.Wistia.api.all();var cleanId=bgContainerId.replace('wistia-','');for(var i=0;i<allVideos.length;i++){if(allVideos[i].hashedId&&allVideos[i].hashedId()===cleanId){return allVideos[i]}
4if(allVideos[i].container&&allVideos[i].container.id===bgContainerId){return allVideos[i]}}
5return null}
6function openPopup(trigger,e){if(e)e.preventDefault();var popupId=trigger.getAttribute('data-popup-id');if(!popupId)return;var popupEl=document.getElementById(popupId);if(!popupEl)return;var playerEl=document.getElementById(popupId+'-player');if(!playerEl)return;var videoBlock=trigger.closest('.wistia-video-block');var bgEmbed=videoBlock?videoBlock.querySelector('.wistia_embed'):null;var bgContainerId=bgEmbed?bgEmbed.id:'';var popupVideoId=popupEl.getAttribute('data-video-id')||(bgEmbed?bgEmbed.id.replace('wistia-',''):'');popupEl.classList.add('is-active');document.documentElement.style.overflow='hidden';var bgVideo=getBgVideo(bgContainerId);if(bgVideo){bgVideosMap[popupId]=bgVideo;bgWasPlayingMap[popupId]=bgVideo.state()==='playing';try{bgVideo.pause()}catch(err){console.warn('Could not pause background video:',err)}}
7if(!activePopupPlayers[popupId]&&window.Wistia){activePopupPlayers[popupId]=window.Wistia.embed(popupVideoId,{container:playerEl,autoPlay:!0,videoFoam:!0,playerColor:'#F36C12'})}else if(activePopupPlayers[popupId]){activePopupPlayers[popupId].play()}}
8function closePopup(popupEl){if(!popupEl)return;var popupId=popupEl.id;popupEl.classList.remove('is-active');document.documentElement.style.overflow='';if(activePopupPlayers[popupId]){try{activePopupPlayers[popupId].pause()}catch(err){console.warn('Could not pause popup video:',err)}}
9if(bgVideosMap[popupId]&&bgWasPlayingMap[popupId]){try{bgVideosMap[popupId].play()}catch(err){console.warn('Could not resume background video:',err)}}}
10document.addEventListener('click',function(e){var trigger=e.target.closest('.wistia-video-play-icon');if(trigger){openPopup(trigger,e);return}
11var activePopup=document.querySelector('.wistia-custom-popup.is-active');if(!activePopup)return;if(e.target.closest('.wistia-custom-popup__close')||e.target.classList.contains('wistia-custom-popup__overlay')){e.preventDefault();closePopup(activePopup)}});document.addEventListener('keydown',function(e){if(e.key==='Escape'){var activePopup=document.querySelector('.wistia-custom-popup.is-active');if(activePopup){closePopup(activePopup)}}})})()

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.