PageSourceSearch

https://bostonenglishcenter.com/build/assets/checkoutPlans-ea1ba0b7.js

js bostonenglishcenter.com collected 2026-10-04 02:40:27 UTC 4,658 bytes, 1 lines download raw bytes

1import{i as E}from"./index-84b426e0.js";const n=document.getElementById("myVideo"),f=()=>{var a;if(!n||n.dataset.ready==="true")return;const e=n.dataset.hlsSrc;if(e){if(n.canPlayType("application/vnd.apple.mpegurl"))n.src=e;else if((a=window.Hls)!=null&&a.isSupported()){const l=new window.Hls({maxBufferLength:18,capLevelToPlayerSize:!0,autoStartLoad:!1});l.loadSource(e),l.attachMedia(n),n._hls=l}else n.src=e;n.dataset.ready="true"}};var v;(v=document.getElementById("showVideo"))==null||v.addEventListener("click",()=>{var e;f(),(e=n._hls)==null||e.startLoad(),document.getElementById("showVideo").classList.add("hidden"),n.play(),n.requestFullscreen()});function m(){!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)&&!n.paused&&n.pause()}document.addEventListener("fullscreenchange",m);document.addEventListener("webkitfullscreenchange",m);document.addEventListener("mozfullscreenchange",m);document.addEventListener("MSFullscreenChange",m);n.addEventListener("pause",()=>{requestAnimationFrame(()=>{const e=document.getElementById("plansSection");if(e){const a=e.getBoundingClientRect().top+window.scrollY+500;window.scrollTo({top:a<0?0:a,behavior:"smooth"})}})});const g=document.getElementById("video-modal");let p=!1;n.addEventListener("play",()=>{p=!0,document.getElementById("showVideo").classList.add("hidden"),g.classList.add("hidden")});g.addEventListener("click",()=>{var e;g.classList.add("hidden"),p||(f(),(e=n._hls)==null||e.startLoad(),n.play(),n.requestFullscreen())});let u=0,y=null;n.addEventListener("play",()=>{y=setInterval(()=>{u+=1,document.querySelectorAll('input[name="watch_video"]').forEach(e=>{e.value=u}),u===10&&fetch("/addWatchVideo/plans-three",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":document.querySelector('meta[name="csrf_token"]').content},body:JSON.stringify({watched_seconds:u})}).then(e=>e.text()).then(e=>{console.log("Posted watch time:",e)}).catch(e=>{console.error("Error posting watch time:",e)})},1e3)});n.addEventListener("pause",()=>{clearInterval(y)});n.addEventListener("ended",()=>{clearInterval(y)});const S=document.querySelectorAll(".disableOnCLick");S.forEach(e=>{e.addEventListener("click",function(a){this.style.opacity="0.5"})});const w=document.querySelectorAll("[data-plan-select]");function L(){var a;const e=(a=document.querySelector("[data-plan-select]:checked"))==null?void 0:a.value;document.querySelectorAll("[data-plan-card]").forEach(l=>{const t=l.dataset.planCard===e;l.classList.toggle("border-[#f86d07]",t),l.classList.toggle("dark:border-[#f86d07]",t),l.classList.toggle("dark:bg-gray-950",t),l.classList.toggle("dark:border-gray-700",!t)}),document.querySelectorAll("[data-plan-selected]").forEach(l=>{l.classList.toggle("hidden",l.dataset.planSelected!==e)}),document.querySelectorAll("[data-plan-unselected]").forEach(l=>{l.classList.toggle("hidden",l.dataset.planUnselected===e)})}w.forEach(e=>{e.addEventListener("change",()=>{L(),e.checked&&setTimeout(()=>{const a=e.getBoundingClientRect(),l=window.pageYOffset||document.documentElement.scrollTop,t=a.top+l+a.height/2,c=window.innerHeight/2,o=t-c;window.scrollTo({top:o,behavior:"smooth"})},100)})});L();document.addEventListener("DOMContentLoaded",function(){var a,l;const e=((l=(a=document.querySelector('[name="iso_code"]'))==null?void 0:a.getAttribute("content"))==null?void 0:l.toLowerCase())||"us";document.querySelectorAll('input[name="phone"]').forEach(function(t){const c=E(t,{utilsScript:"https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js",excludeCountries:["eh"],initialCountry:e}),o=t.value.trim();o?c.setNumber(o.startsWith("+")?o:`+${o}`):t.value=`+${c.getSelectedCountryData().dialCode}`,t.addEventListener("blur",function(){const s=`+${c.getSelectedCountryData().dialCode}`;t.value.startsWith(s)||(t.value=`${s}${t.value}`)}),t.addEventListener("keypress",function(s){"+0123456789".includes(s.key)||s.preventDefault()})}),document.querySelectorAll("[data-plan-form]").forEach(t=>{const c=t.querySelector("[data-validate-name]"),o=t.querySelector("[data-validate-phone]"),s=(d,i,h)=>{const r=!d||d.value.trim().length<h;return d==null||d.classList.toggle("border-red-600",r),d==null||d.classList.toggle("dark:border-red-400",r),i==null||i.classList.toggle("hidden",!r),!r};t.addEventListener("submit",d=>{var r;const i=s(c,t.querySelector("[data-name-error]"),3),h=s(o,t.querySelector("[data-phone-error]"),8);if(!i||!h||!t.checkValidity()){d.preventDefault(),t.reportValidity();return}(r=t.querySelector('button[type="submit"]'))==null||r.setAttribute("disabled","disabled")})})});

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.