HEX
Server: Apache
System: Linux d8507.use1.stableserver.net 5.14.0-570.30.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 30 05:12:29 EDT 2025 x86_64
User: dacusvillerec (1045)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: /home/dacusvillerec/public_html/wp-content/themes/exponent/js/vendor/backgroundcheck.min.js
!function(t,e){"function"==typeof define&&define.amd?define(e):t.BackgroundCheck=e()}(this,function(){"use strict";var u,m,s,e,c,i=void 0!==window.orientation?"orientationchange":"resize",n={};function g(){s=m=u=null,n={},e&&clearTimeout(e)}function f(t){H("debug")&&console.log(t)}function o(t,e){return a(t,typeof e),void 0===t?e:t}function a(t,e){if(void 0!==t&&typeof t!==e)throw"Incorrect attribute type"}function r(t,e){var i=t;if("string"==typeof t?i=document.querySelectorAll(t):t&&1===t.nodeType&&(i=[t]),!i||0===i.length||void 0===i.length)throw"Elements not found";return e&&(i=function(t){for(var e,i=[],n=0;n<t.length;n++)if(e=t[n],i.push(e),"IMG"!==e.tagName){if(1<(e=window.getComputedStyle(e).backgroundImage).split(/,url|, url/).length)throw"Multiple backgrounds are not supported";if(!e||"none"===e)throw"Element is not an <img> but does not have a background-image";i[n]={img:new Image,el:i[n]},e=(e=e.slice(4,-1)).replace(/"/g,""),f("CSS Image - "+(i[n].img.src=e))}return i}(i)),i=Array.prototype.slice.call(i)}function l(){H("debugOverlay")?(m.style.opacity=.5,m.style.pointerEvents="none",document.body.appendChild(m)):m.parentNode&&m.parentNode.removeChild(m)}function d(){c={left:0,top:0,right:document.body.clientWidth,bottom:window.innerHeight},m.width=document.body.clientWidth,m.height=window.innerHeight}function h(t,e,i){var n;return-1!==t.indexOf("px")?n=parseFloat(t):-1!==t.indexOf("%")?(n=(t=(n=parseFloat(t))/100)*e,i&&(n-=i*t)):n=e,n}function p(t){var e,i;t=t.nodeType?(e={left:(i=t.getBoundingClientRect()).left,right:i.right,top:i.top,bottom:i.bottom,width:i.width,height:i.height},i=t.parentNode,t):(e=function(t){var e=window.getComputedStyle(t.el);t.el.style.backgroundRepeat="no-repeat",t.el.style.backgroundOrigin="padding-box";var i,n=e.backgroundSize.split(" "),o=n[0],a=void 0===n[1]?"auto":n[1],r=t.el.clientWidth/t.el.clientHeight,g=t.img.naturalWidth/t.img.naturalHeight;return"cover"===o?a=g<=r?(o="100%","auto"):(o="auto",n[0]="auto","100%"):"contain"===o&&(a=1/r<1/g?(o="auto",n[0]="auto","100%"):(o="100%","auto")),o="auto"===o?t.img.naturalWidth:h(o,t.el.clientWidth),a="auto"===a?o/t.img.naturalWidth*t.img.naturalHeight:h(a,t.el.clientHeight),"auto"===n[0]&&"auto"!==n[1]&&(o=a/t.img.naturalHeight*t.img.naturalWidth),"top"===(n=e.backgroundPosition)?n="50% 0%":"left"===n?n="0% 50%":"right"===n?n="100% 50%":"bottom"===n?n="50% 100%":"center"===n&&(n="50% 50%"),e=(e=4===(n=n.split(" ")).length?(i=n[1],n[3]):(i=n[0],n[1]))||"50%",i=h(i,t.el.clientWidth,o),e=h(e,t.el.clientHeight,a),4===n.length&&("right"===n[0]&&(i=t.el.clientWidth-t.img.naturalWidth-i),"bottom"===n[2]&&(e=t.el.clientHeight-t.img.naturalHeight-e)),i+=t.el.getBoundingClientRect().left,e+=t.el.getBoundingClientRect().top,{left:Math.floor(i),right:Math.floor(i+o),top:Math.floor(e),bottom:Math.floor(e+a),width:Math.floor(o),height:Math.floor(a)}}(t),i=t.el,t.img),i=i.getBoundingClientRect(),e.imageTop=0,e.imageLeft=0,e.imageWidth=t.naturalWidth,e.imageHeight=t.naturalHeight;var n,t=e.imageHeight/e.height;return e.top<i.top&&(n=i.top-e.top,e.imageTop=t*n,e.imageHeight-=t*n,e.top+=n,e.height-=n),e.left<i.left&&(n=i.left-e.left,e.imageLeft+=t*n,e.imageWidth-=t*n,e.width-=n,e.left+=n),e.bottom>i.bottom&&(n=e.bottom-i.bottom,e.imageHeight-=t*n,e.height-=n),e.right>i.right&&(n=e.right-i.right,e.imageWidth-=t*n,e.width-=n),e.imageTop=Math.floor(e.imageTop),e.imageLeft=Math.floor(e.imageLeft),e.imageHeight=Math.floor(e.imageHeight),e.imageWidth=Math.floor(e.imageWidth),e}function v(t,e,i){var n=t.className;switch(i){case"add":n+=" "+e;break;case"remove":var o=new RegExp("(?:^|\\s)"+e+"(?!\\S)","g"),n=n.replace(o,"")}t.className=n.trim()}function w(t){for(var e,i=t?[t]:H("targets"),n=0;n<i.length;n++)e=i[n],v(e=H("changeParent")?e.parentNode:e,H("classes").light,"remove"),v(e,H("classes").dark,"remove"),v(e,H("classes").complex,"remove")}function y(t){var e,i,n=t.getBoundingClientRect(),o=0,a=0,r=0,g=0,l=H("mask");if(0<n.width&&0<n.height){w(t),t=H("changeParent")?t.parentNode:t,e=s.getImageData(n.left,n.top,n.width,n.height).data;for(var d=0;d<e.length;d+=4)e[d]===l.r&&e[d+1]===l.g&&e[d+2]===l.b?g++:(o++,a+=(i=.2126*e[d]+.7152*e[d+1]+.0722*e[d+2]-r)*i,r+=i/o);g<=e.length/4*(1-H("minOverlap")/100)&&(n=Math.sqrt(a/o)/255,r/=255,f("Target: "+t.className+" lum: "+r+" var: "+n),v(t,r<=H("threshold")/100?H("classes").dark:H("classes").light,"add"),n>H("minComplexity")/100&&v(t,H("classes").complex,"add"))}}function b(t,e){return t=(t.nodeType?t:t.el).getBoundingClientRect(),e=e===c?e:(e.nodeType?e:e.el).getBoundingClientRect(),!(t.right<e.left||t.left>e.right||t.top>e.bottom||t.bottom<e.top)}function k(t){for(var e,i=(new Date).getTime(),n=t&&("IMG"===t.tagName||t.img)?"image":"targets",o=!t,a=H("targets").length,r=0;r<a;r++)b(e=H("targets")[r],c)&&("targets"!=n||t&&t!==e?"image"==n&&b(e,t)&&y(e):(o=!0,y(e)));if("targets"==n&&!o)throw t+" is not a target";i=i,f("Duration: "+(i=(new Date).getTime()-i)+"ms"),i>H("maxDuration")&&(console.log("BackgroundCheck - Killed"),w(),g())}function C(t){function e(t){var e=0;return"static"!==window.getComputedStyle(t).position&&0<=(e=parseInt(window.getComputedStyle(t).zIndex,10)||0)&&e++,e}var i=t.parentNode;return 1e5*(i?e(i):0)+e(t)}function x(t,e,i){if(u){var n=H("mask");f("--- BackgroundCheck ---"),f("onLoad event: "+(i&&i.src)),!0!==e&&(s.clearRect(0,0,m.width,m.height),s.fillStyle="rgb("+n.r+", "+n.g+", "+n.b+")",s.fillRect(0,0,m.width,m.height));for(var o=i?[i]:H("images"),a=(h=!1,(n=o).sort(function(t,e){t=t.nodeType?t:t.el,e=e.nodeType?e:e.el;var i=t.compareDocumentPosition(e),n=0;return t=C(t),(e=C(e))<t&&(h=!0),t===e&&2===i?n=1:t===e&&4===i&&(n=-1),n||t-e}),f("Sorted: "+h),h&&f(n),h),r=!1,g=0;g<o.length;g++)b(l=o[g],c)&&(0===(d=l.nodeType?l:l.img).naturalWidth?(r=!0,f("Loading... "+l.src),d.removeEventListener("load",x),a?d.addEventListener("load",x.bind(null,null,!1,null)):d.addEventListener("load",x.bind(null,t,!0,l))):(f("Drawing: "+l.src),d=void 0,d=p(l=l),l=l.nodeType?l:l.img,0<d.imageWidth&&0<d.imageHeight&&0<d.width&&0<d.height?s.drawImage(l,d.imageLeft,d.imageTop,d.imageWidth,d.imageHeight,d.left,d.top,d.width,d.height):f("Skipping image - "+l.src+" - area too small")));i||r?i&&k(i):k(t)}var l,d,h}function W(t){!0===H("windowEvents")&&(e&&clearTimeout(e),e=setTimeout(t,200))}function H(t){if(void 0===n[t])throw"Unknown property - "+t;return n[t]}return{init:function(t){if(void 0===t||void 0===t.targets)throw"Missing attributes";n.debug=o(t.debug,!1),n.debugOverlay=o(t.debugOverlay,!1),n.targets=r(t.targets),n.images=r(t.images||"img",!0),n.changeParent=o(t.changeParent,!1),n.threshold=o(t.threshold,50),n.minComplexity=o(t.minComplexity,30),n.minOverlap=o(t.minOverlap,50),n.windowEvents=o(t.windowEvents,!0),n.maxDuration=o(t.maxDuration,500),n.mask=o(t.mask,{r:0,g:255,b:0}),n.classes=o(t.classes,{dark:"background--dark",light:"background--light",complex:"background--complex"}),void 0===u&&(u=!(!(m=document.createElement("canvas"))||!m.getContext||(s=m.getContext("2d"),0)),l(),u&&(m.style.position="fixed",m.style.top="0px",m.style.left="0px",m.style.width="100%",m.style.height="100%",window.addEventListener(i,W.bind(null,function(){d(),x()})),window.addEventListener("scroll",W.bind(null,x)),d(),x()))},destroy:g,refresh:x,set:function(t,e){if(void 0===n[t])throw"Unknown property - "+t;if(void 0===e)throw"Missing value for "+t;if("targets"===t||"images"===t)try{e=r("images"!==t||e?e:"img","images"===t)}catch(t){throw e=[],t}else a(e,typeof n[t]);w(),n[t]=e,x(),"debugOverlay"===t&&l()},get:H,getImageData:function(){for(var t,e=H("images"),i=[],n=0;n<e.length;n++)t=p(e[n]),i.push(t);return i}}});