b0y-101 Mini Shell


Current Path : E:/www2/kidsbangna/wp-content-old/plugins/advanced-backgrounds/assets/awb/
File Upload :
Current File : E:/www2/kidsbangna/wp-content-old/plugins/advanced-backgrounds/assets/awb/awb.min.js

/*! For license information please see awb.js.LICENSE.txt */
!function(){var t={880:function(){document.addEventListener("jetpack-lazy-loaded-image",(t=>{if(t.target.classList.contains("jarallax-img")){const e=t.target.parentNode.parentNode;e&&e.jarallax&&e.jarallax.image&&e.jarallax.image.$item&&(e.jarallax.image.$item=t.target)}}),{passive:!0})}},e={};function i(a){var n=e[a];if(void 0!==n)return n.exports;var o=e[a]={exports:{}};return t[a](o,o.exports,i),o.exports}!function(){"use strict";function t(t,e,i){var a,n=i||{},o=n.noTrailing,r=void 0!==o&&o,s=n.noLeading,l=void 0!==s&&s,d=n.debounceMode,c=void 0===d?void 0:d,g=!1,u=0;function b(){a&&clearTimeout(a)}function w(){for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];var s=this,d=Date.now()-u;function w(){u=Date.now(),e.apply(s,n)}function p(){a=void 0}g||(l||!c||a||w(),b(),void 0===c&&d>t?l?(u=Date.now(),r||(a=setTimeout(c?p:w,t))):w():!0!==r&&(a=setTimeout(c?p:w,void 0===c?t-d:t)))}return w.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;b(),g=!i},w}function e(t,e,i){const a=new CustomEvent(`awb-${e}`,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(a)}function a(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:document).addEventListener(`awb-${t}`,e)}const{AWB:n={}}=window,o=/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/g.test(navigator.userAgent||navigator.vendor||window.opera),r=!!document.documentMode,s=!r&&!!window.StyleMedia,l="undefined"!=typeof InstallTrigger,d=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),c=!!window.chrome&&!!window.chrome.webstore,g=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0;let u=!1,b=!1;function w(){return n}n.settings&&n.settings.disable_parallax&&n.settings.disable_parallax.length&&n.settings.disable_parallax.forEach((t=>{if(!u)switch(t){case"everywhere":u=!0;break;case"mobile":u=o;break;case"ie":u=r;break;case"edge":u=s;break;case"firefox":u=l;break;case"safari":u=d;break;case"chrome":u=c;break;case"opera":u=g}})),n.settings&&n.settings.disable_video&&n.settings.disable_video.length&&n.settings.disable_video.forEach((t=>{if(!b)switch(t){case"everywhere":b=!0;break;case"mobile":b=o;break;case"ie":b=r;break;case"edge":b=s;break;case"firefox":b=l;break;case"safari":b=d;break;case"chrome":b=c;break;case"opera":b=g}})),n.isMobile=o,n.disableParallax=u,n.disableVideo=b,i(880),a("before-init",(t=>{!function(t){if(!t||!t.parentNode||!t.parentNode.classList.contains("nk-awb-after-vc_row"))return;const e=t.parentNode;let i=e.previousElementSibling;i=!!i.classList.contains("vc_clearfix")&&i;let a=(i||e).previousElementSibling;a=!(!a||!a.matches(".vc_row:not(.nk-awb)"))&&a,a&&("true"===a.getAttribute("data-vc-full-width")&&t.removeAttribute("data-awb-stretch"),a.classList.add("nk-awb"),a.append(t)),e.remove()}(t.target),function(t){if(!t||!t.parentNode||!t.parentNode.classList.contains("nk-awb-after-vc_column"))return;const e=t.parentNode;let i=e.previousElementSibling;i=!(!i||!i.matches(".wpb_column:not(.nk-awb)"))&&i;const a=i.closest(".vc_row");i&&(a.matches("[data-vc-stretch-content=true]")&&t.removeAttribute("data-awb-stretch"),i.classList.add("nk-awb"),i.append(t)),e.remove()}(t.target)}));let p=!1,f="";a("before-init",(t=>{window.GHOSTKIT||function(t){const e=t.parentNode&&t.parentNode.getAttribute("data-ghostkit-styles");e&&(p||(p=document.createElement("style"),p.setAttribute("id","ghostkit-awb-custom-css-inline-css"),document.head.appendChild(p)),f+=e,t.parentNode.removeAttribute("data-ghostkit-styles"),p.textContent=f)}(t.target)}));const{settings:m}=w(),h=[],v=[],y=[];function x(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;t&&t.length&&t.forEach((t=>{const e=t.getBoundingClientRect(),{left:i,right:a}=e,n=window.innerWidth-a,o=getComputedStyle(t),r=parseFloat(o["margin-left"]||0),s=parseFloat(o["margin-right"]||0);t.style["margin-left"]=r-i+"px",t.style["margin-right"]=s-n+"px"}))}function k(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;t&&t.length&&t.forEach((t=>{const e=t.closest(".vc_row"),i=t.closest(".wpb_column"),a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.getBoundingClientRect(),r=getComputedStyle(t),s=getComputedStyle(e),l=a.left,d=window.innerWidth-a.right,c=n.left+(parseFloat(s["padding-left"])||0),g=window.innerWidth-n.right+(parseFloat(s["padding-right"])||0),u=o.left,b=window.innerWidth-o.right,w={"margin-left":0,"margin-right":0};if(Math.round(c)===Math.round(u)){const t=parseFloat(r["margin-left"]||0);w["margin-left"]=t-l+"px"}if(Math.round(g)===Math.round(b)){const t=parseFloat(r["margin-right"]||0);w["margin-right"]=t-d+"px"}t.style["margin-left"]=w["margin-left"],t.style["margin-right"]=w["margin-right"]}))}function A(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;t&&t.length&&t.forEach((t=>{const e=t.getBoundingClientRect(),{left:i,bottom:a}=e,n=window.innerWidth-e.right,o=getComputedStyle(t),r=parseFloat(o["margin-left"]||0),s=parseFloat(o["margin-right"]||0),l=parseFloat(o["margin-bottom"]||0);let d=r-i,c=s-n,g="";const u=t.closest(".ghostkit-col");if(u){const e=t.closest(".ghostkit-grid").getBoundingClientRect(),o=u.getBoundingClientRect(),b=e.left,w=window.innerWidth-e.right,p=o.left,f=window.innerWidth-o.right,m=o.bottom;Math.round(b)!==Math.round(p)&&(d=p-i+r),Math.round(w)!==Math.round(f)&&(c=f-n+s),g=l-(m-a)}t.style["margin-left"]=`${d}px`,t.style["margin-right"]=`${c}px`,t.style["margin-bottom"]=`${g}px`}))}const E=t(200,(function(){x(),k(),A()}));a("before-init",(t=>{!function(t){const e=t.getAttribute("data-awb-stretch");e&&t.parentNode.classList.contains("wpb_column")?(k([t]),v.push(t)):e?(x([t]),h.push(t)):m.full_width_fallback&&t.parentNode.classList.contains("alignfull")&&(A([t]),y.push(t))}(t.target)})),window.addEventListener("resize",E,{passive:!0}),window.addEventListener("orientationchange",E,{passive:!0}),window.addEventListener("load",E,{passive:!0});const{IntersectionObserver:L}=window,{isMobile:_}=w(),S=[];let z=1;function M(){S.forEach((t=>{t.awbMouseData.is_in_viewport&&(t.awbMouseData.rect=t.parentNode.getBoundingClientRect())}))}const j=t(200,M);setInterval(M,3e3),window.addEventListener("resize",j,{passive:!0}),window.addEventListener("orientationchange",j,{passive:!0}),window.addEventListener("load",j,{passive:!0}),document.addEventListener("scroll",j,{passive:!0});const C=t(200,((t,e,i)=>{!function(t,e,i){let a,n,o;S.forEach((r=>{a=r.awbMouseData,a&&"object"==typeof a&&(a.is_in_viewport||i&&z)&&(i?(n=-a.size*t,o=-a.size*e):(n=(a.rect.width-(t-a.rect.left))/a.rect.width,o=(a.rect.height-(e-a.rect.top))/a.rect.height,(n>1||n<0||o>1||o<0)&&(n=.5,o=.5),n=a.size*(n-.5)*2,o=a.size*(o-.5)*2),r.style.transform=`translateX(${n}px) translateY(${o}px) translateZ(0)`,i&&z||(r.style.transition=`transform ${i?2:a.speed}s  cubic-bezier(.22, .63, .6, .88)`))})),z=0}(t,e,i)})),N=new L((t=>{t.forEach((t=>{t.target.awbMouseData&&(t.target.awbMouseData.is_in_viewport=t.isIntersecting,t.isIntersecting&&j())}))}),{rootMargin:"50px"});function F(t){t&&t.length||(t=document.querySelectorAll(".nk-awb .nk-awb-inner img")),t&&t.length&&t.forEach((t=>{const e=window.getComputedStyle(t,null);if(e&&e.objectFit&&"cover"===e.objectFit){const e=parseInt(t.getAttribute("height"),10),i=parseInt(t.getAttribute("width"),10);if(e){let a=t.clientWidth;i/e>t.clientWidth/t.clientHeight&&(a=parseInt(t.clientHeight*i/e,10)),t.getAttribute("sizes")!==`${a}px`&&(t.setAttribute("sizes",`${a}px`),t.getAttribute("data-sizes")&&t.setAttribute("data-sizes",`${a}px`),t.getAttribute("data-lazy-sizes")&&t.setAttribute("data-lazy-sizes",`${a}px`))}}}))}a("init",(t=>{!function(t){if(t.classList.contains("nk-awb-mouse-parallax")||!t.getAttribute("data-awb-mouse-parallax-size"))return;const e=t.querySelector(":scope > .nk-awb-inner"),i=parseFloat(t.getAttribute("data-awb-mouse-parallax-size"))||30,a=parseFloat(t.getAttribute("data-awb-mouse-parallax-speed"))||1e4;t.classList.add("nk-awb-mouse-parallax"),e.awbMouseData={is_in_viewport:0,rect:t.getBoundingClientRect(),size:i,speed:a/1e3},e.style.left=-i+"px",e.style.right=-i+"px",e.style.top=-i+"px",e.style.bottom=-i+"px",N.observe(e),S.push(e),1===S.length&&(_&&window.DeviceOrientationEvent?window.addEventListener("deviceorientation",(t=>{C(t.gamma/90,t.beta/180,!0)}),{passive:!0}):window.addEventListener("mousemove",(t=>{C(t.clientX,t.clientY)}),{passive:!0}))}(t.target)}));const B=(500,t(500,F,{debounceMode:!1!==(void 0!==(W={}.atBegin)&&W)}));var W;a("before-init",(t=>{F(t.target.querySelectorAll(".nk-awb-inner img"))})),window.addEventListener("resize",B,{passive:!0}),window.addEventListener("orientationchange",B,{passive:!0}),window.addEventListener("load",B,{passive:!0});const $=!!document.querySelector("#twentytwenty-style-css, #twenty-twenty-style-css, #twenty-twenty-one-style-css");a("before-jarallax-init",(t=>{$&&function(t,e){const i=t.querySelector(":scope > .nk-awb-inner"),a=e.onInit;e.onInit=function(){Array.from(i.children).forEach((t=>{t.classList.add("intrinsic-ignore")})),a&&a()}}(t.target,t.detail)}));const{jarallax:I}=window,{isMobile:P,disableParallax:R,disableVideo:T}=w();a("init",(t=>{!function(t){if(void 0===I)return;const i=t.getAttribute("data-awb-type");if("color"===i)return;const a=t.querySelector(".jarallax-img"),n=t.getAttribute("data-awb-image-background-size"),o=t.getAttribute("data-awb-image-background-position");let r=!1,s=0,l=0,d=0,c=!0,g=!0,u=!1,b=t.getAttribute("data-awb-parallax"),w=t.getAttribute("data-awb-parallax-speed"),p="true"===t.getAttribute("data-awb-parallax-mobile")||"1"===t.getAttribute("data-awb-parallax-mobile");if("yt_vm_video"!==i&&"video"!==i||(r=t.getAttribute("data-awb-video"),s=parseFloat(t.getAttribute("data-awb-video-start-time"))||0,l=parseFloat(t.getAttribute("data-awb-video-end-time"))||0,d=parseFloat(t.getAttribute("data-awb-video-volume"))||0,c="false"!==t.getAttribute("data-awb-video-loop"),g="true"===t.getAttribute("data-awb-video-always-play"),u="1"===t.getAttribute("data-awb-video-mobile")||"true"===t.getAttribute("data-awb-video-mobile"),!r||b||w||(b="scroll",w=1,p=u)),!b&&!r){const e=t.getAttribute("data-awb-image-background-size")||"cover",i=t.getAttribute("data-awb-image-background-position")||"50% 50%";return void(a&&(a.style.objectFit=e,a.style.objectPosition=i))}const f={type:b,speed:w,disableParallax(){return R||!p&&P},disableVideo(){return T||!u&&P},imgSize:n||"cover",imgPosition:o||"50% 50%"};"pattern"===n&&(f.imgSize="auto",f.imgRepeat="repeat"),r&&(f.speed=b?w:1,f.videoSrc=r,f.videoStartTime=s,f.videoEndTime=l,f.videoVolume=d,f.videoLoop=c,f.videoPlayOnlyVisible=!g);const m=t.querySelector(":scope > .nk-awb-inner"),h=m.querySelector("picture .jarallax-img");h&&(h.classList.remove("jarallax-img"),h.closest("picture").classList.add("jarallax-img")),e(t,"before-jarallax-init",f),I(m,f),e(t,"after-jarallax-init",f)}(t.target)}));const q=w();q.selector=".nk-awb .nk-awb-wrap:not(.nk-awb-rendered)",q.events={on:a,trigger:e},q.init=function(t){const i=document.querySelectorAll(t||q.selector);i&&i.length&&i.forEach((function(t){e(t,"before-init"),t.classList.add("nk-awb-rendered"),e(t,"init"),e(t,"after-init")}))},q.initThrottled=t(200,(()=>{q.init()})),q.init(),new window.MutationObserver((t=>{if(!t||!t.length)return;let e=!1;t.forEach((t=>{let{addedNodes:i}=t;!e&&i&&i.length&&i.forEach((t=>{!e&&t.tagName&&(t.classList.contains("nk-awb")||t.classList.contains("nk-awb-after-vc_row")||t.classList.contains("nk-awb-after-vc_column")||t.firstElementChild&&t.querySelector(".nk-awb, .nk-awb-after-vc_row, .nk-awb-after-vc_column"))&&(e=!0)}))})),e&&q.initThrottled()})).observe(document.documentElement,{childList:!0,subtree:!0}),window.AWB=q,e(document,"ready"),window.nkAwbInit=function(){console.warn('You are using the "nkAwbInit()" function, which is deprecated since v1.11.1. Please, use "AWB.init()" instead.'),window.AWB.init()}}()}();

Copyright © 2019 by b0y-101