PageSourceSearch

https://thei.edu.hk/wp-content/plugins/thim-elementor-kit/build/frontend.js?ver=1.4.6

js thei.edu.hk collected 2026-10-01 14:36:33 UTC 11,617 bytes, 1 lines download raw bytes

1(()=>{"use strict";function e(){const e=document.querySelectorAll(".thim-ekits-menu__content"),t=new WeakSet,n=e=>{const t=e.parentNode;!function(e,t,n=30){let s=0,o=null,i=0;const a=()=>{if(s>=n)return void t();if(!function(e){const t=window.getComputedStyle(e);return null!==e.offsetParent&&e.offsetWidth>0&&e.offsetHeight>0&&"none"!==t.display&&"hidden"!==t.visibility}(e))return s++,void setTimeout(a,50);e.offsetHeight;const r=e.getBoundingClientRect();if(o&&Math.abs(r.width-o.width)<1&&Math.abs(r.height-o.height)<1&&Math.abs(r.top-o.top)<1&&Math.abs(r.left-o.left)<1){if(i++,i>=2)return void t()}else i=0;o={width:r.width,height:r.height,top:r.top,left:r.left},s++,setTimeout(a,30)};a()}(t,(()=>{function s(){const s=t.style.transition,o=t.style.transform;t.style.transition="none",t.style.transform="none",t.offsetHeight,t.scrollHeight,t.clientHeight,requestAnimationFrame((()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{const i=t.getBoundingClientRect();if(t.style.transition=s,t.style.transform=o,!i||0===i.width||0===i.height)return void("complete"!==document.readyState&&window.addEventListener("load",(()=>n(e)),{once:!0}));const a=document.documentElement.clientWidth,r=e.offsetWidth>=a?a:e.offsetWidth,c=e.classList.contains("thim-ekits-menu__content--left"),l=e.classList.contains("thim-ekits-menu__content--right"),d=e.classList.contains("thim-ekits-menu__content--center"),h=e.classList.contains("thim-ekits-menu__content--container");if(!r)return;let m=r-i.right,u=i.left+r-a;if(e.offsetWidth>=a&&(e.style.width=r+"px",e.style.minWidth=r+"px"),h&&e.offsetWidth<a&&e.dataset.container){const t=document.querySelector(e.dataset.container);t&&(u+=(a-t.offsetWidth)/2,m+=(a-t.offsetWidth)/2)}if(d){const t=(r+i.width)/2-i.right,n=i.left+(r+i.width)/2-a;document.body.classList.contains("rtl")&&t>0?e.style.marginLeft=t+"px":n>0&&(e.style.marginLeft=-n+"px")}else c?e.style.right=m>0?-m+"px":"0":l&&(e.style.left=u>0?-u+"px":"0")}))}))}))}document.fonts&&document.fonts.ready?document.fonts.ready.then((()=>{s()})):s()}))};if("ResizeObserver"in window){const s=new ResizeObserver((e=>{e.forEach((e=>{const s=e.target.querySelector(".thim-ekits-menu__content");s&&!t.has(s)&&(t.add(s),setTimeout((()=>{n(s),t.delete(s)}),100))}))}));e.forEach((e=>{n(e),s.observe(e.parentNode)}))}else e.forEach((e=>n(e)))}function t(){const e=document.querySelectorAll(".ekit--fx-word-reveal"),t=new IntersectionObserver((e=>{e.forEach((e=>{if(!e.isIntersecting)return;const n=e.target;(n.matches("h1,h2,h3,h4,h5,h6,p")?[n]:n.querySelectorAll("h1,h2,h3,h4,h5,h6,p")).forEach((e=>{if(e.dataset.animated)return;e.dataset.animated="true";const t="rtl"===getComputedStyle(e).direction||e.closest('[dir="rtl"]');let n=0;function s(e){if(t){const t=(.3*n).toFixed(2);return n++,`<span class="fx-word" style="animation-delay:${t}s">${e}</span>`}return e.split("").map((e=>{const t=(.06*n).toFixed(2);return n++,`<span class="fx-char" style="animation-delay:${t}s">${e}</span>`})).join("")}function o(e){if(3===e.nodeType)return e.textContent.replace(/\s+/g," ").split(/(\s+)/).filter((e=>""!==e)).map((e=>/^\s+$/.test(e)?e:t?s(e):`<span class="fx-word">${s(e)}</span>`)).join("");if(1===e.nodeType){const t=e.tagName.toLowerCase(),n=Array.from(e.attributes).map((e=>`${e.name}="${e.value}"`)).join(" ");return`<${t}${n?" "+n:""}>${Array.from(e.childNodes).map((e=>o(e))).join("")}</${t}>`}return""}const i=Array.from(e.childNodes).map((e=>o(e))).join("");e.innerHTML=i})),t.unobserve(n)}))}),{threshold:.2});e.forEach((e=>t.observe(e)))}document.addEventListener("DOMContentLoaded",(()=>{(function(){document.querySelectorAll(".thim-ekits-menu__mobile").forEach((e=>{const t=e.parentNode.querySelector(".thim-ekits-menu__container"),n=t.parentNode.querySelector(".thim-ekits-menu__mobile__overlay"),s=e.parentNode.classList.contains("thim-ekits-menu--mobile-open"),o=()=>{e.parentNode.classList.remove("thim-ekits-menu--mobile-open")};if(n)n.addEventListener("click",o);else{t.insertAdjacentHTML("beforebegin",'<div class="thim-ekits-menu__mobile__overlay"></div>');const e=t.parentNode.querySelector(".thim-ekits-menu__mobile__overlay");e&&e.addEventListener("click",o)}const i=t.querySelector(".thim-ekits-menu__mobile__close");i&&i.addEventListener("click",o),i.addEventListener("click",o),e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),s?o():e.parentNode.classList.add("thim-ekits-menu--mobile-open")}))}
1));const e=document.querySelectorAll(".thim-ekits-menu__icon"),t=document.querySelector(".thim-ekits-menu__icon-menu-back");e.forEach((e=>{e.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),e.parentNode.classList.contains("thim-ekits-menu__is-hover")?e.parentNode.classList.remove("thim-ekits-menu__is-hover"):(e.parentNode.classList.add("thim-ekits-menu__is-hover"),t&&t.classList.add("show-icon"))}))})),t&&t.addEventListener("click",(e=>{e.stopPropagation();const n=document.querySelectorAll(".thim-ekits-menu__is-hover");n.length>0&&n[n.length-1].classList.remove("thim-ekits-menu__is-hover"),1===n.length&&t.classList.remove("show-icon")}))})(),document.querySelectorAll(".thim-ekits__sticky").forEach((e=>{const t=e.offsetHeight+e.offsetTop,n=e.parentNode,s=document.querySelector("#wpadminbar");window.addEventListener("scroll",(()=>{window.pageYOffset>n.offsetTop?(e.classList.add("thim-ekits__sticky--is-sticky"),s&&e.classList.add("thim-ekits__sticky--adminbar"),n.classList.add("thim-ekits--is-sticky"),n.style.height=t+"px"):(e.classList.remove("thim-ekits__sticky--is-sticky","thim-ekits__sticky--adminbar"),n.classList.remove("thim-ekits--is-sticky"),n.style.height="auto")}))})),function(){const e=document.getElementById("back-to-top-kits"),t=document.querySelector(".scroll-circle-progress");if(e){if(t){const e=document.querySelector(".scroll-circle-progress path"),t=e.getTotalLength();e.style.transition=e.style.WebkitTransition="none",e.style.strokeDasharray=t+" "+t,e.style.strokeDashoffset=t,e.getBoundingClientRect(),e.style.transition=e.style.WebkitTransition="stroke-dashoffset 10ms linear";const n=function(){const n=jQuery(window).scrollTop(),s=jQuery(document).height()-jQuery(window).height(),o=t-n*t/s;e.style.strokeDashoffset=o};n(),jQuery(window).scroll(n)}e.classList.add("hidden"),jQuery(window).scroll((function(){jQuery(this).scrollTop()>400?e.classList.remove("hidden"):e.classList.add("hidden")})),e.addEventListener("click",(function(){window.scrollTo({top:0,behavior:"smooth"})}))}}(),window.addEventListener("scroll",(()=>{const e=document.querySelector(".thim-ekits-scrollProgressBar"),t=document.querySelector(".thim-ekits-scrollPercentage");if(e){const n=document.documentElement.scrollHeight-window.innerHeight,s=window.scrollY/n*100;e.style.width=s+"%",t&&(t.textContent=`${Math.round(s)}%`)}})),setTimeout(t,300),function(){const e=document.querySelectorAll(".ekit--cursor-particles");if(!e.length)return;const t=[[230,57,70],[247,127,0],[252,191,73],[42,157,143],[33,158,188],[58,134,255],[123,44,191]],n=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,s=Math.PI*(3-Math.sqrt(5)),o=[{k:2,amp:.16,speed:.26},{k:3,amp:.1,speed:-.19},{k:5,amp:.06,speed:.12}];e.forEach((e=>{if("1"===e.dataset.ekitWelcomeInit)return;e.dataset.ekitWelcomeInit="1","static"===window.getComputedStyle(e).position&&(e.style.position="relative");const i=document.createElement("canvas");i.className="ekit-welcome-cursor__layer",i.style.cssText="position:absolute;inset:0;pointer-events:none;z-index:0;",e.prepend(i);const a=i.getContext("2d");let r=0,c=0,l=1;const d=()=>{const t=e.getBoundingClientRect();r=t.width,c=t.height,l=window.devicePixelRatio||1,i.width=Math.round(r*l),i.height=Math.round(c*l),i.style.width=r+"px",i.style.height=c+"px",a.setTransform(l,0,0,l,0,0)};d();const h=[];for(let e=0;e<280;e++){const n=4+7*Math.random(),o=1.5+1.5*Math.random(),i=(e+.5)/280,a=20+420*Math.sqrt(i),r=e*s,c=(a-20)/420,l=r,d=t[e%t.length],m=e=>Math.min(255,Math.round(e+30)),u=e=>Math.max(0,Math.round(e-30)),f="rgb("+m(d[0])+","+m(d[1])+","+m(d[2])+")",p="rgb("+u(d[0])+","+u(d[1])+","+u(d[2])+")";h.push({len:n,thick:o,rot:l,baseRadius:a,baseAngle:r,radFrac:c,c1:f,c2:p,wavePhase:c*Math.PI*2*2.4,ease:.07-.035*c,x:0,y:0,scale:1,opacity:0,maxOpacity:.55+.4*Math.random()})}let m=-9999,u=-9999,f=!1,p=null,y=!1,g=!1;const v=e=>{const t=.001*e;let n=!1;const s=f?1:0;a.clearRect(0,0,r,c);const i=.32*Math.sin(.22*t),l=.26*Math.sin(.16*t),d=Math.cos(i),g=Math.sin(i),k=Math.cos(l),w=Math.sin(l);for(let e=0;e<h.length;e++){const i=h[e];let r=i.baseRadius+18*Math.sin(.8*t-i.wavePhase);const c=i.baseAngle;let l=0;for(let e=0;e<o.length;e++){const n=o[e];l+=n.amp*Math.sin(n.k*c+t*n.speed)}r*=1+l;const p=Math.cos(c)*r,y=Math.sin(c)*r,v=70*Math.sin(.022*r-.6*t),_=y*g+v*d,L=-p*w+_*k,b=480/(480+L),E=m+(p*k+_*w)*b,M=u+(y*d-v*g)*b;i.x+=(E-i.x)*i.ease,i.y+=(M-i.y)*i.ease;const x=Math.max(0,Math.min(1,.5-L/154)),q=.7+.55*x;i.scale+=(q-i.scale)*i.ease;const S=.5+.5*x,T=f?.12:.045,A=s*i.maxOpacity*S-i.opacity;if(i.opacity+=A*T,i.opacity<.004){f&&(n=!0);continue}n=!0;const C=i.len*i.scale,N=i.thick*i.scale,$=Math.cos(i.rot)*C/2,W=Math.sin(i.rot)*C/2,j=a.createLinearGradient(i.x-$,i.y-W,i.x+$,i.y+W);j.addColorStop(0,i.c1),j.addColorStop(1,i.c2),a.save(),a.globalAlpha=i.opacity,a.strokeStyle=j,a.lineWidth=N,a.lineCap="round",a.beginPath(),a.moveTo(i.x-$,i.y-W),a.lineTo(i.x+$,i.y+W),a.stroke(),a.restore(
1)}n?p=requestAnimationFrame(v):(p=null,y=!1)},k=()=>{n||y||(y=!0,p=requestAnimationFrame(v))},w=t=>{((t,n)=>{const s=e.getBoundingClientRect();if(m=t-s.left,u=n-s.top,!g){for(const e of h)e.x=m,e.y=u;g=!0}})(t.clientX,t.clientY),f=!0,k()},_=()=>{f=!1,k()};e.addEventListener("mousemove",w,{passive:!0}),e.addEventListener("mouseenter",w),e.addEventListener("mouseleave",_),e.addEventListener("touchmove",(e=>{e.touches&&e.touches[0]&&w({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}),{passive:!0}),e.addEventListener("touchstart",(e=>{e.touches&&e.touches[0]&&w({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}),{passive:!0}),e.addEventListener("touchend",_),e.addEventListener("touchcancel",_);let L=null;window.addEventListener("resize",(()=>{clearTimeout(L),L=setTimeout(d,200)}))}))}(),function(){const e=document.querySelector(".ekit--cursor-area");if(!e)return;const t=document.createElement("div");t.className="dot-cursor",document.body.appendChild(t),Object.assign(t.style,{position:"fixed",top:"0",left:"0",width:"10px",height:"10px",borderRadius:"50%",background:"var(--e-global-color-primary)",pointerEvents:"none",zIndex:"999999",opacity:"0",willChange:"transform, opacity"});let n=0,s=0,o=0,i=0,a=1,r=1,c=0,l=0,d=null,h=!1;const m=(e,t,n)=>e+(t-e)*n;function u(){o=m(o,n,.2),i=m(i,s,.2),a=m(a,r,.15),c=m(c,l,.15),t.style.transform=`translate3d(${o-5}px, ${i-5}px, 0) scale(${a})`,t.style.opacity=c;const e=Math.abs(o-n)<.1&&Math.abs(a-r)<.01&&Math.abs(c-l)<.01;d=!h&&e?null:requestAnimationFrame(u)}e.addEventListener("pointerenter",(e=>{n=e.clientX,s=e.clientY,o=n,i=s,l=1,h=!0,d||(d=requestAnimationFrame(u))})),e.addEventListener("pointermove",(e=>{n=e.clientX,s=e.clientY,e.target.closest("a, button, .elementor-button, img")?(r=4,l=.15):(r=1,l=1)})),e.addEventListener("pointerleave",(()=>{r=1,l=0,h=!1}))}();const n=()=>{document.fonts&&document.fonts.ready?document.fonts.ready.then((()=>{setTimeout(e,100)})):setTimeout(e,100)};"complete"===document.readyState?n():(window.addEventListener("load",n),setTimeout(n,2e3)),window.addEventListener("resize",(()=>{clearTimeout(window.resizeTimeout),window.resizeTimeout=setTimeout((()=>{e()}),100)}))}))})();

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.