%PDF- %PDF-
Direktori : /home/tradesc/www/relax/wp-content/plugins/theplus_elementor_addon/assets/js/extra/ |
Current File : /home/tradesc/www/relax/wp-content/plugins/theplus_elementor_addon/assets/js/extra/tocbot.min.js |
!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var f in a)b.d(d,f,function(b){return a[b]}.bind(null,f));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,g){(function(c){var d,e,f;!function(c){e=[],d=function(b){"use strict";function e(a,b,c){var d,e;return b||(b=250),function(){var f=c||this,g=+new Date,h=arguments;d&&g<d+b?(clearTimeout(e),e=setTimeout(function(){d=g,a.apply(f,h)},b)):(d=g,a.apply(f,h))}}var j,k,m,n=g(2),q={},r={},s=g(3),c=g(4),a=g(5),u=!!(b&&b.document&&b.document.querySelector&&b.addEventListener);if("undefined"!=typeof window||u){var d=Object.prototype.hasOwnProperty;return r.destroy=function(){if(!q.skipRendering)try{document.querySelector(q.tocSelector).innerHTML=""}catch(a){console.warn("Element not found: "+q.tocSelector)}q.scrollContainer&&document.querySelector(q.scrollContainer)?(document.querySelector(q.scrollContainer).removeEventListener("scroll",this._scrollListener,!1),document.querySelector(q.scrollContainer).removeEventListener("resize",this._scrollListener,!1),j&&document.querySelector(q.scrollContainer).removeEventListener("click",this._clickListener,!1)):(document.removeEventListener("scroll",this._scrollListener,!1),document.removeEventListener("resize",this._scrollListener,!1),j&&document.removeEventListener("click",this._clickListener,!1))},r.init=function(b){if(u&&(q=function(){for(var a,b={},c=0;c<arguments.length;c++)for(var e in a=arguments[c],a)d.call(a,e)&&(b[e]=a[e]);return b}(n,b||{}),this.options=q,this.state={},q.scrollSmooth&&(q.duration=q.scrollSmoothDuration,q.offset=q.scrollSmoothOffset,r.scrollSmooth=g(6).initSmoothScrolling(q)),j=s(q),k=c(q),this._buildHtml=j,this._parseContent=k,r.destroy(),null!==(m=k.selectHeadings(q.contentSelector,q.headingSelector)))){var f=k.nestHeadingsArray(m).nest;q.skipRendering||j.render(q.tocSelector,f),this._scrollListener=e(function(b){j.updateToc(m),q.disableTocScrollSync||a(q);var c=b&&b.target&&b.target.scrollingElement&&0===b.target.scrollingElement.scrollTop;(b&&(0===b.eventPhase||null===b.currentTarget)||c)&&(j.updateToc(m),q.scrollEndCallback&&q.scrollEndCallback(b))},q.throttleTimeout),this._scrollListener(),q.scrollContainer&&document.querySelector(q.scrollContainer)?(document.querySelector(q.scrollContainer).addEventListener("scroll",this._scrollListener,!1),document.querySelector(q.scrollContainer).addEventListener("resize",this._scrollListener,!1)):(document.addEventListener("scroll",this._scrollListener,!1),document.addEventListener("resize",this._scrollListener,!1));var h=null;return this._clickListener=e(function(a){q.scrollSmooth&&j.disableTocAnimation(a),j.updateToc(m),h&&clearTimeout(h),h=setTimeout(function(){j.enableTocAnimation()},q.scrollSmoothDuration)},q.throttleTimeout),q.scrollContainer&&document.querySelector(q.scrollContainer)?document.querySelector(q.scrollContainer).addEventListener("click",this._clickListener,!1):document.addEventListener("click",this._clickListener,!1),this}},r.refresh=function(a){r.destroy(),r.init(a||this.options)},b.tocbot=r,r}}(c),void 0===(f="function"==typeof d?d.apply(b,e):d)||(a.exports=f)}(void 0===c?this.window||this.global:c)}).call(this,g(1))},function(a){var b=function(){return this}();try{b=b||Function("return this")()||(0,eval)("this")}catch(a){"object"==typeof window&&(b=window)}a.exports=b},function(a){a.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".tp-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,onClick:function(){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1}},function(a){a.exports=function(b){function a(f,g){var h=g.appendChild(function(a){var c=document.createElement("li"),d=document.createElement("a");return b.listItemClass&&c.setAttribute("class",b.listItemClass),b.onClick&&(d.onclick=b.onClick),b.includeHtml&&a.childNodes.length?e.call(a.childNodes,function(a){d.appendChild(a.cloneNode(!0))}):d.textContent=a.textContent,(d.setAttribute("href",b.basePath+"#"+a.id),d.setAttribute("class",b.linkClass+" node-name--"+a.nodeName+" "+b.extraLinkClasses),c.appendChild(d),c)}(f));if(f.children.length){var i=d(f.isCollapsed);f.children.forEach(function(b){a(b,i)}),h.appendChild(i)}}function d(a){var c=b.orderedList?"ol":"ul",d=document.createElement(c),e=b.listClass+" "+b.extraListClasses;return a&&(e+=" "+b.collapsibleClass,e+=" "+b.isCollapsedClass),d.setAttribute("class",e),d}var e=[].forEach,g=[].some,j=document.body,k=!0;return{enableTocAnimation:function(){k=!0},disableTocAnimation:function(a){var c=a.target||a.srcElement;"string"==typeof c.className&&-1!==c.className.indexOf(b.linkClass)&&(k=!1)},render:function(b,c){var f=d(!1);c.forEach(function(b){a(b,f)});var e=document.querySelector(b);if(null!==e)return e.firstChild&&e.removeChild(e.firstChild),0===c.length?e:e.appendChild(f)},updateToc:function(l){var i;i=b.scrollContainer&&document.querySelector(b.scrollContainer)?document.querySelector(b.scrollContainer).scrollTop:document.documentElement.scrollTop||j.scrollTop,b.positionFixedSelector&&function(){var a=b.scrollContainer&&document.querySelector(b.scrollContainer)?document.querySelector(b.scrollContainer).scrollTop:document.documentElement.scrollTop||j.scrollTop;var c=document.querySelector(b.positionFixedSelector);"auto"===b.fixedSidebarOffset&&(b.fixedSidebarOffset=document.querySelector(b.tocSelector).offsetTop),a>b.fixedSidebarOffset?-1===c.className.indexOf(b.positionFixedClass)&&(c.className+=" "+b.positionFixedClass):c.className=c.className.split(" "+b.positionFixedClass).join("")}();var o,p=l;if(k&&null!==document.querySelector(b.tocSelector)&&0<p.length){g.call(p,function(a,c){return function a(c){var d=0;return c!==document.querySelector(b.contentSelector&&null!=c)&&(d=c.offsetTop,b.hasInnerContainers&&(d+=a(c.offsetParent))),d}(a)>i+b.headingsOffset+10?(o=p[0===c?c:c-1],!0):c===p.length-1?(o=p[p.length-1],!0):void 0});var a=document.querySelector(b.tocSelector).querySelectorAll("."+b.linkClass);e.call(a,function(a){a.className=a.className.split(" "+b.activeLinkClass).join("")});var n=document.querySelector(b.tocSelector).querySelectorAll("."+b.listItemClass);e.call(n,function(a){a.className=a.className.split(" "+b.activeListItemClass).join("")});var d=document.querySelector(b.tocSelector).querySelector("."+b.linkClass+".node-name--"+o.nodeName+"[href=\""+b.basePath+"#"+o.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/@])/g,"\\$1")+"\"]");-1===d.className.indexOf(b.activeLinkClass)&&(d.className+=" "+b.activeLinkClass);var f=d.parentNode;f&&-1===f.className.indexOf(b.activeListItemClass)&&(f.className+=" "+b.activeListItemClass);var m=document.querySelector(b.tocSelector).querySelectorAll("."+b.listClass+"."+b.collapsibleClass);e.call(m,function(a){-1===a.className.indexOf(b.isCollapsedClass)&&(a.className+=" "+b.isCollapsedClass)}),""!=b.isCollapsedClass&&d.nextSibling&&-1!==d.nextSibling.className.indexOf(b.isCollapsedClass)&&(d.nextSibling.className=d.nextSibling.className.split(" "+b.isCollapsedClass).join("")),function a(c){if(""!=b.isCollapsedClass)return-1!==c.className.indexOf(b.collapsibleClass)&&-1!==c.className.indexOf(b.isCollapsedClass)?(c.className=c.className.split(" "+b.isCollapsedClass).join(""),a(c.parentNode.parentNode)):c}(d.parentNode.parentNode)}}}}},function(a){a.exports=function(b){function d(a){return a[a.length-1]}function e(a){if(!(a instanceof window.HTMLElement))return a;if(b.ignoreHiddenElements&&(!a.offsetHeight||!a.offsetParent))return null;if(""===a.id){var c=b.headingLabelCallback?b.headingLabelCallback(a.textContent)+"":a.textContent.trim();0===c.length&&(c="?");for(var d="",e=1,f=(f=c.replace(/\s+/g,"-")).replace(/[&\/\\#,+()$!~%.'":*?<>{}]/g,"");null!==document.getElementById(f+d);)d="_"+e++;a.id=f+d}var d={id:a.id,children:[],nodeName:a.nodeName,headingLevel:function(a){return+a.nodeName.split("H").join("")}(a),textContent:b.headingLabelCallback?b.headingLabelCallback(a.textContent)+"":a.textContent.trim()};return b.includeHtml&&(d.childNodes=a.childNodes),b.headingObjectCallback?b.headingObjectCallback(d,a):d}var a=[].reduce;return{nestHeadingsArray:function(c){return a.call(c,function(a,c){var f=e(c);return f&&function(f,g){for(var h=e(f),j=h.headingLevel,i=g,k=d(i),l=j-(k?k.headingLevel:0);0<l;)(k=d(i))&&void 0!==k.children&&(i=k.children),l--;j>=b.collapseDepth&&(h.isCollapsed=!0),i.push(h)}(f,a.nest),a},{nest:[]})},selectHeadings:function(a,c){var d=c;b.ignoreSelector&&(d=c.split(",").map(function(a){return a.trim()+":not("+b.ignoreSelector+")"}));var e=[],f=document.querySelector(a).querySelectorAll(c);return f.forEach(function(a){var c=jQuery(a).closest(b.ignoreSelector);c.length||e.push(a)}),e}}}},function(a){a.exports=function(a){var b=document.querySelector(a.tocSelector);if(b&&b.scrollHeight>b.clientHeight){var c=b.querySelector("."+a.activeListItemClass);c&&(b.scrollTop=c.offsetTop)}}},function(a,b){function c(b,d){function f(b){h=b-g,window.scrollTo(0,k.easing(h,j,l,m)),h<m?requestAnimationFrame(f):a()}function a(){(window.scrollTo(0,j+l),"function"==typeof k.callback)&&k.callback()}var g,h,j=window.pageYOffset,k={duration:d.duration,offset:d.offset||0,callback:d.callback,easing:d.easing||function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}},e=document.querySelector("[id=\""+decodeURI(b).split("#").join("")+"\"]"),l="string"==typeof b?k.offset+(b?e&&e.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):b,m="function"==typeof k.duration?k.duration(l):k.duration;requestAnimationFrame(function(a){g=a,f(a)})}b.initSmoothScrolling=function(a){function b(a){return a.slice(0,a.lastIndexOf("#"))}document.documentElement.style;var d=a.duration,e=a.offset,f=location.hash?b(location.href):location.href;!function(){document.body.addEventListener("click",function(g){!function(a){return"a"===a.tagName.toLowerCase()&&(0<a.hash.length||"#"===a.href.charAt(a.href.length-1))&&(b(a.href)===f||b(a.href)+"#"===f)}(g.target)||-1<g.target.className.indexOf("no-smooth-scroll")||"#"===g.target.href.charAt(g.target.href.length-2)&&"!"===g.target.href.charAt(g.target.href.length-1)||-1===g.target.className.indexOf(a.linkClass)||c(g.target.hash,{duration:d,offset:e,callback:function(){!function(a){var b=document.getElementById(a.substring(1));b&&(/^(?:a|select|input|button|textarea)$/i.test(b.tagName)||(b.tabIndex=-1),b.focus())}(g.target.hash)}})},!1)}()}}]);