PageSourceSearch

https://hemingways-heidelberg.de/wp-content/cache/autoptimize/js/a…fccddac02c11c20b0d3d4bed89580f.js?ver=7.1.6

js hemingways-heidelberg.de collected 2026-10-07 23:50:41 UTC 7,274 bytes, 79 lines download raw bytes

1var aviaJS=aviaJS||{};(function($)
2{"use strict";var _units=['years','months','weeks','days','hours','minutes','seconds'],_second=1000,_minute=_second*60,_hour=_minute*60,_day=_hour*24,_week=_day*7,getDaysInMonth=function(month,year)
3{return new Date(year,month,0).getDate();},splitStartDate=function(date)
4{var result={year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate(),hours:date.getHours(),minutes:date.getMinutes(),seconds:date.getSeconds()};return result;},getYears=function(start,endDate)
5{var diff=endDate.getFullYear()-start.year;if(diff>0)
6{var check=new Date(start.year+diff,start.month-1,start.day,start.hours,start.minutes,start.seconds);if(check>endDate)
7{diff--;}}
8return(diff>=0)?diff:0;},getMonths=function(start,endDate)
9{var endMonth=endDate.getMonth()+1;var diff=endMonth-start.month;if(diff<0)
10{diff=12-start.month+endMonth;}
11if(diff>0)
12{var check=new Date(start.year,start.month-1+diff,start.day,start.hours,start.minutes,start.seconds);if(check>endDate)
13{diff--;}}
14return(diff>=0)?diff:0;},getDays=function(start,endDate)
15{var endDay=endDate.getDate();var diff=endDay-start.day;if(diff<0)
16{diff=getDaysInMonth(start.month,start.year)-start.day+endDay;}
17if(diff>0)
18{var check=new Date(start.year,start.month-1,start.day+diff,start.hours,start.minutes,start.seconds);if(check>endDate)
19{diff--;}}
20return(diff>=0)?diff:0;},getBetween=function(startDate,endDate)
21{var start=splitStartDate(startDate),result={years:0,year_months:0,month_months:0,days:0};result.years=getYears(start,endDate);start.year+=result.years;result.year_months=getMonths(start,endDate);start.month+=result.year_months;result.days=getDays(start,endDate);start.day+=result.days;result.month_months=result.years*12+result.year_months;return result;},setLabelMinWidth=function(_self,reset)
22{if(true===reset)
23{for(let i in _self.time)
24{if(typeof _self.update[i]=="object"&&_self.update[i].label_container.length)
25{_self.update[i].label_container.css({"min-width":''});}}
26_self.labelMinWidth=0;return;}
27let newMin=_self.labelMinWidth;for(let i in _self.time)
28{if(typeof _self.update[i]=="object"&&_self.update[i].label_container.length)
29{let curr=_self.update[i].label_container.outerWidth(true);if(newMin<curr)
30{newMin=curr;}}}
31if(newMin>_self.labelMinWidth)
32{for(let i in _self.time)
33{if(typeof _self.update[i]=="object"&&_self.update[i].label_container.length)
34{_self.update[i].label_container.css({"min-width":newMin+"px"});}}
35_self.labelMinWidth=newMin;}},ticker=function(_self)
36{var tmLoc=new Date(),_now=new Date(tmLoc.getTime()+tmLoc.getTimezoneOffset()*60000),_timestamp=_self.end-_now;if(_timestamp<=0)
37{if(_self.firstrun&&!_self.container.hasClass('av-finished-msg'))
38{_timestamp=0;}
39else
40{_self.container.addClass('av-countdown-finished');clearInterval(_self.countdown);return;}}
41_self.time.years=0;_self.time.months=0;_self.time.weeks=Math.floor(_timestamp/_week);_self.time.days=Math.floor((_timestamp%_week)/_day);_self.time.hours=Math.floor((_timestamp%_day)/_hour);_self.time.minutes=Math.floor((_timestamp%_hour)/_minute);_self.time.seconds=Math.floor((_timestamp%_minute)/_second);var between=getBetween(_now,_self.end);switch(_self.data.maximum)
42{case 1:_self.time.seconds=Math.floor(_timestamp/_second);break;case 2:_self.time.minutes=Math.floor(_timestamp/_minute);break;case 3:_self.time.hours=Math.floor(_timestamp/_hour);break;case 4:_self.time.days=Math.floor(_timestamp/_day);break;case 6:_self.time.days=between.days;_self.time.months=between.month_months;break;case 7:_self.time.days=between.days;_self.time.months=between.year_months;_self.time.years=between.years;break;}
43for(let i in _self.time)
44{if(typeof _self.update[i]=="object"&&_self.update[i].label_container.length)
45{if(_self.firstrun||_self.oldtime[i]!=_self.time[i])
46{let labelkey=(_self.time[i]===1)?"single":"multi",new_label=_self.update[i][labelkey],old_label=_self.update[i].label_container.text();if(old_label!=new_label)
47{_self.update[i].label_container.text(new_label);}
48if(_self.isFlipNumbers)
49{if(_self.update[i].unitContainer.length)
50{if(!_self.firstrun)
51{_self.update[i].backCard.attr('data-value',_self.oldtime[i]);_self.update[i].bottomCard.attr('data-value',_self.oldtime[i]);}
52_self.update[i].topCard.text(_self.time[i]);_self.update[i].backBottomCard.attr('data-value',_self.time[i]);_self.update[i].unitContainer.removeClass('flip');void _self.update[i].unitContainer[0].offsetWidth;_self.update[i].unitContainer.addClass('flip');}}
53else if(_self.isFlipClock)
54{if(_self.update[i].unitContainer.length)
55{if(!_self.firstrun)
56{_self.update[i].currentTop.text(_self.oldtime[i]);_self.update[i].currentBottom.text(_self.oldtime[i]);}
57_self.update[i].nextTop.text(_self.time[i]);_self.update[i].nextBottom.text(_self.time[i]);_self.update[i].unitContainer.removeClass('flip');void _self.update[i].unitContainer[0].offsetWidth;_self.update[i].unitContainer.addClass('flip');}}
58else
59{_self.update[i].time_container.text(_self.time[i]);}}}}
60if(_self.firstrun)
61{_self.container.addClass('av-countdown-active');}
62_self.oldtime=$.extend({},_self.time);_self.firstrun=false;if((_self.isFlipNumbers||_self.isFlipClock)&&_self.number_space)
63{setTimeout(function()
64{setLabelMinWidth(_self);},50);}};$.fn.aviaCountdown=function(options)
65{if(!this.length)
66{return;}
67return this.each(function()
68{var _self={};_self.update={};_self.time={};_self.oldtime={};_self.firstrun=true;_self.container=$(this);_self.data=_self.container.data();_self.end=new Date(_self.data.year,_self.data.month,_self.data.day,_self.data.hour,_self.data.minute);_self.isFlipNumbers=_self.container.hasClass('av-flip-numbers');_self.isFlipClock=_self.container.hasClass('av-flip-clock');
68_self.number_space=_self.container.hasClass('av-number-space-equal');_self.labelMinWidth=0;var onResize=function(e)
69{if(_self.number_space)
70{setLabelMinWidth(_self,true);}};if(_self.data.timezone!='0')
71{_self.end=new Date(_self.end.getTime()-_self.data.timezone*60000);}
72for(var i in _units)
73{let unitContainer=_self.container.find('.av-countdown-'+_units[i]);_self.update[_units[i]]={unitContainer:unitContainer,time_container:_self.container.find('.av-countdown-'+_units[i]+' .av-countdown-time'),label_container:_self.container.find('.av-countdown-'+_units[i]+' .av-countdown-time-label')};if(_self.update[_units[i]].label_container.length)
74{_self.update[_units[i]].single=_self.update[_units[i]].label_container.data('label');_self.update[_units[i]].multi=_self.update[_units[i]].label_container.data('label-multi');}
75if(_self.isFlipNumbers)
76{_self.update[_units[i]].topCard=unitContainer.find('.card__top');_self.update[_units[i]].bottomCard=unitContainer.find('.card__bottom');_self.update[_units[i]].backCard=unitContainer.find('.card__back');_self.update[_units[i]].backBottomCard=unitContainer.find('.card__back .card__bottom');}
77else if(_self.isFlipClock)
78{_self.update[_units[i]].currentTop=unitContainer.find('.curr.top');_self.update[_units[i]].nextTop=unitContainer.find('.next.top');_self.update[_units[i]].nextBottom=unitContainer.find('.next.bottom');_self.update[_units[i]].currentBottom=unitContainer.find('.curr.bottom');}}
79ticker(_self);_self.countdown=setInterval(function(){ticker(_self);},1000);window.addEventListener('resize',aviaJS.aviaJSHelpers.debounce(onResize.bind(this),50));});};}(jQuery));

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.