/* * hc-sticky * ========= * version: 2.2.7 * author: some web media * author url: https://github.com/somewebmedia * plugin url: https://github.com/somewebmedia/hc-sticky * description: javascript library that makes any element on your page visible while you scroll * license: mit */ "use strict";!function(t,e){if("object"==typeof module&&"object"==typeof module.exports){if(!t.document)throw new error("hc-sticky requires a browser to run.");module.exports=e(t)}else"function"==typeof define&&define.amd?define("hcsticky",[],e(t)):e(t)}("undefined"!=typeof window?window:this,function(v){var i,n,q=v.document,u={top:0,bottom:0,bottomend:0,innertop:0,innersticker:null,stickyclass:"sticky",stickto:null,followscroll:!0,responsive:null,mobilefirst:!1,onstart:null,onstop:null,onbeforeresize:null,onresize:null,resizedebounce:100,disable:!1},y=function(t,e,o){console.warn("%chc sticky:%c "+o+"%c '"+t+"'%c is now deprecated and will be removed. use%c '"+e+"'%c instead.","color: #fa253b","color: default","color: #5595c6","color: default","color: #5595c6","color: default")},$=function(n,f){var o=this;if(f=f||{},!(n="string"==typeof n?q.queryselector(n):n))return!1;f.queries&&y("queries","responsive","option"),f.queryflow&&y("queryflow","mobilefirst","option");var p={},u=$.helpers,s=n.parentnode;"static"===u.getstyle(s,"position")&&(s.style.position="relative");function d(t){u.isemptyobject(t=t||{})&&!u.isemptyobject(p)||(p=object.assign({},u,p,t))}function t(){return p.disable}function e(){var t,e=p.responsive||p.queries;if(e){var o=v.innerwidth;if(t=f,(p=object.assign({},u,t||{})).mobilefirst)for(var i in e)i<=o&&!u.isemptyobject(e[i])&&d(e[i]);else{var n,s=[];for(n in e){var r={};r[n]=e[n],s.push(r)}for(var l=s.length-1;0<=l;l--){var a=s[l],c=object.keys(a)[0];o<=c&&!u.isemptyobject(a[c])&&d(a[c])}}}}function i(){var t,e,o,i;i.css=(t=n,e=u.getcascadedstyle(t),o=u.getstyle(t),i={height:t.offsetheight+"px",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalalign:o.verticalalign,boxsizing:o.boxsizing,marginleft:e.marginleft,marginright:e.marginright,margintop:e.margintop,marginbottom:e.marginbottom,paddingleft:e.paddingleft,paddingright:e.paddingright},e.float&&(i.float=e.float||"none"),e.cssfloat&&(i.cssfloat=e.cssfloat||"none"),o.mozboxsizing&&(i.mozboxsizing=o.mozboxsizing),i.width="auto"!==e.width?e.width:"border-box"===i.boxsizing||"border-box"===i.mozboxsizing?t.offsetwidth+"px":o.width,i),p.init(),y=!(!p.stickto||!("document"===p.stickto||p.stickto.nodetype&&9===p.stickto.nodetype||"object"==typeof p.stickto&&p.stickto instanceof("undefined"!=typeof htmldocument?htmldocument:document))),h=p.stickto?y?q:u.getelement(p.stickto):s,z=(r=function(){var t=n.offsetheight+(parseint(i.css.margintop)||0)+(parseint(i.css.marginbottom)||0),e=(z||0)-t;return-1<=e&&e<=1?z:t})(),v=(h=function(){return y?math.max(q.documentelement.clientheight,q.body.scrollheight,q.documentelement.scrollheight,q.body.offsetheight,q.documentelement.offsetheight):h.offsetheight})(),s=y?0:u.offset(h).top,w=p.stickto?y?0:u.offset(s).top:s,e=v.innerheight,n=n.offsettop-(parseint(i.css.margintop)||0),b=u.getelement(p.innersticker),l=isnan(p.top)&&-1