PageSourceSearch

https://annmacprevostcounseling.com/wp-content/themes/paris/assets/vendors/scroll-lock/scroll-lock.js

js annmacprevostcounseling.com collected 2026-10-04 06:36:51 UTC 4,591 bytes, 1 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.scrollLock=t():e.scrollLock=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=["padding","margin","width"],i=!0,u=0,a=[],s=[],c=o[0],f=["body",".sl--fillgap"],d=[],h=function(e){return e.join(", ")},y=function(e,t){for(var n=0;n<e.length;n++)t(e[n])},p=function(e){for(var t=e.target;!(null===t||t.classList&&t.classList.contains("sl--scrollable"));)t=t.parentNode;return t},v=function(e){console.error("[scroll-lock] "+e)},m=function(e,t){var n=p(e);if(n){var r=(n.scrollTop,n.scrollHeight),l=n.clientHeight;n.dataset.slDelta=e.touches[0].clientY,l===r&&(n.dataset.slPrevented="true")}},g=function(e,t){if(!t.getState()){var n=p(e);if(n)if("true"===n.dataset.slPrevented)e.preventDefault();else{var r=n.scrollTop,l=n.scrollHeight,o=r+n.offsetHeight,i=parseFloat(n.dataset.slDelta),u=e.touches[0].clientY;r<=0?i<u&&e.preventDefault():o>=l&&i>u&&e.preventDefault()}else e.preventDefault()}},b=function(e,t){var n=p(e);n&&(n.dataset.slPrevented="false")},k=function(e){document.addEventListener("touchstart",function(e){return m(e)}),document.addEventListener("touchmove",function(t){return g(t,e)},{passive:!1}),document.addEventListener("touchend",function(e){return b(e)})},w=function(){function e(){r(this,e),k(this)}return l(e,[{key:"getState",value:function(){return i}},{key:"hide",value:function(e){return u<=0&&(this._fillGaps(),document.body.style.overflow="hidden",i=!1),this._setTemporaryScrollableTargets(e),u++,this}},{key:"show",value:function(){return u--,u<=0?(document.body.style.overflow="",this._unfillGaps(),i=!0):this.clearQueue(),this}},{key:"clearQueue",value:function(){return u=0,this}},{key:"toggle",value:function(){return this.getState()?this.hide():this.show(),this}},{key:"getWidth",value:function(){var e=document.body.style.overflow,t=0;return document.body.style.overflow="scroll",t=this.getCurrentWidth(),document.body.style.overflow=e,t}},{key:"getCurrentWidth",value:function(){var e=document.documentElement.clientWidth;return window.innerWidth-e}},{key:"setScrollableTargets",value:function(e){var t=this;return Array.isArray(selectors)?a=e:e&&(a=[e]),y(a,function(e){return t._makeScrollableTargetsElement(e)}),this}},{key:"setFillGapMethod",value:function(e){var t=e.toLowerCase();return o.includes(t)?c=t:v('"'+e+'" method is not available!'),this}},{key:"setFillGapSelectors",value:function(e){return Array.isArray(e)?(e.push(".sl--fillgap"),f=e):e&&(f=[e]),this}},{key:"setFillGapTargets",value:function(e){return Array.isArray(e)?d=e:e&&(d=[e]),this}},{key:"_setTemporaryScrollableTargets",value:function(e){var t=this;Array.isArray(e)?s=e:e&&(s=[e]),y(s,function(e){return t._makeScrollableTargetsElement(e)})}},{key:"_makeScrollableTargetsElement",value:function(e){e instanceof Element&&e.classList.add("sl--scrollable")}},{key:"_fillGaps",value:function(){var e=this,t=h(f),n=document.querySelectorAll(t);y(n,function(t){return e._fillGapsElement(t)}),y(d,function(t){return e._fillGapsElement(t)})}},{key:"_fillGapsElement",value:function(e){var t=this.getCurrentWidth();e instanceof Element&&("margin"===c?e.style.marginRight=t+"px":"width"===c?e.style.width="calc(100% - "+t+"px)":e.style.paddingRight=t+"px")}},{key:"_unfillGaps",value:function(){var e=this,t=h(f),n=document.querySelectorAll(t);y(n,function(t){return e._unfillGapsElement(t)}),y(d,function(t){return e._unfillGapsElement(t)})}},{key:"_unfillGapsElement",value:function(e){e instanceof Element&&(e.style.marginRight="",e.style.width="",e.style.paddingRight="")}}]),e}(),_=new w;t.default=_,e.exports=_}])});

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.