View file upload/js/themehouse/uix_classic_dark/indexRadius.min.js

File size: 9.91Kb
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,f){a!=Array.prototype&&a!=Object.prototype&&(a[b]=f.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(f){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(f||"")+"_"+b++,f)}var b=0;return a}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
(function(a){function b(g){if(f[g])return f[g].exports;var e=f[g]={i:g,l:!1,exports:{}};a[g].call(e.exports,e,e.exports,b);e.l=!0;return e.exports}var f={};b.m=a;b.c=f;b.d=function(a,e,d){b.o(a,e)||Object.defineProperty(a,e,{configurable:!1,enumerable:!0,get:d})};b.n=function(a){var e=a&&a.__esModule?function(){return a["default"]}:function(){return a};b.d(e,"a",e);return e};b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};b.p="";return b(b.s=2)})([function(a,b,f){Object.defineProperty(b,
"__esModule",{value:!0});a=f(1);$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();b="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbol();return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};"object"!==b(window.themehouse)&&(window.themehouse={});"object"!==b(window.themehouse.settings)&&(window.themehouse.settings={});
"object"!==b(window.themehouse.settings.data)&&(window.themehouse.settings.data={});window.themehouse.settings.data.jsVersion="2.1.2.0_Release";(new a.a({settings:window.themehouse.settings.sticky})).register()},function(a,b,f){var g=function(){function a(a,c){for(var d=0;d<c.length;d++){var b=c[d];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}return function(d,c,b){c&&a(d.prototype,c);b&&a(d,b);return d}}();a=function(){function a(d){var c=
this,b=d.settings;b=void 0===b?{}:b;var h=d.init;h=void 0===h?!1:h;d=d.commonVersion;d=void 0===d?"20180112":d;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.initEle=function(a){var b=c.eles[a],d=b.offsets,k=d.topOffsetBreakpoints;d=Math.max(d.topOffset,0);if(k.length){var m=!0,l=!1,h=void 0;try{$jscomp.initSymbol();$jscomp.initSymbolIterator();for(var e=k[Symbol.iterator](),f;!(m=(f=e.next()).done);m=!0){var g=f.value,n=parseInt(g.offset,10)||0;if(g.breakpoint&&
"100%"!==g.breakpoint){var p=parseInt(g.breakpoint,10)||0;c.common.values.innerWidth>=p&&(d+=n)}}}catch(q){l=!0,h=q}finally{try{!m&&e["return"]&&e["return"]()}finally{if(l)throw h;}}}d!==b.currentOffset&&(k=jQuery(b.ele),-1!==b.currentOffset&&k.trigger("sticky_kit:detach").removeData("sticky_kit"),k.stick_in_parent({sticky_class:c.settings.stickyClass,offset_top:d}),c.eles[a].currentOffset=d)};this.init=function(){c.initGet();c.initSet()};this.initGet=function(){for(var a=window.document.querySelectorAll(c.settings.stickySelector),
b=0,d=a.length;b<d;b++){var k=a[b],e=parseInt(k.getAttribute(c.settings.dataTop),10)||0,l=void 0;try{l=JSON.parse(k.getAttribute(c.settings.dataTopBreakpoints))||[]}catch(r){l=[]}c.eles.push({ele:k,offsets:{topOffset:e,topOffsetBreakpoints:l},currentOffset:-1})}c.resizeGet();$(window).on("resize.sticky-header",$.proxy(c,"update"))};this.initSet=function(){c.resizeSet();c.running=!0};this.resize=function(){c.resizeGet();c.resizeSet()};this.resizeGet=function(){};this.resizeSet=function(){c.common.values.innerHeight<
c.settings.minWindowHeight?!1!==c.active&&c.disable():c.active||c.enable();for(var a=0,b=c.eles.length;a<b;a++)c.initEle(a)};this.running=!1;this.settings=Object.assign({stickySelector:".uix_stickyBar",stickyClass:"is-sticky",stickyBrokenClass:"is-sticky-broken",stickyDisabledClass:"is-sticky-disabled",minWindowHeight:251,dataTop:"data-top-offset",dataTopBreakpoints:"data-top-offset-breakpoints"},b);this.commonVersion=d;this.common=window.themehouse.common[d];this.stickyBroken=this.supportsSticky=
this.active=!1;this.eles=[];h&&this.init()}g(a,[{key:"register",value:function(){this.common.register({phase:"initGet",addon:"TH_UIX_Sticky",func:this.initGet,order:10});this.common.register({phase:"initSet",addon:"TH_UIX_Sticky",func:this.initSet,order:10});this.common.register({phase:"resizeGet",addon:"TH_UIX_Sticky",func:this.resizeGet,order:10});this.common.register({phase:"resizeSet",addon:"TH_UIX_Sticky",func:this.resizeSet,order:100})}},{key:"enable",value:function(){var a=this;this.active=
!0;for(var c=function(c,b){var d=a.eles[c].ele;d.classList.remove(a.settings.stickyDisabledClass);a.supportsSticky||(a.stickyBroken&&setTimeout(function(){d.classList.add(a.settings.stickyBrokenClass)},0),a.initEle(c))},b=0,e=this.eles.length;b<e;b++)c(b,e)}},{key:"disable",value:function(){this.active=!1;this.supportsSticky&&window.jQuery(window).off("scroll.sticky-header");for(var a=0,c=this.eles.length;a<c;a++){var b=this.eles[a].ele;this.supportsSticky&&window.jQuery(b).trigger("sticky_kit:detach").removeData("sticky_kit");
b.classList.remove(this.settings.stickyClass);b.classList.remove(this.settings.stickyBrokenClass);b.classList.remove(this.settings.stickyDisabledClass)}}}]);return a}();"undefined"===typeof window.themehouse&&(window.themehouse={});window.themehouse.sticky={sticky:a};b.a=a},function(a,b,f){Object.defineProperty(b,"__esModule",{value:!0});a=f(3);f(0);(new a.a({settings:window.themehouse.settings.checkRadius})).register()},function(a,b,f){var g=function(){function a(a,c){for(var b=0;b<c.length;b++){var d=
c[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,e){c&&a(b.prototype,c);e&&a(b,e);return b}}();a=function(){function a(b){var c=this,d=b.settings;d=void 0===d?{}:d;var e=b.init;e=void 0===e?!1:e;b=b.commonVersion;b=void 0===b?"20180112":b;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.init=function(){c.initGet();c.initSet()};this.initGet=function(){if(c.settings.enabled){var a=
c.settings.selectors.split(",");if(a.length){for(var b=0,d=a.length;b<d;b++){var e=a[b];if(e.length)for(var f=window.document.querySelectorAll(e),g=0,h=f.length;g<h;g++)c.eles.push({ele:f[g],selector:e,lastClass:"",height:-1,topOffset:-1,topRadius:!0,bottomRadius:!0})}c.resizeGet()}}};this.initSet=function(){c.settings.enabled&&(c.resizeSet(),c.running=!0)};this.resize=function(){c.resizeGet();c.resizeSet()};this.resizeGet=function(){c.settings.enabled&&c.checkGet()};this.resizeSet=function(){c.settings.enabled&&
c.checkSet()};this.check=function(){c.checkGet();c.checkSet()};this.checkGet=function(){if(c.settings.enabled)for(var a=window.document.body.scrollTop||0,b=0,d=c.eles.length;b<d;b++){var e=c.eles[b].ele,f=e.getBoundingClientRect();c.eles[b].height=e.offsetHeight;c.eles[b].width=e.offsetWidth;c.eles[b].topOffset=f.top+a}};this.checkSet=function(){if(c.settings.enabled)for(var a=0,b=c.eles.length;a<b;a++){var d=c.eles[a];if(d.width===c.common.values.innerWidth)c.eles[a].topRadius=!1,c.eles[a].bottomRadius=
!1;else for(var e=0;e<b;e++)if(a!==e){var f=c.eles[e];1>Math.abs(d.topOffset-(f.topOffset+f.height))&&(c.eles[a].topRadius=!1);1>Math.abs(d.topOffset+d.height-f.topOffset)&&(c.eles[a].bottomRadius=!1)}e=c.settings.defaultClass;d.topRadius||d.bottomRadius?d.topRadius?d.bottomRadius||(e=c.settings.noBottomClass):e=c.settings.noTopClass:e=c.settings.noBorderClass;e!==d.lastClass&&(d.lastClass&&d.ele.classList.remove(d.lastClass),d.ele.classList.add(e),d.lastClass=e)}};this.running=!1;this.settings=Object.assign({enabled:!1,
selectors:"",defaultClass:"uix_smartBorder--default",noTopClass:"uix_smartBorder--noTop",noBottomClass:"uix_smartBorder--noBottom",noBorderClass:"uix_smartBorder--noBoth"},d);this.commonVersion=b;this.common=window.themehouse.common[b];this.eles=[];e&&this.init()}g(a,[{key:"register",value:function(){this.settings.enabled&&(this.common.register({phase:"initGet",addon:"TH_UIX_CheckRadius",func:this.initGet,order:100}),this.common.register({phase:"initSet",addon:"TH_UIX_CheckRadius",func:this.initSet,
order:100}),this.common.register({phase:"resizeGet",addon:"TH_UIX_CheckRadius",func:this.resizeGet,order:10}),this.common.register({phase:"resizeSet",addon:"TH_UIX_CheckRadius",func:this.resizeSet,order:10}))}}]);return a}();"undefined"===typeof window.themehouse&&(window.themehouse={});window.themehouse.checkRadius={checkRadius:a};b.a=a}]);