!function(e){"use strict";var t={i18n:{ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;t<0&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&S<=r||S>=o&&S<=s||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(o<=S&&S<=s?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return t==-1&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;o<7;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&n<i)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;o<60;o+=_.step)m=(a<10?"0":"")+a,c=(o<10?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";a<=11;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;n-t<a&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return!a.hasClass("xdsoft_disabled")&&(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return!n.hasClass("xdsoft_disabled")&&(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return!_.scrollMonth||(t<0?W.nextMonth():W.prevMonth(),!1)}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return t<0&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return!_.scrollInput||(!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0)});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),n<0&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=o.detail*-1),o.deltaY&&(u=o.deltaY*-1,i=u),o.deltaX&&(d=o.deltaX,i=d*-1),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=o.wheelDeltaX*-1),c=Math.abs(i),(!n||c<n)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||l<a)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(l){r=!0,s=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||T,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!e)return i;for(s=e.attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.hasAttribute(t+i)},setAttr:function(e,t,i,n){e.setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function S(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var i=t.map(function(e){return parseInt(e,10)}),n=_slicedToArray(i,4),r=(n[0],n[1]),s=n[2],a=n[3],S=new Date(r,s-1,a);return S.getFullYear()!==r||S.getMonth()+1!==s||S.getDate()!==a?null:S},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var i=this.parse[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';var n=i(t);if(null===n)throw"Requirement is not a "+e+': "'+t+'"';return n},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){i.indexOf(t)==-1&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return!this.parent||this.parent.trigger(e,t,i)},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var u=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},d=function(e,t,i){var n=null,r={};for(var s in e)if(s){var o=i(s);"string"==typeof o&&(o=a.parseRequirement(e[s],o)),r[s]=o}else n=a.parseRequirement(e[s],t);return[n,r]},h=function(t){e.extend(!0,this,t)};h.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=a.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return Array.isArray(t)?t:[t];var n=this.requirementType;if(Array.isArray(n)){for(var r=u(t,n.length),s=0;s<r.length;s++)r[s]=a.parseRequirement(n[s],r[s]);return r}return e.isPlainObject(n)?d(n,t,i):[a.parseRequirement(n,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},c={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==a.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};c.range=c.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(a.parse[e])},g=function(e,t){return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),t.apply(void 0,[i].concat(_toConsumableArray(m(e,r))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var i in e)this.addValidator(i,e[i].fn,e[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new h(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"any":n,s=i.base,a=void 0===s?0:s,o=c[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(f(r),f(a));if(f(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,i){return e>=t&&e<=i}),equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i||i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler)return 0===e(this.options.classHandler).length&&ParsleyUtils.warn("No elements found that match the selector `"+this.options.classHandler+"` set in options.classHandler or data-parsley-class-handler"),e(this.options.classHandler);if("function"==typeof this.options.classHandler)var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return"undefined"!=typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._submitSource||this.$element.find(a._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=_extends({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);if(("Field"===n.__class__||"FieldMultiple"===n.__class__)&&!0!==n.options.excluded){var r=n.__class__+"-"+n.__id__;"undefined"==typeof t.fieldsMappedById[r]&&(t.fieldsMappedById[r]=n,t.fields.push(n))}}),e.each(a.difference(i,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(e,t,i,n,r){var s=window.Parsley._validatorRegistry.validators[t],a=new h(s);n=n||e.options[t+"Priority"]||a.priority,r=!0===r,_extends(this,{validator:a,name:t,requirements:i,priority:n,isDomConstraint:r}),this._parseRequirements(e.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var E=function(t,i,n,r){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};E.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;if(this.refreshConstraints(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return!s||A[s.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));if(d.push(r),"rejected"===r.state())return!1}),a.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=this.element.type;return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=E,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if("radio"===this.element.type)return this._findRelated().filter(":checked").val()||"";if("checkbox"===this.element.type){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.element=t,this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&_extends(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"Form"!==n.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.7.2",this.__id__=a.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||a.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return"radio"===this.element.type||"checkbox"===this.element.type||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){"radio"!==t.type&&"checkbox"!==t.type||t.setAttribute(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.7.2"});_extends(x.prototype,y.Field,l.prototype),_extends(w.prototype,y.Form,l.prototype),_extends(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this[0],t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=a,window.ParsleyUtils={},e.each(a,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),a[e].apply(a,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return a.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var T=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var I=new n;I.install();var q=O;return q});jQuery(document).ready(function(e){function a(e,a){l(e,a),e.find(a.container).first().show()}function n(a,n){if(n.tabs){var t=e("<div />",{"class":n.tabMenuClassName}).insertBefore(a.children(n.container).filter(":first"));a.children(n.container).each(function(i,r){var l=e("<button/>").html(e(this).children(n.header).html()).addClass(0==i?n.tabMenuItemActiveClassName:"").addClass("item"+i).addClass("btn btn-default").prop("type","button").on("click keypress",{container:a.children(n.container),fieldset:e(r)},function(){var t=e(this),i=t.parent().children().index(t);s(a,n,t,i)});n.tabIndex&&l.prop("tabindex",i),t.append(l)})}}function t(a,n){n.navigation&&a.children(n.container).each(function(t){var i=e("<div />").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));t>0&&i.append(c(a,n)),t<a.children(n.container).length-1&&i.append(o(a,n))})}function i(a,n){e.fn.parsley&&"data-parsley-validate"===a.data("parsley-validate")&&a.parsley().subscribe("parsley:field:validated",function(){v(a,n),C(a,n)})}function r(a,n){n.openTabOnError&&e.fn.parsley&&e.listen("parsley:field:error",function(){setTimeout(function(){a.find("."+n.tabMenuClassName+" > ."+n.tabMenuItemErrorClassName+":first").click()},50)})}function s(a,n,t,i){$activeTab=b(a,n),$activeTab.removeClass(n.tabMenuItemActiveClassName),t.addClass(n.tabMenuItemActiveClassName),l(a,n),e(".powermail_fieldset",a).slice(i,i+1).show()}function l(e,a){e.children(a.container).hide()}function c(a,n){return e("<a />").prop("href","#").addClass("btn btn-warning").html("<").click(function(e){e.preventDefault(),u(a,n)})}function o(a,n){return e("<a />").prop("href","#").addClass("btn btn-primary pull-right").html(">").click(function(e){e.preventDefault(),d(a,n)})}function d(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName),f(e,a,n+1)}function u(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName),f(e,a,n-1)}function f(e,a,n){l(e,a),e.find(".powermail_fieldset").slice(n,n+1).show()}function m(e,a){var n=p(e,a),t=n.index(b(e,a));return parseInt(t)}function p(e,a){return e.find("."+a.tabMenuClassName).children()}function b(e,a){var n=p(e,a);return n.filter("."+a.tabMenuItemActiveClassName)}function v(e,a){var n=p(e,a);n.removeClass(a.tabMenuItemErrorClassName)}function C(a,n){a.parsley().isValid()||a.find(".parsley-error").each(function(){var t=a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),i=p(a,n),r=i.slice(t,t+1);r.addClass(n.tabMenuItemErrorClassName)})}e.fn.powermailTabs=function(e){"use strict";var s=jQuery(this);e=jQuery.extend({container:"fieldset",header:"legend",tabs:!0,navigation:!0,openTabOnError:!0,tabIndex:!0,tabMenuClassName:"btn-group",tabMenuItemActiveClassName:"btn-primary",tabMenuItemErrorClassName:"btn-danger"},e),a(s,e),n(s,e),t(s,e),i(s,e),r(s,e)}});function PowermailForm(e){"use strict";this.initialize=function(){t(),a(),i(),r(),o(),n(),f(),l()};var t=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},a=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(t){var a=t.coords.latitude,i=t.coords.longitude,r=C()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+a+"&lng="+i,cache:!1,success:function(t){t&&e('*[data-powermail-location="prefill"]').val(t)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var t=e(this);if("date"===t.prop("type")||"datetime-local"===t.prop("type")||"time"===t.prop("type")){if(!t.data("datepicker-force")){if(e(this).data("date-value")){var a=g(e(this).data("date-value"),e(this).data("datepicker-format"),t.prop("type"));null!==a&&e(this).val(a)}return}t.prop("type","text"),t.val(e(this).data("date-value"))}var i=!0,r=!0;"date"===t.data("datepicker-settings")?r=!1:"time"===t.data("datepicker-settings")&&(i=!1),t.datetimepicker({format:t.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:t.data("datepicker-months").split(","),dayOfWeek:t.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(x(),b())},p=function(){var t,a=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this),o=r.closest(".tx-powermail");r.data("powermail-ajax-uri")&&(t=r.data("powermail-ajax-uri"));var n=r.data("powermail-form");a||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),contentType:!1,processData:!1,beforeSend:function(){s(r)},complete:function(){d(r),f(),c(o)},success:function(i){var o=e('*[data-powermail-form="'+n+'"]:first',i);o.length?(e('*[data-powermail-form="'+n+'"]:first').closest(".tx-powermail").html(o),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),w()):(t?D(t):r.submit(),a=!0)}}),i.preventDefault())})},s=function(t){d(t),e(".powermail_submit",t).length?e(".powermail_submit",t).parent().append(y()):t.closest(".tx-powermail").append(y())},d=function(e){e.closest(".tx-powermail").find(".powermail_progressbar").remove()},c=function(t){var a=e.Event("submitted.powermail.form");t.trigger(a)},f=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){u(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){m(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},u=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},m=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},w=function(){e("img.powermail_captchaimage").each(function(){var t=h(e(this).prop("src"));e(this).prop("src",t+"?hash="+v(5))})},h=function(e){var t=e.split("?");return t[0]},v=function(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},g=function(e,t,a){var i=Date.parseDate(e,t);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===a?o:"datetime-local"===a?l:"time"===a?n:null},y=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progress_inner")))},_=function(e){for(var t=e.get(0),a=0,i=0;i<t.files.length;i++){var r=t.files[i];r.size>a&&(a=r.size)}return parseInt(a)},x=function(){window.Parsley.addValidator("powermailfilesize",function(t,a){if(a.indexOf(",")!==-1){var i=a.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&_(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},b=function(){window.Parsley.addValidator("powermailfileextensions",function(t,a){var i=e('*[name="tx_powermail_pi1[field]['+a+'][]"]');return!i.length||k(j(t),i.prop("accept"))},32).addMessage("en","powermailfileextensions","Error")},k=function(e,t){return t.indexOf("."+e)!==-1},j=function(e){return e.split(".").pop().toLowerCase()},D=function(e){e.indexOf("http")!==-1?window.location=e:window.location.pathname=e},C=function(){var t;return t=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var t=new window.PowermailForm(e);t.initialize()});!function(e){function o(o){"use strict";var i=e(o),r=["powermail_input","powermail_textarea","powermail_select","powermail_radio","powermail_checkbox"];this.ajaxListener=function(){t(),e(_()).on("change",function(){t()})};var n=function(o){if(void 0!==o.todo){for(var i in o.todo){var r=e(".powermail_form_"+i);for(var n in o.todo[i]){r.find(".powermail_fieldset_"+n);"hide"===o.todo[i][n]["#action"]&&f(m(n,r)),"un_hide"===o.todo[i][n]["#action"]&&p(m(n,r));for(var t in o.todo[i][n])"hide"===o.todo[i][n][t]["#action"]&&c(t,r),"un_hide"===o.todo[i][n][t]["#action"]&&u(t,r)}}h()}},t=function(){var o=e(i.get(0)),r=o.find(":disabled").prop("disabled",!1),t=new FormData(i.get(0));r.prop("disabled",!0),e.ajax({type:"POST",url:l(),data:t,contentType:!1,processData:!1,success:function(e){100===e.loops&&q("100 loops reached by parsing conditions and rules. Maybe there are conflicting conditions."),n(e)}})},a=function(e){(e.prop("required")||e.data("parsley-required"))&&(e.prop("required",!1),e.removeAttr("data-parsley-required"),e.data("powermailcond-required","required"))},d=function(e){"required"===e.data("powermailcond-required")&&(y()?e.prop("required","required"):v()&&e.prop("required","required")),e.removeData("powermailcond-required")},u=function(e,o){var i=o.find(".powermail_fieldwrap_"+e);i.show();var r=s(e,o);r.prop("disabled",!1),d(r)},c=function(e,o){var i=o.find(".powermail_fieldwrap_"+e);i.hide();var r=s(e,o);r.prop("disabled",!0),a(r)},p=function(e){e.show()},f=function(e){e.hide()},l=function(){var o=e("*[data-condition-uri]").data("condition-uri");return void 0===o&&q("Tag with data-condition-uri not found. Maybe TypoScript was not included."),o},s=function(e,o){return o.find('[name^="tx_powermail_pi1[field]['+e+']"]').not('[type="hidden"]')},m=function(e,o){return o.find(".powermail_fieldset_"+e)},w=function(e,o,i){o="undefined"!=typeof o?o:"",i="undefined"!=typeof i?i:",";for(var r="",n=0;n<e.length;n++)n>0&&(r+=i),r+=o+e[n];return r},_=function(){return w(r,".")},v=function(){return"data-parsley-validate"===i.data("parsley-validate")},y=function(){return"html5"===i.data("validate")},h=function(){v()&&(i.parsley().destroy(),i.parsley())},q=function(e){"object"==typeof console&&("string"==typeof e&&(e="powermail_cond: "+e),console.log(e))}}e(document).ready(function(){e("form.powermail_form").each(function(){new o(this).ajaxListener()})})}(jQuery);
/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.6.0
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */
/* global window, document, define, jQuery, setInterval, clearInterval */
(function(factory) {
    'use strict';
    if (typeof define === 'function' && define.amd) {
        define(['jquery'], factory);
    } else if (typeof exports !== 'undefined') {
        module.exports = factory(require('jquery'));
    } else {
        factory(jQuery);
    }

}(function($) {
    'use strict';
    var Slick = window.Slick || {};

    Slick = (function() {

        var instanceUid = 0;

        function Slick(element, settings) {

            var _ = this, dataSettings;

            _.defaults = {
                accessibility: true,
                adaptiveHeight: false,
                appendArrows: $(element),
                appendDots: $(element),
                arrows: true,
                asNavFor: null,
                prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
                nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
                autoplay: false,
                autoplaySpeed: 3000,
                centerMode: false,
                centerPadding: '50px',
                cssEase: 'ease',
                customPaging: function(slider, i) {
                    return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
                },
                dots: false,
                dotsClass: 'slick-dots',
                draggable: true,
                easing: 'linear',
                edgeFriction: 0.35,
                fade: false,
                focusOnSelect: false,
                infinite: true,
                initialSlide: 0,
                lazyLoad: 'ondemand',
                mobileFirst: false,
                pauseOnHover: true,
                pauseOnFocus: true,
                pauseOnDotsHover: false,
                respondTo: 'window',
                responsive: null,
                rows: 1,
                rtl: false,
                slide: '',
                slidesPerRow: 1,
                slidesToShow: 1,
                slidesToScroll: 1,
                speed: 500,
                swipe: true,
                swipeToSlide: false,
                touchMove: true,
                touchThreshold: 5,
                useCSS: true,
                useTransform: true,
                variableWidth: false,
                vertical: false,
                verticalSwiping: false,
                waitForAnimate: true,
                zIndex: 1000
            };

            _.initials = {
                animating: false,
                dragging: false,
                autoPlayTimer: null,
                currentDirection: 0,
                currentLeft: null,
                currentSlide: 0,
                direction: 1,
                $dots: null,
                listWidth: null,
                listHeight: null,
                loadIndex: 0,
                $nextArrow: null,
                $prevArrow: null,
                slideCount: null,
                slideWidth: null,
                $slideTrack: null,
                $slides: null,
                sliding: false,
                slideOffset: 0,
                swipeLeft: null,
                $list: null,
                touchObject: {},
                transformsEnabled: false,
                unslicked: false
            };

            $.extend(_, _.initials);

            _.activeBreakpoint = null;
            _.animType = null;
            _.animProp = null;
            _.breakpoints = [];
            _.breakpointSettings = [];
            _.cssTransitions = false;
            _.focussed = false;
            _.interrupted = false;
            _.hidden = 'hidden';
            _.paused = true;
            _.positionProp = null;
            _.respondTo = null;
            _.rowCount = 1;
            _.shouldClick = true;
            _.$slider = $(element);
            _.$slidesCache = null;
            _.transformType = null;
            _.transitionType = null;
            _.visibilityChange = 'visibilitychange';
            _.windowWidth = 0;
            _.windowTimer = null;

            dataSettings = $(element).data('slick') || {};

            _.options = $.extend({}, _.defaults, settings, dataSettings);

            _.currentSlide = _.options.initialSlide;

            _.originalSettings = _.options;

            if (typeof document.mozHidden !== 'undefined') {
                _.hidden = 'mozHidden';
                _.visibilityChange = 'mozvisibilitychange';
            } else if (typeof document.webkitHidden !== 'undefined') {
                _.hidden = 'webkitHidden';
                _.visibilityChange = 'webkitvisibilitychange';
            }

            _.autoPlay = $.proxy(_.autoPlay, _);
            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
            _.changeSlide = $.proxy(_.changeSlide, _);
            _.clickHandler = $.proxy(_.clickHandler, _);
            _.selectHandler = $.proxy(_.selectHandler, _);
            _.setPosition = $.proxy(_.setPosition, _);
            _.swipeHandler = $.proxy(_.swipeHandler, _);
            _.dragHandler = $.proxy(_.dragHandler, _);
            _.keyHandler = $.proxy(_.keyHandler, _);

            _.instanceUid = instanceUid++;

            // A simple way to check for HTML strings
            // Strict HTML recognition (must start with <)
            // Extracted from jQuery v1.11 source
            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;


            _.registerBreakpoints();
            _.init(true);

        }

        return Slick;

    }());

    Slick.prototype.activateADA = function() {
        var _ = this;

        _.$slideTrack.find('.slick-active').attr({
            'aria-hidden': 'false'
        }).find('a, input, button, select').attr({
            'tabindex': '0'
        });

    };

    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            addBefore = index;
            index = null;
        } else if (index < 0 || (index >= _.slideCount)) {
            return false;
        }

        _.unload();

        if (typeof(index) === 'number') {
            if (index === 0 && _.$slides.length === 0) {
                $(markup).appendTo(_.$slideTrack);
            } else if (addBefore) {
                $(markup).insertBefore(_.$slides.eq(index));
            } else {
                $(markup).insertAfter(_.$slides.eq(index));
            }
        } else {
            if (addBefore === true) {
                $(markup).prependTo(_.$slideTrack);
            } else {
                $(markup).appendTo(_.$slideTrack);
            }
        }

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).detach();

        _.$slideTrack.append(_.$slides);

        _.$slides.each(function(index, element) {
            $(element).attr('data-slick-index', index);
        });

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.animateHeight = function() {
        var _ = this;
        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
            _.$list.animate({
                height: targetHeight
            }, _.options.speed);
        }
    };

    Slick.prototype.animateSlide = function(targetLeft, callback) {

        var animProps = {},
            _ = this;

        _.animateHeight();

        if (_.options.rtl === true && _.options.vertical === false) {
            targetLeft = -targetLeft;
        }
        if (_.transformsEnabled === false) {
            if (_.options.vertical === false) {
                _.$slideTrack.animate({
                    left: targetLeft
                }, _.options.speed, _.options.easing, callback);
            } else {
                _.$slideTrack.animate({
                    top: targetLeft
                }, _.options.speed, _.options.easing, callback);
            }

        } else {

            if (_.cssTransitions === false) {
                if (_.options.rtl === true) {
                    _.currentLeft = -(_.currentLeft);
                }
                $({
                    animStart: _.currentLeft
                }).animate({
                    animStart: targetLeft
                }, {
                    duration: _.options.speed,
                    easing: _.options.easing,
                    step: function(now) {
                        now = Math.ceil(now);
                        if (_.options.vertical === false) {
                            animProps[_.animType] = 'translate(' +
                                now + 'px, 0px)';
                            _.$slideTrack.css(animProps);
                        } else {
                            animProps[_.animType] = 'translate(0px,' +
                                now + 'px)';
                            _.$slideTrack.css(animProps);
                        }
                    },
                    complete: function() {
                        if (callback) {
                            callback.call();
                        }
                    }
                });

            } else {

                _.applyTransition();
                targetLeft = Math.ceil(targetLeft);

                if (_.options.vertical === false) {
                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
                } else {
                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
                }
                _.$slideTrack.css(animProps);

                if (callback) {
                    setTimeout(function() {

                        _.disableTransition();

                        callback.call();
                    }, _.options.speed);
                }

            }

        }

    };

    Slick.prototype.getNavTarget = function() {

        var _ = this,
            asNavFor = _.options.asNavFor;

        if ( asNavFor && asNavFor !== null ) {
            asNavFor = $(asNavFor).not(_.$slider);
        }

        return asNavFor;

    };

    Slick.prototype.asNavFor = function(index) {

        var _ = this,
            asNavFor = _.getNavTarget();

        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
            asNavFor.each(function() {
                var target = $(this).slick('getSlick');
                if(!target.unslicked) {
                    target.slideHandler(index, true);
                }
            });
        }

    };

    Slick.prototype.applyTransition = function(slide) {

        var _ = this,
            transition = {};

        if (_.options.fade === false) {
            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
        } else {
            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
        }

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.autoPlay = function() {

        var _ = this;

        _.autoPlayClear();

        if ( _.slideCount > _.options.slidesToShow ) {
            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
        }

    };

    Slick.prototype.autoPlayClear = function() {

        var _ = this;

        if (_.autoPlayTimer) {
            clearInterval(_.autoPlayTimer);
        }

    };

    Slick.prototype.autoPlayIterator = function() {

        var _ = this,
            slideTo = _.currentSlide + _.options.slidesToScroll;

        if ( !_.paused && !_.interrupted && !_.focussed ) {

            if ( _.options.infinite === false ) {

                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
                    _.direction = 0;
                }

                else if ( _.direction === 0 ) {

                    slideTo = _.currentSlide - _.options.slidesToScroll;

                    if ( _.currentSlide - 1 === 0 ) {
                        _.direction = 1;
                    }

                }

            }

            _.slideHandler( slideTo );

        }

    };

    Slick.prototype.buildArrows = function() {

        var _ = this;

        if (_.options.arrows === true ) {

            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');

            if( _.slideCount > _.options.slidesToShow ) {

                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');

                if (_.htmlExpr.test(_.options.prevArrow)) {
                    _.$prevArrow.prependTo(_.options.appendArrows);
                }

                if (_.htmlExpr.test(_.options.nextArrow)) {
                    _.$nextArrow.appendTo(_.options.appendArrows);
                }

                if (_.options.infinite !== true) {
                    _.$prevArrow
                        .addClass('slick-disabled')
                        .attr('aria-disabled', 'true');
                }

            } else {

                _.$prevArrow.add( _.$nextArrow )

                    .addClass('slick-hidden')
                    .attr({
                        'aria-disabled': 'true',
                        'tabindex': '-1'
                    });

            }

        }

    };

    Slick.prototype.buildDots = function() {

        var _ = this,
            i, dot;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$slider.addClass('slick-dotted');

            dot = $('<ul />').addClass(_.options.dotsClass);

            for (i = 0; i <= _.getDotCount(); i += 1) {
                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
            }

            _.$dots = dot.appendTo(_.options.appendDots);

            _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');

        }

    };

    Slick.prototype.buildOut = function() {

        var _ = this;

        _.$slides =
            _.$slider
                .children( _.options.slide + ':not(.slick-cloned)')
                .addClass('slick-slide');

        _.slideCount = _.$slides.length;

        _.$slides.each(function(index, element) {
            $(element)
                .attr('data-slick-index', index)
                .data('originalStyling', $(element).attr('style') || '');
        });

        _.$slider.addClass('slick-slider');

        _.$slideTrack = (_.slideCount === 0) ?
            $('<div class="slick-track"/>').appendTo(_.$slider) :
            _.$slides.wrapAll('<div class="slick-track"/>').parent();

        _.$list = _.$slideTrack.wrap(
            '<div aria-live="polite" class="slick-list"/>').parent();
        _.$slideTrack.css('opacity', 0);

        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
            _.options.slidesToScroll = 1;
        }

        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');

        _.setupInfinite();

        _.buildArrows();

        _.buildDots();

        _.updateDots();


        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

        if (_.options.draggable === true) {
            _.$list.addClass('draggable');
        }

    };

    Slick.prototype.buildRows = function() {

        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;

        newSlides = document.createDocumentFragment();
        originalSlides = _.$slider.children();

        if(_.options.rows > 1) {

            slidesPerSection = _.options.slidesPerRow * _.options.rows;
            numOfSlides = Math.ceil(
                originalSlides.length / slidesPerSection
            );

            for(a = 0; a < numOfSlides; a++){
                var slide = document.createElement('div');
                for(b = 0; b < _.options.rows; b++) {
                    var row = document.createElement('div');
                    for(c = 0; c < _.options.slidesPerRow; c++) {
                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
                        if (originalSlides.get(target)) {
                            row.appendChild(originalSlides.get(target));
                        }
                    }
                    slide.appendChild(row);
                }
                newSlides.appendChild(slide);
            }

            _.$slider.empty().append(newSlides);
            _.$slider.children().children().children()
                .css({
                    'width':(100 / _.options.slidesPerRow) + '%',
                    'display': 'inline-block'
                });

        }

    };

    Slick.prototype.checkResponsive = function(initial, forceUpdate) {

        var _ = this,
            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
        var sliderWidth = _.$slider.width();
        var windowWidth = window.innerWidth || $(window).width();

        if (_.respondTo === 'window') {
            respondToWidth = windowWidth;
        } else if (_.respondTo === 'slider') {
            respondToWidth = sliderWidth;
        } else if (_.respondTo === 'min') {
            respondToWidth = Math.min(windowWidth, sliderWidth);
        }

        if ( _.options.responsive &&
            _.options.responsive.length &&
            _.options.responsive !== null) {

            targetBreakpoint = null;

            for (breakpoint in _.breakpoints) {
                if (_.breakpoints.hasOwnProperty(breakpoint)) {
                    if (_.originalSettings.mobileFirst === false) {
                        if (respondToWidth < _.breakpoints[breakpoint]) {
                            targetBreakpoint = _.breakpoints[breakpoint];
                        }
                    } else {
                        if (respondToWidth > _.breakpoints[breakpoint]) {
                            targetBreakpoint = _.breakpoints[breakpoint];
                        }
                    }
                }
            }

            if (targetBreakpoint !== null) {
                if (_.activeBreakpoint !== null) {
                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
                        _.activeBreakpoint =
                            targetBreakpoint;
                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                            _.unslick(targetBreakpoint);
                        } else {
                            _.options = $.extend({}, _.originalSettings,
                                _.breakpointSettings[
                                    targetBreakpoint]);
                            if (initial === true) {
                                _.currentSlide = _.options.initialSlide;
                            }
                            _.refresh(initial);
                        }
                        triggerBreakpoint = targetBreakpoint;
                    }
                } else {
                    _.activeBreakpoint = targetBreakpoint;
                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                        _.unslick(targetBreakpoint);
                    } else {
                        _.options = $.extend({}, _.originalSettings,
                            _.breakpointSettings[
                                targetBreakpoint]);
                        if (initial === true) {
                            _.currentSlide = _.options.initialSlide;
                        }
                        _.refresh(initial);
                    }
                    triggerBreakpoint = targetBreakpoint;
                }
            } else {
                if (_.activeBreakpoint !== null) {
                    _.activeBreakpoint = null;
                    _.options = _.originalSettings;
                    if (initial === true) {
                        _.currentSlide = _.options.initialSlide;
                    }
                    _.refresh(initial);
                    triggerBreakpoint = targetBreakpoint;
                }
            }

            // only trigger breakpoints during an actual break. not on initialize.
            if( !initial && triggerBreakpoint !== false ) {
                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
            }
        }

    };

    Slick.prototype.changeSlide = function(event, dontAnimate) {

        var _ = this,
            $target = $(event.currentTarget),
            indexOffset, slideOffset, unevenOffset;

        // If target is a link, prevent default action.
        if($target.is('a')) {
            event.preventDefault();
        }

        // If target is not the <li> element (ie: a child), find the <li>.
        if(!$target.is('li')) {
            $target = $target.closest('li');
        }

        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;

        switch (event.data.message) {

            case 'previous':
                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
                if (_.slideCount > _.options.slidesToShow) {
                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
                }
                break;

            case 'next':
                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
                if (_.slideCount > _.options.slidesToShow) {
                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
                }
                break;

            case 'index':
                var index = event.data.index === 0 ? 0 :
                    event.data.index || $target.index() * _.options.slidesToScroll;

                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
                $target.children().trigger('focus');
                break;

            default:
                return;
        }

    };

    Slick.prototype.checkNavigable = function(index) {

        var _ = this,
            navigables, prevNavigable;

        navigables = _.getNavigableIndexes();
        prevNavigable = 0;
        if (index > navigables[navigables.length - 1]) {
            index = navigables[navigables.length - 1];
        } else {
            for (var n in navigables) {
                if (index < navigables[n]) {
                    index = prevNavigable;
                    break;
                }
                prevNavigable = navigables[n];
            }
        }

        return index;
    };

    Slick.prototype.cleanUpEvents = function() {

        var _ = this;

        if (_.options.dots && _.$dots !== null) {

            $('li', _.$dots)
                .off('click.slick', _.changeSlide)
                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));

        }

        _.$slider.off('focus.slick blur.slick');

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
        }

        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);

        _.$list.off('click.slick', _.clickHandler);

        $(document).off(_.visibilityChange, _.visibility);

        _.cleanUpSlideEvents();

        if (_.options.accessibility === true) {
            _.$list.off('keydown.slick', _.keyHandler);
        }

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
        }

        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);

        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);

        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);

        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
        $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);

    };

    Slick.prototype.cleanUpSlideEvents = function() {

        var _ = this;

        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));

    };

    Slick.prototype.cleanUpRows = function() {

        var _ = this, originalSlides;

        if(_.options.rows > 1) {
            originalSlides = _.$slides.children().children();
            originalSlides.removeAttr('style');
            _.$slider.empty().append(originalSlides);
        }

    };

    Slick.prototype.clickHandler = function(event) {

        var _ = this;

        if (_.shouldClick === false) {
            event.stopImmediatePropagation();
            event.stopPropagation();
            event.preventDefault();
        }

    };

    Slick.prototype.destroy = function(refresh) {

        var _ = this;

        _.autoPlayClear();

        _.touchObject = {};

        _.cleanUpEvents();

        $('.slick-cloned', _.$slider).detach();

        if (_.$dots) {
            _.$dots.remove();
        }


        if ( _.$prevArrow && _.$prevArrow.length ) {

            _.$prevArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display','');

            if ( _.htmlExpr.test( _.options.prevArrow )) {
                _.$prevArrow.remove();
            }
        }

        if ( _.$nextArrow && _.$nextArrow.length ) {

            _.$nextArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display','');

            if ( _.htmlExpr.test( _.options.nextArrow )) {
                _.$nextArrow.remove();
            }

        }


        if (_.$slides) {

            _.$slides
                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
                .removeAttr('aria-hidden')
                .removeAttr('data-slick-index')
                .each(function(){
                    $(this).attr('style', $(this).data('originalStyling'));
                });

            _.$slideTrack.children(this.options.slide).detach();

            _.$slideTrack.detach();

            _.$list.detach();

            _.$slider.append(_.$slides);
        }

        _.cleanUpRows();

        _.$slider.removeClass('slick-slider');
        _.$slider.removeClass('slick-initialized');
        _.$slider.removeClass('slick-dotted');

        _.unslicked = true;

        if(!refresh) {
            _.$slider.trigger('destroy', [_]);
        }

    };

    Slick.prototype.disableTransition = function(slide) {

        var _ = this,
            transition = {};

        transition[_.transitionType] = '';

        if (_.options.fade === false) {
            _.$slideTrack.css(transition);
        } else {
            _.$slides.eq(slide).css(transition);
        }

    };

    Slick.prototype.fadeSlide = function(slideIndex, callback) {

        var _ = this;

        if (_.cssTransitions === false) {

            _.$slides.eq(slideIndex).css({
                zIndex: _.options.zIndex
            });

            _.$slides.eq(slideIndex).animate({
                opacity: 1
            }, _.options.speed, _.options.easing, callback);

        } else {

            _.applyTransition(slideIndex);

            _.$slides.eq(slideIndex).css({
                opacity: 1,
                zIndex: _.options.zIndex
            });

            if (callback) {
                setTimeout(function() {

                    _.disableTransition(slideIndex);

                    callback.call();
                }, _.options.speed);
            }

        }

    };

    Slick.prototype.fadeSlideOut = function(slideIndex) {

        var _ = this;

        if (_.cssTransitions === false) {

            _.$slides.eq(slideIndex).animate({
                opacity: 0,
                zIndex: _.options.zIndex - 2
            }, _.options.speed, _.options.easing);

        } else {

            _.applyTransition(slideIndex);

            _.$slides.eq(slideIndex).css({
                opacity: 0,
                zIndex: _.options.zIndex - 2
            });

        }

    };

    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {

        var _ = this;

        if (filter !== null) {

            _.$slidesCache = _.$slides;

            _.unload();

            _.$slideTrack.children(this.options.slide).detach();

            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.focusHandler = function() {

        var _ = this;

        _.$slider
            .off('focus.slick blur.slick')
            .on('focus.slick blur.slick',
                '*:not(.slick-arrow)', function(event) {

            event.stopImmediatePropagation();
            var $sf = $(this);

            setTimeout(function() {

                if( _.options.pauseOnFocus ) {
                    _.focussed = $sf.is(':focus');
                    _.autoPlay();
                }

            }, 0);

        });
    };

    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {

        var _ = this;
        return _.currentSlide;

    };

    Slick.prototype.getDotCount = function() {

        var _ = this;

        var breakPoint = 0;
        var counter = 0;
        var pagerQty = 0;

        if (_.options.infinite === true) {
            while (breakPoint < _.slideCount) {
                ++pagerQty;
                breakPoint = counter + _.options.slidesToScroll;
                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
            }
        } else if (_.options.centerMode === true) {
            pagerQty = _.slideCount;
        } else if(!_.options.asNavFor) {
            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
        }else {
            while (breakPoint < _.slideCount) {
                ++pagerQty;
                breakPoint = counter + _.options.slidesToScroll;
                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
            }
        }

        return pagerQty - 1;

    };

    Slick.prototype.getLeft = function(slideIndex) {

        var _ = this,
            targetLeft,
            verticalHeight,
            verticalOffset = 0,
            targetSlide;

        _.slideOffset = 0;
        verticalHeight = _.$slides.first().outerHeight(true);

        if (_.options.infinite === true) {
            if (_.slideCount > _.options.slidesToShow) {
                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
            }
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
                    if (slideIndex > _.slideCount) {
                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
                    } else {
                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
                    }
                }
            }
        } else {
            if (slideIndex + _.options.slidesToShow > _.slideCount) {
                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
            }
        }

        if (_.slideCount <= _.options.slidesToShow) {
            _.slideOffset = 0;
            verticalOffset = 0;
        }

        if (_.options.centerMode === true && _.options.infinite === true) {
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
        } else if (_.options.centerMode === true) {
            _.slideOffset = 0;
            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
        }

        if (_.options.vertical === false) {
            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
        } else {
            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
        }

        if (_.options.variableWidth === true) {

            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
            } else {
                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
            }

            if (_.options.rtl === true) {
                if (targetSlide[0]) {
                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                } else {
                    targetLeft =  0;
                }
            } else {
                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
            }

            if (_.options.centerMode === true) {
                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
                } else {
                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
                }

                if (_.options.rtl === true) {
                    if (targetSlide[0]) {
                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                    } else {
                        targetLeft =  0;
                    }
                } else {
                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
                }

                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
            }
        }

        return targetLeft;

    };

    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {

        var _ = this;

        return _.options[option];

    };

    Slick.prototype.getNavigableIndexes = function() {

        var _ = this,
            breakPoint = 0,
            counter = 0,
            indexes = [],
            max;

        if (_.options.infinite === false) {
            max = _.slideCount;
        } else {
            breakPoint = _.options.slidesToScroll * -1;
            counter = _.options.slidesToScroll * -1;
            max = _.slideCount * 2;
        }

        while (breakPoint < max) {
            indexes.push(breakPoint);
            breakPoint = counter + _.options.slidesToScroll;
            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
        }

        return indexes;

    };

    Slick.prototype.getSlick = function() {

        return this;

    };

    Slick.prototype.getSlideCount = function() {

        var _ = this,
            slidesTraversed, swipedSlide, centerOffset;

        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;

        if (_.options.swipeToSlide === true) {
            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
                    swipedSlide = slide;
                    return false;
                }
            });

            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;

            return slidesTraversed;

        } else {
            return _.options.slidesToScroll;
        }

    };

    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'index',
                index: parseInt(slide)
            }
        }, dontAnimate);

    };

    Slick.prototype.init = function(creation) {

        var _ = this;

        if (!$(_.$slider).hasClass('slick-initialized')) {

            $(_.$slider).addClass('slick-initialized');

            _.buildRows();
            _.buildOut();
            _.setProps();
            _.startLoad();
            _.loadSlider();
            _.initializeEvents();
            _.updateArrows();
            _.updateDots();
            _.checkResponsive(true);
            _.focusHandler();

        }

        if (creation) {
            _.$slider.trigger('init', [_]);
        }

        if (_.options.accessibility === true) {
            _.initADA();
        }

        if ( _.options.autoplay ) {

            _.paused = false;
            _.autoPlay();

        }

    };

    Slick.prototype.initADA = function() {
        var _ = this;
        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
            'aria-hidden': 'true',
            'tabindex': '-1'
        }).find('a, input, button, select').attr({
            'tabindex': '-1'
        });

        _.$slideTrack.attr('role', 'listbox');

        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
            $(this).attr({
                'role': 'option',
                'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
            });
        });

        if (_.$dots !== null) {
            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
                $(this).attr({
                    'role': 'presentation',
                    'aria-selected': 'false',
                    'aria-controls': 'navigation' + _.instanceUid + i + '',
                    'id': 'slick-slide' + _.instanceUid + i + ''
                });
            })
                .first().attr('aria-selected', 'true').end()
                .find('button').attr('role', 'button').end()
                .closest('div').attr('role', 'toolbar');
        }
        _.activateADA();

    };

    Slick.prototype.initArrowEvents = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
            _.$prevArrow
               .off('click.slick')
               .on('click.slick', {
                    message: 'previous'
               }, _.changeSlide);
            _.$nextArrow
               .off('click.slick')
               .on('click.slick', {
                    message: 'next'
               }, _.changeSlide);
        }

    };

    Slick.prototype.initDotEvents = function() {

        var _ = this;

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
            $('li', _.$dots).on('click.slick', {
                message: 'index'
            }, _.changeSlide);
        }

        if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {

            $('li', _.$dots)
                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));

        }

    };

    Slick.prototype.initSlideEvents = function() {

        var _ = this;

        if ( _.options.pauseOnHover ) {

            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));

        }

    };

    Slick.prototype.initializeEvents = function() {

        var _ = this;

        _.initArrowEvents();

        _.initDotEvents();
        _.initSlideEvents();

        _.$list.on('touchstart.slick mousedown.slick', {
            action: 'start'
        }, _.swipeHandler);
        _.$list.on('touchmove.slick mousemove.slick', {
            action: 'move'
        }, _.swipeHandler);
        _.$list.on('touchend.slick mouseup.slick', {
            action: 'end'
        }, _.swipeHandler);
        _.$list.on('touchcancel.slick mouseleave.slick', {
            action: 'end'
        }, _.swipeHandler);

        _.$list.on('click.slick', _.clickHandler);

        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));

        if (_.options.accessibility === true) {
            _.$list.on('keydown.slick', _.keyHandler);
        }

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
        }

        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));

        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));

        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);

        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
        $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);

    };

    Slick.prototype.initUI = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.show();
            _.$nextArrow.show();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.show();

        }

    };

    Slick.prototype.keyHandler = function(event) {

        var _ = this;
         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
            if (event.keyCode === 37 && _.options.accessibility === true) {
                _.changeSlide({
                    data: {
                        message: _.options.rtl === true ? 'next' :  'previous'
                    }
                });
            } else if (event.keyCode === 39 && _.options.accessibility === true) {
                _.changeSlide({
                    data: {
                        message: _.options.rtl === true ? 'previous' : 'next'
                    }
                });
            }
        }

    };

    Slick.prototype.lazyLoad = function() {

        var _ = this,
            loadRange, cloneRange, rangeStart, rangeEnd;

        function loadImages(imagesScope) {

            $('img[data-lazy]', imagesScope).each(function() {

                var image = $(this),
                    imageSource = $(this).attr('data-lazy'),
                    imageToLoad = document.createElement('img');

                imageToLoad.onload = function() {

                    image
                        .animate({ opacity: 0 }, 100, function() {
                            image
                                .attr('src', imageSource)
                                .animate({ opacity: 1 }, 200, function() {
                                    image
                                        .removeAttr('data-lazy')
                                        .removeClass('slick-loading');
                                });
                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
                        });

                };

                imageToLoad.onerror = function() {

                    image
                        .removeAttr( 'data-lazy' )
                        .removeClass( 'slick-loading' )
                        .addClass( 'slick-lazyload-error' );

                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);

                };

                imageToLoad.src = imageSource;

            });

        }

        if (_.options.centerMode === true) {
            if (_.options.infinite === true) {
                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
                rangeEnd = rangeStart + _.options.slidesToShow + 2;
            } else {
                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
            }
        } else {
            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
            if (_.options.fade === true) {
                if (rangeStart > 0) rangeStart--;
                if (rangeEnd <= _.slideCount) rangeEnd++;
            }
        }

        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
        loadImages(loadRange);

        if (_.slideCount <= _.options.slidesToShow) {
            cloneRange = _.$slider.find('.slick-slide');
            loadImages(cloneRange);
        } else
        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
            loadImages(cloneRange);
        } else if (_.currentSlide === 0) {
            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
            loadImages(cloneRange);
        }

    };

    Slick.prototype.loadSlider = function() {

        var _ = this;

        _.setPosition();

        _.$slideTrack.css({
            opacity: 1
        });

        _.$slider.removeClass('slick-loading');

        _.initUI();

        if (_.options.lazyLoad === 'progressive') {
            _.progressiveLazyLoad();
        }

    };

    Slick.prototype.next = Slick.prototype.slickNext = function() {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'next'
            }
        });

    };

    Slick.prototype.orientationChange = function() {

        var _ = this;

        _.checkResponsive();
        _.setPosition();

    };

    Slick.prototype.pause = Slick.prototype.slickPause = function() {

        var _ = this;

        _.autoPlayClear();
        _.paused = true;

    };

    Slick.prototype.play = Slick.prototype.slickPlay = function() {

        var _ = this;

        _.autoPlay();
        _.options.autoplay = true;
        _.paused = false;
        _.focussed = false;
        _.interrupted = false;

    };

    Slick.prototype.postSlide = function(index) {

        var _ = this;

        if( !_.unslicked ) {

            _.$slider.trigger('afterChange', [_, index]);

            _.animating = false;

            _.setPosition();

            _.swipeLeft = null;

            if ( _.options.autoplay ) {
                _.autoPlay();
            }

            if (_.options.accessibility === true) {
                _.initADA();
            }

        }

    };

    Slick.prototype.prev = Slick.prototype.slickPrev = function() {

        var _ = this;

        _.changeSlide({
            data: {
                message: 'previous'
            }
        });

    };

    Slick.prototype.preventDefault = function(event) {

        event.preventDefault();

    };

    Slick.prototype.progressiveLazyLoad = function( tryCount ) {

        tryCount = tryCount || 1;

        var _ = this,
            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
            image,
            imageSource,
            imageToLoad;

        if ( $imgsToLoad.length ) {

            image = $imgsToLoad.first();
            imageSource = image.attr('data-lazy');
            imageToLoad = document.createElement('img');

            imageToLoad.onload = function() {

                image
                    .attr( 'src', imageSource )
                    .removeAttr('data-lazy')
                    .removeClass('slick-loading');

                if ( _.options.adaptiveHeight === true ) {
                    _.setPosition();
                }

                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
                _.progressiveLazyLoad();

            };

            imageToLoad.onerror = function() {

                if ( tryCount < 3 ) {

                    /**
                     * try to load the image 3 times,
                     * leave a slight delay so we don't get
                     * servers blocking the request.
                     */
                    setTimeout( function() {
                        _.progressiveLazyLoad( tryCount + 1 );
                    }, 500 );

                } else {

                    image
                        .removeAttr( 'data-lazy' )
                        .removeClass( 'slick-loading' )
                        .addClass( 'slick-lazyload-error' );

                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);

                    _.progressiveLazyLoad();

                }

            };

            imageToLoad.src = imageSource;

        } else {

            _.$slider.trigger('allImagesLoaded', [ _ ]);

        }

    };

    Slick.prototype.refresh = function( initializing ) {

        var _ = this, currentSlide, lastVisibleIndex;

        lastVisibleIndex = _.slideCount - _.options.slidesToShow;

        // in non-infinite sliders, we don't want to go past the
        // last visible index.
        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
            _.currentSlide = lastVisibleIndex;
        }

        // if less slides than to show, go to start.
        if ( _.slideCount <= _.options.slidesToShow ) {
            _.currentSlide = 0;

        }

        currentSlide = _.currentSlide;

        _.destroy(true);

        $.extend(_, _.initials, { currentSlide: currentSlide });

        _.init();

        if( !initializing ) {

            _.changeSlide({
                data: {
                    message: 'index',
                    index: currentSlide
                }
            }, false);

        }

    };

    Slick.prototype.registerBreakpoints = function() {

        var _ = this, breakpoint, currentBreakpoint, l,
            responsiveSettings = _.options.responsive || null;

        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {

            _.respondTo = _.options.respondTo || 'window';

            for ( breakpoint in responsiveSettings ) {

                l = _.breakpoints.length-1;
                currentBreakpoint = responsiveSettings[breakpoint].breakpoint;

                if (responsiveSettings.hasOwnProperty(breakpoint)) {

                    // loop through the breakpoints and cut out any existing
                    // ones with the same breakpoint number, we don't want dupes.
                    while( l >= 0 ) {
                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
                            _.breakpoints.splice(l,1);
                        }
                        l--;
                    }

                    _.breakpoints.push(currentBreakpoint);
                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;

                }

            }

            _.breakpoints.sort(function(a, b) {
                return ( _.options.mobileFirst ) ? a-b : b-a;
            });

        }

    };

    Slick.prototype.reinit = function() {

        var _ = this;

        _.$slides =
            _.$slideTrack
                .children(_.options.slide)
                .addClass('slick-slide');

        _.slideCount = _.$slides.length;

        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
        }

        if (_.slideCount <= _.options.slidesToShow) {
            _.currentSlide = 0;
        }

        _.registerBreakpoints();

        _.setProps();
        _.setupInfinite();
        _.buildArrows();
        _.updateArrows();
        _.initArrowEvents();
        _.buildDots();
        _.updateDots();
        _.initDotEvents();
        _.cleanUpSlideEvents();
        _.initSlideEvents();

        _.checkResponsive(false, true);

        if (_.options.focusOnSelect === true) {
            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
        }

        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

        _.setPosition();
        _.focusHandler();

        _.paused = !_.options.autoplay;
        _.autoPlay();

        _.$slider.trigger('reInit', [_]);

    };

    Slick.prototype.resize = function() {

        var _ = this;

        if ($(window).width() !== _.windowWidth) {
            clearTimeout(_.windowDelay);
            _.windowDelay = window.setTimeout(function() {
                _.windowWidth = $(window).width();
                _.checkResponsive();
                if( !_.unslicked ) { _.setPosition(); }
            }, 50);
        }
    };

    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {

        var _ = this;

        if (typeof(index) === 'boolean') {
            removeBefore = index;
            index = removeBefore === true ? 0 : _.slideCount - 1;
        } else {
            index = removeBefore === true ? --index : index;
        }

        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
            return false;
        }

        _.unload();

        if (removeAll === true) {
            _.$slideTrack.children().remove();
        } else {
            _.$slideTrack.children(this.options.slide).eq(index).remove();
        }

        _.$slides = _.$slideTrack.children(this.options.slide);

        _.$slideTrack.children(this.options.slide).detach();

        _.$slideTrack.append(_.$slides);

        _.$slidesCache = _.$slides;

        _.reinit();

    };

    Slick.prototype.setCSS = function(position) {

        var _ = this,
            positionProps = {},
            x, y;

        if (_.options.rtl === true) {
            position = -position;
        }
        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';

        positionProps[_.positionProp] = position;

        if (_.transformsEnabled === false) {
            _.$slideTrack.css(positionProps);
        } else {
            positionProps = {};
            if (_.cssTransitions === false) {
                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
                _.$slideTrack.css(positionProps);
            } else {
                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
                _.$slideTrack.css(positionProps);
            }
        }

    };

    Slick.prototype.setDimensions = function() {

        var _ = this;

        if (_.options.vertical === false) {
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: ('0px ' + _.options.centerPadding)
                });
            }
        } else {
            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
            if (_.options.centerMode === true) {
                _.$list.css({
                    padding: (_.options.centerPadding + ' 0px')
                });
            }
        }

        _.listWidth = _.$list.width();
        _.listHeight = _.$list.height();


        if (_.options.vertical === false && _.options.variableWidth === false) {
            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));

        } else if (_.options.variableWidth === true) {
            _.$slideTrack.width(5000 * _.slideCount);
        } else {
            _.slideWidth = Math.ceil(_.listWidth);
            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
        }

        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);

    };

    Slick.prototype.setFade = function() {

        var _ = this,
            targetLeft;

        _.$slides.each(function(index, element) {
            targetLeft = (_.slideWidth * index) * -1;
            if (_.options.rtl === true) {
                $(element).css({
                    position: 'relative',
                    right: targetLeft,
                    top: 0,
                    zIndex: _.options.zIndex - 2,
                    opacity: 0
                });
            } else {
                $(element).css({
                    position: 'relative',
                    left: targetLeft,
                    top: 0,
                    zIndex: _.options.zIndex - 2,
                    opacity: 0
                });
            }
        });

        _.$slides.eq(_.currentSlide).css({
            zIndex: _.options.zIndex - 1,
            opacity: 1
        });

    };

    Slick.prototype.setHeight = function() {

        var _ = this;

        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
            _.$list.css('height', targetHeight);
        }

    };

    Slick.prototype.setOption =
    Slick.prototype.slickSetOption = function() {

        /**
         * accepts arguments in format of:
         *
         *  - for changing a single option's value:
         *     .slick("setOption", option, value, refresh )
         *
         *  - for changing a set of responsive options:
         *     .slick("setOption", 'responsive', [{}, ...], refresh )
         *
         *  - for updating multiple values at once (not responsive)
         *     .slick("setOption", { 'option': value, ... }, refresh )
         */

        var _ = this, l, item, option, value, refresh = false, type;

        if( $.type( arguments[0] ) === 'object' ) {

            option =  arguments[0];
            refresh = arguments[1];
            type = 'multiple';

        } else if ( $.type( arguments[0] ) === 'string' ) {

            option =  arguments[0];
            value = arguments[1];
            refresh = arguments[2];

            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {

                type = 'responsive';

            } else if ( typeof arguments[1] !== 'undefined' ) {

                type = 'single';

            }

        }

        if ( type === 'single' ) {

            _.options[option] = value;


        } else if ( type === 'multiple' ) {

            $.each( option , function( opt, val ) {

                _.options[opt] = val;

            });


        } else if ( type === 'responsive' ) {

            for ( item in value ) {

                if( $.type( _.options.responsive ) !== 'array' ) {

                    _.options.responsive = [ value[item] ];

                } else {

                    l = _.options.responsive.length-1;

                    // loop through the responsive object and splice out duplicates.
                    while( l >= 0 ) {

                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {

                            _.options.responsive.splice(l,1);

                        }

                        l--;

                    }

                    _.options.responsive.push( value[item] );

                }

            }

        }

        if ( refresh ) {

            _.unload();
            _.reinit();

        }

    };

    Slick.prototype.setPosition = function() {

        var _ = this;

        _.setDimensions();

        _.setHeight();

        if (_.options.fade === false) {
            _.setCSS(_.getLeft(_.currentSlide));
        } else {
            _.setFade();
        }

        _.$slider.trigger('setPosition', [_]);

    };

    Slick.prototype.setProps = function() {

        var _ = this,
            bodyStyle = document.body.style;

        _.positionProp = _.options.vertical === true ? 'top' : 'left';

        if (_.positionProp === 'top') {
            _.$slider.addClass('slick-vertical');
        } else {
            _.$slider.removeClass('slick-vertical');
        }

        if (bodyStyle.WebkitTransition !== undefined ||
            bodyStyle.MozTransition !== undefined ||
            bodyStyle.msTransition !== undefined) {
            if (_.options.useCSS === true) {
                _.cssTransitions = true;
            }
        }

        if ( _.options.fade ) {
            if ( typeof _.options.zIndex === 'number' ) {
                if( _.options.zIndex < 3 ) {
                    _.options.zIndex = 3;
                }
            } else {
                _.options.zIndex = _.defaults.zIndex;
            }
        }

        if (bodyStyle.OTransform !== undefined) {
            _.animType = 'OTransform';
            _.transformType = '-o-transform';
            _.transitionType = 'OTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.MozTransform !== undefined) {
            _.animType = 'MozTransform';
            _.transformType = '-moz-transform';
            _.transitionType = 'MozTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.webkitTransform !== undefined) {
            _.animType = 'webkitTransform';
            _.transformType = '-webkit-transform';
            _.transitionType = 'webkitTransition';
            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
        }
        if (bodyStyle.msTransform !== undefined) {
            _.animType = 'msTransform';
            _.transformType = '-ms-transform';
            _.transitionType = 'msTransition';
            if (bodyStyle.msTransform === undefined) _.animType = false;
        }
        if (bodyStyle.transform !== undefined && _.animType !== false) {
            _.animType = 'transform';
            _.transformType = 'transform';
            _.transitionType = 'transition';
        }
        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
    };


    Slick.prototype.setSlideClasses = function(index) {

        var _ = this,
            centerOffset, allSlides, indexOffset, remainder;

        allSlides = _.$slider
            .find('.slick-slide')
            .removeClass('slick-active slick-center slick-current')
            .attr('aria-hidden', 'true');

        _.$slides
            .eq(index)
            .addClass('slick-current');

        if (_.options.centerMode === true) {

            centerOffset = Math.floor(_.options.slidesToShow / 2);

            if (_.options.infinite === true) {

                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {

                    _.$slides
                        .slice(index - centerOffset, index + centerOffset + 1)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                } else {

                    indexOffset = _.options.slidesToShow + index;
                    allSlides
                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                }

                if (index === 0) {

                    allSlides
                        .eq(allSlides.length - 1 - _.options.slidesToShow)
                        .addClass('slick-center');

                } else if (index === _.slideCount - 1) {

                    allSlides
                        .eq(_.options.slidesToShow)
                        .addClass('slick-center');

                }

            }

            _.$slides
                .eq(index)
                .addClass('slick-center');

        } else {

            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {

                _.$slides
                    .slice(index, index + _.options.slidesToShow)
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

            } else if (allSlides.length <= _.options.slidesToShow) {

                allSlides
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

            } else {

                remainder = _.slideCount % _.options.slidesToShow;
                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;

                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {

                    allSlides
                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                } else {

                    allSlides
                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

                }

            }

        }

        if (_.options.lazyLoad === 'ondemand') {
            _.lazyLoad();
        }

    };

    Slick.prototype.setupInfinite = function() {

        var _ = this,
            i, slideIndex, infiniteCount;

        if (_.options.fade === true) {
            _.options.centerMode = false;
        }

        if (_.options.infinite === true && _.options.fade === false) {

            slideIndex = null;

            if (_.slideCount > _.options.slidesToShow) {

                if (_.options.centerMode === true) {
                    infiniteCount = _.options.slidesToShow + 1;
                } else {
                    infiniteCount = _.options.slidesToShow;
                }

                for (i = _.slideCount; i > (_.slideCount -
                        infiniteCount); i -= 1) {
                    slideIndex = i - 1;
                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex - _.slideCount)
                        .prependTo(_.$slideTrack).addClass('slick-cloned');
                }
                for (i = 0; i < infiniteCount; i += 1) {
                    slideIndex = i;
                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex + _.slideCount)
                        .appendTo(_.$slideTrack).addClass('slick-cloned');
                }
                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
                    $(this).attr('id', '');
                });

            }

        }

    };

    Slick.prototype.interrupt = function( toggle ) {

        var _ = this;

        if( !toggle ) {
            _.autoPlay();
        }
        _.interrupted = toggle;

    };

    Slick.prototype.selectHandler = function(event) {

        var _ = this;

        var targetElement =
            $(event.target).is('.slick-slide') ?
                $(event.target) :
                $(event.target).parents('.slick-slide');

        var index = parseInt(targetElement.attr('data-slick-index'));

        if (!index) index = 0;

        if (_.slideCount <= _.options.slidesToShow) {

            _.setSlideClasses(index);
            _.asNavFor(index);
            return;

        }

        _.slideHandler(index);

    };

    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {

        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
            _ = this, navTarget;

        sync = sync || false;

        if (_.animating === true && _.options.waitForAnimate === true) {
            return;
        }

        if (_.options.fade === true && _.currentSlide === index) {
            return;
        }

        if (_.slideCount <= _.options.slidesToShow) {
            return;
        }

        if (sync === false) {
            _.asNavFor(index);
        }

        targetSlide = index;
        targetLeft = _.getLeft(targetSlide);
        slideLeft = _.getLeft(_.currentSlide);

        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;

        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
            if (_.options.fade === false) {
                targetSlide = _.currentSlide;
                if (dontAnimate !== true) {
                    _.animateSlide(slideLeft, function() {
                        _.postSlide(targetSlide);
                    });
                } else {
                    _.postSlide(targetSlide);
                }
            }
            return;
        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
            if (_.options.fade === false) {
                targetSlide = _.currentSlide;
                if (dontAnimate !== true) {
                    _.animateSlide(slideLeft, function() {
                        _.postSlide(targetSlide);
                    });
                } else {
                    _.postSlide(targetSlide);
                }
            }
            return;
        }

        if ( _.options.autoplay ) {
            clearInterval(_.autoPlayTimer);
        }

        if (targetSlide < 0) {
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
            } else {
                animSlide = _.slideCount + targetSlide;
            }
        } else if (targetSlide >= _.slideCount) {
            if (_.slideCount % _.options.slidesToScroll !== 0) {
                animSlide = 0;
            } else {
                animSlide = targetSlide - _.slideCount;
            }
        } else {
            animSlide = targetSlide;
        }

        _.animating = true;

        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);

        oldSlide = _.currentSlide;
        _.currentSlide = animSlide;

        _.setSlideClasses(_.currentSlide);

        if ( _.options.asNavFor ) {

            navTarget = _.getNavTarget();
            navTarget = navTarget.slick('getSlick');

            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
                navTarget.setSlideClasses(_.currentSlide);
            }

        }

        _.updateDots();
        _.updateArrows();

        if (_.options.fade === true) {
            if (dontAnimate !== true) {

                _.fadeSlideOut(oldSlide);

                _.fadeSlide(animSlide, function() {
                    _.postSlide(animSlide);
                });

            } else {
                _.postSlide(animSlide);
            }
            _.animateHeight();
            return;
        }

        if (dontAnimate !== true) {
            _.animateSlide(targetLeft, function() {
                _.postSlide(animSlide);
            });
        } else {
            _.postSlide(animSlide);
        }

    };

    Slick.prototype.startLoad = function() {

        var _ = this;

        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

            _.$prevArrow.hide();
            _.$nextArrow.hide();

        }

        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

            _.$dots.hide();

        }

        _.$slider.addClass('slick-loading');

    };

    Slick.prototype.swipeDirection = function() {

        var xDist, yDist, r, swipeAngle, _ = this;

        xDist = _.touchObject.startX - _.touchObject.curX;
        yDist = _.touchObject.startY - _.touchObject.curY;
        r = Math.atan2(yDist, xDist);

        swipeAngle = Math.round(r * 180 / Math.PI);
        if (swipeAngle < 0) {
            swipeAngle = 360 - Math.abs(swipeAngle);
        }

        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
            return (_.options.rtl === false ? 'left' : 'right');
        }
        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
            return (_.options.rtl === false ? 'left' : 'right');
        }
        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
            return (_.options.rtl === false ? 'right' : 'left');
        }
        if (_.options.verticalSwiping === true) {
            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
                return 'down';
            } else {
                return 'up';
            }
        }

        return 'vertical';

    };

    Slick.prototype.swipeEnd = function(event) {

        var _ = this,
            slideCount,
            direction;

        _.dragging = false;
        _.interrupted = false;
        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;

        if ( _.touchObject.curX === undefined ) {
            return false;
        }

        if ( _.touchObject.edgeHit === true ) {
            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
        }

        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {

            direction = _.swipeDirection();

            switch ( direction ) {

                case 'left':
                case 'down':

                    slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
                            _.currentSlide + _.getSlideCount();

                    _.currentDirection = 0;

                    break;

                case 'right':
                case 'up':

                    slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
                            _.currentSlide - _.getSlideCount();

                    _.currentDirection = 1;

                    break;

                default:


            }

            if( direction != 'vertical' ) {

                _.slideHandler( slideCount );
                _.touchObject = {};
                _.$slider.trigger('swipe', [_, direction ]);

            }

        } else {

            if ( _.touchObject.startX !== _.touchObject.curX ) {

                _.slideHandler( _.currentSlide );
                _.touchObject = {};

            }

        }

    };

    Slick.prototype.swipeHandler = function(event) {

        var _ = this;

        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
            return;
        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
            return;
        }

        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
            event.originalEvent.touches.length : 1;

        _.touchObject.minSwipe = _.listWidth / _.options
            .touchThreshold;

        if (_.options.verticalSwiping === true) {
            _.touchObject.minSwipe = _.listHeight / _.options
                .touchThreshold;
        }

        switch (event.data.action) {

            case 'start':
                _.swipeStart(event);
                break;

            case 'move':
                _.swipeMove(event);
                break;

            case 'end':
                _.swipeEnd(event);
                break;

        }

    };

    Slick.prototype.swipeMove = function(event) {

        var _ = this,
            edgeWasHit = false,
            curLeft, swipeDirection, swipeLength, positionOffset, touches;

        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;

        if (!_.dragging || touches && touches.length !== 1) {
            return false;
        }

        curLeft = _.getLeft(_.currentSlide);

        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;

        _.touchObject.swipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));

        if (_.options.verticalSwiping === true) {
            _.touchObject.swipeLength = Math.round(Math.sqrt(
                Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
        }

        swipeDirection = _.swipeDirection();

        if (swipeDirection === 'vertical') {
            return;
        }

        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
            event.preventDefault();
        }

        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
        if (_.options.verticalSwiping === true) {
            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
        }


        swipeLength = _.touchObject.swipeLength;

        _.touchObject.edgeHit = false;

        if (_.options.infinite === false) {
            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
                _.touchObject.edgeHit = true;
            }
        }

        if (_.options.vertical === false) {
            _.swipeLeft = curLeft + swipeLength * positionOffset;
        } else {
            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
        }
        if (_.options.verticalSwiping === true) {
            _.swipeLeft = curLeft + swipeLength * positionOffset;
        }

        if (_.options.fade === true || _.options.touchMove === false) {
            return false;
        }

        if (_.animating === true) {
            _.swipeLeft = null;
            return false;
        }

        _.setCSS(_.swipeLeft);

    };

    Slick.prototype.swipeStart = function(event) {

        var _ = this,
            touches;

        _.interrupted = true;

        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
            _.touchObject = {};
            return false;
        }

        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
            touches = event.originalEvent.touches[0];
        }

        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;

        _.dragging = true;

    };

    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {

        var _ = this;

        if (_.$slidesCache !== null) {

            _.unload();

            _.$slideTrack.children(this.options.slide).detach();

            _.$slidesCache.appendTo(_.$slideTrack);

            _.reinit();

        }

    };

    Slick.prototype.unload = function() {

        var _ = this;

        $('.slick-cloned', _.$slider).remove();

        if (_.$dots) {
            _.$dots.remove();
        }

        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
            _.$prevArrow.remove();
        }

        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
            _.$nextArrow.remove();
        }

        _.$slides
            .removeClass('slick-slide slick-active slick-visible slick-current')
            .attr('aria-hidden', 'true')
            .css('width', '');

    };

    Slick.prototype.unslick = function(fromBreakpoint) {

        var _ = this;
        _.$slider.trigger('unslick', [_, fromBreakpoint]);
        _.destroy();

    };

    Slick.prototype.updateArrows = function() {

        var _ = this,
            centerOffset;

        centerOffset = Math.floor(_.options.slidesToShow / 2);

        if ( _.options.arrows === true &&
            _.slideCount > _.options.slidesToShow &&
            !_.options.infinite ) {

            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            if (_.currentSlide === 0) {

                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {

                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {

                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

            }

        }

    };

    Slick.prototype.updateDots = function() {

        var _ = this;

        if (_.$dots !== null) {

            _.$dots
                .find('li')
                .removeClass('slick-active')
                .attr('aria-hidden', 'true');

            _.$dots
                .find('li')
                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
                .addClass('slick-active')
                .attr('aria-hidden', 'false');

        }

    };

    Slick.prototype.visibility = function() {

        var _ = this;

        if ( _.options.autoplay ) {

            if ( document[_.hidden] ) {

                _.interrupted = true;

            } else {

                _.interrupted = false;

            }

        }

    };

    $.fn.slick = function() {
        var _ = this,
            opt = arguments[0],
            args = Array.prototype.slice.call(arguments, 1),
            l = _.length,
            i,
            ret;
        for (i = 0; i < l; i++) {
            if (typeof opt == 'object' || typeof opt == 'undefined')
                _[i].slick = new Slick(_[i], opt);
            else
                ret = _[i].slick[opt].apply(_[i].slick, args);
            if (typeof ret != 'undefined') return ret;
        }
        return _;
    };

}));

/*!
 * @preserve
 *
 * Readmore.js jQuery plugin
 * Author: @jed_foster
 * Project home: http://jedfoster.github.io/Readmore.js
 * Licensed under the MIT license
 *
 * Debounce function from http://davidwalsh.name/javascript-debounce-function
 */

/* global jQuery */

(function(factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD
    define(['jquery'], factory);
  } else if (typeof exports === 'object') {
    // CommonJS
    module.exports = factory(require('jquery'));
  } else {
    // Browser globals
    factory(jQuery);
  }
}(function($) {
  'use strict';

  var readmore = 'readmore',
      defaults = {
        speed: 100,
        collapsedHeight: 200,
        heightMargin: 16,
        moreLink: '<a href="#">Read More</a>',
        lessLink: '<a href="#">Close</a>',
        embedCSS: true,
        blockCSS: 'display: block; width: 100%;',
        startOpen: false,

        // callbacks
        beforeToggle: function(){},
        afterToggle: function(){}
      },
      cssEmbedded = {},
      uniqueIdCounter = 0;

  function debounce(func, wait, immediate) {
    var timeout;

    return function() {
      var context = this, args = arguments;
      var later = function() {
        timeout = null;
        if (! immediate) {
          func.apply(context, args);
        }
      };
      var callNow = immediate && !timeout;

      clearTimeout(timeout);
      timeout = setTimeout(later, wait);

      if (callNow) {
        func.apply(context, args);
      }
    };
  }

  function uniqueId(prefix) {
    var id = ++uniqueIdCounter;

    return String(prefix === null ? 'rmjs-' : prefix) + id;
  }

  function setBoxHeights(element) {
    var el = element.clone().css({
          height: 'auto',
          width: element.width(),
          maxHeight: 'none',
          overflow: 'hidden'
        }).insertAfter(element),
        expandedHeight = el.outerHeight(),
        cssMaxHeight = parseInt(el.css({maxHeight: ''}).css('max-height').replace(/[^-\d\.]/g, ''), 10),
        defaultHeight = element.data('defaultHeight');

    el.remove();

    var collapsedHeight = cssMaxHeight || element.data('collapsedHeight') || defaultHeight;

    // Store our measurements.
    element.data({
      expandedHeight: expandedHeight,
      maxHeight: cssMaxHeight,
      collapsedHeight: collapsedHeight
    })
    // and disable any `max-height` property set in CSS
    .css({
      maxHeight: 'none'
    });
  }

  var resizeBoxes = debounce(function() {
    $('[data-readmore]').each(function() {
      var current = $(this),
          isExpanded = (current.attr('aria-expanded') === 'true');

      setBoxHeights(current);

      current.css({
        height: current.data( (isExpanded ? 'expandedHeight' : 'collapsedHeight') )
      });
    });
  }, 100);

  function embedCSS(options) {
    if (! cssEmbedded[options.selector]) {
      var styles = ' ';

      if (options.embedCSS && options.blockCSS !== '') {
        styles += options.selector + ' + [data-readmore-toggle], ' +
          options.selector + '[data-readmore]{' +
            options.blockCSS +
          '}';
      }

      // Include the transition CSS even if embedCSS is false
      styles += options.selector + '[data-readmore]{' +
        'transition: height ' + options.speed + 'ms;' +
        'overflow: hidden;' +
      '}';

      (function(d, u) {
        var css = d.createElement('style');
        css.type = 'text/css';

        if (css.styleSheet) {
          css.styleSheet.cssText = u;
        }
        else {
          css.appendChild(d.createTextNode(u));
        }

        d.getElementsByTagName('head')[0].appendChild(css);
      }(document, styles));

      cssEmbedded[options.selector] = true;
    }
  }

  function Readmore(element, options) {
    this.element = element;

    this.options = $.extend({}, defaults, options);

    embedCSS(this.options);

    this._defaults = defaults;
    this._name = readmore;

    this.init();

    // IE8 chokes on `window.addEventListener`, so need to test for support.
    if (window.addEventListener) {
      // Need to resize boxes when the page has fully loaded.
      window.addEventListener('load', resizeBoxes);
      window.addEventListener('resize', resizeBoxes);
    }
    else {
      window.attachEvent('load', resizeBoxes);
      window.attachEvent('resize', resizeBoxes);
    }
  }


  Readmore.prototype = {
    init: function() {
      var current = $(this.element);

      current.data({
        defaultHeight: this.options.collapsedHeight,
        heightMargin: this.options.heightMargin
      });

      setBoxHeights(current);

      var collapsedHeight = current.data('collapsedHeight'),
          heightMargin = current.data('heightMargin');

      if (current.outerHeight(true) <= collapsedHeight + heightMargin) {
        // The block is shorter than the limit, so there's no need to truncate it.
        return true;
      }
      else {
        var id = current.attr('id') || uniqueId(),
            useLink = this.options.startOpen ? this.options.lessLink : this.options.moreLink;

        current.attr({
          'data-readmore': '',
          'aria-expanded': this.options.startOpen,
          'id': id
        });

        current.after($(useLink)
          .on('click', (function(_this) {
            return function(event) {
              _this.toggle(this, current[0], event);
            };
          })(this))
          .attr({
            'data-readmore-toggle': '',
            'aria-controls': id
          }));

        if (! this.options.startOpen) {
          current.css({
            height: collapsedHeight
          });
        }
      }
    },

    toggle: function(trigger, element, event) {
      if (event) {
        event.preventDefault();
      }

      if (! trigger) {
        trigger = $('[aria-controls="' + _this.element.id + '"]')[0];
      }

      if (! element) {
        element = _this.element;
      }

      var $element = $(element),
          newHeight = '',
          newLink = '',
          expanded = false,
          collapsedHeight = $element.data('collapsedHeight');

      if ($element.height() <= collapsedHeight) {
        newHeight = $element.data('expandedHeight') + 'px';
        newLink = 'lessLink';
        expanded = true;
      }
      else {
        newHeight = collapsedHeight;
        newLink = 'moreLink';
      }

      // Fire beforeToggle callback
      // Since we determined the new "expanded" state above we're now out of sync
      // with our true current state, so we need to flip the value of `expanded`
      this.options.beforeToggle(trigger, $element, ! expanded);

      $element.css({'height': newHeight});

      // Fire afterToggle callback
      $element.on('transitionend', (function(_this) {
        return function() {
          _this.options.afterToggle(trigger, $element, expanded);

          $(this).attr({
            'aria-expanded': expanded
          }).off('transitionend');
        };
      })(this));

      $(trigger).replaceWith($(this.options[newLink])
        .on('click', (function(_this) {
            return function(event) {
              _this.toggle(this, element, event);
            };
          })(this))
        .attr({
          'data-readmore-toggle': '',
          'aria-controls': $element.attr('id')
        }));
    },

    destroy: function() {
      $(this.element).each(function() {
        var current = $(this);

        current.attr({
          'data-readmore': null,
          'aria-expanded': null
        })
          .css({
            maxHeight: '',
            height: ''
          })
          .next('[data-readmore-toggle]')
          .remove();

        current.removeData();
      });
    }
  };


  $.fn.readmore = function(options) {
    var args = arguments,
        selector = this.selector;

    options = options || {};

    if (typeof options === 'object') {
      return this.each(function() {
        if ($.data(this, 'plugin_' + readmore)) {
          var instance = $.data(this, 'plugin_' + readmore);
          instance.destroy.apply(instance);
        }

        options.selector = selector;

        $.data(this, 'plugin_' + readmore, new Readmore(this, options));
      });
    }
    else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
      return this.each(function () {
        var instance = $.data(this, 'plugin_' + readmore);
        if (instance instanceof Readmore && typeof instance[options] === 'function') {
          instance[options].apply(instance, Array.prototype.slice.call(args, 1));
        }
      });
    }
  };

}));


/*
 * jQuery mmenu v5.7.8
 * @requires jQuery 1.7.0 or later
 *
 * mmenu.frebsite.nl
 *	
 * Copyright (c) Fred Heusschen
 * www.frebsite.nl
 *
 * License: CC-BY-NC-4.0
 * http://creativecommons.org/licenses/by-nc/4.0/
 */
!function(e){function n(){e[t].glbl||(r={$wndw:e(window),$docu:e(document),$html:e("html"),$body:e("body")},s={},a={},o={},e.each([s,a,o],function(e,n){n.add=function(e){e=e.split(" ");for(var t=0,i=e.length;t<i;t++)n[e[t]]=n.mm(e[t])}}),s.mm=function(e){return"mm-"+e},s.add("wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),s.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return"mm-"+e},a.add("parent child"),o.mm=function(e){return e+".mm"},o.add("transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange"),e[t]._c=s,e[t]._d=a,e[t]._e=o,e[t].glbl=r)}var t="mmenu",i="5.7.8";if(!(e[t]&&e[t].version>i)){e[t]=function(e,n,t){this.$menu=e,this._api=["bind","getInstance","update","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=n,this.conf=t,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var i=this.$pnls.children();return this._initAddons(),this.initPanels(i),"function"==typeof this.___debug&&this.___debug(),this},e[t].version=i,e[t].addons={},e[t].uniqueId=0,e[t].defaults={extensions:[],initMenu:function(){},initPanels:function(){},navbar:{add:!0,title:"Menu",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[t].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[t].prototype={init:function(e){this.initPanels(e)},getInstance:function(){return this},update:function(){this.trigger("update")},initPanels:function(e){e=e.not("."+s.nopanel),e=this._initPanels(e),this.opts.initPanels.call(this,e),this.trigger("initPanels",e),this.trigger("update")},openPanel:function(n){var i=n.parent(),a=this;if(i.hasClass(s.vertical)){var o=i.parents("."+s.subopened);if(o.length)return void this.openPanel(o.first());i.addClass(s.opened),this.trigger("openPanel",n),this.trigger("openingPanel",n),this.trigger("openedPanel",n)}else{if(n.hasClass(s.current))return;var r=this.$pnls.children("."+s.panel),l=r.filter("."+s.current);r.removeClass(s.highest).removeClass(s.current).not(n).not(l).not("."+s.vertical).addClass(s.hidden),e[t].support.csstransitions||l.addClass(s.hidden),n.hasClass(s.opened)?n.nextAll("."+s.opened).addClass(s.highest).removeClass(s.opened).removeClass(s.subopened):(n.addClass(s.highest),l.addClass(s.subopened)),n.removeClass(s.hidden).addClass(s.current),a.trigger("openPanel",n),setTimeout(function(){n.removeClass(s.subopened).addClass(s.opened),a.trigger("openingPanel",n),a.__transitionend(n,function(){a.trigger("openedPanel",n)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var n=e.parent();n.hasClass(s.vertical)&&(n.removeClass(s.opened),this.trigger("closePanel",e),this.trigger("closingPanel",e),this.trigger("closedPanel",e))},closeAllPanels:function(){this.$menu.find("."+s.listview).children().removeClass(s.selected).filter("."+s.vertical).removeClass(s.opened);var e=this.$pnls.children("."+s.panel),n=e.first();this.$pnls.children("."+s.panel).not(n).removeClass(s.subopened).removeClass(s.opened).removeClass(s.current).removeClass(s.highest).addClass(s.hidden),this.openPanel(n)},togglePanel:function(e){var n=e.parent();n.hasClass(s.vertical)&&this[n.hasClass(s.opened)?"closePanel":"openPanel"](e)},setSelected:function(e){this.$menu.find("."+s.listview).children("."+s.selected).removeClass(s.selected),e.addClass(s.selected),this.trigger("setSelected",e)},bind:function(e,n){e="init"==e?"initPanels":e,this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(n)},trigger:function(){var e=this,n=Array.prototype.slice.call(arguments),t=n.shift();if(t="init"==t?"initPanels":t,this.cbck[t])for(var i=0,s=this.cbck[t].length;i<s;i++)this.cbck[t][i].apply(e,n)},_initMenu:function(){this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",s.mm(e(this).attr("id")))})),this.opts.initMenu.call(this,this.$menu,this.$orig),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=e('<div class="'+s.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(s.wrapper);var n=[s.menu];this.opts.slidingSubmenus||n.push(s.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addClass(n.join(" ")),this.trigger("_initMenu")},_initPanels:function(n){var i=this,o=this.__findAddBack(n,"ul, ol");this.__refactorClass(o,this.conf.classNames.inset,"inset").addClass(s.nolistview+" "+s.nopanel),o.not("."+s.nolistview).addClass(s.listview);var r=this.__findAddBack(n,"."+s.listview).children();this.__refactorClass(r,this.conf.classNames.selected,"selected"),this.__refactorClass(r,this.conf.classNames.divider,"divider"),this.__refactorClass(r,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(n,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var l=e(),d=n.add(n.find("."+s.panel)).add(this.__findAddBack(n,"."+s.listview).children().children(this.conf.panelNodetype)).not("."+s.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(s.vertical),d.each(function(){var n=e(this),t=n;n.is("ul, ol")?(n.wrap('<div class="'+s.panel+'" />'),t=n.parent()):t.addClass(s.panel);var a=n.attr("id");n.removeAttr("id"),t.attr("id",a||i.__getUniqueId()),n.hasClass(s.vertical)&&(n.removeClass(i.conf.classNames.vertical),t.add(t.parent()).addClass(s.vertical)),l=l.add(t)});var c=e("."+s.panel,this.$menu);l.each(function(n){var o,r,l=e(this),d=l.parent(),c=d.children("a, span").first();if(d.is("."+s.panels)||(d.data(a.child,l),l.data(a.parent,d)),d.children("."+s.next).length||d.parent().is("."+s.listview)&&(o=l.attr("id"),r=e('<a class="'+s.next+'" href="#'+o+'" data-target="#'+o+'" />').insertBefore(c),c.is("span")&&r.addClass(s.fullsubopen)),!l.children("."+s.navbar).length&&!d.hasClass(s.vertical)){d.parent().is("."+s.listview)?d=d.closest("."+s.panel):(c=d.closest("."+s.panel).find('a[href="#'+l.attr("id")+'"]').first(),d=c.closest("."+s.panel));var h=!1,u=e('<div class="'+s.navbar+'" />');if(i.opts.navbar.add&&l.addClass(s.hasnavbar),d.length){switch(o=d.attr("id"),i.opts.navbar.titleLink){case"anchor":h=c.attr("href");break;case"panel":case"parent":h="#"+o;break;default:h=!1}u.append('<a class="'+s.btn+" "+s.prev+'" href="#'+o+'" data-target="#'+o+'" />').append(e('<a class="'+s.title+'"'+(h?' href="'+h+'"':"")+" />").text(c.text())).prependTo(l)}else i.opts.navbar.title&&u.append('<a class="'+s.title+'">'+e[t].i18n(i.opts.navbar.title)+"</a>").prependTo(l)}});var h=this.__findAddBack(n,"."+s.listview).children("."+s.selected).removeClass(s.selected).last().addClass(s.selected);h.add(h.parentsUntil("."+s.menu,"li")).filter("."+s.vertical).addClass(s.opened).end().each(function(){e(this).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).addClass(s.subopened)}),h.children("."+s.panel).not("."+s.vertical).addClass(s.opened).parentsUntil("."+s.menu,"."+s.panel).not("."+s.vertical).first().addClass(s.opened).addClass(s.subopened);var u=c.filter("."+s.opened);return u.length||(u=l.first()),u.addClass(s.opened).last().addClass(s.current),l.not("."+s.vertical).not(u.last()).addClass(s.hidden).end().filter(function(){return!e(this).parent().hasClass(s.panels)}).appendTo(this.$pnls),this.trigger("_initPanels",l),l},_initAnchors:function(){var n=this;r.$body.on(o.click+"-oncanvas","a[href]",function(i){var a=e(this),o=!1,r=n.$menu.find(a).length;for(var l in e[t].addons)if(e[t].addons[l].clickAnchor.call(n,a,r)){o=!0;break}var d=a.attr("href");if(!o&&r&&d.length>1&&"#"==d.slice(0,1))try{var c=e(d,n.$menu);c.is("."+s.panel)&&(o=!0,n[a.parent().hasClass(s.vertical)?"togglePanel":"openPanel"](c))}catch(h){}if(o&&i.preventDefault(),!o&&r&&a.is("."+s.listview+" > li > a")&&!a.is('[rel="external"]')&&!a.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,a)&&n.setSelected(e(i.target).parent());var u=n.__valueOrFn(n.opts.onClick.preventDefault,a,"#"==d.slice(0,1));u&&i.preventDefault(),n.__valueOrFn(n.opts.onClick.close,a,u)&&n.close()}}),this.trigger("_initAnchors")},_initAddons:function(){var n;for(n in e[t].addons)e[t].addons[n].add.call(this),e[t].addons[n].add=function(){};for(n in e[t].addons)e[t].addons[n].setup.call(this);this.trigger("_initAddons")},_getOriginalMenuId:function(){var e=this.$menu.attr("id");return e&&e.length&&this.conf.clone&&(e=s.umm(e)),e},__api:function(){var n=this,t={};return e.each(this._api,function(e){var i=this;t[i]=function(){var e=n[i].apply(n,arguments);return"undefined"==typeof e?t:e}}),t},__valueOrFn:function(e,n,t){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof t?t:e},__refactorClass:function(e,n,t){return e.filter("."+n).removeClass(n).addClass(s[t])},__findAddBack:function(e,n){return e.find(n).add(e.filter(n))},__filterListItems:function(e){return e.not("."+s.divider).not("."+s.hidden)},__transitionend:function(n,t,i){var s=!1,a=function(i){if("undefined"!=typeof i){if(!e(i.target).is(n))return!1;n.unbind(o.transitionend),n.unbind(o.webkitTransitionEnd)}s||t.call(n[0]),s=!0};n.on(o.transitionend,a),n.on(o.webkitTransitionEnd,a),setTimeout(a,1.1*i)},__getUniqueId:function(){return s.mm(e[t].uniqueId++)}},e.fn[t]=function(i,s){n(),i=e.extend(!0,{},e[t].defaults,i),s=e.extend(!0,{},e[t].configuration,s);var a=e();return this.each(function(){var n=e(this);if(!n.data(t)){var o=new e[t](n,i,s);o.$menu.data(t,o.__api()),a=a.add(o.$menu)}}),a},e[t].i18n=function(){var n={};return function(t){switch(typeof t){case"object":return e.extend(n,t),n;case"string":return n[t]||t;case"undefined":default:return n}}}(),e[t].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if("undefined"!=typeof Modernizr&&"undefined"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,n=e.style,t="transition";if("string"==typeof n[t])return!0;var i=["Moz","webkit","Webkit","Khtml","O","ms"];t=t.charAt(0).toUpperCase()+t.substr(1);for(var s=0;s<i.length;s++)if("string"==typeof n[i[s]+t])return!0;return!1}(),csstransforms:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms||Modernizr.csstransforms}(),csstransforms3d:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms3d||Modernizr.csstransforms3d}()};var s,a,o,r}}(jQuery),/*	
 * jQuery mmenu offCanvas add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="offCanvas";e[n].addons[t]={setup:function(){if(this.opts[t]){var s=this.opts[t],a=this.conf[t];o=e[n].glbl,this._api=e.merge(this._api,["open","close","setPage"]),"top"!=s.position&&"bottom"!=s.position||(s.zposition="front"),"string"!=typeof a.pageSelector&&(a.pageSelector="> "+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[i.offcanvas];"left"!=s.position&&r.push(i.mm(s.position)),"back"!=s.zposition&&r.push(i.mm(s.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(i.wrapper),e[n].support.csstransforms||this.$menu.addClass(i["no-csstransforms"]),e[n].support.csstransforms3d||this.$menu.addClass(i["no-csstransforms3d"]),this.setPage(o.$page),this._initBlocker(),this["_initWindow_"+t](),this.$menu[a.menuInjectMethod+"To"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("offcanvas slideout blocking modal background opening blocker page no-csstransforms3d"),s.add("style"),a.add("resize")},clickAnchor:function(e,n){var s=this;if(this.opts[t]){var a=this._getOriginalMenuId();if(a&&e.is('[href="#'+a+'"]')){if(n)return!0;var r=e.closest("."+i.menu);if(r.length){var l=r.data("mmenu");if(l&&l.close)return l.close(),s.__transitionend(r,function(){s.open()},s.conf.transitionDuration),!0}return this.open(),!0}if(o.$page)return a=o.$page.first().attr("id"),a&&e.is('[href="#'+a+'"]')?(this.close(),!0):void 0}}},e[n].defaults[t]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},e[n].configuration[t]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},e[n].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open")}},e[n].prototype._openSetup=function(){var n=this,r=this.opts[t];this.closeAllOthers(),o.$page.each(function(){e(this).data(s.style,e(this).attr("style")||"")}),o.$wndw.trigger(a.resize+"-"+t,[!0]);var l=[i.opened];r.blockUI&&l.push(i.blocking),"modal"==r.blockUI&&l.push(i.modal),r.moveBackground&&l.push(i.background),"left"!=r.position&&l.push(i.mm(this.opts[t].position)),"back"!=r.zposition&&l.push(i.mm(this.opts[t].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(" ")),setTimeout(function(){n.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(i.current+" "+i.opened)},e[n].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger("opened")},this.conf.transitionDuration),o.$html.addClass(i.opening),this.trigger("opening")},e[n].prototype.close=function(){if(this.vars.opened){var n=this;this.__transitionend(o.$page.first(),function(){n.$menu.removeClass(i.current+" "+i.opened);var a=[i.opened,i.blocking,i.modal,i.background,i.mm(n.opts[t].position),i.mm(n.opts[t].zposition)];n.opts.extensions&&a.push(n.opts.extensions),o.$html.removeClass(a.join(" ")),o.$page.each(function(){e(this).attr("style",e(this).data(s.style))}),n.vars.opened=!1,n.trigger("closed")},this.conf.transitionDuration),o.$html.removeClass(i.opening),this.trigger("close"),this.trigger("closing")}},e[n].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var t=e(this).data(n);t&&t.close&&t.close()})},e[n].prototype.setPage=function(n){var s=this,a=this.conf[t];n&&n.length||(n=o.$body.find(a.pageSelector),a.noPageSelector.length&&(n=n.not(a.noPageSelector.join(", "))),n.length>1&&a.wrapPageIfNeeded&&(n=n.wrapAll("<"+this.conf[t].pageNodetype+" />").parent())),n.each(function(){e(this).attr("id",e(this).attr("id")||s.__getUniqueId())}),n.addClass(i.page+" "+i.slideout),o.$page=n,this.trigger("setPage",n)},e[n].prototype["_initWindow_"+t]=function(){o.$wndw.off(a.keydown+"-"+t).on(a.keydown+"-"+t,function(e){if(o.$html.hasClass(i.opened)&&9==e.keyCode)return e.preventDefault(),!1});var e=0;o.$wndw.off(a.resize+"-"+t).on(a.resize+"-"+t,function(n,t){if(1==o.$page.length&&(t||o.$html.hasClass(i.opened))){var s=o.$wndw.height();(t||s!=e)&&(e=s,o.$page.css("minHeight",s))}})},e[n].prototype._initBlocker=function(){var n=this;this.opts[t].blockUI&&(o.$blck||(o.$blck=e('<div id="'+i.blocker+'" class="'+i.slideout+'" />')),o.$blck.appendTo(o.$body).off(a.touchstart+"-"+t+" "+a.touchmove+"-"+t).on(a.touchstart+"-"+t+" "+a.touchmove+"-"+t,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+"-"+t)}).off(a.mousedown+"-"+t).on(a.mousedown+"-"+t,function(e){e.preventDefault(),o.$html.hasClass(i.modal)||(n.closeAllOthers(),n.close())}))};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu scrollBugFix add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="scrollBugFix";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,e[n].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof r&&(r={fix:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),r.fix)){var l=this.$menu.attr("id"),d=!1;this.bind("opening",function(){this.$pnls.children("."+i.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){s.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,"#"+l+"> ."+i.panels+"> ."+i.current,function(e){s.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,"#"+l+"> ."+i.panels+"> ."+i.current,function(n){s.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&n.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){s.$pnls.children("."+i.current).scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e},clickAnchor:function(e,n){}},e[n].defaults[t]={fix:!0};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu autoHeight add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="autoHeight";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var s=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof s&&s&&(s={height:"auto"}),"string"==typeof s&&(s={height:s}),"object"!=typeof s&&(s={}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),"auto"==s.height||"highest"==s.height){this.$menu.addClass(i.autoheight);var a=function(n){if(this.vars.opened){var t=parseInt(this.$pnls.css("top"),10)||0,a=parseInt(this.$pnls.css("bottom"),10)||0,o=0;this.$menu.addClass(i.measureheight),"auto"==s.height?(n=n||this.$pnls.children("."+i.current),n.is("."+i.vertical)&&(n=n.parents("."+i.panel).not("."+i.vertical).first()),o=n.outerHeight()):"highest"==s.height&&this.$pnls.children().each(function(){var n=e(this);n.is("."+i.vertical)&&(n=n.parents("."+i.panel).not("."+i.vertical).first()),o=Math.max(o,n.outerHeight())}),this.$menu.height(o+t+a).removeClass(i.measureheight)}};this.bind("opening",a),"highest"==s.height&&this.bind("initPanels",a),"auto"==s.height&&(this.bind("update",a),this.bind("openPanel",a),this.bind("closePanel",a))}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(e,n){}},e[n].defaults[t]={height:"default"};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu backButton add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="backButton";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var s=this,a=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof a&&(a={close:a}),"object"!=typeof a&&(a={}),a=e.extend(!0,{},e[n].defaults[t],a),a.close){var r="#"+s.$menu.attr("id");this.bind("opened",function(e){location.hash!=r&&history.pushState(null,document.title,r)}),e(window).on("popstate",function(e){o.$html.hasClass(i.opened)?(e.stopPropagation(),s.close()):location.hash==r&&(e.stopPropagation(),s.open())})}}},add:function(){return window.history&&window.history.pushState?(i=e[n]._c,s=e[n]._d,void(a=e[n]._e)):void(e[n].addons[t].setup=function(){})},clickAnchor:function(e,n){}},e[n].defaults[t]={close:!1};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu columns add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="columns";e[n].addons[t]={setup:function(){var s=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof s&&(s={add:s}),"number"==typeof s&&(s={add:!0,visible:s}),"object"!=typeof s&&(s={}),"number"==typeof s.visible&&(s.visible={min:s.visible,max:s.visible}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),s.add){s.visible.min=Math.max(1,Math.min(6,s.visible.min)),s.visible.max=Math.max(s.visible.min,Math.min(6,s.visible.max)),this.$menu.addClass(i.columns);for(var a=this.opts.offCanvas?this.$menu.add(o.$html):this.$menu,r=[],l=0;l<=s.visible.max;l++)r.push(i.columns+"-"+l);r=r.join(" ");var d=function(e){u.call(this,this.$pnls.children("."+i.current))},c=function(){var e=this.$pnls.children("."+i.panel).filter("."+i.opened).length;e=Math.min(s.visible.max,Math.max(s.visible.min,e)),a.removeClass(r).addClass(i.columns+"-"+e)},h=function(){this.opts.offCanvas&&o.$html.removeClass(r)},u=function(n){this.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(n).slice(-s.visible.max).each(function(n){e(this).addClass(i.columns+"-"+n)})};this.bind("open",c),this.bind("close",h),this.bind("initPanels",d),this.bind("openPanel",u),this.bind("openingPanel",c),this.bind("openedPanel",c),this.opts.offCanvas||c.call(this)}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("columns")},clickAnchor:function(n,s){if(!this.opts[t].add)return!1;if(s){var a=n.attr("href");if(a.length>1&&"#"==a.slice(0,1))try{var o=e(a,this.$menu);if(o.is("."+i.panel))for(var r=parseInt(n.closest("."+i.panel).attr("class").split(i.columns+"-")[1].split(" ")[0],10)+1;r!==!1;){var l=this.$pnls.children("."+i.columns+"-"+r);if(!l.length){r=!1;break}r++,l.removeClass(i.subopened).removeClass(i.opened).removeClass(i.current).removeClass(i.highest).addClass(i.hidden)}}catch(d){}}}},e[n].defaults[t]={add:!1,visible:{min:1,max:3}};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu counters add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="counters";e[n].addons[t]={setup:function(){var a=this,r=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){this.__refactorClass(e("em",n),this.conf.classNames[t].counter,"counter")}),r.add&&this.bind("initPanels",function(n){var t;switch(r.addTo){case"panels":t=n;break;default:t=n.filter(r.addTo)}t.each(function(){var n=e(this).data(s.parent);n&&(n.children("em."+i.counter).length||n.prepend(e('<em class="'+i.counter+'" />')))})}),r.update&&this.bind("update",function(){this.$pnls.find("."+i.panel).each(function(){var n=e(this),t=n.data(s.parent);if(t){var o=t.children("em."+i.counter);o.length&&(n=n.children("."+i.listview),n.length&&o.html(a.__filterListItems(n.children()).length))}})})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(e,n){}},e[n].defaults[t]={add:!1,addTo:"panels",update:!1},e[n].configuration.classNames[t]={counter:"Counter"};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu dividers add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="dividers";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof r&&(r={add:r,fixed:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){this.__refactorClass(e("li",this.$menu),this.conf.classNames[t].collapsed,"collapsed")}),r.add&&this.bind("initPanels",function(n){var t;switch(r.addTo){case"panels":t=n;break;default:t=n.filter(r.addTo)}e("."+i.divider,t).remove(),t.find("."+i.listview).not("."+i.vertical).each(function(){var n="";s.__filterListItems(e(this).children()).each(function(){var t=e.trim(e(this).children("a, span").text()).slice(0,1).toLowerCase();t!=n&&t.length&&(n=t,e('<li class="'+i.divider+'">'+t+"</li>").insertBefore(this))})})}),r.collapse&&this.bind("initPanels",function(n){e("."+i.divider,n).each(function(){var n=e(this),t=n.nextUntil("."+i.divider,"."+i.collapsed);t.length&&(n.children("."+i.subopen).length||(n.wrapInner("<span />"),n.prepend('<a href="#" class="'+i.subopen+" "+i.fullsubopen+'" />')))})}),r.fixed){var l=function(n){n=n||this.$pnls.children("."+i.current);var t=n.find("."+i.divider).not("."+i.hidden);if(t.length){this.$menu.addClass(i.hasdividers);var s=n.scrollTop()||0,a="";n.is(":visible")&&n.find("."+i.divider).not("."+i.hidden).each(function(){e(this).position().top+s<s+1&&(a=e(this).text())}),this.$fixeddivider.text(a)}else this.$menu.removeClass(i.hasdividers)};this.$fixeddivider=e('<ul class="'+i.listview+" "+i.fixeddivider+'"><li class="'+i.divider+'"></li></ul>').prependTo(this.$pnls).children(),this.bind("openPanel",l),this.bind("update",l),this.bind("initPanels",function(n){n.off(a.scroll+"-dividers "+a.touchmove+"-dividers").on(a.scroll+"-dividers "+a.touchmove+"-dividers",function(n){l.call(s,e(this))})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("collapsed uncollapsed fixeddivider hasdividers"),a.add("scroll")},clickAnchor:function(e,n){if(this.opts[t].collapse&&n){var s=e.parent();if(s.is("."+i.divider)){var a=s.nextUntil("."+i.divider,"."+i.collapsed);return s.toggleClass(i.opened),a[s.hasClass(i.opened)?"addClass":"removeClass"](i.uncollapsed),!0}}return!1}},e[n].defaults[t]={add:!1,addTo:"panels",fixed:!1,collapse:!1},e[n].configuration.classNames[t]={collapsed:"Collapsed"};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu drag add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){function n(e,n,t){return e<n&&(e=n),e>t&&(e=t),e}function t(t,i,s){var r,l,d,c,h,u=this,f={},p=0,v=!1,m=!1,g=0,b=0;switch(this.opts.offCanvas.position){case"left":case"right":f.events="panleft panright",f.typeLower="x",f.typeUpper="X",m="width";break;case"top":case"bottom":f.events="panup pandown",f.typeLower="y",f.typeUpper="Y",m="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":f.negative=!0,c=function(e){e>=s.$wndw[m]()-t.maxStartPos&&(p=1)};break;default:f.negative=!1,c=function(e){e<=t.maxStartPos&&(p=1)}}switch(this.opts.offCanvas.position){case"left":f.open_dir="right",f.close_dir="left";break;case"right":f.open_dir="left",f.close_dir="right";break;case"top":f.open_dir="down",f.close_dir="up";break;case"bottom":f.open_dir="up",f.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+o.slideout)}}var _=this.__valueOrFn(t.node,this.$menu,s.$page);"string"==typeof _&&(_=e(_));var C=new Hammer(_[0],this.opts[a].vendors.hammer);C.on("panstart",function(e){c(e.center[f.typeLower]),s.$slideOutNodes=h(),v=f.open_dir}).on(f.events+" panend",function(e){p>0&&e.preventDefault()}).on(f.events,function(e){if(r=e["delta"+f.typeUpper],f.negative&&(r=-r),r!=g&&(v=r>=g?f.open_dir:f.close_dir),g=r,g>t.threshold&&1==p){if(s.$html.hasClass(o.opened))return;p=2,u._openSetup(),u.trigger("opening"),s.$html.addClass(o.dragging),b=n(s.$wndw[m]()*i[m].perc,i[m].min,i[m].max)}2==p&&(l=n(g,10,b)-("front"==u.opts.offCanvas.zposition?b:0),f.negative&&(l=-l),d="translate"+f.typeUpper+"("+l+"px )",s.$slideOutNodes.css({"-webkit-transform":"-webkit-"+d,transform:d}))}).on("panend",function(e){2==p&&(s.$html.removeClass(o.dragging),s.$slideOutNodes.css("transform",""),u[v==f.open_dir?"_openFinish":"close"]()),p=0})}function i(n,t,i,s){var l=this;n.each(function(){var n=e(this),t=n.data(r.parent);if(t&&(t=t.closest("."+o.panel),t.length)){var i=new Hammer(n[0],l.opts[a].vendors.hammer);i.on("panright",function(e){l.openPanel(t)})}})}var s="mmenu",a="drag";e[s].addons[a]={setup:function(){if(this.opts.offCanvas){var n=this.opts[a],o=this.conf[a];d=e[s].glbl,"boolean"==typeof n&&(n={menu:n,panels:n}),"object"!=typeof n&&(n={}),"boolean"==typeof n.menu&&(n.menu={open:n.menu}),"object"!=typeof n.menu&&(n.menu={}),"boolean"==typeof n.panels&&(n.panels={close:n.panels}),"object"!=typeof n.panels&&(n.panels={}),n=this.opts[a]=e.extend(!0,{},e[s].defaults[a],n),n.menu.open&&t.call(this,n.menu,o.menu,d),n.panels.close&&this.bind("initPanels",function(e){i.call(this,e,n.panels,o.panels,d)})}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?void(e[s].addons[a].setup=function(){}):(o=e[s]._c,r=e[s]._d,l=e[s]._e,void o.add("dragging"))},clickAnchor:function(e,n){}},e[s].defaults[a]={menu:{open:!1,maxStartPos:100,threshold:50},panels:{close:!1},vendors:{hammer:{}}},e[s].configuration[a]={menu:{width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},panels:{}};var o,r,l,d}(jQuery),/*	
 * jQuery mmenu fixedElements add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="fixedElements";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var i=this.opts[t];this.conf[t];o=e[n].glbl,i=this.opts[t]=e.extend(!0,{},e[n].defaults[t],i);var s=function(e){var n=this.conf.classNames[t].fixed;this.__refactorClass(e.find("."+n),n,"slideout").appendTo(o.$body)};s.call(this,o.$page),this.bind("setPage",s)}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("fixed")},clickAnchor:function(e,n){}},e[n].configuration.classNames[t]={fixed:"Fixed"};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu dropdown add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="dropdown";e[n].addons[t]={setup:function(){if(this.opts.offCanvas){var r=this,l=this.opts[t],d=this.conf[t];if(o=e[n].glbl,"boolean"==typeof l&&l&&(l={drop:l}),"object"!=typeof l&&(l={}),"string"==typeof l.position&&(l.position={of:l.position}),l=this.opts[t]=e.extend(!0,{},e[n].defaults[t],l),l.drop){if("string"!=typeof l.position.of){var c=this.$menu.attr("id");c&&c.length&&(this.conf.clone&&(c=i.umm(c)),l.position.of='[href="#'+c+'"]')}if("string"==typeof l.position.of){var h=e(l.position.of);if(h.length){this.$menu.addClass(i.dropdown),l.tip&&this.$menu.addClass(i.tip),l.event=l.event.split(" "),1==l.event.length&&(l.event[1]=l.event[0]),"hover"==l.event[0]&&h.on(a.mouseenter+"-dropdown",function(){r.open()}),"hover"==l.event[1]&&this.$menu.on(a.mouseleave+"-dropdown",function(){r.close()}),this.bind("opening",function(){this.$menu.data(s.style,this.$menu.attr("style")||""),o.$html.addClass(i.dropdown)}),this.bind("closed",function(){this.$menu.attr("style",this.$menu.data(s.style)),o.$html.removeClass(i.dropdown)});var u=function(s,a){var r=a[0],c=a[1],u="x"==s?"scrollLeft":"scrollTop",f="x"==s?"outerWidth":"outerHeight",p="x"==s?"left":"top",v="x"==s?"right":"bottom",m="x"==s?"width":"height",g="x"==s?"maxWidth":"maxHeight",b=null,_=o.$wndw[u](),C=h.offset()[p]-=_,y=C+h[f](),$=o.$wndw[m](),w=d.offset.button[s]+d.offset.viewport[s];if(l.position[s])switch(l.position[s]){case"left":case"bottom":b="after";break;case"right":case"top":b="before"}null===b&&(b=C+(y-C)/2<$/2?"after":"before");var x,k;return"after"==b?(x="x"==s?C:y,k=$-(x+w),r[p]=x+d.offset.button[s],r[v]="auto",c.push(i["x"==s?"tipleft":"tiptop"])):(x="x"==s?y:C,k=x-w,r[v]="calc( 100% - "+(x-d.offset.button[s])+"px )",r[p]="auto",c.push(i["x"==s?"tipright":"tipbottom"])),r[g]=Math.min(e[n].configuration[t][m].max,k),[r,c]},f=function(e){if(this.vars.opened){this.$menu.attr("style",this.$menu.data(s.style));var n=[{},[]];n=u.call(this,"y",n),n=u.call(this,"x",n),this.$menu.css(n[0]),l.tip&&this.$menu.removeClass(i.tipleft+" "+i.tipright+" "+i.tiptop+" "+i.tipbottom).addClass(n[1].join(" "))}};this.bind("opening",f),o.$wndw.on(a.resize+"-dropdown",function(e){f.call(r)}),this.opts.offCanvas.blockUI||o.$wndw.on(a.scroll+"-dropdown",function(e){f.call(r)})}}}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("dropdown tip tipleft tipright tiptop tipbottom"),a.add("mouseenter mouseleave resize scroll")},clickAnchor:function(e,n){}},e[n].defaults[t]={drop:!1,event:"click",position:{},tip:!0},e[n].configuration[t]={offset:{button:{x:-10,y:10},viewport:{x:20,y:20}},height:{max:880},width:{max:440}};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu iconPanels add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="iconPanels";e[n].addons[t]={setup:function(){var s=this,a=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof a&&(a={add:a}),"number"==typeof a&&(a={add:!0,visible:a}),"object"!=typeof a&&(a={}),a=this.opts[t]=e.extend(!0,{},e[n].defaults[t],a),a.visible++,a.add){this.$menu.addClass(i.iconpanel);for(var r=[],l=0;l<=a.visible;l++)r.push(i.iconpanel+"-"+l);r=r.join(" ");var d=function(n){n.hasClass(i.vertical)||s.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(n).not("."+i.vertical).slice(-a.visible).each(function(n){e(this).addClass(i.iconpanel+"-"+n)})};this.bind("openPanel",d),this.bind("initPanels",function(n){d.call(s,s.$pnls.children("."+i.current)),n.not("."+i.vertical).each(function(){e(this).children("."+i.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+i.panel).attr("id")+'" class="'+i.subblocker+'" />')})})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("iconpanel subblocker")},clickAnchor:function(e,n){}},e[n].defaults[t]={add:!1,visible:3};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu keyboardNavigation add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){function n(n,t){n||(n=this.$pnls.children("."+a.current));var i=e();"default"==t&&(i=n.children("."+a.listview).find("a[href]").not(":hidden"),i.length||(i=n.find(d).not(":hidden")),i.length||(i=this.$menu.children("."+a.navbar).find(d).not(":hidden"))),i.length||(i=this.$menu.children("."+a.tabstart)),i.first().focus()}function t(e){e||(e=this.$pnls.children("."+a.current));var n=this.$pnls.children("."+a.panel),t=n.not(e);t.find(d).attr("tabindex",-1),e.find(d).attr("tabindex",0),e.find("input.mm-toggle, input.mm-check").attr("tabindex",-1)}var i="mmenu",s="keyboardNavigation";e[i].addons[s]={setup:function(){var o=this,r=this.opts[s];this.conf[s];if(l=e[i].glbl,"boolean"!=typeof r&&"string"!=typeof r||(r={enable:r}),"object"!=typeof r&&(r={}),r=this.opts[s]=e.extend(!0,{},e[i].defaults[s],r),r.enable){r.enhance&&this.$menu.addClass(a.keyboardfocus);var c=e('<input class="'+a.tabstart+'" tabindex="0" type="text" />'),h=e('<input class="'+a.tabend+'" tabindex="0" type="text" />');this.bind("initPanels",function(){this.$menu.prepend(c).append(h).children("."+a.navbar).find(d).attr("tabindex",0)}),this.bind("open",function(){t.call(this),this.__transitionend(this.$menu,function(){n.call(o,null,r.enable)},this.conf.transitionDuration)}),this.bind("openPanel",function(e){t.call(this,e),this.__transitionend(e,function(){n.call(o,e,r.enable)},this.conf.transitionDuration)}),this["_initWindow_"+s](r.enhance)}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("tabstart tabend keyboardfocus"),r.add("focusin keydown")},clickAnchor:function(e,n){}},e[i].defaults[s]={enable:!1,enhance:!1},e[i].configuration[s]={},e[i].prototype["_initWindow_"+s]=function(n){l.$wndw.off(r.keydown+"-offCanvas"),l.$wndw.off(r.focusin+"-"+s).on(r.focusin+"-"+s,function(n){if(l.$html.hasClass(a.opened)){var t=e(n.target);t.is("."+a.tabend)&&t.parent().find("."+a.tabstart).focus()}}),l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(n){var t=e(n.target),i=t.closest("."+a.menu);if(i.length){i.data("mmenu");if(t.is("input, textarea"));else switch(n.keyCode){case 13:(t.is(".mm-toggle")||t.is(".mm-check"))&&t.trigger(r.click);break;case 32:case 37:case 38:case 39:case 40:n.preventDefault()}}}),n&&l.$wndw.on(r.keydown+"-"+s,function(n){var t=e(n.target),i=t.closest("."+a.menu);if(i.length){var s=i.data("mmenu");if(t.is("input, textarea"))switch(n.keyCode){case 27:t.val("")}else switch(n.keyCode){case 8:var r=t.closest("."+a.panel).data(o.parent);r&&r.length&&s.openPanel(r.closest("."+a.panel));break;case 27:i.hasClass(a.offcanvas)&&s.close()}}})};var a,o,r,l,d="input, select, textarea, button, label, a[href]"}(jQuery),/*	
 * jQuery mmenu lazySubmenus add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="lazySubmenus";e[n].addons[t]={setup:function(){var a=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof a&&(a={load:a}),"object"!=typeof a&&(a={}),a=this.opts[t]=e.extend(!0,{},e[n].defaults[t],a),a.load&&(this.$menu.find("li").find("li").children(this.conf.panelNodetype).each(function(){e(this).parent().addClass(i.lazysubmenu).data(s.lazysubmenu,this).end().remove()}),this.bind("openingPanel",function(n){var t=n.find("."+i.lazysubmenu);t.length&&(t.each(function(){e(this).append(e(this).data(s.lazysubmenu)).removeData(s.lazysubmenu).removeClass(i.lazysubmenu)}),this.initPanels(n))}))},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("lazysubmenu"),s.add("lazysubmenu")},clickAnchor:function(e,n){}},e[n].defaults[t]={load:!1},e[n].configuration[t]={};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu navbar add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars";e[n].addons[t]={setup:function(){var s=this,a=this.opts[t],r=this.conf[t];if(o=e[n].glbl,"undefined"!=typeof a){a instanceof Array||(a=[a]);var l={};if(a.length){e.each(a,function(o){var d=a[o];"boolean"==typeof d&&d&&(d={}),"object"!=typeof d&&(d={}),"undefined"==typeof d.content&&(d.content=["prev","title"]),d.content instanceof Array||(d.content=[d.content]),d=e.extend(!0,{},s.opts.navbar,d);var c=d.position,h=d.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=c&&(c="top"),l[c]||(l[c]=0),l[c]++;var u=e("<div />").addClass(i.navbar+" "+i.navbar+"-"+c+" "+i.navbar+"-"+c+"-"+l[c]+" "+i.navbar+"-size-"+h);l[c]+=h-1;for(var f=0,p=0,v=d.content.length;p<v;p++){var m=e[n].addons[t][d.content[p]]||!1;m?f+=m.call(s,u,d,r):(m=d.content[p],m instanceof e||(m=e(d.content[p])),u.append(m))}f+=Math.ceil(u.children().not("."+i.btn).length/h),f>1&&u.addClass(i.navbar+"-content-"+f),u.children("."+i.btn).length&&u.addClass(i.hasbtns),u.prependTo(s.$menu)});for(var d in l)s.$menu.addClass(i.hasnavbar+"-"+d+"-"+l[d])}}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("close hasbtns")},clickAnchor:function(e,n){}},e[n].configuration[t]={breadcrumbSeparator:"/"},e[n].configuration.classNames[t]={};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu navbar add-on breadcrumbs content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="breadcrumbs";e[n].addons[t][i]=function(t,i,s){var a=e[n]._c,o=e[n]._d;a.add("breadcrumbs separator");var r=e('<span class="'+a.breadcrumbs+'" />').appendTo(t);this.bind("initPanels",function(n){n.removeClass(a.hasnavbar).each(function(){for(var n=[],t=e(this),i=e('<span class="'+a.breadcrumbs+'"></span>'),r=e(this).children().first(),l=!0;r&&r.length;){r.is("."+a.panel)||(r=r.closest("."+a.panel));var d=r.children("."+a.navbar).children("."+a.title).text();n.unshift(l?"<span>"+d+"</span>":'<a href="#'+r.attr("id")+'">'+d+"</a>"),l=!1,r=r.data(o.parent)}i.append(n.join('<span class="'+a.separator+'">'+s.breadcrumbSeparator+"</span>")).appendTo(t.children("."+a.navbar))})});var l=function(){r.html(this.$pnls.children("."+a.current).children("."+a.navbar).children("."+a.breadcrumbs).html())};return this.bind("openPanel",l),this.bind("initPanels",l),0}}(jQuery),/*	
 * jQuery mmenu navbar add-on close content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="close";e[n].addons[t][i]=function(t,i){var s=e[n]._c,a=e[n].glbl,o=e('<a class="'+s.close+" "+s.btn+'" href="#" />').appendTo(t),r=function(e){o.attr("href","#"+e.attr("id"))};return r.call(this,a.$page),this.bind("setPage",r),-1}}(jQuery),/*
 * jQuery mmenu navbar add-on next content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="next";e[n].addons[t][i]=function(i,s){var a,o,r,l=e[n]._c,d=e('<a class="'+l.next+" "+l.btn+'" href="#" />').appendTo(i),c=function(e){e=e||this.$pnls.children("."+l.current);var n=e.find("."+this.conf.classNames[t].panelNext);a=n.attr("href"),r=n.attr("aria-owns"),o=n.html(),d[a?"attr":"removeAttr"]("href",a),d[r?"attr":"removeAttr"]("aria-owns",r),d[a||o?"removeClass":"addClass"](l.hidden),d.html(o)};return this.bind("openPanel",c),this.bind("initPanels",function(){c.call(this)}),-1},e[n].configuration.classNames[t].panelNext="Next"}(jQuery),/*
 * jQuery mmenu navbar add-on prev content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="prev";e[n].addons[t][i]=function(i,s){var a=e[n]._c,o=e('<a class="'+a.prev+" "+a.btn+'" href="#" />').appendTo(i);this.bind("initPanels",function(e){e.removeClass(a.hasnavbar).children("."+a.navbar).addClass(a.hidden)});var r,l,d,c=function(e){if(e=e||this.$pnls.children("."+a.current),!e.hasClass(a.vertical)){var n=e.find("."+this.conf.classNames[t].panelPrev);n.length||(n=e.children("."+a.navbar).children("."+a.prev)),r=n.attr("href"),d=n.attr("aria-owns"),l=n.html(),o[r?"attr":"removeAttr"]("href",r),o[d?"attr":"removeAttr"]("aria-owns",d),o[r||l?"removeClass":"addClass"](a.hidden),o.html(l)}};return this.bind("openPanel",c),this.bind("initPanels",function(){c.call(this)}),-1},e[n].configuration.classNames[t].panelPrev="Prev"}(jQuery),/*	
 * jQuery mmenu navbar add-on searchfield content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="searchfield";e[n].addons[t][i]=function(t,i){var s=e[n]._c,a=e('<div class="'+s.search+'" />').appendTo(t);return"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=a,0}}(jQuery),/*	
 * jQuery mmenu navbar add-on title content
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="navbars",i="title";e[n].addons[t][i]=function(i,s){var a,o,r=e[n]._c,l=e('<a class="'+r.title+'" />').appendTo(i),d=function(e){if(e=e||this.$pnls.children("."+r.current),!e.hasClass(r.vertical)){var n=e.find("."+this.conf.classNames[t].panelTitle);n.length||(n=e.children("."+r.navbar).children("."+r.title)),a=n.attr("href"),o=n.html()||s.title,l[a?"attr":"removeAttr"]("href",a),l[a||o?"removeClass":"addClass"](r.hidden),l.html(o)}};return this.bind("openPanel",d),this.bind("initPanels",function(e){d.call(this)}),0},e[n].configuration.classNames[t].panelTitle="Title"}(jQuery),/*	
 * jQuery mmenu RTL add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="rtl";e[n].addons[t]={setup:function(){var s=this.opts[t];this.conf[t];o=e[n].glbl,"object"!=typeof s&&(s={use:s}),s=this.opts[t]=e.extend(!0,{},e[n].defaults[t],s),"boolean"!=typeof s.use&&(s.use="rtl"==(o.$html.attr("dir")||"").toLowerCase()),s.use&&this.$menu.addClass(i.rtl)},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("rtl")},clickAnchor:function(e,n){}},e[n].defaults[t]={use:"detect"};var i,s,a,o}(jQuery),/*
 * jQuery mmenu screenReader add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){function n(e,n,t){e.prop("aria-"+n,t)[t?"attr":"removeAttr"]("aria-"+n,t)}function t(e){return'<span class="'+a.sronly+'">'+e+"</span>"}var i="mmenu",s="screenReader";e[i].addons[s]={setup:function(){var o=this.opts[s],r=this.conf[s];if(l=e[i].glbl,"boolean"==typeof o&&(o={aria:o,text:o}),"object"!=typeof o&&(o={}),o=this.opts[s]=e.extend(!0,{},e[i].defaults[s],o),o.aria){if(this.opts.offCanvas){var d=function(){n(this.$menu,"hidden",!1)},c=function(){n(this.$menu,"hidden",!0)};this.bind("open",d),this.bind("close",c),n(this.$menu,"hidden",!0)}var h=function(){},u=function(e){var t=this.$menu.children("."+a.navbar),i=t.children("."+a.prev),s=t.children("."+a.next),r=t.children("."+a.title);n(i,"hidden",i.is("."+a.hidden)),n(s,"hidden",s.is("."+a.hidden)),o.text&&n(r,"hidden",!i.is("."+a.hidden)),n(this.$pnls.children("."+a.panel).not(e),"hidden",!0),n(e,"hidden",!1)};this.bind("update",h),this.bind("openPanel",h),this.bind("openPanel",u);var f=function(t){var i;t=t||this.$menu;var s=t.children("."+a.navbar),r=s.children("."+a.prev),l=s.children("."+a.next);s.children("."+a.title);n(r,"haspopup",!0),n(l,"haspopup",!0),i=t.is("."+a.panel)?t.find("."+a.prev+", ."+a.next):r.add(l),i.each(function(){n(e(this),"owns",e(this).attr("href").replace("#",""))}),o.text&&t.is("."+a.panel)&&(i=t.find("."+a.listview).find("."+a.fullsubopen).parent().children("span"),n(i,"hidden",!0))};this.bind("initPanels",f),this.bind("_initAddons",f)}if(o.text){var p=function(n){var s;n=n||this.$menu;var o=n.children("."+a.navbar);o.each(function(){var n=e(this),o=e[i].i18n(r.text.closeSubmenu);s=n.children("."+a.title),s.length&&(o+=" ("+s.text()+")"),n.children("."+a.prev).html(t(o))}),o.children("."+a.close).html(t(e[i].i18n(r.text.closeMenu))),n.is("."+a.panel)&&n.find("."+a.listview).children("li").children("."+a.next).each(function(){var n=e(this),o=e[i].i18n(r.text[n.parent().is("."+a.vertical)?"toggleSubmenu":"openSubmenu"]);s=n.nextAll("span, a").first(),s.length&&(o+=" ("+s.text()+")"),n.html(t(o))})};this.bind("initPanels",p),this.bind("_initAddons",p)}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("sronly")},clickAnchor:function(e,n){}},e[i].defaults[s]={aria:!1,text:!1},e[i].configuration[s]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}};var a,o,r,l}(jQuery),/*	
 * jQuery mmenu searchfield add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){function n(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var t="mmenu",i="searchfield";e[t].addons[i]={setup:function(){var l=this,d=this.opts[i],c=this.conf[i];r=e[t].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),"boolean"==typeof d.resultsPanel&&(d.resultsPanel={add:d.resultsPanel}),d=this.opts[i]=e.extend(!0,{},e[t].defaults[i],d),c=this.conf[i]=e.extend(!0,{},e[t].configuration[i],c),this.bind("close",function(){this.$menu.find("."+s.search).find("input").blur()}),this.bind("initPanels",function(r){if(d.add){var h;switch(d.addTo){case"panels":h=r;break;default:h=this.$menu.find(d.addTo)}if(h.each(function(){var n=e(this);if(!n.is("."+s.panel)||!n.is("."+s.vertical)){if(!n.children("."+s.search).length){var i=l.__valueOrFn(c.clear,n),a=l.__valueOrFn(c.form,n),r=l.__valueOrFn(c.input,n),h=l.__valueOrFn(c.submit,n),u=e("<"+(a?"form":"div")+' class="'+s.search+'" />'),f=e('<input placeholder="'+e[t].i18n(d.placeholder)+'" type="text" autocomplete="off" />');u.append(f);var p;if(r)for(p in r)f.attr(p,r[p]);if(i&&e('<a class="'+s.btn+" "+s.clear+'" href="#" />').appendTo(u).on(o.click+"-searchfield",function(e){e.preventDefault(),f.val("").trigger(o.keyup+"-searchfield")}),a){for(p in a)u.attr(p,a[p]);h&&!i&&e('<a class="'+s.btn+" "+s.next+'" href="#" />').appendTo(u).on(o.click+"-searchfield",function(e){e.preventDefault(),u.submit()})}n.hasClass(s.search)?n.replaceWith(u):n.prepend(u).addClass(s.hassearch)}if(d.noResults){var v=n.closest("."+s.panel).length;if(v||(n=l.$pnls.children("."+s.panel).first()),!n.children("."+s.noresultsmsg).length){var m=n.children("."+s.listview).first();e('<div class="'+s.noresultsmsg+" "+s.hidden+'" />').append(e[t].i18n(d.noResults))[m.length?"insertAfter":"prependTo"](m.length?m:n)}}}}),d.search){if(d.resultsPanel.add){d.showSubPanels=!1;var u=this.$pnls.children("."+s.resultspanel);u.length||(u=e('<div class="'+s.panel+" "+s.resultspanel+" "+s.hidden+'" />').appendTo(this.$pnls).append('<div class="'+s.navbar+" "+s.hidden+'"><a class="'+s.title+'">'+e[t].i18n(d.resultsPanel.title)+"</a></div>").append('<ul class="'+s.listview+'" />').append(this.$pnls.find("."+s.noresultsmsg).first().clone()),this.initPanels(u))}this.$menu.find("."+s.search).each(function(){var t,r,c=e(this),h=c.closest("."+s.panel).length;h?(t=c.closest("."+s.panel),r=t):(t=e("."+s.panel,l.$menu),r=l.$menu),d.resultsPanel.add&&(t=t.not(u));var f=c.children("input"),p=l.__findAddBack(t,"."+s.listview).children("li"),v=p.filter("."+s.divider),m=l.__filterListItems(p),g="a",b=g+", span",_="",C=function(){var n=f.val().toLowerCase();if(n!=_){if(_=n,d.resultsPanel.add&&u.children("."+s.listview).empty(),t.scrollTop(0),m.add(v).addClass(s.hidden).find("."+s.fullsubopensearch).removeClass(s.fullsubopen+" "+s.fullsubopensearch),m.each(function(){var n=e(this),t=g;(d.showTextItems||d.showSubPanels&&n.find("."+s.next))&&(t=b);var i=n.data(a.searchtext)||n.children(t).text();i.toLowerCase().indexOf(_)>-1&&n.add(n.prevAll("."+s.divider).first()).removeClass(s.hidden)}),d.showSubPanels&&t.each(function(n){var t=e(this);l.__filterListItems(t.find("."+s.listview).children()).each(function(){var n=e(this),t=n.data(a.child);n.removeClass(s.nosubresults),t&&t.find("."+s.listview).children().removeClass(s.hidden)})}),d.resultsPanel.add)if(""===_)this.closeAllPanels(),this.openPanel(this.$pnls.children("."+s.subopened).last());else{var i=e();t.each(function(){var n=l.__filterListItems(e(this).find("."+s.listview).children()).not("."+s.hidden).clone(!0);n.length&&(d.resultsPanel.dividers&&(i=i.add('<li class="'+s.divider+'">'+e(this).children("."+s.navbar).text()+"</li>")),i=i.add(n))}),i.find("."+s.next).remove(),u.children("."+s.listview).append(i),this.openPanel(u)}else e(t.get().reverse()).each(function(n){var t=e(this),i=t.data(a.parent);i&&(l.__filterListItems(t.find("."+s.listview).children()).length?(i.hasClass(s.hidden)&&i.children("."+s.next).not("."+s.fullsubopen).addClass(s.fullsubopen).addClass(s.fullsubopensearch),i.removeClass(s.hidden).removeClass(s.nosubresults).prevAll("."+s.divider).first().removeClass(s.hidden)):h||(t.hasClass(s.opened)&&setTimeout(function(){l.openPanel(i.closest("."+s.panel))},(n+1)*(1.5*l.conf.openingInterval)),i.addClass(s.nosubresults)))});r.find("."+s.noresultsmsg)[m.not("."+s.hidden).length?"addClass":"removeClass"](s.hidden),this.update()}};f.off(o.keyup+"-"+i+" "+o.change+"-"+i).on(o.keyup+"-"+i,function(e){n(e.keyCode)||C.call(l)}).on(o.change+"-"+i,function(e){C.call(l)});var y=c.children("."+s.btn);y.length&&f.on(o.keyup+"-"+i,function(e){y[f.val().length?"removeClass":"addClass"](s.hidden)}),f.trigger(o.keyup+"-"+i)})}}})},add:function(){s=e[t]._c,a=e[t]._d,o=e[t]._e,s.add("clear search hassearch resultspanel noresultsmsg noresults nosubresults fullsubopensearch"),a.add("searchtext"),o.add("change keyup")},clickAnchor:function(e,n){}},e[t].defaults[i]={add:!1,addTo:"panels",placeholder:"Search",noResults:"No results found.",resultsPanel:{add:!1,dividers:!0,title:"Search results"},search:!0,showTextItems:!1,showSubPanels:!0},e[t].configuration[i]={clear:!1,form:!1,input:!1,submit:!1};var s,a,o,r}(jQuery),/*	
 * jQuery mmenu sectionIndexer add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="sectionIndexer";e[n].addons[t]={setup:function(){var s=this,r=this.opts[t];this.conf[t];o=e[n].glbl,"boolean"==typeof r&&(r={add:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),this.bind("initPanels",function(n){if(r.add){var t;switch(r.addTo){case"panels":t=n;break;default:t=e(r.addTo,this.$menu).filter("."+i.panel)}t.find("."+i.divider).closest("."+i.panel).addClass(i.hasindexer)}if(!this.$indexer&&this.$pnls.children("."+i.hasindexer).length){this.$indexer=e('<div class="'+i.indexer+'" />').prependTo(this.$pnls).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(a.mouseover+"-sectionindexer "+i.touchstart+"-sectionindexer",function(n){var t=e(this).attr("href").slice(1),a=s.$pnls.children("."+i.current),o=a.find("."+i.listview),r=!1,l=a.scrollTop();a.scrollTop(0),o.children("."+i.divider).not("."+i.hidden).each(function(){r===!1&&t==e(this).text().slice(0,1).toLowerCase()&&(r=e(this).position().top)}),a.scrollTop(r!==!1?r:l)});var o=function(e){s.$menu[(e.hasClass(i.hasindexer)?"add":"remove")+"Class"](i.hasindexer)};this.bind("openPanel",o),o.call(this,this.$pnls.children("."+i.current))}})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("indexer hasindexer"),a.add("mouseover touchstart")},clickAnchor:function(e,n){if(e.parent().is("."+i.indexer))return!0}},e[n].defaults[t]={add:!1,addTo:"panels"};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu setSelected add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="setSelected";e[n].addons[t]={setup:function(){var a=this,r=this.opts[t];this.conf[t];if(o=e[n].glbl,"boolean"==typeof r&&(r={hover:r,parent:r}),"object"!=typeof r&&(r={}),r=this.opts[t]=e.extend(!0,{},e[n].defaults[t],r),"detect"==r.current){var l=function(e){e=e.split("?")[0].split("#")[0];var n=a.$menu.find('a[href="'+e+'"], a[href="'+e+'/"]');n.length?a.setSelected(n.parent(),!0):(e=e.split("/").slice(0,-1),e.length&&l(e.join("/")))};l(window.location.href)}else r.current||this.bind("initPanels",function(e){e.find("."+i.listview).children("."+i.selected).removeClass(i.selected)});if(r.hover&&this.$menu.addClass(i.hoverselected),r.parent){this.$menu.addClass(i.parentselected);var d=function(e){this.$pnls.find("."+i.listview).find("."+i.next).removeClass(i.selected);for(var n=e.data(s.parent);n&&n.length;)n=n.not("."+i.vertical).children("."+i.next).addClass(i.selected).end().closest("."+i.panel).data(s.parent)};this.bind("openedPanel",d),this.bind("initPanels",function(e){d.call(this,this.$pnls.children("."+i.current))})}},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("hoverselected parentselected")},clickAnchor:function(e,n){}},e[n].defaults[t]={current:!0,hover:!1,parent:!1};var i,s,a,o}(jQuery),/*	
 * jQuery mmenu toggles add-on
 * mmenu.frebsite.nl
 *
 * Copyright (c) Fred Heusschen
 */
function(e){var n="mmenu",t="toggles";e[n].addons[t]={setup:function(){var s=this;this.opts[t],this.conf[t];o=e[n].glbl,this.bind("initPanels",function(n){this.__refactorClass(e("input",n),this.conf.classNames[t].toggle,"toggle"),this.__refactorClass(e("input",n),this.conf.classNames[t].check,"check"),e("input."+i.toggle+", input."+i.check,n).each(function(){var n=e(this),t=n.closest("li"),a=n.hasClass(i.toggle)?"toggle":"check",o=n.attr("id")||s.__getUniqueId();t.children('label[for="'+o+'"]').length||(n.attr("id",o),t.prepend(n),e('<label for="'+o+'" class="'+i[a]+'"></label>').insertBefore(t.children("a, span").last()))})})},add:function(){i=e[n]._c,s=e[n]._d,a=e[n]._e,i.add("toggle check")},clickAnchor:function(e,n){}},e[n].configuration.classNames[t]={toggle:"Toggle",check:"Check"};var i,s,a,o}(jQuery);
var fakewaffle = ( function ( $, fakewaffle ) {
	'use strict';

	fakewaffle.responsiveTabs = function ( collapseDisplayed ) {

		fakewaffle.currentPosition = 'tabs';

		var tabGroups = $( '.nav-tabs.responsive' );
		var hidden    = '';
		var visible   = '';
		var activeTab = '';

		if ( collapseDisplayed === undefined ) {
			collapseDisplayed = [ 'xs', 'sm' ];
		}

		$.each( collapseDisplayed, function () {
			hidden  += ' hidden-' + this;
			visible += ' visible-' + this;
		} );

		$.each( tabGroups, function ( index ) {
			var collapseDiv;
			var $tabGroup = $( this );
			var tabs      = $tabGroup.find( 'li a' );

			if ( $tabGroup.attr( 'id' ) === undefined ) {
				$tabGroup.attr( 'id', 'tabs-' + index );
			}

			collapseDiv = $( '<div></div>', {
				'class' : 'panel-group responsive' + visible,
				'id'    : 'collapse-' + $tabGroup.attr( 'id' )
			} );

			$.each( tabs, function () {
				var $this          = $( this );
				var oldLinkClass   = $this.attr( 'class' ) === undefined ? '' : $this.attr( 'class' );
				var newLinkClass   = 'accordion-toggle';
				var oldParentClass = $this.parent().attr( 'class' ) === undefined ? '' : $this.parent().attr( 'class' );
				var newParentClass = 'panel panel-default';
				var newHash        = $this.get( 0 ).hash.replace( '#', 'collapse-' );

				if ( oldLinkClass.length > 0 ) {
					newLinkClass += ' ' + oldLinkClass;
				}

				if ( oldParentClass.length > 0 ) {
					oldParentClass = oldParentClass.replace( /\bactive\b/g, '' );
					newParentClass += ' ' + oldParentClass;
					newParentClass = newParentClass.replace( /\s{2,}/g, ' ' );
					newParentClass = newParentClass.replace( /^\s+|\s+$/g, '' );
				}

				if ( $this.parent().hasClass( 'active' ) ) {
					activeTab = '#' + newHash;
				}

				collapseDiv.append(
					$( '<div>' ).attr( 'class', newParentClass ).html(
						$( '<div>' ).attr( 'class', 'panel-heading' ).html(
							$( '<h4>' ).attr( 'class', 'panel-title' ).html(
								$( '<a>', {
									'class'       : newLinkClass,
									'data-toggle' : 'collapse',
									'data-parent' : '#collapse-' + $tabGroup.attr( 'id' ),
									'href'        : '#' + newHash,
									'html'        : $this.html()
								} )
							)
						)
					).append(
						$( '<div>', {
							'id'    : newHash,
							'class' : 'panel-collapse collapse'
						} )
					)
				);
			} );

			$tabGroup.next().after( collapseDiv );
			$tabGroup.addClass( hidden );
			$( '.tab-content.responsive' ).addClass( hidden );

			if ( activeTab ) {
				setTimeout(function(){
                    $( activeTab ).collapse( 'show' );
				}, 10);
			}
		} );

		fakewaffle.checkResize();
		fakewaffle.bindTabToCollapse();
	};

	fakewaffle.checkResize = function () {

		if ( $( '.panel-group.responsive' ).is( ':visible' ) === true && fakewaffle.currentPosition === 'tabs' ) {
			fakewaffle.tabToPanel();
			fakewaffle.currentPosition = 'panel';
		} else if ( $( '.panel-group.responsive' ).is( ':visible' ) === false && fakewaffle.currentPosition === 'panel' ) {
			fakewaffle.panelToTab();
			fakewaffle.currentPosition = 'tabs';
		}

	};

	fakewaffle.tabToPanel = function () {

		var tabGroups = $( '.nav-tabs.responsive' );

		$.each( tabGroups, function ( index, tabGroup ) {

			// Find the tab
			var tabContents = $( tabGroup ).next( '.tab-content' ).find( '.tab-pane' );

			$.each( tabContents, function ( index, tabContent ) {
				// Find the id to move the element to
				var destinationId = $( tabContent ).attr( 'id' ).replace ( /^/, '#collapse-' );

				// Convert tab to panel and move to destination
				$( tabContent )
					.removeClass( 'tab-pane' )
					.addClass( 'panel-body fw-previous-tab-pane' )
					.appendTo( $( destinationId ) );

			} );

		} );

	};

	fakewaffle.panelToTab = function () {

		var panelGroups = $( '.panel-group.responsive' );

		$.each( panelGroups, function ( index, panelGroup ) {

			var destinationId = $( panelGroup ).attr( 'id' ).replace( 'collapse-', '#' );
			var destination   = $( destinationId ).next( '.tab-content' )[ 0 ];

			// Find the panel contents
			var panelContents = $( panelGroup ).find( '.panel-body.fw-previous-tab-pane' );

			// Convert to tab and move to destination
			panelContents
				.removeClass( 'panel-body fw-previous-tab-pane' )
				.addClass( 'tab-pane' )
				.appendTo( $( destination ) );

		} );

	};

	fakewaffle.bindTabToCollapse = function () {

		var tabs     = $( '.nav-tabs.responsive' ).find( 'li a' );
		var collapse = $( '.panel-group.responsive' ).find( '.panel-collapse' );

		// Toggle the panels when the associated tab is toggled
		tabs.on( 'shown.bs.tab', function ( e ) {

			if (fakewaffle.currentPosition === 'tabs') {
				var $current  = $( e.currentTarget.hash.replace( /#/, '#collapse-' ) );
				$current.collapse( 'show' );

				if ( e.relatedTarget ) {
					var $previous = $( e.relatedTarget.hash.replace( /#/, '#collapse-' ) );
					$previous.collapse( 'hide' );
				}
			}

		} );

		// Toggle the tab when the associated panel is toggled
		collapse.on( 'shown.bs.collapse', function ( e ) {

			if (fakewaffle.currentPosition === 'panel') {
				// Activate current tabs
				var current = $( e.target ).context.id.replace( /collapse-/g, '#' );
				$( 'a[href="' + current + '"]' ).tab( 'show' );

				// Update the content with active
				var panelGroup = $( e.currentTarget ).closest( '.panel-group.responsive' );
				$( panelGroup ).find( '.panel-body' ).removeClass( 'active' );
				$( e.currentTarget ).find( '.panel-body' ).addClass( 'active' );
			}

		} );
	};

	$( window ).resize( function () {
		fakewaffle.checkResize();
	} );

	return fakewaffle;
}( window.jQuery, fakewaffle || { } ) );

/*!
 * Select2 4.0.3
 * https://select2.github.io
 *
 * Released under the MIT license
 * https://github.com/select2/select2/blob/master/LICENSE.md
 */
(function (factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['jquery'], factory);
  } else if (typeof exports === 'object') {
    // Node/CommonJS
    factory(require('jquery'));
  } else {
    // Browser globals
    factory(jQuery);
  }
}(function (jQuery) {
  // This is needed so we can catch the AMD loader configuration and use it
  // The inner file should be wrapped (by `banner.start.js`) in a function that
  // returns the AMD loader references.
  var S2 =
(function () {
  // Restore the Select2 AMD loader so it can be used
  // Needed mostly in the language files, where the loader is not inserted
  if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
    var S2 = jQuery.fn.select2.amd;
  }
var S2;(function () { if (!S2 || !S2.requirejs) {
if (!S2) { S2 = {}; } else { require = S2; }
/**
 * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/almond for details
 */
var requirejs,require,define;(function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}
function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=(map&&map['*'])||{};if(name&&name.charAt(0)==="."){if(baseName){name=name.split('/');lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,'')}
name=baseParts.slice(0,baseParts.length-1).concat(name);for(i=0;i<name.length;i+=1){part=name[i];if(part==="."){name.splice(i,1);i-=1}else if(part===".."){if(i===1&&(name[2]==='..'||name[0]==='..')){break}else if(i>0){name.splice(i-1,2);i-=2}}}
name=name.join("/")}else if(name.indexOf('./')===0){name=name.substring(2)}}
if((baseParts||starMap)&&map){nameParts=name.split('/');for(i=nameParts.length;i>0;i-=1){nameSegment=nameParts.slice(0,i).join("/");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join('/')];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i;break}}}}
if(foundMap){break}
if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i}}
if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI}
if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join('/')}}
return name}
function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!=='string'&&args.length===1){args.push(null)}
return req.apply(undef,args.concat([relName,forceSync]))}}
function makeNormalize(relName){return function(name){return normalize(name,relName)}}
function makeLoad(depName){return function(value){defined[depName]=value}}
function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];defining[name]=!0;main.apply(undef,args)}
if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error('No '+name)}
return defined[name]}
function splitPrefix(name){var prefix,index=name?name.indexOf('!'):-1;if(index>-1){prefix=name.substring(0,index);name=name.substring(index+1,name.length)}
return[prefix,name]}
makeMap=function(name,relName){var plugin,parts=splitPrefix(name),prefix=parts[0];name=parts[1];if(prefix){prefix=normalize(prefix,relName);plugin=callDep(prefix)}
if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relName))}else{name=normalize(name,relName)}}else{name=normalize(name,relName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix)}}
return{f:prefix?prefix+'!'+name:name,n:name,pr:prefix,p:plugin}};function makeConfig(name){return function(){return(config&&config.config&&config.config[name])||{}}}
handlers={require:function(name){return makeRequire(name)},exports:function(name){var e=defined[name];if(typeof e!=='undefined'){return e}else{return(defined[name]={})}},module:function(name){return{id:name,uri:'',exports:defined[name],config:makeConfig(name)}}};main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,args=[],callbackType=typeof callback,usingExports;relName=relName||name;if(callbackType==='undefined'||callbackType==='function'){deps=!deps.length&&callback.length?['require','exports','module']:deps;for(i=0;i<deps.length;i+=1){map=makeMap(deps[i],relName);depName=map.f;if(depName==="require"){args[i]=handlers.require(name)}else if(depName==="exports"){args[i]=handlers.exports(name);usingExports=!0}else if(depName==="module"){cjsModule=args[i]=handlers.module(name)}else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName)){args[i]=callDep(depName)}else if(map.p){map.p.load(map.n,makeRequire(relName,!0),makeLoad(depName),{});args[i]=defined[depName]}else{throw new Error(name+' missing '+depName)}}
ret=callback?callback.apply(defined[name],args):undefined;if(name){if(cjsModule&&cjsModule.exports!==undef&&cjsModule.exports!==defined[name]){defined[name]=cjsModule.exports}else if(ret!==undef||!usingExports){defined[name]=ret}}}else if(name){defined[name]=callback}};requirejs=require=req=function(deps,callback,relName,forceSync,alt){if(typeof deps==="string"){if(handlers[deps]){return handlers[deps](callback)}
return callDep(makeMap(deps,callback).f)}else if(!deps.splice){config=deps;if(config.deps){req(config.deps,config.callback)}
if(!callback){return}
if(callback.splice){deps=callback;callback=relName;relName=null}else{deps=undef}}
callback=callback||function(){};if(typeof relName==='function'){relName=forceSync;forceSync=alt}
if(forceSync){main(undef,deps,callback,relName)}else{setTimeout(function(){main(undef,deps,callback,relName)},4)}
return req};req.config=function(cfg){return req(cfg)};requirejs._defined=defined;define=function(name,deps,callback){if(typeof name!=='string'){throw new Error('See almond README: incorrect module build, no module name')}
if(!deps.splice){callback=deps;deps=[]}
if(!hasProp(defined,name)&&!hasProp(waiting,name)){waiting[name]=[name,deps,callback]}};define.amd={jQuery:!0}}());S2.requirejs=requirejs;S2.require=require;S2.define=define}}());S2.define("almond",function(){});S2.define('jquery',[],function(){var _$=jQuery||$;if(_$==null&&console&&console.error){console.error('Select2: An instance of jQuery or a jQuery-compatible library was not '+'found. Make sure that you are including jQuery before Select2 on your '+'web page.')}
return _$});S2.define('select2/utils',['jquery'],function($){var Utils={};Utils.Extend=function(ChildClass,SuperClass){var __hasProp={}.hasOwnProperty;function BaseConstructor(){this.constructor=ChildClass}
for(var key in SuperClass){if(__hasProp.call(SuperClass,key)){ChildClass[key]=SuperClass[key]}}
BaseConstructor.prototype=SuperClass.prototype;ChildClass.prototype=new BaseConstructor();ChildClass.__super__=SuperClass.prototype;return ChildClass};function getMethods(theClass){var proto=theClass.prototype;var methods=[];for(var methodName in proto){var m=proto[methodName];if(typeof m!=='function'){continue}
if(methodName==='constructor'){continue}
methods.push(methodName)}
return methods}
Utils.Decorate=function(SuperClass,DecoratorClass){var decoratedMethods=getMethods(DecoratorClass);var superMethods=getMethods(SuperClass);function DecoratedClass(){var unshift=Array.prototype.unshift;var argCount=DecoratorClass.prototype.constructor.length;var calledConstructor=SuperClass.prototype.constructor;if(argCount>0){unshift.call(arguments,SuperClass.prototype.constructor);calledConstructor=DecoratorClass.prototype.constructor}
calledConstructor.apply(this,arguments)}
DecoratorClass.displayName=SuperClass.displayName;function ctr(){this.constructor=DecoratedClass}
DecoratedClass.prototype=new ctr();for(var m=0;m<superMethods.length;m++){var superMethod=superMethods[m];DecoratedClass.prototype[superMethod]=SuperClass.prototype[superMethod]}
var calledMethod=function(methodName){var originalMethod=function(){};if(methodName in DecoratedClass.prototype){originalMethod=DecoratedClass.prototype[methodName]}
var decoratedMethod=DecoratorClass.prototype[methodName];return function(){var unshift=Array.prototype.unshift;unshift.call(arguments,originalMethod);return decoratedMethod.apply(this,arguments)}};for(var d=0;d<decoratedMethods.length;d++){var decoratedMethod=decoratedMethods[d];DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod)}
return DecoratedClass};var Observable=function(){this.listeners={}};Observable.prototype.on=function(event,callback){this.listeners=this.listeners||{};if(event in this.listeners){this.listeners[event].push(callback)}else{this.listeners[event]=[callback]}};Observable.prototype.trigger=function(event){var slice=Array.prototype.slice;var params=slice.call(arguments,1);this.listeners=this.listeners||{};if(params==null){params=[]}
if(params.length===0){params.push({})}
params[0]._type=event;if(event in this.listeners){this.invoke(this.listeners[event],slice.call(arguments,1))}
if('*' in this.listeners){this.invoke(this.listeners['*'],arguments)}};Observable.prototype.invoke=function(listeners,params){for(var i=0,len=listeners.length;i<len;i++){listeners[i].apply(this,params)}};Utils.Observable=Observable;Utils.generateChars=function(length){var chars='';for(var i=0;i<length;i++){var randomChar=Math.floor(Math.random()*36);chars+=randomChar.toString(36)}
return chars};Utils.bind=function(func,context){return function(){func.apply(context,arguments)}};Utils._convertData=function(data){for(var originalKey in data){var keys=originalKey.split('-');var dataLevel=data;if(keys.length===1){continue}
for(var k=0;k<keys.length;k++){var key=keys[k];key=key.substring(0,1).toLowerCase()+key.substring(1);if(!(key in dataLevel)){dataLevel[key]={}}
if(k==keys.length-1){dataLevel[key]=data[originalKey]}
dataLevel=dataLevel[key]}
delete data[originalKey]}
return data};Utils.hasScroll=function(index,el){var $el=$(el);var overflowX=el.style.overflowX;var overflowY=el.style.overflowY;if(overflowX===overflowY&&(overflowY==='hidden'||overflowY==='visible')){return!1}
if(overflowX==='scroll'||overflowY==='scroll'){return!0}
return($el.innerHeight()<el.scrollHeight||$el.innerWidth()<el.scrollWidth)};Utils.escapeMarkup=function(markup){var replaceMap={'\\':'&#92;','&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;','\'':'&#39;','/':'&#47;'};if(typeof markup!=='string'){return markup}
return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replaceMap[match]})};Utils.appendMany=function($element,$nodes){if($.fn.jquery.substr(0,3)==='1.7'){var $jqNodes=$();$.map($nodes,function(node){$jqNodes=$jqNodes.add(node)});$nodes=$jqNodes}
$element.append($nodes)};return Utils});S2.define('select2/results',['jquery','./utils'],function($,Utils){function Results($element,options,dataAdapter){this.$element=$element;this.data=dataAdapter;this.options=options;Results.__super__.constructor.call(this)}
Utils.Extend(Results,Utils.Observable);Results.prototype.render=function(){var $results=$('<ul class="select2-results__options" role="tree"></ul>');if(this.options.get('multiple')){$results.attr('aria-multiselectable','true')}
this.$results=$results;return $results};Results.prototype.clear=function(){this.$results.empty()};Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get('escapeMarkup');this.clear();this.hideLoading();var $message=$('<li role="treeitem" aria-live="assertive"'+' class="select2-results__option"></li>');var message=this.options.get('translations').get(params.message);$message.append(escapeMarkup(message(params.args)));$message[0].className+=' select2-results__message';this.$results.append($message)};Results.prototype.hideMessages=function(){this.$results.find('.select2-results__message').remove()};Results.prototype.append=function(data){this.hideLoading();var $options=[];if(data.results==null||data.results.length===0){if(this.$results.children().length===0){this.trigger('results:message',{message:'noResults'})}
return}
data.results=this.sort(data.results);for(var d=0;d<data.results.length;d++){var item=data.results[d];var $option=this.option(item);$options.push($option)}
this.$results.append($options)};Results.prototype.position=function($results,$dropdown){var $resultsContainer=$dropdown.find('.select2-results');$resultsContainer.append($results)};Results.prototype.sort=function(data){var sorter=this.options.get('sorter');return sorter(data)};Results.prototype.highlightFirstItem=function(){var $options=this.$results.find('.select2-results__option[aria-selected]');var $selected=$options.filter('[aria-selected=true]');if($selected.length>0){$selected.first().trigger('mouseenter')}else{$options.first().trigger('mouseenter')}
this.ensureHighlightVisible()};Results.prototype.setClasses=function(){var self=this;this.data.current(function(selected){var selectedIds=$.map(selected,function(s){return s.id.toString()});var $options=self.$results.find('.select2-results__option[aria-selected]');$options.each(function(){var $option=$(this);var item=$.data(this,'data');var id=''+item.id;if((item.element!=null&&item.element.selected)||(item.element==null&&$.inArray(id,selectedIds)>-1)){$option.attr('aria-selected','true')}else{$option.attr('aria-selected','false')}})})};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get('translations').get('searching');var loading={disabled:!0,loading:!0,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=' loading-results';this.$results.prepend($loading)};Results.prototype.hideLoading=function(){this.$results.find('.loading-results').remove()};Results.prototype.option=function(data){var option=document.createElement('li');option.className='select2-results__option';var attrs={'role':'treeitem','aria-selected':'false'};if(data.disabled){delete attrs['aria-selected'];attrs['aria-disabled']='true'}
if(data.id==null){delete attrs['aria-selected']}
if(data._resultId!=null){option.id=data._resultId}
if(data.title){option.title=data.title}
if(data.children){attrs.role='group';attrs['aria-label']=data.text;delete attrs['aria-selected']}
for(var attr in attrs){var val=attrs[attr];option.setAttribute(attr,val)}
if(data.children){var $option=$(option);var label=document.createElement('strong');label.className='select2-results__group';var $label=$(label);this.template(data,label);var $children=[];for(var c=0;c<data.children.length;c++){var child=data.children[c];var $child=this.option(child);$children.push($child)}
var $childrenContainer=$('<ul></ul>',{'class':'select2-results__options select2-results__options--nested'});$childrenContainer.append($children);$option.append(label);$option.append($childrenContainer)}else{this.template(data,option)}
$.data(option,'data',data);return option};Results.prototype.bind=function(container,$container){var self=this;var id=container.id+'-results';this.$results.attr('id',id);container.on('results:all',function(params){self.clear();self.append(params.data);if(container.isOpen()){self.setClasses();self.highlightFirstItem()}});container.on('results:append',function(params){self.append(params.data);if(container.isOpen()){self.setClasses()}});container.on('query',function(params){self.hideMessages();self.showLoading(params)});container.on('select',function(){if(!container.isOpen()){return}
self.setClasses();self.highlightFirstItem()});container.on('unselect',function(){if(!container.isOpen()){return}
self.setClasses();self.highlightFirstItem()});container.on('open',function(){self.$results.attr('aria-expanded','true');self.$results.attr('aria-hidden','false');self.setClasses();self.ensureHighlightVisible()});container.on('close',function(){self.$results.attr('aria-expanded','false');self.$results.attr('aria-hidden','true');self.$results.removeAttr('aria-activedescendant')});container.on('results:toggle',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return}
$highlighted.trigger('mouseup')});container.on('results:select',function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return}
var data=$highlighted.data('data');if($highlighted.attr('aria-selected')=='true'){self.trigger('close',{})}else{self.trigger('select',{data:data})}});container.on('results:previous',function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);if(currentIndex===0){return}
var nextIndex=currentIndex-1;if($highlighted.length===0){nextIndex=0}
var $next=$options.eq(nextIndex);$next.trigger('mouseenter');var currentOffset=self.$results.offset().top;var nextTop=$next.offset().top;var nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);if(nextIndex===0){self.$results.scrollTop(0)}else if(nextTop-currentOffset<0){self.$results.scrollTop(nextOffset)}});container.on('results:next',function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);var nextIndex=currentIndex+1;if(nextIndex>=$options.length){return}
var $next=$options.eq(nextIndex);$next.trigger('mouseenter');var currentOffset=self.$results.offset().top+self.$results.outerHeight(!1);var nextBottom=$next.offset().top+$next.outerHeight(!1);var nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;if(nextIndex===0){self.$results.scrollTop(0)}else if(nextBottom>currentOffset){self.$results.scrollTop(nextOffset)}});container.on('results:focus',function(params){params.element.addClass('select2-results__option--highlighted')});container.on('results:message',function(params){self.displayMessage(params)});if($.fn.mousewheel){this.$results.on('mousewheel',function(e){var top=self.$results.scrollTop();var bottom=self.$results.get(0).scrollHeight-top+e.deltaY;var isAtTop=e.deltaY>0&&top-e.deltaY<=0;var isAtBottom=e.deltaY<0&&bottom<=self.$results.height();if(isAtTop){self.$results.scrollTop(0);e.preventDefault();e.stopPropagation()}else if(isAtBottom){self.$results.scrollTop(self.$results.get(0).scrollHeight-self.$results.height());e.preventDefault();e.stopPropagation()}})}
this.$results.on('mouseup','.select2-results__option[aria-selected]',function(evt){var $this=$(this);var data=$this.data('data');if($this.attr('aria-selected')==='true'){if(self.options.get('multiple')){self.trigger('unselect',{originalEvent:evt,data:data})}else{self.trigger('close',{})}
return}
self.trigger('select',{originalEvent:evt,data:data})});this.$results.on('mouseenter','.select2-results__option[aria-selected]',function(evt){var data=$(this).data('data');self.getHighlightedResults().removeClass('select2-results__option--highlighted');self.trigger('results:focus',{data:data,element:$(this)})})};Results.prototype.getHighlightedResults=function(){var $highlighted=this.$results.find('.select2-results__option--highlighted');return $highlighted};Results.prototype.destroy=function(){this.$results.remove()};Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if($highlighted.length===0){return}
var $options=this.$results.find('[aria-selected]');var currentIndex=$options.index($highlighted);var currentOffset=this.$results.offset().top;var nextTop=$highlighted.offset().top;var nextOffset=this.$results.scrollTop()+(nextTop-currentOffset);var offsetDelta=nextTop-currentOffset;nextOffset-=$highlighted.outerHeight(!1)*2;if(currentIndex<=2){this.$results.scrollTop(0)}else if(offsetDelta>this.$results.outerHeight()||offsetDelta<0){this.$results.scrollTop(nextOffset)}};Results.prototype.template=function(result,container){var template=this.options.get('templateResult');var escapeMarkup=this.options.get('escapeMarkup');var content=template(result,container);if(content==null){container.style.display='none'}else if(typeof content==='string'){container.innerHTML=escapeMarkup(content)}else{$(container).append(content)}};return Results});S2.define('select2/keys',[],function(){var KEYS={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return KEYS});S2.define('select2/selection/base',['jquery','../utils','../keys'],function($,Utils,KEYS){function BaseSelection($element,options){this.$element=$element;this.options=options;BaseSelection.__super__.constructor.call(this)}
Utils.Extend(BaseSelection,Utils.Observable);BaseSelection.prototype.render=function(){var $selection=$('<span class="select2-selection" role="combobox" '+' aria-haspopup="true" aria-expanded="false">'+'</span>');this._tabindex=0;if(this.$element.data('old-tabindex')!=null){this._tabindex=this.$element.data('old-tabindex')}else if(this.$element.attr('tabindex')!=null){this._tabindex=this.$element.attr('tabindex')}
$selection.attr('title',this.$element.attr('title'));$selection.attr('tabindex',this._tabindex);this.$selection=$selection;return $selection};BaseSelection.prototype.bind=function(container,$container){var self=this;var id=container.id+'-container';var resultsId=container.id+'-results';this.container=container;this.$selection.on('focus',function(evt){self.trigger('focus',evt)});this.$selection.on('blur',function(evt){self._handleBlur(evt)});this.$selection.on('keydown',function(evt){self.trigger('keypress',evt);if(evt.which===KEYS.SPACE){evt.preventDefault()}});container.on('results:focus',function(params){self.$selection.attr('aria-activedescendant',params.data._resultId)});container.on('selection:update',function(params){self.update(params.data)});container.on('open',function(){self.$selection.attr('aria-expanded','true');self.$selection.attr('aria-owns',resultsId);self._attachCloseHandler(container)});container.on('close',function(){self.$selection.attr('aria-expanded','false');self.$selection.removeAttr('aria-activedescendant');self.$selection.removeAttr('aria-owns');self.$selection.focus();self._detachCloseHandler(container)});container.on('enable',function(){self.$selection.attr('tabindex',self._tabindex)});container.on('disable',function(){self.$selection.attr('tabindex','-1')})};BaseSelection.prototype._handleBlur=function(evt){var self=this;window.setTimeout(function(){if((document.activeElement==self.$selection[0])||($.contains(self.$selection[0],document.activeElement))){return}
self.trigger('blur',evt)},1)};BaseSelection.prototype._attachCloseHandler=function(container){var self=this;$(document.body).on('mousedown.select2.'+container.id,function(e){var $target=$(e.target);var $select=$target.closest('.select2');var $all=$('.select2.select2-container--open');$all.each(function(){var $this=$(this);if(this==$select[0]){return}
var $element=$this.data('element');$element.select2('close')})})};BaseSelection.prototype._detachCloseHandler=function(container){$(document.body).off('mousedown.select2.'+container.id)};BaseSelection.prototype.position=function($selection,$container){var $selectionContainer=$container.find('.selection');$selectionContainer.append($selection)};BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container)};BaseSelection.prototype.update=function(data){throw new Error('The `update` method must be defined in child classes.')};return BaseSelection});S2.define('select2/selection/single',['jquery','./base','../utils','../keys'],function($,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments)}
Utils.Extend(SingleSelection,BaseSelection);SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);$selection.addClass('select2-selection--single');$selection.html('<span class="select2-selection__rendered"></span>'+'<span class="select2-selection__arrow" role="presentation">'+'<b role="presentation"></b>'+'</span>');return $selection};SingleSelection.prototype.bind=function(container,$container){var self=this;SingleSelection.__super__.bind.apply(this,arguments);var id=container.id+'-container';this.$selection.find('.select2-selection__rendered').attr('id',id);this.$selection.attr('aria-labelledby',id);this.$selection.on('mousedown',function(evt){if(evt.which!==1){return}
self.trigger('toggle',{originalEvent:evt})});this.$selection.on('focus',function(evt){});this.$selection.on('blur',function(evt){});container.on('focus',function(evt){if(!container.isOpen()){self.$selection.focus()}});container.on('selection:update',function(params){self.update(params.data)})};SingleSelection.prototype.clear=function(){this.$selection.find('.select2-selection__rendered').empty()};SingleSelection.prototype.display=function(data,container){var template=this.options.get('templateSelection');var escapeMarkup=this.options.get('escapeMarkup');return escapeMarkup(template(data,container))};SingleSelection.prototype.selectionContainer=function(){return $('<span></span>')};SingleSelection.prototype.update=function(data){if(data.length===0){this.clear();return}
var selection=data[0];var $rendered=this.$selection.find('.select2-selection__rendered');var formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);$rendered.prop('title',selection.title||selection.text)};return SingleSelection});S2.define('select2/selection/multiple',['jquery','./base','../utils'],function($,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments)}
Utils.Extend(MultipleSelection,BaseSelection);MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);$selection.addClass('select2-selection--multiple');$selection.html('<ul class="select2-selection__rendered"></ul>');return $selection};MultipleSelection.prototype.bind=function(container,$container){var self=this;MultipleSelection.__super__.bind.apply(this,arguments);this.$selection.on('click',function(evt){self.trigger('toggle',{originalEvent:evt})});this.$selection.on('click','.select2-selection__choice__remove',function(evt){if(self.options.get('disabled')){return}
var $remove=$(this);var $selection=$remove.parent();var data=$selection.data('data');self.trigger('unselect',{originalEvent:evt,data:data})})};MultipleSelection.prototype.clear=function(){this.$selection.find('.select2-selection__rendered').empty()};MultipleSelection.prototype.display=function(data,container){var template=this.options.get('templateSelection');var escapeMarkup=this.options.get('escapeMarkup');return escapeMarkup(template(data,container))};MultipleSelection.prototype.selectionContainer=function(){var $container=$('<li class="select2-selection__choice">'+'<span class="select2-selection__choice__remove" role="presentation">'+'&times;'+'</span>'+'</li>');return $container};MultipleSelection.prototype.update=function(data){this.clear();if(data.length===0){return}
var $selections=[];for(var d=0;d<data.length;d++){var selection=data[d];var $selection=this.selectionContainer();var formatted=this.display(selection,$selection);$selection.append(formatted);$selection.prop('title',selection.title||selection.text);$selection.data('data',selection);$selections.push($selection)}
var $rendered=this.$selection.find('.select2-selection__rendered');Utils.appendMany($rendered,$selections)};return MultipleSelection});S2.define('select2/selection/placeholder',['../utils'],function(Utils){function Placeholder(decorated,$element,options){this.placeholder=this.normalizePlaceholder(options.get('placeholder'));decorated.call(this,$element,options)}
Placeholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==='string'){placeholder={id:'',text:placeholder}}
return placeholder};Placeholder.prototype.createPlaceholder=function(decorated,placeholder){var $placeholder=this.selectionContainer();$placeholder.html(this.display(placeholder));$placeholder.addClass('select2-selection__placeholder').removeClass('select2-selection__choice');return $placeholder};Placeholder.prototype.update=function(decorated,data){var singlePlaceholder=(data.length==1&&data[0].id!=this.placeholder.id);var multipleSelections=data.length>1;if(multipleSelections||singlePlaceholder){return decorated.call(this,data)}
this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find('.select2-selection__rendered').append($placeholder)};return Placeholder});S2.define('select2/selection/allowClear',['jquery','../keys'],function($,KEYS){function AllowClear(){}
AllowClear.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);if(this.placeholder==null){if(this.options.get('debug')&&window.console&&console.error){console.error('Select2: The `allowClear` option should be used in combination '+'with the `placeholder` option.')}}
this.$selection.on('mousedown','.select2-selection__clear',function(evt){self._handleClear(evt)});container.on('keypress',function(evt){self._handleKeyboardClear(evt,container)})};AllowClear.prototype._handleClear=function(_,evt){if(this.options.get('disabled')){return}
var $clear=this.$selection.find('.select2-selection__clear');if($clear.length===0){return}
evt.stopPropagation();var data=$clear.data('data');for(var d=0;d<data.length;d++){var unselectData={data:data[d]};this.trigger('unselect',unselectData);if(unselectData.prevented){return}}
this.$element.val(this.placeholder.id).trigger('change');this.trigger('toggle',{})};AllowClear.prototype._handleKeyboardClear=function(_,evt,container){if(container.isOpen()){return}
if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){this._handleClear(evt)}};AllowClear.prototype.update=function(decorated,data){decorated.call(this,data);if(this.$selection.find('.select2-selection__placeholder').length>0||data.length===0){return}
var $remove=$('<span class="select2-selection__clear">'+'&times;'+'</span>');$remove.data('data',data);this.$selection.find('.select2-selection__rendered').prepend($remove)};return AllowClear});S2.define('select2/selection/search',['jquery','../utils','../keys'],function($,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options)}
Search.prototype.render=function(decorated){var $search=$('<li class="select2-search select2-search--inline">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="off"'+' spellcheck="false" role="textbox" aria-autocomplete="list" />'+'</li>');this.$searchContainer=$search;this.$search=$search.find('input');var $rendered=decorated.call(this);this._transferTabIndex();return $rendered};Search.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('open',function(){self.$search.trigger('focus')});container.on('close',function(){self.$search.val('');self.$search.removeAttr('aria-activedescendant');self.$search.trigger('focus')});container.on('enable',function(){self.$search.prop('disabled',!1);self._transferTabIndex()});container.on('disable',function(){self.$search.prop('disabled',!0)});container.on('focus',function(evt){self.$search.trigger('focus')});container.on('results:focus',function(params){self.$search.attr('aria-activedescendant',params.id)});this.$selection.on('focusin','.select2-search--inline',function(evt){self.trigger('focus',evt)});this.$selection.on('focusout','.select2-search--inline',function(evt){self._handleBlur(evt)});this.$selection.on('keydown','.select2-search--inline',function(evt){evt.stopPropagation();self.trigger('keypress',evt);self._keyUpPrevented=evt.isDefaultPrevented();var key=evt.which;if(key===KEYS.BACKSPACE&&self.$search.val()===''){var $previousChoice=self.$searchContainer.prev('.select2-selection__choice');if($previousChoice.length>0){var item=$previousChoice.data('data');self.searchRemoveChoice(item);evt.preventDefault()}}});var msie=document.documentMode;var disableInputEvents=msie&&msie<=11;this.$selection.on('input.searchcheck','.select2-search--inline',function(evt){if(disableInputEvents){self.$selection.off('input.search input.searchcheck');return}
self.$selection.off('keyup.search')});this.$selection.on('keyup.search input.search','.select2-search--inline',function(evt){if(disableInputEvents&&evt.type==='input'){self.$selection.off('input.search input.searchcheck');return}
var key=evt.which;if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){return}
if(key==KEYS.TAB){return}
self.handleSearch(evt)})};Search.prototype._transferTabIndex=function(decorated){this.$search.attr('tabindex',this.$selection.attr('tabindex'));this.$selection.attr('tabindex','-1')};Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search.attr('placeholder',placeholder.text)};Search.prototype.update=function(decorated,data){var searchHadFocus=this.$search[0]==document.activeElement;this.$search.attr('placeholder','');decorated.call(this,data);this.$selection.find('.select2-selection__rendered').append(this.$searchContainer);this.resizeSearch();if(searchHadFocus){this.$search.focus()}};Search.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var input=this.$search.val();this.trigger('query',{term:input})}
this._keyUpPrevented=!1};Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger('unselect',{data:item});this.$search.val(item.text);this.handleSearch()};Search.prototype.resizeSearch=function(){this.$search.css('width','25px');var width='';if(this.$search.attr('placeholder')!==''){width=this.$selection.find('.select2-selection__rendered').innerWidth()}else{var minimumWidth=this.$search.val().length+1;width=(minimumWidth*0.75)+'em'}
this.$search.css('width',width)};return Search});S2.define('select2/selection/eventRelay',['jquery'],function($){function EventRelay(){}
EventRelay.prototype.bind=function(decorated,container,$container){var self=this;var relayEvents=['open','opening','close','closing','select','selecting','unselect','unselecting'];var preventableEvents=['opening','closing','selecting','unselecting'];decorated.call(this,container,$container);container.on('*',function(name,params){if($.inArray(name,relayEvents)===-1){return}
params=params||{};var evt=$.Event('select2:'+name,{params:params});self.$element.trigger(evt);if($.inArray(name,preventableEvents)===-1){return}
params.prevented=evt.isDefaultPrevented()})};return EventRelay});S2.define('select2/translation',['jquery','require'],function($,require){function Translation(dict){this.dict=dict||{}}
Translation.prototype.all=function(){return this.dict};Translation.prototype.get=function(key){return this.dict[key]};Translation.prototype.extend=function(translation){this.dict=$.extend({},translation.all(),this.dict)};Translation._cache={};Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require(path);Translation._cache[path]=translations}
return new Translation(Translation._cache[path])};return Translation});S2.define('select2/diacritics',[],function(){var diacritics={'\u24B6':'A','\uFF21':'A','\u00C0':'A','\u00C1':'A','\u00C2':'A','\u1EA6':'A','\u1EA4':'A','\u1EAA':'A','\u1EA8':'A','\u00C3':'A','\u0100':'A','\u0102':'A','\u1EB0':'A','\u1EAE':'A','\u1EB4':'A','\u1EB2':'A','\u0226':'A','\u01E0':'A','\u00C4':'A','\u01DE':'A','\u1EA2':'A','\u00C5':'A','\u01FA':'A','\u01CD':'A','\u0200':'A','\u0202':'A','\u1EA0':'A','\u1EAC':'A','\u1EB6':'A','\u1E00':'A','\u0104':'A','\u023A':'A','\u2C6F':'A','\uA732':'AA','\u00C6':'AE','\u01FC':'AE','\u01E2':'AE','\uA734':'AO','\uA736':'AU','\uA738':'AV','\uA73A':'AV','\uA73C':'AY','\u24B7':'B','\uFF22':'B','\u1E02':'B','\u1E04':'B','\u1E06':'B','\u0243':'B','\u0182':'B','\u0181':'B','\u24B8':'C','\uFF23':'C','\u0106':'C','\u0108':'C','\u010A':'C','\u010C':'C','\u00C7':'C','\u1E08':'C','\u0187':'C','\u023B':'C','\uA73E':'C','\u24B9':'D','\uFF24':'D','\u1E0A':'D','\u010E':'D','\u1E0C':'D','\u1E10':'D','\u1E12':'D','\u1E0E':'D','\u0110':'D','\u018B':'D','\u018A':'D','\u0189':'D','\uA779':'D','\u01F1':'DZ','\u01C4':'DZ','\u01F2':'Dz','\u01C5':'Dz','\u24BA':'E','\uFF25':'E','\u00C8':'E','\u00C9':'E','\u00CA':'E','\u1EC0':'E','\u1EBE':'E','\u1EC4':'E','\u1EC2':'E','\u1EBC':'E','\u0112':'E','\u1E14':'E','\u1E16':'E','\u0114':'E','\u0116':'E','\u00CB':'E','\u1EBA':'E','\u011A':'E','\u0204':'E','\u0206':'E','\u1EB8':'E','\u1EC6':'E','\u0228':'E','\u1E1C':'E','\u0118':'E','\u1E18':'E','\u1E1A':'E','\u0190':'E','\u018E':'E','\u24BB':'F','\uFF26':'F','\u1E1E':'F','\u0191':'F','\uA77B':'F','\u24BC':'G','\uFF27':'G','\u01F4':'G','\u011C':'G','\u1E20':'G','\u011E':'G','\u0120':'G','\u01E6':'G','\u0122':'G','\u01E4':'G','\u0193':'G','\uA7A0':'G','\uA77D':'G','\uA77E':'G','\u24BD':'H','\uFF28':'H','\u0124':'H','\u1E22':'H','\u1E26':'H','\u021E':'H','\u1E24':'H','\u1E28':'H','\u1E2A':'H','\u0126':'H','\u2C67':'H','\u2C75':'H','\uA78D':'H','\u24BE':'I','\uFF29':'I','\u00CC':'I','\u00CD':'I','\u00CE':'I','\u0128':'I','\u012A':'I','\u012C':'I','\u0130':'I','\u00CF':'I','\u1E2E':'I','\u1EC8':'I','\u01CF':'I','\u0208':'I','\u020A':'I','\u1ECA':'I','\u012E':'I','\u1E2C':'I','\u0197':'I','\u24BF':'J','\uFF2A':'J','\u0134':'J','\u0248':'J','\u24C0':'K','\uFF2B':'K','\u1E30':'K','\u01E8':'K','\u1E32':'K','\u0136':'K','\u1E34':'K','\u0198':'K','\u2C69':'K','\uA740':'K','\uA742':'K','\uA744':'K','\uA7A2':'K','\u24C1':'L','\uFF2C':'L','\u013F':'L','\u0139':'L','\u013D':'L','\u1E36':'L','\u1E38':'L','\u013B':'L','\u1E3C':'L','\u1E3A':'L','\u0141':'L','\u023D':'L','\u2C62':'L','\u2C60':'L','\uA748':'L','\uA746':'L','\uA780':'L','\u01C7':'LJ','\u01C8':'Lj','\u24C2':'M','\uFF2D':'M','\u1E3E':'M','\u1E40':'M','\u1E42':'M','\u2C6E':'M','\u019C':'M','\u24C3':'N','\uFF2E':'N','\u01F8':'N','\u0143':'N','\u00D1':'N','\u1E44':'N','\u0147':'N','\u1E46':'N','\u0145':'N','\u1E4A':'N','\u1E48':'N','\u0220':'N','\u019D':'N','\uA790':'N','\uA7A4':'N','\u01CA':'NJ','\u01CB':'Nj','\u24C4':'O','\uFF2F':'O','\u00D2':'O','\u00D3':'O','\u00D4':'O','\u1ED2':'O','\u1ED0':'O','\u1ED6':'O','\u1ED4':'O','\u00D5':'O','\u1E4C':'O','\u022C':'O','\u1E4E':'O','\u014C':'O','\u1E50':'O','\u1E52':'O','\u014E':'O','\u022E':'O','\u0230':'O','\u00D6':'O','\u022A':'O','\u1ECE':'O','\u0150':'O','\u01D1':'O','\u020C':'O','\u020E':'O','\u01A0':'O','\u1EDC':'O','\u1EDA':'O','\u1EE0':'O','\u1EDE':'O','\u1EE2':'O','\u1ECC':'O','\u1ED8':'O','\u01EA':'O','\u01EC':'O','\u00D8':'O','\u01FE':'O','\u0186':'O','\u019F':'O','\uA74A':'O','\uA74C':'O','\u01A2':'OI','\uA74E':'OO','\u0222':'OU','\u24C5':'P','\uFF30':'P','\u1E54':'P','\u1E56':'P','\u01A4':'P','\u2C63':'P','\uA750':'P','\uA752':'P','\uA754':'P','\u24C6':'Q','\uFF31':'Q','\uA756':'Q','\uA758':'Q','\u024A':'Q','\u24C7':'R','\uFF32':'R','\u0154':'R','\u1E58':'R','\u0158':'R','\u0210':'R','\u0212':'R','\u1E5A':'R','\u1E5C':'R','\u0156':'R','\u1E5E':'R','\u024C':'R','\u2C64':'R','\uA75A':'R','\uA7A6':'R','\uA782':'R','\u24C8':'S','\uFF33':'S','\u1E9E':'S','\u015A':'S','\u1E64':'S','\u015C':'S','\u1E60':'S','\u0160':'S','\u1E66':'S','\u1E62':'S','\u1E68':'S','\u0218':'S','\u015E':'S','\u2C7E':'S','\uA7A8':'S','\uA784':'S','\u24C9':'T','\uFF34':'T','\u1E6A':'T','\u0164':'T','\u1E6C':'T','\u021A':'T','\u0162':'T','\u1E70':'T','\u1E6E':'T','\u0166':'T','\u01AC':'T','\u01AE':'T','\u023E':'T','\uA786':'T','\uA728':'TZ','\u24CA':'U','\uFF35':'U','\u00D9':'U','\u00DA':'U','\u00DB':'U','\u0168':'U','\u1E78':'U','\u016A':'U','\u1E7A':'U','\u016C':'U','\u00DC':'U','\u01DB':'U','\u01D7':'U','\u01D5':'U','\u01D9':'U','\u1EE6':'U','\u016E':'U','\u0170':'U','\u01D3':'U','\u0214':'U','\u0216':'U','\u01AF':'U','\u1EEA':'U','\u1EE8':'U','\u1EEE':'U','\u1EEC':'U','\u1EF0':'U','\u1EE4':'U','\u1E72':'U','\u0172':'U','\u1E76':'U','\u1E74':'U','\u0244':'U','\u24CB':'V','\uFF36':'V','\u1E7C':'V','\u1E7E':'V','\u01B2':'V','\uA75E':'V','\u0245':'V','\uA760':'VY','\u24CC':'W','\uFF37':'W','\u1E80':'W','\u1E82':'W','\u0174':'W','\u1E86':'W','\u1E84':'W','\u1E88':'W','\u2C72':'W','\u24CD':'X','\uFF38':'X','\u1E8A':'X','\u1E8C':'X','\u24CE':'Y','\uFF39':'Y','\u1EF2':'Y','\u00DD':'Y','\u0176':'Y','\u1EF8':'Y','\u0232':'Y','\u1E8E':'Y','\u0178':'Y','\u1EF6':'Y','\u1EF4':'Y','\u01B3':'Y','\u024E':'Y','\u1EFE':'Y','\u24CF':'Z','\uFF3A':'Z','\u0179':'Z','\u1E90':'Z','\u017B':'Z','\u017D':'Z','\u1E92':'Z','\u1E94':'Z','\u01B5':'Z','\u0224':'Z','\u2C7F':'Z','\u2C6B':'Z','\uA762':'Z','\u24D0':'a','\uFF41':'a','\u1E9A':'a','\u00E0':'a','\u00E1':'a','\u00E2':'a','\u1EA7':'a','\u1EA5':'a','\u1EAB':'a','\u1EA9':'a','\u00E3':'a','\u0101':'a','\u0103':'a','\u1EB1':'a','\u1EAF':'a','\u1EB5':'a','\u1EB3':'a','\u0227':'a','\u01E1':'a','\u00E4':'a','\u01DF':'a','\u1EA3':'a','\u00E5':'a','\u01FB':'a','\u01CE':'a','\u0201':'a','\u0203':'a','\u1EA1':'a','\u1EAD':'a','\u1EB7':'a','\u1E01':'a','\u0105':'a','\u2C65':'a','\u0250':'a','\uA733':'aa','\u00E6':'ae','\u01FD':'ae','\u01E3':'ae','\uA735':'ao','\uA737':'au','\uA739':'av','\uA73B':'av','\uA73D':'ay','\u24D1':'b','\uFF42':'b','\u1E03':'b','\u1E05':'b','\u1E07':'b','\u0180':'b','\u0183':'b','\u0253':'b','\u24D2':'c','\uFF43':'c','\u0107':'c','\u0109':'c','\u010B':'c','\u010D':'c','\u00E7':'c','\u1E09':'c','\u0188':'c','\u023C':'c','\uA73F':'c','\u2184':'c','\u24D3':'d','\uFF44':'d','\u1E0B':'d','\u010F':'d','\u1E0D':'d','\u1E11':'d','\u1E13':'d','\u1E0F':'d','\u0111':'d','\u018C':'d','\u0256':'d','\u0257':'d','\uA77A':'d','\u01F3':'dz','\u01C6':'dz','\u24D4':'e','\uFF45':'e','\u00E8':'e','\u00E9':'e','\u00EA':'e','\u1EC1':'e','\u1EBF':'e','\u1EC5':'e','\u1EC3':'e','\u1EBD':'e','\u0113':'e','\u1E15':'e','\u1E17':'e','\u0115':'e','\u0117':'e','\u00EB':'e','\u1EBB':'e','\u011B':'e','\u0205':'e','\u0207':'e','\u1EB9':'e','\u1EC7':'e','\u0229':'e','\u1E1D':'e','\u0119':'e','\u1E19':'e','\u1E1B':'e','\u0247':'e','\u025B':'e','\u01DD':'e','\u24D5':'f','\uFF46':'f','\u1E1F':'f','\u0192':'f','\uA77C':'f','\u24D6':'g','\uFF47':'g','\u01F5':'g','\u011D':'g','\u1E21':'g','\u011F':'g','\u0121':'g','\u01E7':'g','\u0123':'g','\u01E5':'g','\u0260':'g','\uA7A1':'g','\u1D79':'g','\uA77F':'g','\u24D7':'h','\uFF48':'h','\u0125':'h','\u1E23':'h','\u1E27':'h','\u021F':'h','\u1E25':'h','\u1E29':'h','\u1E2B':'h','\u1E96':'h','\u0127':'h','\u2C68':'h','\u2C76':'h','\u0265':'h','\u0195':'hv','\u24D8':'i','\uFF49':'i','\u00EC':'i','\u00ED':'i','\u00EE':'i','\u0129':'i','\u012B':'i','\u012D':'i','\u00EF':'i','\u1E2F':'i','\u1EC9':'i','\u01D0':'i','\u0209':'i','\u020B':'i','\u1ECB':'i','\u012F':'i','\u1E2D':'i','\u0268':'i','\u0131':'i','\u24D9':'j','\uFF4A':'j','\u0135':'j','\u01F0':'j','\u0249':'j','\u24DA':'k','\uFF4B':'k','\u1E31':'k','\u01E9':'k','\u1E33':'k','\u0137':'k','\u1E35':'k','\u0199':'k','\u2C6A':'k','\uA741':'k','\uA743':'k','\uA745':'k','\uA7A3':'k','\u24DB':'l','\uFF4C':'l','\u0140':'l','\u013A':'l','\u013E':'l','\u1E37':'l','\u1E39':'l','\u013C':'l','\u1E3D':'l','\u1E3B':'l','\u017F':'l','\u0142':'l','\u019A':'l','\u026B':'l','\u2C61':'l','\uA749':'l','\uA781':'l','\uA747':'l','\u01C9':'lj','\u24DC':'m','\uFF4D':'m','\u1E3F':'m','\u1E41':'m','\u1E43':'m','\u0271':'m','\u026F':'m','\u24DD':'n','\uFF4E':'n','\u01F9':'n','\u0144':'n','\u00F1':'n','\u1E45':'n','\u0148':'n','\u1E47':'n','\u0146':'n','\u1E4B':'n','\u1E49':'n','\u019E':'n','\u0272':'n','\u0149':'n','\uA791':'n','\uA7A5':'n','\u01CC':'nj','\u24DE':'o','\uFF4F':'o','\u00F2':'o','\u00F3':'o','\u00F4':'o','\u1ED3':'o','\u1ED1':'o','\u1ED7':'o','\u1ED5':'o','\u00F5':'o','\u1E4D':'o','\u022D':'o','\u1E4F':'o','\u014D':'o','\u1E51':'o','\u1E53':'o','\u014F':'o','\u022F':'o','\u0231':'o','\u00F6':'o','\u022B':'o','\u1ECF':'o','\u0151':'o','\u01D2':'o','\u020D':'o','\u020F':'o','\u01A1':'o','\u1EDD':'o','\u1EDB':'o','\u1EE1':'o','\u1EDF':'o','\u1EE3':'o','\u1ECD':'o','\u1ED9':'o','\u01EB':'o','\u01ED':'o','\u00F8':'o','\u01FF':'o','\u0254':'o','\uA74B':'o','\uA74D':'o','\u0275':'o','\u01A3':'oi','\u0223':'ou','\uA74F':'oo','\u24DF':'p','\uFF50':'p','\u1E55':'p','\u1E57':'p','\u01A5':'p','\u1D7D':'p','\uA751':'p','\uA753':'p','\uA755':'p','\u24E0':'q','\uFF51':'q','\u024B':'q','\uA757':'q','\uA759':'q','\u24E1':'r','\uFF52':'r','\u0155':'r','\u1E59':'r','\u0159':'r','\u0211':'r','\u0213':'r','\u1E5B':'r','\u1E5D':'r','\u0157':'r','\u1E5F':'r','\u024D':'r','\u027D':'r','\uA75B':'r','\uA7A7':'r','\uA783':'r','\u24E2':'s','\uFF53':'s','\u00DF':'s','\u015B':'s','\u1E65':'s','\u015D':'s','\u1E61':'s','\u0161':'s','\u1E67':'s','\u1E63':'s','\u1E69':'s','\u0219':'s','\u015F':'s','\u023F':'s','\uA7A9':'s','\uA785':'s','\u1E9B':'s','\u24E3':'t','\uFF54':'t','\u1E6B':'t','\u1E97':'t','\u0165':'t','\u1E6D':'t','\u021B':'t','\u0163':'t','\u1E71':'t','\u1E6F':'t','\u0167':'t','\u01AD':'t','\u0288':'t','\u2C66':'t','\uA787':'t','\uA729':'tz','\u24E4':'u','\uFF55':'u','\u00F9':'u','\u00FA':'u','\u00FB':'u','\u0169':'u','\u1E79':'u','\u016B':'u','\u1E7B':'u','\u016D':'u','\u00FC':'u','\u01DC':'u','\u01D8':'u','\u01D6':'u','\u01DA':'u','\u1EE7':'u','\u016F':'u','\u0171':'u','\u01D4':'u','\u0215':'u','\u0217':'u','\u01B0':'u','\u1EEB':'u','\u1EE9':'u','\u1EEF':'u','\u1EED':'u','\u1EF1':'u','\u1EE5':'u','\u1E73':'u','\u0173':'u','\u1E77':'u','\u1E75':'u','\u0289':'u','\u24E5':'v','\uFF56':'v','\u1E7D':'v','\u1E7F':'v','\u028B':'v','\uA75F':'v','\u028C':'v','\uA761':'vy','\u24E6':'w','\uFF57':'w','\u1E81':'w','\u1E83':'w','\u0175':'w','\u1E87':'w','\u1E85':'w','\u1E98':'w','\u1E89':'w','\u2C73':'w','\u24E7':'x','\uFF58':'x','\u1E8B':'x','\u1E8D':'x','\u24E8':'y','\uFF59':'y','\u1EF3':'y','\u00FD':'y','\u0177':'y','\u1EF9':'y','\u0233':'y','\u1E8F':'y','\u00FF':'y','\u1EF7':'y','\u1E99':'y','\u1EF5':'y','\u01B4':'y','\u024F':'y','\u1EFF':'y','\u24E9':'z','\uFF5A':'z','\u017A':'z','\u1E91':'z','\u017C':'z','\u017E':'z','\u1E93':'z','\u1E95':'z','\u01B6':'z','\u0225':'z','\u0240':'z','\u2C6C':'z','\uA763':'z','\u0386':'\u0391','\u0388':'\u0395','\u0389':'\u0397','\u038A':'\u0399','\u03AA':'\u0399','\u038C':'\u039F','\u038E':'\u03A5','\u03AB':'\u03A5','\u038F':'\u03A9','\u03AC':'\u03B1','\u03AD':'\u03B5','\u03AE':'\u03B7','\u03AF':'\u03B9','\u03CA':'\u03B9','\u0390':'\u03B9','\u03CC':'\u03BF','\u03CD':'\u03C5','\u03CB':'\u03C5','\u03B0':'\u03C5','\u03C9':'\u03C9','\u03C2':'\u03C3'};return diacritics});S2.define('select2/data/base',['../utils'],function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this)}
Utils.Extend(BaseAdapter,Utils.Observable);BaseAdapter.prototype.current=function(callback){throw new Error('The `current` method must be defined in child classes.')};BaseAdapter.prototype.query=function(params,callback){throw new Error('The `query` method must be defined in child classes.')};BaseAdapter.prototype.bind=function(container,$container){};BaseAdapter.prototype.destroy=function(){};BaseAdapter.prototype.generateResultId=function(container,data){var id=container.id+'-result-';id+=Utils.generateChars(4);if(data.id!=null){id+='-'+data.id.toString()}else{id+='-'+Utils.generateChars(4)}
return id};return BaseAdapter});S2.define('select2/data/select',['./base','../utils','jquery'],function(BaseAdapter,Utils,$){function SelectAdapter($element,options){this.$element=$element;this.options=options;SelectAdapter.__super__.constructor.call(this)}
Utils.Extend(SelectAdapter,BaseAdapter);SelectAdapter.prototype.current=function(callback){var data=[];var self=this;this.$element.find(':selected').each(function(){var $option=$(this);var option=self.item($option);data.push(option)});callback(data)};SelectAdapter.prototype.select=function(data){var self=this;data.selected=!0;if($(data.element).is('option')){data.element.selected=!0;this.$element.trigger('change');return}
if(this.$element.prop('multiple')){this.current(function(currentData){var val=[];data=[data];data.push.apply(data,currentData);for(var d=0;d<data.length;d++){var id=data[d].id;if($.inArray(id,val)===-1){val.push(id)}}
self.$element.val(val);self.$element.trigger('change')})}else{var val=data.id;this.$element.val(val);this.$element.trigger('change')}};SelectAdapter.prototype.unselect=function(data){var self=this;if(!this.$element.prop('multiple')){return}
data.selected=!1;if($(data.element).is('option')){data.element.selected=!1;this.$element.trigger('change');return}
this.current(function(currentData){var val=[];for(var d=0;d<currentData.length;d++){var id=currentData[d].id;if(id!==data.id&&$.inArray(id,val)===-1){val.push(id)}}
self.$element.val(val);self.$element.trigger('change')})};SelectAdapter.prototype.bind=function(container,$container){var self=this;this.container=container;container.on('select',function(params){self.select(params.data)});container.on('unselect',function(params){self.unselect(params.data)})};SelectAdapter.prototype.destroy=function(){this.$element.find('*').each(function(){$.removeData(this,'data')})};SelectAdapter.prototype.query=function(params,callback){var data=[];var self=this;var $options=this.$element.children();$options.each(function(){var $option=$(this);if(!$option.is('option')&&!$option.is('optgroup')){return}
var option=self.item($option);var matches=self.matches(params,option);if(matches!==null){data.push(matches)}});callback({results:data})};SelectAdapter.prototype.addOptions=function($options){Utils.appendMany(this.$element,$options)};SelectAdapter.prototype.option=function(data){var option;if(data.children){option=document.createElement('optgroup');option.label=data.text}else{option=document.createElement('option');if(option.textContent!==undefined){option.textContent=data.text}else{option.innerText=data.text}}
if(data.id){option.value=data.id}
if(data.disabled){option.disabled=!0}
if(data.selected){option.selected=!0}
if(data.title){option.title=data.title}
var $option=$(option);var normalizedData=this._normalizeItem(data);normalizedData.element=option;$.data(option,'data',normalizedData);return $option};SelectAdapter.prototype.item=function($option){var data={};data=$.data($option[0],'data');if(data!=null){return data}
if($option.is('option')){data={id:$option.val(),text:$option.text(),disabled:$option.prop('disabled'),selected:$option.prop('selected'),title:$option.prop('title')}}else if($option.is('optgroup')){data={text:$option.prop('label'),children:[],title:$option.prop('title')};var $children=$option.children('option');var children=[];for(var c=0;c<$children.length;c++){var $child=$($children[c]);var child=this.item($child);children.push(child)}
data.children=children}
data=this._normalizeItem(data);data.element=$option[0];$.data($option[0],'data',data);return data};SelectAdapter.prototype._normalizeItem=function(item){if(!$.isPlainObject(item)){item={id:item,text:item}}
item=$.extend({},{text:''},item);var defaults={selected:!1,disabled:!1};if(item.id!=null){item.id=item.id.toString()}
if(item.text!=null){item.text=item.text.toString()}
if(item._resultId==null&&item.id&&this.container!=null){item._resultId=this.generateResultId(this.container,item)}
return $.extend({},defaults,item)};SelectAdapter.prototype.matches=function(params,data){var matcher=this.options.get('matcher');return matcher(params,data)};return SelectAdapter});S2.define('select2/data/array',['./select','../utils','jquery'],function(SelectAdapter,Utils,$){function ArrayAdapter($element,options){var data=options.get('data')||[];ArrayAdapter.__super__.constructor.call(this,$element,options);this.addOptions(this.convertToOptions(data))}
Utils.Extend(ArrayAdapter,SelectAdapter);ArrayAdapter.prototype.select=function(data){var $option=this.$element.find('option').filter(function(i,elm){return elm.value==data.id.toString()});if($option.length===0){$option=this.option(data);this.addOptions($option)}
ArrayAdapter.__super__.select.call(this,data)};ArrayAdapter.prototype.convertToOptions=function(data){var self=this;var $existing=this.$element.find('option');var existingIds=$existing.map(function(){return self.item($(this)).id}).get();var $options=[];function onlyItem(item){return function(){return $(this).val()==item.id}}
for(var d=0;d<data.length;d++){var item=this._normalizeItem(data[d]);if($.inArray(item.id,existingIds)>=0){var $existingOption=$existing.filter(onlyItem(item));var existingData=this.item($existingOption);var newData=$.extend(!0,{},item,existingData);var $newOption=this.option(newData);$existingOption.replaceWith($newOption);continue}
var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);Utils.appendMany($option,$children)}
$options.push($option)}
return $options};return ArrayAdapter});S2.define('select2/data/ajax',['./array','../utils','jquery'],function(ArrayAdapter,Utils,$){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get('ajax'));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}
AjaxAdapter.__super__.constructor.call(this,$element,options)}
Utils.Extend(AjaxAdapter,ArrayAdapter);AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $.extend({},params,{q:params.term})},transport:function(params,success,failure){var $request=$.ajax(params);$request.then(success);$request.fail(failure);return $request}};return $.extend({},defaults,options,!0)};AjaxAdapter.prototype.processResults=function(results){return results};AjaxAdapter.prototype.query=function(params,callback){var matches=[];var self=this;if(this._request!=null){if($.isFunction(this._request.abort)){this._request.abort()}
this._request=null}
var options=$.extend({type:'GET'},this.ajaxOptions);if(typeof options.url==='function'){options.url=options.url.call(this.$element,params)}
if(typeof options.data==='function'){options.data=options.data.call(this.$element,params)}
function request(){var $request=options.transport(options,function(data){var results=self.processResults(data,params);if(self.options.get('debug')&&window.console&&console.error){if(!results||!results.results||!$.isArray(results.results)){console.error('Select2: The AJAX results did not return an array in the '+'`results` key of the response.')}}
callback(results)},function(){if($request.status&&$request.status==='0'){return}
self.trigger('results:message',{message:'errorLoading'})});self._request=$request}
if(this.ajaxOptions.delay&&params.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}
this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay)}else{request()}};return AjaxAdapter});S2.define('select2/data/tags',['jquery'],function($){function Tags(decorated,$element,options){var tags=options.get('tags');var createTag=options.get('createTag');if(createTag!==undefined){this.createTag=createTag}
var insertTag=options.get('insertTag');if(insertTag!==undefined){this.insertTag=insertTag}
decorated.call(this,$element,options);if($.isArray(tags)){for(var t=0;t<tags.length;t++){var tag=tags[t];var item=this._normalizeItem(tag);var $option=this.option(item);this.$element.append($option)}}}
Tags.prototype.query=function(decorated,params,callback){var self=this;this._removeOldTags();if(params.term==null||params.page!=null){decorated.call(this,params,callback);return}
function wrapper(obj,child){var data=obj.results;for(var i=0;i<data.length;i++){var option=data[i];var checkChildren=(option.children!=null&&!wrapper({results:option.children},!0));var checkText=option.text===params.term;if(checkText||checkChildren){if(child){return!1}
obj.data=data;callback(obj);return}}
if(child){return!0}
var tag=self.createTag(params);if(tag!=null){var $option=self.option(tag);$option.attr('data-select2-tag',!0);self.addOptions([$option]);self.insertTag(data,tag)}
obj.results=data;callback(obj)}
decorated.call(this,params,wrapper)};Tags.prototype.createTag=function(decorated,params){var term=$.trim(params.term);if(term===''){return null}
return{id:term,text:term}};Tags.prototype.insertTag=function(_,data,tag){data.unshift(tag)};Tags.prototype._removeOldTags=function(_){var tag=this._lastTag;var $options=this.$element.find('option[data-select2-tag]');$options.each(function(){if(this.selected){return}
$(this).remove()})};return Tags});S2.define('select2/data/tokenizer',['jquery'],function($){function Tokenizer(decorated,$element,options){var tokenizer=options.get('tokenizer');if(tokenizer!==undefined){this.tokenizer=tokenizer}
decorated.call(this,$element,options)}
Tokenizer.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);this.$search=container.dropdown.$search||container.selection.$search||$container.find('.select2-search__field')};Tokenizer.prototype.query=function(decorated,params,callback){var self=this;function createAndSelect(data){var item=self._normalizeItem(data);var $existingOptions=self.$element.find('option').filter(function(){return $(this).val()===item.id});if(!$existingOptions.length){var $option=self.option(item);$option.attr('data-select2-tag',!0);self._removeOldTags();self.addOptions([$option])}
select(item)}
function select(data){self.trigger('select',{data:data})}
params.term=params.term||'';var tokenData=this.tokenizer(params,this.options,createAndSelect);if(tokenData.term!==params.term){if(this.$search.length){this.$search.val(tokenData.term);this.$search.focus()}
params.term=tokenData.term}
decorated.call(this,params,callback)};Tokenizer.prototype.tokenizer=function(_,params,options,callback){var separators=options.get('tokenSeparators')||[];var term=params.term;var i=0;var createTag=this.createTag||function(params){return{id:params.term,text:params.term}};while(i<term.length){var termChar=term[i];if($.inArray(termChar,separators)===-1){i++;continue}
var part=term.substr(0,i);var partParams=$.extend({},params,{term:part});var data=createTag(partParams);if(data==null){i++;continue}
callback(data);term=term.substr(i+1)||'';i=0}
return{term:term}};return Tokenizer});S2.define('select2/data/minimumInputLength',[],function(){function MinimumInputLength(decorated,$e,options){this.minimumInputLength=options.get('minimumInputLength');decorated.call(this,$e,options)}
MinimumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||'';if(params.term.length<this.minimumInputLength){this.trigger('results:message',{message:'inputTooShort',args:{minimum:this.minimumInputLength,input:params.term,params:params}});return}
decorated.call(this,params,callback)};return MinimumInputLength});S2.define('select2/data/maximumInputLength',[],function(){function MaximumInputLength(decorated,$e,options){this.maximumInputLength=options.get('maximumInputLength');decorated.call(this,$e,options)}
MaximumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||'';if(this.maximumInputLength>0&&params.term.length>this.maximumInputLength){this.trigger('results:message',{message:'inputTooLong',args:{maximum:this.maximumInputLength,input:params.term,params:params}});return}
decorated.call(this,params,callback)};return MaximumInputLength});S2.define('select2/data/maximumSelectionLength',[],function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get('maximumSelectionLength');decorated.call(this,$e,options)}
MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self=this;this.current(function(currentData){var count=currentData!=null?currentData.length:0;if(self.maximumSelectionLength>0&&count>=self.maximumSelectionLength){self.trigger('results:message',{message:'maximumSelected',args:{maximum:self.maximumSelectionLength}});return}
decorated.call(self,params,callback)})};return MaximumSelectionLength});S2.define('select2/dropdown',['jquery','./utils'],function($,Utils){function Dropdown($element,options){this.$element=$element;this.options=options;Dropdown.__super__.constructor.call(this)}
Utils.Extend(Dropdown,Utils.Observable);Dropdown.prototype.render=function(){var $dropdown=$('<span class="select2-dropdown">'+'<span class="select2-results"></span>'+'</span>');$dropdown.attr('dir',this.options.get('dir'));this.$dropdown=$dropdown;return $dropdown};Dropdown.prototype.bind=function(){};Dropdown.prototype.position=function($dropdown,$container){};Dropdown.prototype.destroy=function(){this.$dropdown.remove()};return Dropdown});S2.define('select2/dropdown/search',['jquery','../utils'],function($,Utils){function Search(){}
Search.prototype.render=function(decorated){var $rendered=decorated.call(this);var $search=$('<span class="select2-search select2-search--dropdown">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="off"'+' spellcheck="false" role="textbox" />'+'</span>');this.$searchContainer=$search;this.$search=$search.find('input');$rendered.prepend($search);return $rendered};Search.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);this.$search.on('keydown',function(evt){self.trigger('keypress',evt);self._keyUpPrevented=evt.isDefaultPrevented()});this.$search.on('input',function(evt){$(this).off('keyup')});this.$search.on('keyup input',function(evt){self.handleSearch(evt)});container.on('open',function(){self.$search.attr('tabindex',0);self.$search.focus();window.setTimeout(function(){self.$search.focus()},0)});container.on('close',function(){self.$search.attr('tabindex',-1);self.$search.val('')});container.on('focus',function(){if(container.isOpen()){self.$search.focus()}});container.on('results:all',function(params){if(params.query.term==null||params.query.term===''){var showSearch=self.showSearch(params);if(showSearch){self.$searchContainer.removeClass('select2-search--hide')}else{self.$searchContainer.addClass('select2-search--hide')}}})};Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$search.val();this.trigger('query',{term:input})}
this._keyUpPrevented=!1};Search.prototype.showSearch=function(_,params){return!0};return Search});S2.define('select2/dropdown/hidePlaceholder',[],function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get('placeholder'));decorated.call(this,$element,options,dataAdapter)}
HidePlaceholder.prototype.append=function(decorated,data){data.results=this.removePlaceholder(data.results);decorated.call(this,data)};HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==='string'){placeholder={id:'',text:placeholder}}
return placeholder};HidePlaceholder.prototype.removePlaceholder=function(_,data){var modifiedData=data.slice(0);for(var d=data.length-1;d>=0;d--){var item=data[d];if(this.placeholder.id===item.id){modifiedData.splice(d,1)}}
return modifiedData};return HidePlaceholder});S2.define('select2/dropdown/infiniteScroll',['jquery'],function($){function InfiniteScroll(decorated,$element,options,dataAdapter){this.lastParams={};decorated.call(this,$element,options,dataAdapter);this.$loadingMore=this.createLoadingMore();this.loading=!1}
InfiniteScroll.prototype.append=function(decorated,data){this.$loadingMore.remove();this.loading=!1;decorated.call(this,data);if(this.showLoadingMore(data)){this.$results.append(this.$loadingMore)}};InfiniteScroll.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('query',function(params){self.lastParams=params;self.loading=!0});container.on('query:append',function(params){self.lastParams=params;self.loading=!0});this.$results.on('scroll',function(){var isLoadMoreVisible=$.contains(document.documentElement,self.$loadingMore[0]);if(self.loading||!isLoadMoreVisible){return}
var currentOffset=self.$results.offset().top+self.$results.outerHeight(!1);var loadingMoreOffset=self.$loadingMore.offset().top+self.$loadingMore.outerHeight(!1);if(currentOffset+50>=loadingMoreOffset){self.loadMore()}})};InfiniteScroll.prototype.loadMore=function(){this.loading=!0;var params=$.extend({},{page:1},this.lastParams);params.page++;this.trigger('query:append',params)};InfiniteScroll.prototype.showLoadingMore=function(_,data){return data.pagination&&data.pagination.more};InfiniteScroll.prototype.createLoadingMore=function(){var $option=$('<li '+'class="select2-results__option select2-results__option--load-more"'+'role="treeitem" aria-disabled="true"></li>');var message=this.options.get('translations').get('loadingMore');$option.html(message(this.lastParams));return $option};return InfiniteScroll});S2.define('select2/dropdown/attachBody',['jquery','../utils'],function($,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=options.get('dropdownParent')||$(document.body);decorated.call(this,$element,options)}
AttachBody.prototype.bind=function(decorated,container,$container){var self=this;var setupResultsEvents=!1;decorated.call(this,container,$container);container.on('open',function(){self._showDropdown();self._attachPositioningHandler(container);if(!setupResultsEvents){setupResultsEvents=!0;container.on('results:all',function(){self._positionDropdown();self._resizeDropdown()});container.on('results:append',function(){self._positionDropdown();self._resizeDropdown()})}});container.on('close',function(){self._hideDropdown();self._detachPositioningHandler(container)});this.$dropdownContainer.on('mousedown',function(evt){evt.stopPropagation()})};AttachBody.prototype.destroy=function(decorated){decorated.call(this);this.$dropdownContainer.remove()};AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown.attr('class',$container.attr('class'));$dropdown.removeClass('select2');$dropdown.addClass('select2-container--open');$dropdown.css({position:'absolute',top:-999999});this.$container=$container};AttachBody.prototype.render=function(decorated){var $container=$('<span></span>');var $dropdown=decorated.call(this);$container.append($dropdown);this.$dropdownContainer=$container;return $container};AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach()};AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self=this;var scrollEvent='scroll.select2.'+container.id;var resizeEvent='resize.select2.'+container.id;var orientationEvent='orientationchange.select2.'+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each(function(){$(this).data('select2-scroll-position',{x:$(this).scrollLeft(),y:$(this).scrollTop()})});$watchers.on(scrollEvent,function(ev){var position=$(this).data('select2-scroll-position');$(this).scrollTop(position.y)});$(window).on(scrollEvent+' '+resizeEvent+' '+orientationEvent,function(e){self._positionDropdown();self._resizeDropdown()})};AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent='scroll.select2.'+container.id;var resizeEvent='resize.select2.'+container.id;var orientationEvent='orientationchange.select2.'+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.off(scrollEvent);$(window).off(scrollEvent+' '+resizeEvent+' '+orientationEvent)};AttachBody.prototype._positionDropdown=function(){var $window=$(window);var isCurrentlyAbove=this.$dropdown.hasClass('select2-dropdown--above');var isCurrentlyBelow=this.$dropdown.hasClass('select2-dropdown--below');var newDirection=null;var offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(!1);var container={height:this.$container.outerHeight(!1)};container.top=offset.top;container.bottom=offset.top+container.height;var dropdown={height:this.$dropdown.outerHeight(!1)};var viewport={top:$window.scrollTop(),bottom:$window.scrollTop()+$window.height()};var enoughRoomAbove=viewport.top<(offset.top-dropdown.height);var enoughRoomBelow=viewport.bottom>(offset.bottom+dropdown.height);var css={left:offset.left,top:container.bottom};var $offsetParent=this.$dropdownParent;if($offsetParent.css('position')==='static'){$offsetParent=$offsetParent.offsetParent()}
var parentOffset=$offsetParent.offset();css.top-=parentOffset.top;css.left-=parentOffset.left;if(!isCurrentlyAbove&&!isCurrentlyBelow){newDirection='below'}
if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){newDirection='above'}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){newDirection='below'}
if(newDirection=='above'||(isCurrentlyAbove&&newDirection!=='below')){css.top=container.top-parentOffset.top-dropdown.height}
if(newDirection!=null){this.$dropdown.removeClass('select2-dropdown--below select2-dropdown--above').addClass('select2-dropdown--'+newDirection);this.$container.removeClass('select2-container--below select2-container--above').addClass('select2-container--'+newDirection)}
this.$dropdownContainer.css(css)};AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(!1)+'px'};if(this.options.get('dropdownAutoWidth')){css.minWidth=css.width;css.position='relative';css.width='auto'}
this.$dropdown.css(css)};AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return AttachBody});S2.define('select2/dropdown/minimumResultsForSearch',[],function(){function countResults(data){var count=0;for(var d=0;d<data.length;d++){var item=data[d];if(item.children){count+=countResults(item.children)}else{count++}}
return count}
function MinimumResultsForSearch(decorated,$element,options,dataAdapter){this.minimumResultsForSearch=options.get('minimumResultsForSearch');if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity}
decorated.call(this,$element,options,dataAdapter)}
MinimumResultsForSearch.prototype.showSearch=function(decorated,params){if(countResults(params.data.results)<this.minimumResultsForSearch){return!1}
return decorated.call(this,params)};return MinimumResultsForSearch});S2.define('select2/dropdown/selectOnClose',[],function(){function SelectOnClose(){}
SelectOnClose.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('close',function(params){self._handleSelectOnClose(params)})};SelectOnClose.prototype._handleSelectOnClose=function(_,params){if(params&&params.originalSelect2Event!=null){var event=params.originalSelect2Event;if(event._type==='select'||event._type==='unselect'){return}}
var $highlightedResults=this.getHighlightedResults();if($highlightedResults.length<1){return}
var data=$highlightedResults.data('data');if((data.element!=null&&data.element.selected)||(data.element==null&&data.selected)){return}
this.trigger('select',{data:data})};return SelectOnClose});S2.define('select2/dropdown/closeOnSelect',[],function(){function CloseOnSelect(){}
CloseOnSelect.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on('select',function(evt){self._selectTriggered(evt)});container.on('unselect',function(evt){self._selectTriggered(evt)})};CloseOnSelect.prototype._selectTriggered=function(_,evt){var originalEvent=evt.originalEvent;if(originalEvent&&originalEvent.ctrlKey){return}
this.trigger('close',{originalEvent:originalEvent,originalSelect2Event:evt})};return CloseOnSelect});S2.define('select2/i18n/en',[],function(){return{errorLoading:function(){return'The results could not be loaded.'},inputTooLong:function(args){var overChars=args.input.length-args.maximum;var message='Please delete '+overChars+' character';if(overChars!=1){message+='s'}
return message},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;var message='Please enter '+remainingChars+' or more characters';return message},loadingMore:function(){return'Loading more results…'},maximumSelected:function(args){var message='You can only select '+args.maximum+' item';if(args.maximum!=1){message+='s'}
return message},noResults:function(){return'No results found'},searching:function(){return'Searching…'}}});S2.define('select2/defaults',['jquery','require','./results','./selection/single','./selection/multiple','./selection/placeholder','./selection/allowClear','./selection/search','./selection/eventRelay','./utils','./translation','./diacritics','./data/select','./data/array','./data/ajax','./data/tags','./data/tokenizer','./data/minimumInputLength','./data/maximumInputLength','./data/maximumSelectionLength','./dropdown','./dropdown/search','./dropdown/hidePlaceholder','./dropdown/infiniteScroll','./dropdown/attachBody','./dropdown/minimumResultsForSearch','./dropdown/selectOnClose','./dropdown/closeOnSelect','./i18n/en'],function($,require,ResultsList,SingleSelection,MultipleSelection,Placeholder,AllowClear,SelectionSearch,EventRelay,Utils,Translation,DIACRITICS,SelectData,ArrayData,AjaxData,Tags,Tokenizer,MinimumInputLength,MaximumInputLength,MaximumSelectionLength,Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,EnglishTranslation){function Defaults(){this.reset()}
Defaults.prototype.apply=function(options){options=$.extend(!0,{},this.defaults,options);if(options.dataAdapter==null){if(options.ajax!=null){options.dataAdapter=AjaxData}else if(options.data!=null){options.dataAdapter=ArrayData}else{options.dataAdapter=SelectData}
if(options.minimumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength)}
if(options.maximumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength)}
if(options.maximumSelectionLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength)}
if(options.tags){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags)}
if(options.tokenSeparators!=null||options.tokenizer!=null){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer)}
if(options.query!=null){var Query=require(options.amdBase+'compat/query');options.dataAdapter=Utils.Decorate(options.dataAdapter,Query)}
if(options.initSelection!=null){var InitSelection=require(options.amdBase+'compat/initSelection');options.dataAdapter=Utils.Decorate(options.dataAdapter,InitSelection)}}
if(options.resultsAdapter==null){options.resultsAdapter=ResultsList;if(options.ajax!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll)}
if(options.placeholder!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder)}
if(options.selectOnClose){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose)}}
if(options.dropdownAdapter==null){if(options.multiple){options.dropdownAdapter=Dropdown}else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown}
if(options.minimumResultsForSearch!==0){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch)}
if(options.closeOnSelect){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect)}
if(options.dropdownCssClass!=null||options.dropdownCss!=null||options.adaptDropdownCssClass!=null){var DropdownCSS=require(options.amdBase+'compat/dropdownCss');options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS)}
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody)}
if(options.selectionAdapter==null){if(options.multiple){options.selectionAdapter=MultipleSelection}else{options.selectionAdapter=SingleSelection}
if(options.placeholder!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder)}
if(options.allowClear){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear)}
if(options.multiple){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch)}
if(options.containerCssClass!=null||options.containerCss!=null||options.adaptContainerCssClass!=null){var ContainerCSS=require(options.amdBase+'compat/containerCss');options.selectionAdapter=Utils.Decorate(options.selectionAdapter,ContainerCSS)}
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay)}
if(typeof options.language==='string'){if(options.language.indexOf('-')>0){var languageParts=options.language.split('-');var baseLanguage=languageParts[0];options.language=[options.language,baseLanguage]}else{options.language=[options.language]}}
if($.isArray(options.language)){var languages=new Translation();options.language.push('en');var languageNames=options.language;for(var l=0;l<languageNames.length;l++){var name=languageNames[l];var language={};try{language=Translation.loadPath(name)}catch(e){try{name=this.defaults.amdLanguageBase+name;language=Translation.loadPath(name)}catch(ex){if(options.debug&&window.console&&console.warn){console.warn('Select2: The language file for "'+name+'" could not be '+'automatically loaded. A fallback will be used instead.')}
continue}}
languages.extend(language)}
options.translations=languages}else{var baseTranslation=Translation.loadPath(this.defaults.amdLanguageBase+'en');var customTranslation=new Translation(options.language);customTranslation.extend(baseTranslation);options.translations=customTranslation}
return options};Defaults.prototype.reset=function(){function stripDiacritics(text){function match(a){return DIACRITICS[a]||a}
return text.replace(/[^\u0000-\u007E]/g,match)}
function matcher(params,data){if($.trim(params.term)===''){return data}
if(data.children&&data.children.length>0){var match=$.extend(!0,{},data);for(var c=data.children.length-1;c>=0;c--){var child=data.children[c];var matches=matcher(params,child);if(matches==null){match.children.splice(c,1)}}
if(match.children.length>0){return match}
return matcher(params,match)}
var original=stripDiacritics(data.text).toUpperCase();var term=stripDiacritics(params.term).toUpperCase();if(original.indexOf(term)>-1){return data}
return null}
this.defaults={amdBase:'./',amdLanguageBase:'./i18n/',closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:Utils.escapeMarkup,language:EnglishTranslation,matcher:matcher,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(data){return data},templateResult:function(result){return result.text},templateSelection:function(selection){return selection.text},theme:'default',width:'resolve'}};Defaults.prototype.set=function(key,value){var camelKey=$.camelCase(key);var data={};data[camelKey]=value;var convertedData=Utils._convertData(data);$.extend(this.defaults,convertedData)};var defaults=new Defaults();return defaults});S2.define('select2/options',['require','jquery','./defaults','./utils'],function(require,$,Defaults,Utils){function Options(options,$element){this.options=options;if($element!=null){this.fromElement($element)}
this.options=Defaults.apply(this.options);if($element&&$element.is('input')){var InputCompat=require(this.get('amdBase')+'compat/inputData');this.options.dataAdapter=Utils.Decorate(this.options.dataAdapter,InputCompat)}}
Options.prototype.fromElement=function($e){var excludedData=['select2'];if(this.options.multiple==null){this.options.multiple=$e.prop('multiple')}
if(this.options.disabled==null){this.options.disabled=$e.prop('disabled')}
if(this.options.language==null){if($e.prop('lang')){this.options.language=$e.prop('lang').toLowerCase()}else if($e.closest('[lang]').prop('lang')){this.options.language=$e.closest('[lang]').prop('lang')}}
if(this.options.dir==null){if($e.prop('dir')){this.options.dir=$e.prop('dir')}else if($e.closest('[dir]').prop('dir')){this.options.dir=$e.closest('[dir]').prop('dir')}else{this.options.dir='ltr'}}
$e.prop('disabled',this.options.disabled);$e.prop('multiple',this.options.multiple);if($e.data('select2Tags')){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to '+'use the `data-data` and `data-tags="true"` attributes and will be '+'removed in future versions of Select2.')}
$e.data('data',$e.data('select2Tags'));$e.data('tags',!0)}
if($e.data('ajaxUrl')){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-ajax-url` attribute has been changed to '+'`data-ajax--url` and support for the old attribute will be removed'+' in future versions of Select2.')}
$e.attr('ajax--url',$e.data('ajaxUrl'));$e.data('ajax--url',$e.data('ajaxUrl'))}
var dataset={};if($.fn.jquery&&$.fn.jquery.substr(0,2)=='1.'&&$e[0].dataset){dataset=$.extend(!0,{},$e[0].dataset,$e.data())}else{dataset=$e.data()}
var data=$.extend(!0,{},dataset);data=Utils._convertData(data);for(var key in data){if($.inArray(key,excludedData)>-1){continue}
if($.isPlainObject(this.options[key])){$.extend(this.options[key],data[key])}else{this.options[key]=data[key]}}
return this};Options.prototype.get=function(key){return this.options[key]};Options.prototype.set=function(key,val){this.options[key]=val};return Options});S2.define('select2/core',['jquery','./options','./utils','./keys'],function($,Options,Utils,KEYS){var Select2=function($element,options){if($element.data('select2')!=null){$element.data('select2').destroy()}
this.$element=$element;this.id=this._generateId($element);options=options||{};this.options=new Options(options,$element);Select2.__super__.constructor.call(this);var tabindex=$element.attr('tabindex')||0;$element.data('old-tabindex',tabindex);$element.attr('tabindex','-1');var DataAdapter=this.options.get('dataAdapter');this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get('selectionAdapter');this.selection=new SelectionAdapter($element,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get('dropdownAdapter');this.dropdown=new DropdownAdapter($element,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get('resultsAdapter');this.results=new ResultsAdapter($element,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var self=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(initialData){self.trigger('selection:update',{data:initialData})});$element.addClass('select2-hidden-accessible');$element.attr('aria-hidden','true');this._syncAttributes();$element.data('select2',this)};Utils.Extend(Select2,Utils.Observable);Select2.prototype._generateId=function($element){var id='';if($element.attr('id')!=null){id=$element.attr('id')}else if($element.attr('name')!=null){id=$element.attr('name')+'-'+Utils.generateChars(2)}else{id=Utils.generateChars(4)}
id=id.replace(/(:|\.|\[|\]|,)/g,'');id='select2-'+id;return id};Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get('width'));if(width!=null){$container.css('width',width)}};Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(method=='resolve'){var styleWidth=this._resolveWidth($element,'style');if(styleWidth!=null){return styleWidth}
return this._resolveWidth($element,'element')}
if(method=='element'){var elementWidth=$element.outerWidth(!1);if(elementWidth<=0){return'auto'}
return elementWidth+'px'}
if(method=='style'){var style=$element.attr('style');if(typeof(style)!=='string'){return null}
var attrs=style.split(';');for(var i=0,l=attrs.length;i<l;i=i+1){var attr=attrs[i].replace(/\s/g,'');var matches=attr.match(WIDTH);if(matches!==null&&matches.length>=1){return matches[1]}}
return null}
return method};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on('change.select2',function(){self.dataAdapter.current(function(data){self.trigger('selection:update',{data:data})})});this.$element.on('focus.select2',function(evt){self.trigger('focus',evt)});this._syncA=Utils.bind(this._syncAttributes,this);this._syncS=Utils.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent('onpropertychange',this._syncA)}
var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(observer!=null){this._observer=new observer(function(mutations){$.each(mutations,self._syncA);$.each(mutations,self._syncS)});this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})}else if(this.$element[0].addEventListener){this.$element[0].addEventListener('DOMAttrModified',self._syncA,!1);this.$element[0].addEventListener('DOMNodeInserted',self._syncS,!1);this.$element[0].addEventListener('DOMNodeRemoved',self._syncS,!1)}};Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on('*',function(name,params){self.trigger(name,params)})};Select2.prototype._registerSelectionEvents=function(){var self=this;var nonRelayEvents=['toggle','focus'];this.selection.on('toggle',function(){self.toggleDropdown()});this.selection.on('focus',function(params){self.focus(params)});this.selection.on('*',function(name,params){if($.inArray(name,nonRelayEvents)!==-1){return}
self.trigger(name,params)})};Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on('*',function(name,params){self.trigger(name,params)})};Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on('*',function(name,params){self.trigger(name,params)})};Select2.prototype._registerEvents=function(){var self=this;this.on('open',function(){self.$container.addClass('select2-container--open')});this.on('close',function(){self.$container.removeClass('select2-container--open')});this.on('enable',function(){self.$container.removeClass('select2-container--disabled')});this.on('disable',function(){self.$container.addClass('select2-container--disabled')});this.on('blur',function(){self.$container.removeClass('select2-container--focus')});this.on('query',function(params){if(!self.isOpen()){self.trigger('open',{})}
this.dataAdapter.query(params,function(data){self.trigger('results:all',{data:data,query:params})})});this.on('query:append',function(params){this.dataAdapter.query(params,function(data){self.trigger('results:append',{data:data,query:params})})});this.on('keypress',function(evt){var key=evt.which;if(self.isOpen()){if(key===KEYS.ESC||key===KEYS.TAB||(key===KEYS.UP&&evt.altKey)){self.close();evt.preventDefault()}else if(key===KEYS.ENTER){self.trigger('results:select',{});evt.preventDefault()}else if((key===KEYS.SPACE&&evt.ctrlKey)){self.trigger('results:toggle',{});evt.preventDefault()}else if(key===KEYS.UP){self.trigger('results:previous',{});evt.preventDefault()}else if(key===KEYS.DOWN){self.trigger('results:next',{});evt.preventDefault()}}else{if(key===KEYS.ENTER||key===KEYS.SPACE||(key===KEYS.DOWN&&evt.altKey)){self.open();evt.preventDefault()}}})};Select2.prototype._syncAttributes=function(){this.options.set('disabled',this.$element.prop('disabled'));if(this.options.get('disabled')){if(this.isOpen()){this.close()}
this.trigger('disable',{})}else{this.trigger('enable',{})}};Select2.prototype._syncSubtree=function(evt,mutations){var changed=!1;var self=this;if(evt&&evt.target&&(evt.target.nodeName!=='OPTION'&&evt.target.nodeName!=='OPTGROUP')){return}
if(!mutations){changed=!0}else if(mutations.addedNodes&&mutations.addedNodes.length>0){for(var n=0;n<mutations.addedNodes.length;n++){var node=mutations.addedNodes[n];if(node.selected){changed=!0}}}else if(mutations.removedNodes&&mutations.removedNodes.length>0){changed=!0}
if(changed){this.dataAdapter.current(function(currentData){self.trigger('selection:update',{data:currentData})})}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={'open':'opening','close':'closing','select':'selecting','unselect':'unselecting'};if(args===undefined){args={}}
if(name in preTriggerMap){var preTriggerName=preTriggerMap[name];var preTriggerArgs={prevented:!1,name:name,args:args};actualTrigger.call(this,preTriggerName,preTriggerArgs);if(preTriggerArgs.prevented){args.prevented=!0;return}}
actualTrigger.call(this,name,args)};Select2.prototype.toggleDropdown=function(){if(this.options.get('disabled')){return}
if(this.isOpen()){this.close()}else{this.open()}};Select2.prototype.open=function(){if(this.isOpen()){return}
this.trigger('query',{})};Select2.prototype.close=function(){if(!this.isOpen()){return}
this.trigger('close',{})};Select2.prototype.isOpen=function(){return this.$container.hasClass('select2-container--open')};Select2.prototype.hasFocus=function(){return this.$container.hasClass('select2-container--focus')};Select2.prototype.focus=function(data){if(this.hasFocus()){return}
this.$container.addClass('select2-container--focus');this.trigger('focus',{})};Select2.prototype.enable=function(args){if(this.options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will'+' be removed in later Select2 versions. Use $element.prop("disabled")'+' instead.')}
if(args==null||args.length===0){args=[!0]}
var disabled=!args[0];this.$element.prop('disabled',disabled)};Select2.prototype.data=function(){if(this.options.get('debug')&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You '+'should consider setting the value instead using `$element.val()`.')}
var data=[];this.dataAdapter.current(function(currentData){data=currentData});return data};Select2.prototype.val=function(args){if(this.options.get('debug')&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be'+' removed in later Select2 versions. Use $element.val() instead.')}
if(args==null||args.length===0){return this.$element.val()}
var newVal=args[0];if($.isArray(newVal)){newVal=$.map(newVal,function(obj){return obj.toString()})}
this.$element.val(newVal).trigger('change')};Select2.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent('onpropertychange',this._syncA)}
if(this._observer!=null){this._observer.disconnect();this._observer=null}else if(this.$element[0].removeEventListener){this.$element[0].removeEventListener('DOMAttrModified',this._syncA,!1);this.$element[0].removeEventListener('DOMNodeInserted',this._syncS,!1);this.$element[0].removeEventListener('DOMNodeRemoved',this._syncS,!1)}
this._syncA=null;this._syncS=null;this.$element.off('.select2');this.$element.attr('tabindex',this.$element.data('old-tabindex'));this.$element.removeClass('select2-hidden-accessible');this.$element.attr('aria-hidden','false');this.$element.removeData('select2');this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};Select2.prototype.render=function(){var $container=$('<span class="select2 select2-container">'+'<span class="selection"></span>'+'<span class="dropdown-wrapper" aria-hidden="true"></span>'+'</span>');$container.attr('dir',this.options.get('dir'));this.$container=$container;this.$container.addClass('select2-container--'+this.options.get('theme'));$container.data('element',this.$element);return $container};return Select2});S2.define('jquery-mousewheel',['jquery'],function($){return $});S2.define('jquery.select2',['jquery','jquery-mousewheel','./select2/core','./select2/defaults'],function($,_,Select2,Defaults){if($.fn.select2==null){var thisMethods=['open','close','destroy'];$.fn.select2=function(options){options=options||{};if(typeof options==='object'){this.each(function(){var instanceOptions=$.extend(!0,{},options);var instance=new Select2($(this),instanceOptions)});return this}else if(typeof options==='string'){var ret;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$(this).data('select2');if(instance==null&&window.console&&console.error){console.error('The select2(\''+options+'\') method was called on an '+'element that is not using Select2.')}
ret=instance[options].apply(instance,args)});if($.inArray(options,thisMethods)>-1){return this}
return ret}else{throw new Error('Invalid arguments for Select2: '+options)}}}
if($.fn.select2.defaults==null){$.fn.select2.defaults=Defaults}
return Select2});return{define:S2.define,require:S2.require}}());var select2=S2.require('jquery.select2');jQuery.fn.select2.amd=S2;return select2}));(function(e,t,n,r){function d(t,n){this.element=t,this.options=e.extend({},s,n),this._defaults=s,this._name=i,this.init()}var i="stellar",s={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(e){e.hide()},showElement:function(e){e.show()}},o={scroll:{getLeft:function(e){return e.scrollLeft()},setLeft:function(e,t){e.scrollLeft(t)},getTop:function(e){return e.scrollTop()},setTop:function(e,t){e.scrollTop(t)}},position:{getLeft:function(e){return parseInt(e.css("left"),10)*-1},getTop:function(e){return parseInt(e.css("top"),10)*-1}},margin:{getLeft:function(e){return parseInt(e.css("margin-left"),10)*-1},getTop:function(e){return parseInt(e.css("margin-top"),10)*-1}},transform:{getLeft:function(e){var t=getComputedStyle(e[0])[f];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[4],10)*-1:0},getTop:function(e){var t=getComputedStyle(e[0])[f];return t!=="none"?parseInt(t.match(/(-?[0-9]+)/g)[5],10)*-1:0}}},u={position:{setLeft:function(e,t){e.css("left",t)},setTop:function(e,t){e.css("top",t)}},transform:{setPosition:function(e,t,n,r,i){e[0].style[f]="translate3d("+(t-n)+"px, "+(r-i)+"px, 0)"}}},a=function(){var t=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,n=e("script")[0].style,r="",i;for(i in n)if(t.test(i)){r=i.match(t)[0];break}return"WebkitOpacity"in n&&(r="Webkit"),"KhtmlOpacity"in n&&(r="Khtml"),function(e){return r+(r.length>0?e.charAt(0).toUpperCase()+e.slice(1):e)}}(),f=a("transform"),l=e("<div />",{style:"background:#fff"}).css("background-position-x")!==r,c=l?function(e,t,n){e.css({"background-position-x":t,"background-position-y":n})}:function(e,t,n){e.css("background-position",t+" "+n)},h=l?function(e){return[e.css("background-position-x"),e.css("background-position-y")]}:function(e){return e.css("background-position").split(" ")},p=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};d.prototype={init:function(){this.options.name=i+"_"+Math.floor(Math.random()*1e9),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),this.options.scrollProperty==="scroll"?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===n.body&&(this.element=t),this.$scrollElement=e(this.element),this.$element=this.element===t?e("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==r?e(this.options.viewportElement):this.$scrollElement[0]===t||this.options.scrollProperty==="scroll"?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var e=this,t=o[e.options.scrollProperty];this._getScrollLeft=function(){return t.getLeft(e.$scrollElement)},this._getScrollTop=function(){return t.getTop(e.$scrollElement)}},_defineSetters:function(){var t=this,n=o[t.options.scrollProperty],r=u[t.options.positionProperty],i=n.setLeft,s=n.setTop;this._setScrollLeft=typeof i=="function"?function(e){i(t.$scrollElement,e)}:e.noop,this._setScrollTop=typeof s=="function"?function(e){s(t.$scrollElement,e)}:e.noop,this._setPosition=r.setPosition||function(e,n,i,s,o){t.options.horizontalScrolling&&r.setLeft(e,n,i),t.options.verticalScrolling&&r.setTop(e,s,o)}},_handleWindowLoadAndResize:function(){var n=this,r=e(t);n.options.responsive&&r.bind("load."+this.name,function(){n.refresh()}),r.bind("resize."+this.name,function(){n._detectViewport(),n.options.responsive&&n.refresh()})},refresh:function(n){var r=this,i=r._getScrollLeft(),s=r._getScrollTop();(!n||!n.firstLoad)&&this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),n&&n.firstLoad&&/WebKit/.test(navigator.userAgent)&&e(t).load(function(){var e=r._getScrollLeft(),t=r._getScrollTop();r._setScrollLeft(e+1),r._setScrollTop(t+1),r._setScrollLeft(e),r._setScrollTop(t)}),this._setScrollLeft(i),this._setScrollTop(s)},_detectViewport:function(){var e=this.$viewportElement.offset(),t=e!==null&&e!==r;this.viewportWidth=this.$viewportElement.width(),this.viewportHeight=this.$viewportElement.height(),this.viewportOffsetTop=t?e.top:0,this.viewportOffsetLeft=t?e.left:0},_findParticles:function(){var t=this,n=this._getScrollLeft(),i=this._getScrollTop();if(this.particles!==r)for(var s=this.particles.length-1;s>=0;s--)this.particles[s].$element.data("stellar-elementIsActive",r);this.particles=[];if(!this.options.parallaxElements)return;this.$element.find("[data-stellar-ratio]").each(function(n){var i=e(this),s,o,u,a,f,l,c,h,p,d=0,v=0,m=0,g=0;if(!i.data("stellar-elementIsActive"))i.data("stellar-elementIsActive",this);else if(i.data("stellar-elementIsActive")!==this)return;t.options.showElement(i),i.data("stellar-startingLeft")?(i.css("left",i.data("stellar-startingLeft")),i.css("top",i.data("stellar-startingTop"))):(i.data("stellar-startingLeft",i.css("left")),i.data("stellar-startingTop",i.css("top"))),u=i.position().left,a=i.position().top,f=i.css("margin-left")==="auto"?0:parseInt(i.css("margin-left"),10),l=i.css("margin-top")==="auto"?0:parseInt(i.css("margin-top"),10),h=i.offset().left-f,p=i.offset().top-l,i.parents().each(function(){var t=e(this);if(t.data("stellar-offset-parent")===!0)return d=m,v=g,c=t,!1;m+=t.position().left,g+=t.position().top}),s=i.data("stellar-horizontal-offset")!==r?i.data("stellar-horizontal-offset"):c!==r&&c.data("stellar-horizontal-offset")!==r?c.data("stellar-horizontal-offset"):t.horizontalOffset,o=i.data("stellar-vertical-offset")!==r?i.data("stellar-vertical-offset"):c!==r&&c.data("stellar-vertical-offset")!==r?c.data("stellar-vertical-offset"):t.verticalOffset,t.particles.push({$element:i,$offsetParent:c,isFixed:i.css("position")==="fixed",horizontalOffset:s,verticalOffset:o,startingPositionLeft:u,startingPositionTop:a,startingOffsetLeft:h,startingOffsetTop:p,parentOffsetLeft:d,parentOffsetTop:v,stellarRatio:i.data("stellar-ratio")!==r?i.data("stellar-ratio"):1,width:i.outerWidth(!0),height:i.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var t=this,n=this._getScrollLeft(),i=this._getScrollTop(),s;this.backgrounds=[];if(!this.options.parallaxBackgrounds)return;s=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(s=s.add(this.$element)),s.each(function(){var s=e(this),o=h(s),u,a,f,l,p,d,v,m,g,y=0,b=0,w=0,E=0;if(!s.data("stellar-backgroundIsActive"))s.data("stellar-backgroundIsActive",this);else if(s.data("stellar-backgroundIsActive")!==this)return;s.data("stellar-backgroundStartingLeft")?c(s,s.data("stellar-backgroundStartingLeft"),s.data("stellar-backgroundStartingTop")):(s.data("stellar-backgroundStartingLeft",o[0]),s.data("stellar-backgroundStartingTop",o[1])),p=s.css("margin-left")==="auto"?0:parseInt(s.css("margin-left"),10),d=s.css("margin-top")==="auto"?0:parseInt(s.css("margin-top"),10),v=s.offset().left-p-n,m=s.offset().top-d-i,s.parents().each(function(){var t=e(this);if(t.data("stellar-offset-parent")===!0)return y=w,b=E,g=t,!1;w+=t.position().left,E+=t.position().top}),u=s.data("stellar-horizontal-offset")!==r?s.data("stellar-horizontal-offset"):g!==r&&g.data("stellar-horizontal-offset")!==r?g.data("stellar-horizontal-offset"):t.horizontalOffset,a=s.data("stellar-vertical-offset")!==r?s.data("stellar-vertical-offset"):g!==r&&g.data("stellar-vertical-offset")!==r?g.data("stellar-vertical-offset"):t.verticalOffset,t.backgrounds.push({$element:s,$offsetParent:g,isFixed:s.css("background-attachment")==="fixed",horizontalOffset:u,verticalOffset:a,startingValueLeft:o[0],startingValueTop:o[1],startingBackgroundPositionLeft:isNaN(parseInt(o[0],10))?0:parseInt(o[0],10),startingBackgroundPositionTop:isNaN(parseInt(o[1],10))?0:parseInt(o[1],10),startingPositionLeft:s.position().left,startingPositionTop:s.position().top,startingOffsetLeft:v,startingOffsetTop:m,parentOffsetLeft:y,parentOffsetTop:b,stellarRatio:s.data("stellar-background-ratio")===r?1:s.data("stellar-background-ratio")})})},_reset:function(){var e,t,n,r,i;for(i=this.particles.length-1;i>=0;i--)e=this.particles[i],t=e.$element.data("stellar-startingLeft"),n=e.$element.data("stellar-startingTop"),this._setPosition(e.$element,t,t,n,n),this.options.showElement(e.$element),e.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(i=this.backgrounds.length-1;i>=0;i--)r=this.backgrounds[i],r.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),c(r.$element,r.startingValueLeft,r.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=e.noop,e(t).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var n=this,r=e(t);r.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),typeof this.options.horizontalOffset=="function"?(this.horizontalOffset=this.options.horizontalOffset(),r.bind("resize.horizontal-"+this.name,function(){n.horizontalOffset=n.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,typeof this.options.verticalOffset=="function"?(this.verticalOffset=this.options.verticalOffset(),r.bind("resize.vertical-"+this.name,function(){n.verticalOffset=n.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var e=this._getScrollLeft(),t=this._getScrollTop(),n,r,i,s,o,u,a,f=!0,l=!0,h,p,d,v,m;if(this.currentScrollLeft===e&&this.currentScrollTop===t&&this.currentWidth===this.viewportWidth&&this.currentHeight===this.viewportHeight)return;this.currentScrollLeft=e,this.currentScrollTop=t,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight;for(m=this.particles.length-1;m>=0;m--)i=this.particles[m],s=i.isFixed?1:0,this.options.horizontalScrolling?(h=(e+i.horizontalOffset+this.viewportOffsetLeft+i.startingPositionLeft-i.startingOffsetLeft+i.parentOffsetLeft)*-(i.stellarRatio+s-1)+i.startingPositionLeft,d=h-i.startingPositionLeft+i.startingOffsetLeft):(h=i.startingPositionLeft,d=i.startingOffsetLeft),this.options.verticalScrolling?(p=(t+i.verticalOffset+this.viewportOffsetTop+i.startingPositionTop-i.startingOffsetTop+i.parentOffsetTop)*-(i.stellarRatio+s-1)+i.startingPositionTop,v=p-i.startingPositionTop+i.startingOffsetTop):(p=i.startingPositionTop,v=i.startingOffsetTop),this.options.hideDistantElements&&(l=!this.options.horizontalScrolling||d+i.width>(i.isFixed?0:e)&&d<(i.isFixed?0:e)+this.viewportWidth+this.viewportOffsetLeft,f=!this.options.verticalScrolling||v+i.height>(i.isFixed?0:t)&&v<(i.isFixed?0:t)+this.viewportHeight+this.viewportOffsetTop),l&&f?(i.isHidden&&(this.options.showElement(i.$element),i.isHidden=!1),this._setPosition(i.$element,h,i.startingPositionLeft,p,i.startingPositionTop)):i.isHidden||(this.options.hideElement(i.$element),i.isHidden=!0);for(m=this.backgrounds.length-1;m>=0;m--)o=this.backgrounds[m],s=o.isFixed?0:1,u=this.options.horizontalScrolling?(e+o.horizontalOffset-this.viewportOffsetLeft-o.startingOffsetLeft+o.parentOffsetLeft-o.startingBackgroundPositionLeft)*(s-o.stellarRatio)+"px":o.startingValueLeft,a=this.options.verticalScrolling?(t+o.verticalOffset-this.viewportOffsetTop-o.startingOffsetTop+o.parentOffsetTop-o.startingBackgroundPositionTop)*(s-o.stellarRatio)+"px":o.startingValueTop,c(o.$element,u,a)},_handleScrollEvent:function(){var e=this,t=!1,n=function(){e._repositionElements(),t=!1},r=function(){t||(p(n),t=!0)};this.$scrollElement.bind("scroll."+this.name,r),r()},_startAnimationLoop:function(){var e=this;this._animationLoop=function(){p(e._animationLoop),e._repositionElements()},this._animationLoop()}},e.fn[i]=function(t){var n=arguments;if(t===r||typeof t=="object")return this.each(function(){e.data(this,"plugin_"+i)||e.data(this,"plugin_"+i,new d(this,t))});if(typeof t=="string"&&t[0]!=="_"&&t!=="init")return this.each(function(){var r=e.data(this,"plugin_"+i);r instanceof d&&typeof r[t]=="function"&&r[t].apply(r,Array.prototype.slice.call(n,1)),t==="destroy"&&e.data(this,"plugin_"+i,null)})},e[i]=function(n){var r=e(t);return r.stellar.apply(r,Array.prototype.slice.call(arguments,0))},e[i].scrollProperty=o,e[i].positionProperty=u,t.Stellar=d})(jQuery,this,document);(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'))}else{factory(jQuery)}})(function($){'use strict';var $scrollTo=$.scrollTo=function(target,duration,settings){return $(window).scrollTo(target,duration,settings)};$scrollTo.defaults={axis:'xy',duration:0,limit:!0};function isWin(elem){return!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!==-1}
$.fn.scrollTo=function(target,duration,settings){if(typeof duration==='object'){settings=duration;duration=0}
if(typeof settings==='function'){settings={onAfter:settings}}
if(target==='max'){target=9e9}
settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.duration;var queue=settings.queue&&settings.axis.length>1;if(queue){duration/=2}
settings.offset=both(settings.offset);settings.over=both(settings.over);return this.each(function(){if(target===null)return;var win=isWin(this),elem=win?this.contentWindow||window:this,$elem=$(elem),targ=target,attr={},toff;switch(typeof targ){case 'number':case 'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}
targ=win?$(targ):$(targ,elem);case 'object':if(targ.length===0)return;if(targ.is||targ.style){toff=(targ=$(targ)).offset()}}
var offset=$.isFunction(settings.offset)&&settings.offset(elem,targ)||settings.offset;$.each(settings.axis.split(''),function(i,axis){var Pos=axis==='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,prev=$elem[key](),max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:prev-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos),10)||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'),10)||0}
attr[key]+=offset[pos]||0;if(settings.over[pos]){attr[key]+=targ[axis==='x'?'width':'height']()*settings.over[pos]}}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)==='%'?parseFloat(val)/100*max:val}
if(settings.limit&&/^\d+$/.test(attr[key])){attr[key]=attr[key]<=0?0:Math.min(attr[key],max)}
if(!i&&settings.axis.length>1){if(prev===attr[key]){attr={}}else if(queue){animate(settings.onAfterFirst);attr={}}}});animate(settings.onAfter);function animate(callback){var opts=$.extend({},settings,{queue:!0,duration:duration,complete:callback&&function(){callback.call(elem,targ,settings)}});$elem.animate(attr,opts)}})};$scrollTo.max=function(elem,axis){var Dim=axis==='x'?'Width':'Height',scroll='scroll'+Dim;if(!isWin(elem))
return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,doc=elem.ownerDocument||elem.document,html=doc.documentElement,body=doc.body;return Math.max(html[scroll],body[scroll])-Math.min(html[size],body[size])};function both(val){return $.isFunction(val)||$.isPlainObject(val)?val:{top:val,left:val}}
$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(t){return $(t.elem)[t.prop]()},set:function(t){var curr=this.get(t);if(t.options.interrupt&&t._last&&t._last!==curr){return $(t.elem).stop()}
var next=Math.round(t.now);if(curr!==next){$(t.elem)[t.prop](next);t._last=this.get(t)}}};return $scrollTo});(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jquery"))}else{root.bootbox=factory(root.jQuery)}}(this,function init($,undefined){"use strict";var templates={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'>"+"<div class='modal-dialog'>"+"<div class='modal-content'>"+"<div class='modal-body'><div class='bootbox-body'></div></div>"+"</div>"+"</div>"+"</div>",header:"<div class='modal-header'>"+"<h4 class='modal-title'></h4>"+"</div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}};var defaults={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"};var exports={};function _t(key){var locale=locales[defaults.locale];return locale?locale[key]:locales.en[key]}
function processCallback(e,dialog,callback){e.stopPropagation();e.preventDefault();var preserveDialog=$.isFunction(callback)&&callback.call(dialog,e)===!1;if(!preserveDialog){dialog.modal("hide")}}
function getKeyLength(obj){var k,t=0;for(k in obj){t ++}
return t}
function each(collection,iterator){var index=0;$.each(collection,function(key,value){iterator(key,value,index++)})}
function sanitize(options){var buttons;var total;if(typeof options!=="object"){throw new Error("Please supply an object of options")}
if(!options.message){throw new Error("Please specify a message")}
options=$.extend({},defaults,options);if(!options.buttons){options.buttons={}}
buttons=options.buttons;total=getKeyLength(buttons);each(buttons,function(key,button,index){if($.isFunction(button)){button=buttons[key]={callback:button}}
if($.type(button)!=="object"){throw new Error("button with key "+key+" must be an object")}
if(!button.label){button.label=key}
if(!button.className){if(total<=2&&index===total-1){button.className="btn-primary"}else{button.className="btn-default"}}});return options}
function mapArguments(args,properties){var argn=args.length;var options={};if(argn<1||argn>2){throw new Error("Invalid argument length")}
if(argn===2||typeof args[0]==="string"){options[properties[0]]=args[0];options[properties[1]]=args[1]}else{options=args[0]}
return options}
function mergeArguments(defaults,args,properties){return $.extend(!0,{},defaults,mapArguments(args,properties))}
function mergeDialogOptions(className,labels,properties,args){var baseOptions={className:"bootbox-"+className,buttons:createLabels.apply(null,labels)};return validateButtons(mergeArguments(baseOptions,args,properties),labels)}
function createLabels(){var buttons={};for(var i=0,j=arguments.length;i<j;i++){var argument=arguments[i];var key=argument.toLowerCase();var value=argument.toUpperCase();buttons[key]={label:_t(value)}}
return buttons}
function validateButtons(options,buttons){var allowedButtons={};each(buttons,function(key,value){allowedButtons[value]=!0});each(options.buttons,function(key){if(allowedButtons[key]===undefined){throw new Error("button key "+key+" is not allowed (options are "+buttons.join("\n")+")")}});return options}
exports.alert=function(){var options;options=mergeDialogOptions("alert",["ok"],["message","callback"],arguments);if(options.callback&&!$.isFunction(options.callback)){throw new Error("alert requires callback property to be a function when provided")}
options.buttons.ok.callback=options.onEscape=function(){if($.isFunction(options.callback)){return options.callback.call(this)}
return!0};return exports.dialog(options)};exports.confirm=function(){var options;options=mergeDialogOptions("confirm",["cancel","confirm"],["message","callback"],arguments);options.buttons.cancel.callback=options.onEscape=function(){return options.callback.call(this,!1)};options.buttons.confirm.callback=function(){return options.callback.call(this,!0)};if(!$.isFunction(options.callback)){throw new Error("confirm requires a callback")}
return exports.dialog(options)};exports.prompt=function(){var options;var defaults;var dialog;var form;var input;var shouldShow;var inputOptions;form=$(templates.form);defaults={className:"bootbox-prompt",buttons:createLabels("cancel","confirm"),value:"",inputType:"text"};options=validateButtons(mergeArguments(defaults,arguments,["title","callback"]),["cancel","confirm"]);shouldShow=(options.show===undefined)?!0:options.show;options.message=form;options.buttons.cancel.callback=options.onEscape=function(){return options.callback.call(this,null)};options.buttons.confirm.callback=function(){var value;switch(options.inputType){case "text":case "textarea":case "email":case "select":case "date":case "time":case "number":case "password":value=input.val();break;case "checkbox":var checkedItems=input.find("input:checked");value=[];each(checkedItems,function(_,item){value.push($(item).val())});break}
return options.callback.call(this,value)};options.show=!1;if(!options.title){throw new Error("prompt requires a title")}
if(!$.isFunction(options.callback)){throw new Error("prompt requires a callback")}
if(!templates.inputs[options.inputType]){throw new Error("invalid prompt type")}
input=$(templates.inputs[options.inputType]);switch(options.inputType){case "text":case "textarea":case "email":case "date":case "time":case "number":case "password":input.val(options.value);break;case "select":var groups={};inputOptions=options.inputOptions||[];if(!$.isArray(inputOptions)){throw new Error("Please pass an array of input options")}
if(!inputOptions.length){throw new Error("prompt with select requires options")}
each(inputOptions,function(_,option){var elem=input;if(option.value===undefined||option.text===undefined){throw new Error("given options in wrong format")}
if(option.group){if(!groups[option.group]){groups[option.group]=$("<optgroup/>").attr("label",option.group)}
elem=groups[option.group]}
elem.append("<option value='"+option.value+"'>"+option.text+"</option>")});each(groups,function(_,group){input.append(group)});input.val(options.value);break;case "checkbox":var values=$.isArray(options.value)?options.value:[options.value];inputOptions=options.inputOptions||[];if(!inputOptions.length){throw new Error("prompt with checkbox requires options")}
if(!inputOptions[0].value||!inputOptions[0].text){throw new Error("given options in wrong format")}
input=$("<div/>");each(inputOptions,function(_,option){var checkbox=$(templates.inputs[options.inputType]);checkbox.find("input").attr("value",option.value);checkbox.find("label").append(option.text);each(values,function(_,value){if(value===option.value){checkbox.find("input").prop("checked",!0)}});input.append(checkbox)});break}
if(options.placeholder){input.attr("placeholder",options.placeholder)}
if(options.pattern){input.attr("pattern",options.pattern)}
if(options.maxlength){input.attr("maxlength",options.maxlength)}
form.append(input);form.on("submit",function(e){e.preventDefault();e.stopPropagation();dialog.find(".btn-primary").click()});dialog=exports.dialog(options);dialog.off("shown.bs.modal");dialog.on("shown.bs.modal",function(){input.focus()});if(shouldShow===!0){dialog.modal("show")}
return dialog};exports.dialog=function(options){options=sanitize(options);var dialog=$(templates.dialog);var innerDialog=dialog.find(".modal-dialog");var body=dialog.find(".modal-body");var buttons=options.buttons;var buttonStr="";var callbacks={onEscape:options.onEscape};if($.fn.modal===undefined){throw new Error("$.fn.modal is not defined; please double check you have included "+"the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ "+"for more details.")}
each(buttons,function(key,button){buttonStr+="<button data-bb-handler='"+key+"' type='button' class='btn "+button.className+"'>"+button.label+"</button>";callbacks[key]=button.callback});body.find(".bootbox-body").html(options.message);if(options.animate===!0){dialog.addClass("fade")}
if(options.className){dialog.addClass(options.className)}
if(options.size==="large"){innerDialog.addClass("modal-lg")}else if(options.size==="small"){innerDialog.addClass("modal-sm")}
if(options.title){body.before(templates.header)}
if(options.closeButton){var closeButton=$(templates.closeButton);if(options.title){dialog.find(".modal-header").prepend(closeButton)}else{closeButton.css("margin-top","-10px").prependTo(body)}}
if(options.title){dialog.find(".modal-title").html(options.title)}
if(buttonStr.length){body.after(templates.footer);dialog.find(".modal-footer").html(buttonStr)}
dialog.on("hidden.bs.modal",function(e){if(e.target===this){dialog.remove()}});dialog.on("shown.bs.modal",function(){dialog.find(".btn-primary:first").focus()});if(options.backdrop!=="static"){dialog.on("click.dismiss.bs.modal",function(e){if(dialog.children(".modal-backdrop").length){e.currentTarget=dialog.children(".modal-backdrop").get(0)}
if(e.target!==e.currentTarget){return}
dialog.trigger("escape.close.bb")})}
dialog.on("escape.close.bb",function(e){if(callbacks.onEscape){processCallback(e,dialog,callbacks.onEscape)}});dialog.on("click",".modal-footer button",function(e){var callbackKey=$(this).data("bb-handler");processCallback(e,dialog,callbacks[callbackKey])});dialog.on("click",".bootbox-close-button",function(e){processCallback(e,dialog,callbacks.onEscape)});dialog.on("keyup",function(e){if(e.which===27){dialog.trigger("escape.close.bb")}});$(options.container).append(dialog);dialog.modal({backdrop:options.backdrop?"static":!1,keyboard:!1,show:!1});if(options.show){dialog.modal("show")}
return dialog};exports.setDefaults=function(){var values={};if(arguments.length===2){values[arguments[0]]=arguments[1]}else{values=arguments[0]}
$.extend(defaults,values)};exports.hideAll=function(){$(".bootbox").modal("hide");return exports};var locales={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};exports.addLocale=function(name,values){$.each(["OK","CANCEL","CONFIRM"],function(_,v){if(!values[v]){throw new Error("Please supply a translation for '"+v+"'")}});locales[name]={OK:values.OK,CANCEL:values.CANCEL,CONFIRM:values.CONFIRM};return exports};exports.removeLocale=function(name){delete locales[name];return exports};exports.setLocale=function(name){return exports.setDefaults("locale",name)};exports.init=function(_$){return init(_$||$)};return exports}));(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(function($){var eventNamespace='waitForImages';$.waitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage','cursor'],hasImageAttributes:['srcset']};$.expr[':']['has-src']=function(obj){return $(obj).is('img[src][src!=""]')};$.expr[':'].uncached=function(obj){if(!$(obj).is(':has-src')){return!1}
return!obj.complete};$.fn.waitForImages=function(){var allImgsLength=0;var allImgsLoaded=0;var deferred=$.Deferred();var finishedCallback;var eachCallback;var waitForAll;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished}else{if(arguments.length===1&&$.type(arguments[0])==='boolean'){waitForAll=arguments[0]}else{finishedCallback=arguments[0];eachCallback=arguments[1];waitForAll=arguments[2]}}
finishedCallback=finishedCallback||$.noop;eachCallback=eachCallback||$.noop;waitForAll=!!waitForAll;if(!$.isFunction(finishedCallback)||!$.isFunction(eachCallback)){throw new TypeError('An invalid callback was supplied.')}
this.each(function(){var obj=$(this);var allImgs=[];var hasImgProperties=$.waitForImages.hasImageProperties||[];var hasImageAttributes=$.waitForImages.hasImageAttributes||[];var matchUrl=/url\(\s*(['"]?)(.*?)\1\s*\)/g;if(waitForAll){obj.find('*').addBack().each(function(){var element=$(this);if(element.is('img:has-src')&&!element.is('[srcset]')){allImgs.push({src:element.attr('src'),element:element[0]})}
$.each(hasImgProperties,function(i,property){var propertyValue=element.css(property);var match;if(!propertyValue){return!0}
while(match=matchUrl.exec(propertyValue)){allImgs.push({src:match[2],element:element[0]})}});$.each(hasImageAttributes,function(i,attribute){var attributeValue=element.attr(attribute);var attributeValues;if(!attributeValue){return!0}
allImgs.push({src:element.attr('src'),srcset:element.attr('srcset'),element:element[0]})})})}else{obj.find('img:has-src').each(function(){allImgs.push({src:this.src,element:this})})}
allImgsLength=allImgs.length;allImgsLoaded=0;if(allImgsLength===0){finishedCallback.call(obj[0]);deferred.resolveWith(obj[0])}
$.each(allImgs,function(i,img){var image=new Image();var events='load.'+eventNamespace+' error.'+eventNamespace;$(image).one(events,function me(event){var eachArguments=[allImgsLoaded,allImgsLength,event.type=='load'];allImgsLoaded++;eachCallback.apply(img.element,eachArguments);deferred.notifyWith(img.element,eachArguments);$(this).off(events,me);if(allImgsLoaded==allImgsLength){finishedCallback.call(obj[0]);deferred.resolveWith(obj[0]);return!1}});if(img.srcset){image.srcset=img.srcset}
image.src=img.src})});return deferred.promise()}}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof module==='object'&&module.exports){module.exports=factory(require('jquery'))}else{factory(root.jQuery)}}(this,function($){(function(){'use strict';var defaults={mode:'lg-slide',cssEasing:'ease',easing:'linear',speed:600,height:'100%',width:'100%',addClass:'',startClass:'lg-start-zoom',backdropDuration:150,hideBarsDelay:6000,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!0,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:'.lg-sub-html',subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:'',selectWithin:'',nextHtml:'',prevHtml:'',index:!1,iframeMaxWidth:'100%',download:!0,counter:!0,appendCounterTo:'.lg-toolbar',swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};function Plugin(element,options){this.el=element;this.$el=$(element);this.s=$.extend({},defaults,options);if(this.s.dynamic&&this.s.dynamicEl!=='undefined'&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length){throw('When using dynamic mode, you must also define dynamicEl as an Array.')}
this.modules={};this.lGalleryOn=!1;this.lgBusy=!1;this.hideBartimeout=!1;this.isTouch=('ontouchstart' in document.documentElement);if(this.s.slideEndAnimatoin){this.s.hideControlOnEnd=!1}
if(this.s.dynamic){this.$items=this.s.dynamicEl}else{if(this.s.selector==='this'){this.$items=this.$el}else if(this.s.selector!==''){if(this.s.selectWithin){this.$items=$(this.s.selectWithin).find(this.s.selector)}else{this.$items=this.$el.find($(this.s.selector))}}else{this.$items=this.$el.children()}}
this.$slide='';this.$outer='';this.init();return this}
Plugin.prototype.init=function(){var _this=this;if(_this.s.preload>_this.$items.length){_this.s.preload=_this.$items.length}
var _hash=window.location.hash;if(_hash.indexOf('lg='+this.s.galleryId)>0){_this.index=parseInt(_hash.split('&slide=')[1],10);$('body').addClass('lg-from-hash');if(!$('body').hasClass('lg-on')){setTimeout(function(){_this.build(_this.index)});$('body').addClass('lg-on')}}
if(_this.s.dynamic){_this.$el.trigger('onBeforeOpen.lg');_this.index=_this.s.index||0;if(!$('body').hasClass('lg-on')){setTimeout(function(){_this.build(_this.index);$('body').addClass('lg-on')})}}else{_this.$items.on('click.lgcustom',function(event){try{event.preventDefault();event.preventDefault()}catch(er){event.returnValue=!1}
_this.$el.trigger('onBeforeOpen.lg');_this.index=_this.s.index||_this.$items.index(this);if(!$('body').hasClass('lg-on')){_this.build(_this.index);$('body').addClass('lg-on')}})}};Plugin.prototype.build=function(index){var _this=this;_this.structure();$.each($.fn.lightGallery.modules,function(key){_this.modules[key]=new $.fn.lightGallery.modules[key](_this.el)});_this.slide(index,!1,!1,!1);if(_this.s.keyPress){_this.keyPress()}
if(_this.$items.length>1){_this.arrow();setTimeout(function(){_this.enableDrag();_this.enableSwipe()},50);if(_this.s.mousewheel){_this.mousewheel()}}else{_this.$slide.on('click.lg',function(){_this.$el.trigger('onSlideClick.lg')})}
_this.counter();_this.closeGallery();_this.$el.trigger('onAfterOpen.lg');_this.$outer.on('mousemove.lg click.lg touchstart.lg',function(){_this.$outer.removeClass('lg-hide-items');clearTimeout(_this.hideBartimeout);_this.hideBartimeout=setTimeout(function(){_this.$outer.addClass('lg-hide-items')},_this.s.hideBarsDelay)});_this.$outer.trigger('mousemove.lg')};Plugin.prototype.structure=function(){var list='';var controls='';var i=0;var subHtmlCont='';var template;var _this=this;$('body').append('<div class="lg-backdrop"></div>');$('.lg-backdrop').css('transition-duration',this.s.backdropDuration+'ms');for(i=0;i<this.$items.length;i++){list+='<div class="lg-item"></div>'}
if(this.s.controls&&this.$items.length>1){controls='<div class="lg-actions">'+'<button class="lg-prev lg-icon">'+this.s.prevHtml+'</button>'+'<button class="lg-next lg-icon">'+this.s.nextHtml+'</button>'+'</div>'}
if(this.s.appendSubHtmlTo==='.lg-sub-html'){subHtmlCont='<div class="lg-sub-html"></div>'}
template='<div class="lg-outer '+this.s.addClass+' '+this.s.startClass+'">'+'<div class="lg" style="width:'+this.s.width+'; height:'+this.s.height+'">'+'<div class="lg-inner">'+list+'</div>'+'<div class="lg-toolbar lg-group">'+'<span class="lg-close lg-icon"></span>'+'</div>'+controls+subHtmlCont+'</div>'+'</div>';$('body').append(template);this.$outer=$('.lg-outer');this.$slide=this.$outer.find('.lg-item');if(this.s.useLeft){this.$outer.addClass('lg-use-left');this.s.mode='lg-slide'}else{this.$outer.addClass('lg-use-css3')}
_this.setTop();$(window).on('resize.lg orientationchange.lg',function(){setTimeout(function(){_this.setTop()},100)});this.$slide.eq(this.index).addClass('lg-current');if(this.doCss()){this.$outer.addClass('lg-css3')}else{this.$outer.addClass('lg-css');this.s.speed=0}
this.$outer.addClass(this.s.mode);if(this.s.enableDrag&&this.$items.length>1){this.$outer.addClass('lg-grab')}
if(this.s.showAfterLoad){this.$outer.addClass('lg-show-after-load')}
if(this.doCss()){var $inner=this.$outer.find('.lg-inner');$inner.css('transition-timing-function',this.s.cssEasing);$inner.css('transition-duration',this.s.speed+'ms')}
setTimeout(function(){$('.lg-backdrop').addClass('in')});setTimeout(function(){_this.$outer.addClass('lg-visible')},this.s.backdropDuration);if(this.s.download){this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>')}
this.prevScrollTop=$(window).scrollTop()};Plugin.prototype.setTop=function(){if(this.s.height!=='100%'){var wH=$(window).height();var top=(wH-parseInt(this.s.height,10))/2;var $lGallery=this.$outer.find('.lg');if(wH>=parseInt(this.s.height,10)){$lGallery.css('top',top+'px')}else{$lGallery.css('top','0px')}}};Plugin.prototype.doCss=function(){var support=function(){var transition=['transition','MozTransition','WebkitTransition','OTransition','msTransition','KhtmlTransition'];var root=document.documentElement;var i=0;for(i=0;i<transition.length;i++){if(transition[i]in root.style){return!0}}};if(support()){return!0}
return!1};Plugin.prototype.isVideo=function(src,index){var html;if(this.s.dynamic){html=this.s.dynamicEl[index].html}else{html=this.$items.eq(index).attr('data-html')}
if(!src){if(html){return{html5:!0}}else{console.error('lightGallery :- data-src is not pvovided on slide item '+(index+1)+'. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');return!1}}
var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);var vimeo=src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);var dailymotion=src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);var vk=src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);if(youtube){return{youtube:youtube}}else if(vimeo){return{vimeo:vimeo}}else if(dailymotion){return{dailymotion:dailymotion}}else if(vk){return{vk:vk}}};Plugin.prototype.counter=function(){if(this.s.counter){$(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.$items.length+'</span></div>')}};Plugin.prototype.addHtml=function(index){var subHtml=null;var subHtmlUrl;var $currentEle;if(this.s.dynamic){if(this.s.dynamicEl[index].subHtmlUrl){subHtmlUrl=this.s.dynamicEl[index].subHtmlUrl}else{subHtml=this.s.dynamicEl[index].subHtml}}else{$currentEle=this.$items.eq(index);if($currentEle.attr('data-sub-html-url')){subHtmlUrl=$currentEle.attr('data-sub-html-url')}else{subHtml=$currentEle.attr('data-sub-html');if(this.s.getCaptionFromTitleOrAlt&&!subHtml){subHtml=$currentEle.attr('title')||$currentEle.find('img').first().attr('alt')}}}
if(!subHtmlUrl){if(typeof subHtml!=='undefined'&&subHtml!==null){var fL=subHtml.substring(0,1);if(fL==='.'||fL==='#'){if(this.s.subHtmlSelectorRelative&&!this.s.dynamic){subHtml=$currentEle.find(subHtml).html()}else{subHtml=$(subHtml).html()}}}else{subHtml=''}}
if(this.s.appendSubHtmlTo==='.lg-sub-html'){if(subHtmlUrl){this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl)}else{this.$outer.find(this.s.appendSubHtmlTo).html(subHtml)}}else{if(subHtmlUrl){this.$slide.eq(index).load(subHtmlUrl)}else{this.$slide.eq(index).append(subHtml)}}
if(typeof subHtml!=='undefined'&&subHtml!==null){if(subHtml===''){this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html')}else{this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html')}}
this.$el.trigger('onAfterAppendSubHtml.lg',[index])};Plugin.prototype.preload=function(index){var i=1;var j=1;for(i=1;i<=this.s.preload;i++){if(i>=this.$items.length-index){break}
this.loadContent(index+i,!1,0)}
for(j=1;j<=this.s.preload;j++){if(index-j<0){break}
this.loadContent(index-j,!1,0)}};Plugin.prototype.loadContent=function(index,rec,delay){var _this=this;var _hasPoster=!1;var _$img;var _src;var _poster;var _srcset;var _sizes;var _html;var getResponsiveSrc=function(srcItms){var rsWidth=[];var rsSrc=[];for(var i=0;i<srcItms.length;i++){var __src=srcItms[i].split(' ');if(__src[0]===''){__src.splice(0,1)}
rsSrc.push(__src[0]);rsWidth.push(__src[1])}
var wWidth=$(window).width();for(var j=0;j<rsWidth.length;j++){if(parseInt(rsWidth[j],10)>wWidth){_src=rsSrc[j];break}}};if(_this.s.dynamic){if(_this.s.dynamicEl[index].poster){_hasPoster=!0;_poster=_this.s.dynamicEl[index].poster}
_html=_this.s.dynamicEl[index].html;_src=_this.s.dynamicEl[index].src;if(_this.s.dynamicEl[index].responsive){var srcDyItms=_this.s.dynamicEl[index].responsive.split(',');getResponsiveSrc(srcDyItms)}
_srcset=_this.s.dynamicEl[index].srcset;_sizes=_this.s.dynamicEl[index].sizes}else{if(_this.$items.eq(index).attr('data-poster')){_hasPoster=!0;_poster=_this.$items.eq(index).attr('data-poster')}
_html=_this.$items.eq(index).attr('data-html');_src=_this.$items.eq(index).attr('href')||_this.$items.eq(index).attr('data-src');if(_this.$items.eq(index).attr('data-responsive')){var srcItms=_this.$items.eq(index).attr('data-responsive').split(',');getResponsiveSrc(srcItms)}
_srcset=_this.$items.eq(index).attr('data-srcset');_sizes=_this.$items.eq(index).attr('data-sizes')}
var iframe=!1;if(_this.s.dynamic){if(_this.s.dynamicEl[index].iframe){iframe=!0}}else{if(_this.$items.eq(index).attr('data-iframe')==='true'){iframe=!0}}
var _isVideo=_this.isVideo(_src,index);if(!_this.$slide.eq(index).hasClass('lg-loaded')){if(iframe){_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:'+_this.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+_src+'"  allowfullscreen="true"></iframe></div></div>')}else if(_hasPoster){var videoClass='';if(_isVideo&&_isVideo.youtube){videoClass='lg-has-youtube'}else if(_isVideo&&_isVideo.vimeo){videoClass='lg-has-vimeo'}else{videoClass='lg-has-html5'}
_this.$slide.eq(index).prepend('<div class="lg-video-cont '+videoClass+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+_poster+'" /></div></div>')}else if(_isVideo){_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');_this.$el.trigger('hasVideo.lg',[index,_src,_html])}else{_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+_src+'" /></div>')}
_this.$el.trigger('onAferAppendSlide.lg',[index]);_$img=_this.$slide.eq(index).find('.lg-object');if(_sizes){_$img.attr('sizes',_sizes)}
if(_srcset){_$img.attr('srcset',_srcset);try{picturefill({elements:[_$img[0]]})}catch(e){console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.')}}
if(this.s.appendSubHtmlTo!=='.lg-sub-html'){_this.addHtml(index)}
_this.$slide.eq(index).addClass('lg-loaded')}
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg',function(){var _speed=0;if(delay&&!$('body').hasClass('lg-from-hash')){_speed=delay}
setTimeout(function(){_this.$slide.eq(index).addClass('lg-complete');_this.$el.trigger('onSlideItemLoad.lg',[index,delay||0])},_speed)});if(_isVideo&&_isVideo.html5&&!_hasPoster){_this.$slide.eq(index).addClass('lg-complete')}
if(rec===!0){if(!_this.$slide.eq(index).hasClass('lg-complete')){_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg',function(){_this.preload(index)})}else{_this.preload(index)}}};Plugin.prototype.slide=function(index,fromTouch,fromThumb,direction){var _prevIndex=this.$outer.find('.lg-current').index();var _this=this;if(_this.lGalleryOn&&(_prevIndex===index)){return}
var _length=this.$slide.length;var _time=_this.lGalleryOn?this.s.speed:0;if(!_this.lgBusy){if(this.s.download){var _src;if(_this.s.dynamic){_src=_this.s.dynamicEl[index].downloadUrl!==!1&&(_this.s.dynamicEl[index].downloadUrl||_this.s.dynamicEl[index].src)}else{_src=_this.$items.eq(index).attr('data-download-url')!=='false'&&(_this.$items.eq(index).attr('data-download-url')||_this.$items.eq(index).attr('href')||_this.$items.eq(index).attr('data-src'))}
if(_src){$('#lg-download').attr('href',_src);_this.$outer.removeClass('lg-hide-download')}else{_this.$outer.addClass('lg-hide-download')}}
this.$el.trigger('onBeforeSlide.lg',[_prevIndex,index,fromTouch,fromThumb]);_this.lgBusy=!0;clearTimeout(_this.hideBartimeout);if(this.s.appendSubHtmlTo==='.lg-sub-html'){setTimeout(function(){_this.addHtml(index)},_time)}
this.arrowDisable(index);if(!direction){if(index<_prevIndex){direction='prev'}else if(index>_prevIndex){direction='next'}}
if(!fromTouch){_this.$outer.addClass('lg-no-trans');this.$slide.removeClass('lg-prev-slide lg-next-slide');if(direction==='prev'){this.$slide.eq(index).addClass('lg-prev-slide');this.$slide.eq(_prevIndex).addClass('lg-next-slide')}else{this.$slide.eq(index).addClass('lg-next-slide');this.$slide.eq(_prevIndex).addClass('lg-prev-slide')}
setTimeout(function(){_this.$slide.removeClass('lg-current');_this.$slide.eq(index).addClass('lg-current');_this.$outer.removeClass('lg-no-trans')},50)}else{this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');var touchPrev;var touchNext;if(_length>2){touchPrev=index-1;touchNext=index+1;if((index===0)&&(_prevIndex===_length-1)){touchNext=0;touchPrev=_length-1}else if((index===_length-1)&&(_prevIndex===0)){touchNext=0;touchPrev=_length-1}}else{touchPrev=0;touchNext=1}
if(direction==='prev'){_this.$slide.eq(touchNext).addClass('lg-next-slide')}else{_this.$slide.eq(touchPrev).addClass('lg-prev-slide')}
_this.$slide.eq(index).addClass('lg-current')}
if(_this.lGalleryOn){setTimeout(function(){_this.loadContent(index,!0,0)},this.s.speed+50);setTimeout(function(){_this.lgBusy=!1;_this.$el.trigger('onAfterSlide.lg',[_prevIndex,index,fromTouch,fromThumb])},this.s.speed)}else{_this.loadContent(index,!0,_this.s.backdropDuration);_this.lgBusy=!1;_this.$el.trigger('onAfterSlide.lg',[_prevIndex,index,fromTouch,fromThumb])}
_this.lGalleryOn=!0;if(this.s.counter){$('#lg-counter-current').text(index+1)}}
_this.index=index};Plugin.prototype.goToNextSlide=function(fromTouch){var _this=this;var _loop=_this.s.loop;if(fromTouch&&_this.$slide.length<3){_loop=!1}
if(!_this.lgBusy){if((_this.index+1)<_this.$slide.length){_this.index++;_this.$el.trigger('onBeforeNextSlide.lg',[_this.index]);_this.slide(_this.index,fromTouch,!1,'next')}else{if(_loop){_this.index=0;_this.$el.trigger('onBeforeNextSlide.lg',[_this.index]);_this.slide(_this.index,fromTouch,!1,'next')}else if(_this.s.slideEndAnimatoin&&!fromTouch){_this.$outer.addClass('lg-right-end');setTimeout(function(){_this.$outer.removeClass('lg-right-end')},400)}}}};Plugin.prototype.goToPrevSlide=function(fromTouch){var _this=this;var _loop=_this.s.loop;if(fromTouch&&_this.$slide.length<3){_loop=!1}
if(!_this.lgBusy){if(_this.index>0){_this.index--;_this.$el.trigger('onBeforePrevSlide.lg',[_this.index,fromTouch]);_this.slide(_this.index,fromTouch,!1,'prev')}else{if(_loop){_this.index=_this.$items.length-1;_this.$el.trigger('onBeforePrevSlide.lg',[_this.index,fromTouch]);_this.slide(_this.index,fromTouch,!1,'prev')}else if(_this.s.slideEndAnimatoin&&!fromTouch){_this.$outer.addClass('lg-left-end');setTimeout(function(){_this.$outer.removeClass('lg-left-end')},400)}}}};Plugin.prototype.keyPress=function(){var _this=this;if(this.$items.length>1){$(window).on('keyup.lg',function(e){if(_this.$items.length>1){if(e.keyCode===37){e.preventDefault();_this.goToPrevSlide()}
if(e.keyCode===39){e.preventDefault();_this.goToNextSlide()}}})}
$(window).on('keydown.lg',function(e){if(_this.s.escKey===!0&&e.keyCode===27){e.preventDefault();if(!_this.$outer.hasClass('lg-thumb-open')){_this.destroy()}else{_this.$outer.removeClass('lg-thumb-open')}}})};Plugin.prototype.arrow=function(){var _this=this;this.$outer.find('.lg-prev').on('click.lg',function(){_this.goToPrevSlide()});this.$outer.find('.lg-next').on('click.lg',function(){_this.goToNextSlide()})};Plugin.prototype.arrowDisable=function(index){if(!this.s.loop&&this.s.hideControlOnEnd){if((index+1)<this.$slide.length){this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled')}else{this.$outer.find('.lg-next').attr('disabled','disabled').addClass('disabled')}
if(index>0){this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled')}else{this.$outer.find('.lg-prev').attr('disabled','disabled').addClass('disabled')}}};Plugin.prototype.setTranslate=function($el,xValue,yValue){if(this.s.useLeft){$el.css('left',xValue)}else{$el.css({transform:'translate3d('+(xValue)+'px, '+yValue+'px, 0px)'})}};Plugin.prototype.touchMove=function(startCoords,endCoords){var distance=endCoords-startCoords;if(Math.abs(distance)>15){this.$outer.addClass('lg-dragging');this.setTranslate(this.$slide.eq(this.index),distance,0);this.setTranslate($('.lg-prev-slide'),-this.$slide.eq(this.index).width()+distance,0);this.setTranslate($('.lg-next-slide'),this.$slide.eq(this.index).width()+distance,0)}};Plugin.prototype.touchEnd=function(distance){var _this=this;if(_this.s.mode!=='lg-slide'){_this.$outer.addClass('lg-slide')}
this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity','0');setTimeout(function(){_this.$outer.removeClass('lg-dragging');if((distance<0)&&(Math.abs(distance)>_this.s.swipeThreshold)){_this.goToNextSlide(!0)}else if((distance>0)&&(Math.abs(distance)>_this.s.swipeThreshold)){_this.goToPrevSlide(!0)}else if(Math.abs(distance)<5){_this.$el.trigger('onSlideClick.lg')}
_this.$slide.removeAttr('style')});setTimeout(function(){if(!_this.$outer.hasClass('lg-dragging')&&_this.s.mode!=='lg-slide'){_this.$outer.removeClass('lg-slide')}},_this.s.speed+100)};Plugin.prototype.enableSwipe=function(){var _this=this;var startCoords=0;var endCoords=0;var isMoved=!1;if(_this.s.enableSwipe&&_this.doCss()){_this.$slide.on('touchstart.lg',function(e){if(!_this.$outer.hasClass('lg-zoomed')&&!_this.lgBusy){e.preventDefault();_this.manageSwipeClass();startCoords=e.originalEvent.targetTouches[0].pageX}});_this.$slide.on('touchmove.lg',function(e){if(!_this.$outer.hasClass('lg-zoomed')){e.preventDefault();endCoords=e.originalEvent.targetTouches[0].pageX;_this.touchMove(startCoords,endCoords);isMoved=!0}});_this.$slide.on('touchend.lg',function(){if(!_this.$outer.hasClass('lg-zoomed')){if(isMoved){isMoved=!1;_this.touchEnd(endCoords-startCoords)}else{_this.$el.trigger('onSlideClick.lg')}}})}};Plugin.prototype.enableDrag=function(){var _this=this;var startCoords=0;var endCoords=0;var isDraging=!1;var isMoved=!1;if(_this.s.enableDrag&&_this.doCss()){_this.$slide.on('mousedown.lg',function(e){if(!_this.$outer.hasClass('lg-zoomed')&&!_this.lgBusy&&!$(e.target).text().trim()){e.preventDefault();_this.manageSwipeClass();startCoords=e.pageX;isDraging=!0;_this.$outer.scrollLeft+=1;_this.$outer.scrollLeft-=1;_this.$outer.removeClass('lg-grab').addClass('lg-grabbing');_this.$el.trigger('onDragstart.lg')}});$(window).on('mousemove.lg',function(e){if(isDraging){isMoved=!0;endCoords=e.pageX;_this.touchMove(startCoords,endCoords);_this.$el.trigger('onDragmove.lg')}});$(window).on('mouseup.lg',function(e){if(isMoved){isMoved=!1;_this.touchEnd(endCoords-startCoords);_this.$el.trigger('onDragend.lg')}else if($(e.target).hasClass('lg-object')||$(e.target).hasClass('lg-video-play')){_this.$el.trigger('onSlideClick.lg')}
if(isDraging){isDraging=!1;_this.$outer.removeClass('lg-grabbing').addClass('lg-grab')}})}};Plugin.prototype.manageSwipeClass=function(){var _touchNext=this.index+1;var _touchPrev=this.index-1;if(this.s.loop&&this.$slide.length>2){if(this.index===0){_touchPrev=this.$slide.length-1}else if(this.index===this.$slide.length-1){_touchNext=0}}
this.$slide.removeClass('lg-next-slide lg-prev-slide');if(_touchPrev>-1){this.$slide.eq(_touchPrev).addClass('lg-prev-slide')}
this.$slide.eq(_touchNext).addClass('lg-next-slide')};Plugin.prototype.mousewheel=function(){var _this=this;_this.$outer.on('mousewheel.lg',function(e){if(!e.deltaY){return}
if(e.deltaY>0){_this.goToPrevSlide()}else{_this.goToNextSlide()}
e.preventDefault()})};Plugin.prototype.closeGallery=function(){var _this=this;var mousedown=!1;this.$outer.find('.lg-close').on('click.lg',function(){_this.destroy()});if(_this.s.closable){_this.$outer.on('mousedown.lg',function(e){if($(e.target).is('.lg-outer')||$(e.target).is('.lg-item ')||$(e.target).is('.lg-img-wrap')){mousedown=!0}else{mousedown=!1}});_this.$outer.on('mousemove.lg',function(){mousedown=!1});_this.$outer.on('mouseup.lg',function(e){if($(e.target).is('.lg-outer')||$(e.target).is('.lg-item ')||$(e.target).is('.lg-img-wrap')&&mousedown){if(!_this.$outer.hasClass('lg-dragging')){_this.destroy()}}})}};Plugin.prototype.destroy=function(d){var _this=this;if(!d){_this.$el.trigger('onBeforeClose.lg');$(window).scrollTop(_this.prevScrollTop)}
if(d){if(!_this.s.dynamic){this.$items.off('click.lg click.lgcustom')}
$.removeData(_this.el,'lightGallery')}
this.$el.off('.lg.tm');$.each($.fn.lightGallery.modules,function(key){if(_this.modules[key]){_this.modules[key].destroy()}});this.lGalleryOn=!1;clearTimeout(_this.hideBartimeout);this.hideBartimeout=!1;$(window).off('.lg');$('body').removeClass('lg-on lg-from-hash');if(_this.$outer){_this.$outer.removeClass('lg-visible')}
$('.lg-backdrop').removeClass('in');setTimeout(function(){if(_this.$outer){_this.$outer.remove()}
$('.lg-backdrop').remove();if(!d){_this.$el.trigger('onCloseAfter.lg')}},_this.s.backdropDuration+50)};$.fn.lightGallery=function(options){return this.each(function(){if(!$.data(this,'lightGallery')){$.data(this,'lightGallery',new Plugin(this,options))}else{try{$(this).data('lightGallery').init()}catch(err){console.error('lightGallery has not initiated properly')}}})};$.fn.lightGallery.modules={}})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={autoplay:!1,pause:5000,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:'.lg-toolbar'};var Autoplay=function(element){this.core=$(element).data('lightGallery');this.$el=$(element);if(this.core.$items.length<2){return!1}
this.core.s=$.extend({},defaults,this.core.s);this.interval=!1;this.fromAuto=!0;this.canceledOnTouch=!1;this.fourceAutoplayTemp=this.core.s.fourceAutoplay;if(!this.core.doCss()){this.core.s.progressBar=!1}
this.init();return this};Autoplay.prototype.init=function(){var _this=this;if(_this.core.s.autoplayControls){_this.controls()}
if(_this.core.s.progressBar){_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>')}
_this.progress();if(_this.core.s.autoplay){_this.$el.one('onSlideItemLoad.lg.tm',function(){_this.startlAuto()})}
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm',function(){if(_this.interval){_this.cancelAuto();_this.canceledOnTouch=!0}});_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm',function(){if(!_this.interval&&_this.canceledOnTouch){_this.startlAuto();_this.canceledOnTouch=!1}})};Autoplay.prototype.progress=function(){var _this=this;var _$progressBar;var _$progress;_this.$el.on('onBeforeSlide.lg.tm',function(){if(_this.core.s.progressBar&&_this.fromAuto){_$progressBar=_this.core.$outer.find('.lg-progress-bar');_$progress=_this.core.$outer.find('.lg-progress');if(_this.interval){_$progress.removeAttr('style');_$progressBar.removeClass('lg-start');setTimeout(function(){_$progress.css('transition','width '+(_this.core.s.speed+_this.core.s.pause)+'ms ease 0s');_$progressBar.addClass('lg-start')},20)}}
if(!_this.fromAuto&&!_this.core.s.fourceAutoplay){_this.cancelAuto()}
_this.fromAuto=!1})};Autoplay.prototype.controls=function(){var _this=this;var _html='<span class="lg-autoplay-button lg-icon"></span>';$(this.core.s.appendAutoplayControlsTo).append(_html);_this.core.$outer.find('.lg-autoplay-button').on('click.lg',function(){if($(_this.core.$outer).hasClass('lg-show-autoplay')){_this.cancelAuto();_this.core.s.fourceAutoplay=!1}else{if(!_this.interval){_this.startlAuto();_this.core.s.fourceAutoplay=_this.fourceAutoplayTemp}}})};Autoplay.prototype.startlAuto=function(){var _this=this;_this.core.$outer.find('.lg-progress').css('transition','width '+(_this.core.s.speed+_this.core.s.pause)+'ms ease 0s');_this.core.$outer.addClass('lg-show-autoplay');_this.core.$outer.find('.lg-progress-bar').addClass('lg-start');_this.interval=setInterval(function(){if(_this.core.index+1<_this.core.$items.length){_this.core.index++}else{_this.core.index=0}
_this.fromAuto=!0;_this.core.slide(_this.core.index,!1,!1,'next')},_this.core.s.speed+_this.core.s.pause)};Autoplay.prototype.cancelAuto=function(){clearInterval(this.interval);this.interval=!1;this.core.$outer.find('.lg-progress').removeAttr('style');this.core.$outer.removeClass('lg-show-autoplay');this.core.$outer.find('.lg-progress-bar').removeClass('lg-start')};Autoplay.prototype.destroy=function(){this.cancelAuto();this.core.$outer.find('.lg-progress-bar').remove()};$.fn.lightGallery.modules.autoplay=Autoplay})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={fullScreen:!0};var Fullscreen=function(element){this.core=$(element).data('lightGallery');this.$el=$(element);this.core.s=$.extend({},defaults,this.core.s);this.init();return this};Fullscreen.prototype.init=function(){var fullScreen='';if(this.core.s.fullScreen){if(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled&&!document.mozFullScreenEnabled&&!document.msFullscreenEnabled){return}else{fullScreen='<span class="lg-fullscreen lg-icon"></span>';this.core.$outer.find('.lg-toolbar').append(fullScreen);this.fullScreen()}}};Fullscreen.prototype.requestFullscreen=function(){var el=document.documentElement;if(el.requestFullscreen){el.requestFullscreen()}else if(el.msRequestFullscreen){el.msRequestFullscreen()}else if(el.mozRequestFullScreen){el.mozRequestFullScreen()}else if(el.webkitRequestFullscreen){el.webkitRequestFullscreen()}};Fullscreen.prototype.exitFullscreen=function(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}};Fullscreen.prototype.fullScreen=function(){var _this=this;$(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg',function(){_this.core.$outer.toggleClass('lg-fullscreen-on')});this.core.$outer.find('.lg-fullscreen').on('click.lg',function(){if(!document.fullscreenElement&&!document.mozFullScreenElement&&!document.webkitFullscreenElement&&!document.msFullscreenElement){_this.requestFullscreen()}else{_this.exitFullscreen()}})};Fullscreen.prototype.destroy=function(){this.exitFullscreen();$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg')};$.fn.lightGallery.modules.fullscreen=Fullscreen})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={pager:!1};var Pager=function(element){this.core=$(element).data('lightGallery');this.$el=$(element);this.core.s=$.extend({},defaults,this.core.s);if(this.core.s.pager&&this.core.$items.length>1){this.init()}
return this};Pager.prototype.init=function(){var _this=this;var pagerList='';var $pagerCont;var $pagerOuter;var timeout;_this.core.$outer.find('.lg').append('<div class="lg-pager-outer"></div>');if(_this.core.s.dynamic){for(var i=0;i<_this.core.s.dynamicEl.length;i++){pagerList+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+_this.core.s.dynamicEl[i].thumb+'" /></div></span>'}}else{_this.core.$items.each(function(){if(!_this.core.s.exThumbImage){pagerList+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+$(this).find('img').attr('src')+'" /></div></span>'}else{pagerList+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+$(this).attr(_this.core.s.exThumbImage)+'" /></div></span>'}})}
$pagerOuter=_this.core.$outer.find('.lg-pager-outer');$pagerOuter.html(pagerList);$pagerCont=_this.core.$outer.find('.lg-pager-cont');$pagerCont.on('click.lg touchend.lg',function(){var _$this=$(this);_this.core.index=_$this.index();_this.core.slide(_this.core.index,!1,!0,!1)});$pagerOuter.on('mouseover.lg',function(){clearTimeout(timeout);$pagerOuter.addClass('lg-pager-hover')});$pagerOuter.on('mouseout.lg',function(){timeout=setTimeout(function(){$pagerOuter.removeClass('lg-pager-hover')})});_this.core.$el.on('onBeforeSlide.lg.tm',function(e,prevIndex,index){$pagerCont.removeClass('lg-pager-active');$pagerCont.eq(index).addClass('lg-pager-active')})};Pager.prototype.destroy=function(){};$.fn.lightGallery.modules.pager=Pager})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={thumbnail:!0,animateThumb:!0,currentPagerPosition:'middle',thumbWidth:100,thumbHeight:'80px',thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:'thumbnail_small',loadDailymotionThumbnail:!0};var Thumbnail=function(element){this.core=$(element).data('lightGallery');this.core.s=$.extend({},defaults,this.core.s);this.$el=$(element);this.$thumbOuter=null;this.thumbOuterWidth=0;this.thumbTotalWidth=(this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin));this.thumbIndex=this.core.index;if(this.core.s.animateThumb){this.core.s.thumbHeight='100%'}
this.left=0;this.init();return this};Thumbnail.prototype.init=function(){var _this=this;if(this.core.s.thumbnail&&this.core.$items.length>1){if(this.core.s.showThumbByDefault){setTimeout(function(){_this.core.$outer.addClass('lg-thumb-open')},700)}
if(this.core.s.pullCaptionUp){this.core.$outer.addClass('lg-pull-caption-up')}
this.build();if(this.core.s.animateThumb&&this.core.doCss()){if(this.core.s.enableThumbDrag){this.enableThumbDrag()}
if(this.core.s.enableThumbSwipe){this.enableThumbSwipe()}
this.thumbClickable=!1}else{this.thumbClickable=!0}
this.toogle();this.thumbkeyPress()}};Thumbnail.prototype.build=function(){var _this=this;var thumbList='';var vimeoErrorThumbSize='';var $thumb;var html='<div class="lg-thumb-outer">'+'<div class="lg-thumb lg-group">'+'</div>'+'</div>';switch(this.core.s.vimeoThumbSize){case 'thumbnail_large':vimeoErrorThumbSize='640';break;case 'thumbnail_medium':vimeoErrorThumbSize='200x150';break;case 'thumbnail_small':vimeoErrorThumbSize='100x75'}
_this.core.$outer.addClass('lg-has-thumb');_this.core.$outer.find('.lg').append(html);_this.$thumbOuter=_this.core.$outer.find('.lg-thumb-outer');_this.thumbOuterWidth=_this.$thumbOuter.width();if(_this.core.s.animateThumb){_this.core.$outer.find('.lg-thumb').css({width:_this.thumbTotalWidth+'px',position:'relative'})}
if(this.core.s.animateThumb){_this.$thumbOuter.css('height',_this.core.s.thumbContHeight+'px')}
function getThumb(src,thumb,index){var isVideo=_this.core.isVideo(src,index)||{};var thumbImg;var vimeoId='';if(isVideo.youtube||isVideo.vimeo||isVideo.dailymotion){if(isVideo.youtube){if(_this.core.s.loadYoutubeThumbnail){thumbImg='//img.youtube.com/vi/'+isVideo.youtube[1]+'/'+_this.core.s.youtubeThumbSize+'.jpg'}else{thumbImg=thumb}}else if(isVideo.vimeo){if(_this.core.s.loadVimeoThumbnail){thumbImg='//i.vimeocdn.com/video/error_'+vimeoErrorThumbSize+'.jpg';vimeoId=isVideo.vimeo[1]}else{thumbImg=thumb}}else if(isVideo.dailymotion){if(_this.core.s.loadDailymotionThumbnail){thumbImg='//www.dailymotion.com/thumbnail/video/'+isVideo.dailymotion[1]}else{thumbImg=thumb}}}else{thumbImg=thumb}
thumbList+='<div data-vimeo-id="'+vimeoId+'" class="lg-thumb-item" style="width:'+_this.core.s.thumbWidth+'px; height: '+_this.core.s.thumbHeight+'; margin-right: '+_this.core.s.thumbMargin+'px"><img src="'+thumbImg+'" /></div>';vimeoId=''}
if(_this.core.s.dynamic){for(var i=0;i<_this.core.s.dynamicEl.length;i++){getThumb(_this.core.s.dynamicEl[i].src,_this.core.s.dynamicEl[i].thumb,i)}}else{_this.core.$items.each(function(i){if(!_this.core.s.exThumbImage){getThumb($(this).attr('href')||$(this).attr('data-src'),$(this).find('img').attr('src'),i)}else{getThumb($(this).attr('href')||$(this).attr('data-src'),$(this).attr(_this.core.s.exThumbImage),i)}})}
_this.core.$outer.find('.lg-thumb').html(thumbList);$thumb=_this.core.$outer.find('.lg-thumb-item');$thumb.each(function(){var $this=$(this);var vimeoVideoId=$this.attr('data-vimeo-id');if(vimeoVideoId){$.getJSON('//www.vimeo.com/api/v2/video/'+vimeoVideoId+'.json?callback=?',{format:'json'},function(data){$this.find('img').attr('src',data[0][_this.core.s.vimeoThumbSize])})}});$thumb.eq(_this.core.index).addClass('active');_this.core.$el.on('onBeforeSlide.lg.tm',function(){$thumb.removeClass('active');$thumb.eq(_this.core.index).addClass('active')});$thumb.on('click.lg touchend.lg',function(){var _$this=$(this);setTimeout(function(){if((_this.thumbClickable&&!_this.core.lgBusy)||!_this.core.doCss()){_this.core.index=_$this.index();_this.core.slide(_this.core.index,!1,!0,!1)}},50)});_this.core.$el.on('onBeforeSlide.lg.tm',function(){_this.animateThumb(_this.core.index)});$(window).on('resize.lg.thumb orientationchange.lg.thumb',function(){setTimeout(function(){_this.animateThumb(_this.core.index);_this.thumbOuterWidth=_this.$thumbOuter.width()},200)})};Thumbnail.prototype.setTranslate=function(value){this.core.$outer.find('.lg-thumb').css({transform:'translate3d(-'+(value)+'px, 0px, 0px)'})};Thumbnail.prototype.animateThumb=function(index){var $thumb=this.core.$outer.find('.lg-thumb');if(this.core.s.animateThumb){var position;switch(this.core.s.currentPagerPosition){case 'left':position=0;break;case 'middle':position=(this.thumbOuterWidth/2)-(this.core.s.thumbWidth/2);break;case 'right':position=this.thumbOuterWidth-this.core.s.thumbWidth}
this.left=((this.core.s.thumbWidth+this.core.s.thumbMargin)*index-1)-position;if(this.left>(this.thumbTotalWidth-this.thumbOuterWidth)){this.left=this.thumbTotalWidth-this.thumbOuterWidth}
if(this.left<0){this.left=0}
if(this.core.lGalleryOn){if(!$thumb.hasClass('on')){this.core.$outer.find('.lg-thumb').css('transition-duration',this.core.s.speed+'ms')}
if(!this.core.doCss()){$thumb.animate({left:-this.left+'px'},this.core.s.speed)}}else{if(!this.core.doCss()){$thumb.css('left',-this.left+'px')}}
this.setTranslate(this.left)}};Thumbnail.prototype.enableThumbDrag=function(){var _this=this;var startCoords=0;var endCoords=0;var isDraging=!1;var isMoved=!1;var tempLeft=0;_this.$thumbOuter.addClass('lg-grab');_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();startCoords=e.pageX;isDraging=!0;_this.core.$outer.scrollLeft+=1;_this.core.$outer.scrollLeft-=1;_this.thumbClickable=!1;_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing')}});$(window).on('mousemove.lg.thumb',function(e){if(isDraging){tempLeft=_this.left;isMoved=!0;endCoords=e.pageX;_this.$thumbOuter.addClass('lg-dragging');tempLeft=tempLeft-(endCoords-startCoords);if(tempLeft>(_this.thumbTotalWidth-_this.thumbOuterWidth)){tempLeft=_this.thumbTotalWidth-_this.thumbOuterWidth}
if(tempLeft<0){tempLeft=0}
_this.setTranslate(tempLeft)}});$(window).on('mouseup.lg.thumb',function(){if(isMoved){isMoved=!1;_this.$thumbOuter.removeClass('lg-dragging');_this.left=tempLeft;if(Math.abs(endCoords-startCoords)<_this.core.s.swipeThreshold){_this.thumbClickable=!0}}else{_this.thumbClickable=!0}
if(isDraging){isDraging=!1;_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab')}})};Thumbnail.prototype.enableThumbSwipe=function(){var _this=this;var startCoords=0;var endCoords=0;var isMoved=!1;var tempLeft=0;_this.core.$outer.find('.lg-thumb').on('touchstart.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();startCoords=e.originalEvent.targetTouches[0].pageX;_this.thumbClickable=!1}});_this.core.$outer.find('.lg-thumb').on('touchmove.lg',function(e){if(_this.thumbTotalWidth>_this.thumbOuterWidth){e.preventDefault();endCoords=e.originalEvent.targetTouches[0].pageX;isMoved=!0;_this.$thumbOuter.addClass('lg-dragging');tempLeft=_this.left;tempLeft=tempLeft-(endCoords-startCoords);if(tempLeft>(_this.thumbTotalWidth-_this.thumbOuterWidth)){tempLeft=_this.thumbTotalWidth-_this.thumbOuterWidth}
if(tempLeft<0){tempLeft=0}
_this.setTranslate(tempLeft)}});_this.core.$outer.find('.lg-thumb').on('touchend.lg',function(){if(_this.thumbTotalWidth>_this.thumbOuterWidth){if(isMoved){isMoved=!1;_this.$thumbOuter.removeClass('lg-dragging');if(Math.abs(endCoords-startCoords)<_this.core.s.swipeThreshold){_this.thumbClickable=!0}
_this.left=tempLeft}else{_this.thumbClickable=!0}}else{_this.thumbClickable=!0}})};Thumbnail.prototype.toogle=function(){var _this=this;if(_this.core.s.toogleThumb){_this.core.$outer.addClass('lg-can-toggle');_this.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');_this.core.$outer.find('.lg-toogle-thumb').on('click.lg',function(){_this.core.$outer.toggleClass('lg-thumb-open')})}};Thumbnail.prototype.thumbkeyPress=function(){var _this=this;$(window).on('keydown.lg.thumb',function(e){if(e.keyCode===38){e.preventDefault();_this.core.$outer.addClass('lg-thumb-open')}else if(e.keyCode===40){e.preventDefault();_this.core.$outer.removeClass('lg-thumb-open')}})};Thumbnail.prototype.destroy=function(){if(this.core.s.thumbnail&&this.core.$items.length>1){$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');this.$thumbOuter.remove();this.core.$outer.removeClass('lg-has-thumb')}};$.fn.lightGallery.modules.Thumbnail=Thumbnail})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof module==='object'&&module.exports){module.exports=factory(require('jquery'))}else{factory(root.jQuery)}}(this,function($){(function(){'use strict';var defaults={videoMaxWidth:'855px',autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}};var Video=function(element){this.core=$(element).data('lightGallery');this.$el=$(element);this.core.s=$.extend({},defaults,this.core.s);this.videoLoaded=!1;this.init();return this};Video.prototype.init=function(){var _this=this;_this.core.$el.on('hasVideo.lg.tm',onHasVideo.bind(this));_this.core.$el.on('onAferAppendSlide.lg.tm',onAferAppendSlide.bind(this));if(_this.core.doCss()&&(_this.core.$items.length>1)&&(_this.core.s.enableSwipe||_this.core.s.enableDrag)){_this.core.$el.on('onSlideClick.lg.tm',function(){var $el=_this.core.$slide.eq(_this.core.index);_this.loadVideoOnclick($el)})}else{_this.core.$slide.on('click.lg',function(){_this.loadVideoOnclick($(this))})}
_this.core.$el.on('onBeforeSlide.lg.tm',onBeforeSlide.bind(this));_this.core.$el.on('onAfterSlide.lg.tm',function(event,prevIndex){_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing')});if(_this.core.s.autoplayFirstVideo){_this.core.$el.on('onAferAppendSlide.lg.tm',function(e,index){if(!_this.core.lGalleryOn){var $el=_this.core.$slide.eq(index);setTimeout(function(){_this.loadVideoOnclick($el)},100)}})}};Video.prototype.loadVideo=function(src,addClass,noPoster,index,html){var video='';var autoplay=1;var a='';var isVideo=this.core.isVideo(src,index)||{};if(noPoster){if(this.videoLoaded){autoplay=0}else{autoplay=this.core.s.autoplayFirstVideo?1:0}}
if(isVideo.youtube){a='?wmode=opaque&autoplay='+autoplay+'&enablejsapi=1';if(this.core.s.youtubePlayerParams){a=a+'&'+$.param(this.core.s.youtubePlayerParams)}
video='<iframe class="lg-video-object lg-youtube '+addClass+'" width="560" height="315" src="//www.youtube.com/embed/'+isVideo.youtube[1]+a+'" frameborder="0" allowfullscreen></iframe>'}else if(isVideo.vimeo){a='?autoplay='+autoplay+'&api=1';if(this.core.s.vimeoPlayerParams){a=a+'&'+$.param(this.core.s.vimeoPlayerParams)}
video='<iframe class="lg-video-object lg-vimeo '+addClass+'" width="560" height="315"  src="//player.vimeo.com/video/'+isVideo.vimeo[1]+a+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}else if(isVideo.dailymotion){a='?wmode=opaque&autoplay='+autoplay+'&api=postMessage';if(this.core.s.dailymotionPlayerParams){a=a+'&'+$.param(this.core.s.dailymotionPlayerParams)}
video='<iframe class="lg-video-object lg-dailymotion '+addClass+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+isVideo.dailymotion[1]+a+'" frameborder="0" allowfullscreen></iframe>'}else if(isVideo.html5){var fL=html.substring(0,1);if(fL==='.'||fL==='#'){html=$(html).html()}
video=html}else if(isVideo.vk){a='&autoplay='+autoplay;if(this.core.s.vkPlayerParams){a=a+'&'+$.param(this.core.s.vkPlayerParams)}
video='<iframe class="lg-video-object lg-vk '+addClass+'" width="560" height="315" src="//vk.com/video_ext.php?'+isVideo.vk[1]+a+'" frameborder="0" allowfullscreen></iframe>'}
return video};Video.prototype.loadVideoOnclick=function($el){var _this=this;if($el.find('.lg-object').hasClass('lg-has-poster')&&$el.find('.lg-object').is(':visible')){if(!$el.hasClass('lg-has-video')){$el.addClass('lg-video-playing lg-has-video');var _src;var _html;var _loadVideo=function(_src,_html){$el.find('.lg-video').append(_this.loadVideo(_src,'',!1,_this.core.index,_html));if(_html){if(_this.core.s.videojs){try{videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0),_this.core.s.videojsOptions,function(){this.play()})}catch(e){console.error('Make sure you have included videojs')}}else{_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play()}}};if(_this.core.s.dynamic){_src=_this.core.s.dynamicEl[_this.core.index].src;_html=_this.core.s.dynamicEl[_this.core.index].html;_loadVideo(_src,_html)}else{_src=_this.core.$items.eq(_this.core.index).attr('href')||_this.core.$items.eq(_this.core.index).attr('data-src');_html=_this.core.$items.eq(_this.core.index).attr('data-html');_loadVideo(_src,_html)}
var $tempImg=$el.find('.lg-object');$el.find('.lg-video').append($tempImg);if(!$el.find('.lg-video-object').hasClass('lg-html5')){$el.removeClass('lg-complete');$el.find('.lg-video-object').on('load.lg error.lg',function(){$el.addClass('lg-complete')})}}else{var youtubePlayer=$el.find('.lg-youtube').get(0);var vimeoPlayer=$el.find('.lg-vimeo').get(0);var dailymotionPlayer=$el.find('.lg-dailymotion').get(0);var html5Player=$el.find('.lg-html5').get(0);if(youtubePlayer){youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*')}else if(vimeoPlayer){try{$f(vimeoPlayer).api('play')}catch(e){console.error('Make sure you have included froogaloop2 js')}}else if(dailymotionPlayer){dailymotionPlayer.contentWindow.postMessage('play','*')}else if(html5Player){if(_this.core.s.videojs){try{videojs(html5Player).play()}catch(e){console.error('Make sure you have included videojs')}}else{html5Player.play()}}
$el.addClass('lg-video-playing')}}};Video.prototype.destroy=function(){this.videoLoaded=!1};function onHasVideo(event,index,src,html){var _this=this;_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src,'lg-object',!0,index,html));if(html){if(_this.core.s.videojs){try{videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0),_this.core.s.videojsOptions,function(){if(!_this.videoLoaded&&_this.core.s.autoplayFirstVideo){this.play()}})}catch(e){console.error('Make sure you have included videojs')}}else{if(!_this.videoLoaded&&_this.core.s.autoplayFirstVideo){_this.core.$slide.eq(index).find('.lg-html5').get(0).play()}}}}
function onAferAppendSlide(event,index){var $videoCont=this.core.$slide.eq(index).find('.lg-video-cont');if(!$videoCont.hasClass('lg-has-iframe')){$videoCont.css('max-width',this.core.s.videoMaxWidth);this.videoLoaded=!0}}
function onBeforeSlide(event,prevIndex,index){var _this=this;var $videoSlide=_this.core.$slide.eq(prevIndex);var youtubePlayer=$videoSlide.find('.lg-youtube').get(0);var vimeoPlayer=$videoSlide.find('.lg-vimeo').get(0);var dailymotionPlayer=$videoSlide.find('.lg-dailymotion').get(0);var vkPlayer=$videoSlide.find('.lg-vk').get(0);var html5Player=$videoSlide.find('.lg-html5').get(0);if(youtubePlayer){youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*')}else if(vimeoPlayer){try{$f(vimeoPlayer).api('pause')}catch(e){console.error('Make sure you have included froogaloop2 js')}}else if(dailymotionPlayer){dailymotionPlayer.contentWindow.postMessage('pause','*')}else if(html5Player){if(_this.core.s.videojs){try{videojs(html5Player).pause()}catch(e){console.error('Make sure you have included videojs')}}else{html5Player.pause()}}if(vkPlayer){$(vkPlayer).attr('src',$(vkPlayer).attr('src').replace('&autoplay','&noplay'))}
var _src;if(_this.core.s.dynamic){_src=_this.core.s.dynamicEl[index].src}else{_src=_this.core.$items.eq(index).attr('href')||_this.core.$items.eq(index).attr('data-src')}
var _isVideo=_this.core.isVideo(_src,index)||{};if(_isVideo.youtube||_isVideo.vimeo||_isVideo.dailymotion||_isVideo.vk){_this.core.$outer.addClass('lg-hide-download')}}
$.fn.lightGallery.modules.video=Video})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var getUseLeft=function(){var useLeft=!1;var isChrome=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(isChrome&&parseInt(isChrome[2],10)<54){useLeft=!0}
return useLeft};var defaults={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:getUseLeft()};var Zoom=function(element){this.core=$(element).data('lightGallery');this.core.s=$.extend({},defaults,this.core.s);if(this.core.s.zoom&&this.core.doCss()){this.init();this.zoomabletimeout=!1;this.pageX=$(window).width()/2;this.pageY=($(window).height()/2)+$(window).scrollTop()}
return this};Zoom.prototype.init=function(){var _this=this;var zoomIcons='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';if(_this.core.s.actualSize){zoomIcons+='<span id="lg-actual-size" class="lg-icon"></span>'}
if(_this.core.s.useLeftForZoom){_this.core.$outer.addClass('lg-use-left-for-zoom')}else{_this.core.$outer.addClass('lg-use-transition-for-zoom')}
this.core.$outer.find('.lg-toolbar').append(zoomIcons);_this.core.$el.on('onSlideItemLoad.lg.tm.zoom',function(event,index,delay){var _speed=_this.core.s.enableZoomAfter+delay;if($('body').hasClass('lg-from-hash')&&delay){_speed=0}else{$('body').removeClass('lg-from-hash')}
_this.zoomabletimeout=setTimeout(function(){_this.core.$slide.eq(index).addClass('lg-zoomable')},_speed+30)});var scale=1;var zoom=function(scaleVal){var $image=_this.core.$outer.find('.lg-current .lg-image');var _x;var _y;var offsetX=($(window).width()-$image.prop('offsetWidth'))/2;var offsetY=(($(window).height()-$image.prop('offsetHeight'))/2)+$(window).scrollTop();_x=_this.pageX-offsetX;_y=_this.pageY-offsetY;var x=(scaleVal-1)*(_x);var y=(scaleVal-1)*(_y);$image.css('transform','scale3d('+scaleVal+', '+scaleVal+', 1)').attr('data-scale',scaleVal);if(_this.core.s.useLeftForZoom){$image.parent().css({left:-x+'px',top:-y+'px'}).attr('data-x',x).attr('data-y',y)}else{$image.parent().css('transform','translate3d(-'+x+'px, -'+y+'px, 0)').attr('data-x',x).attr('data-y',y)}};var callScale=function(){if(scale>1){_this.core.$outer.addClass('lg-zoomed')}else{_this.resetZoom()}
if(scale<1){scale=1}
zoom(scale)};var actualSize=function(event,$image,index,fromIcon){var w=$image.prop('offsetWidth');var nw;if(_this.core.s.dynamic){nw=_this.core.s.dynamicEl[index].width||$image[0].naturalWidth||w}else{nw=_this.core.$items.eq(index).attr('data-width')||$image[0].naturalWidth||w}
var _scale;if(_this.core.$outer.hasClass('lg-zoomed')){scale=1}else{if(nw>w){_scale=nw/w;scale=_scale||2}}
if(fromIcon){_this.pageX=$(window).width()/2;_this.pageY=($(window).height()/2)+$(window).scrollTop()}else{_this.pageX=event.pageX||event.originalEvent.targetTouches[0].pageX;_this.pageY=event.pageY||event.originalEvent.targetTouches[0].pageY}
callScale();setTimeout(function(){_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab')},10)};var tapped=!1;_this.core.$el.on('onAferAppendSlide.lg.tm.zoom',function(event,index){var $image=_this.core.$slide.eq(index).find('.lg-image');$image.on('dblclick',function(event){actualSize(event,$image,index)});$image.on('touchstart',function(event){if(!tapped){tapped=setTimeout(function(){tapped=null},300)}else{clearTimeout(tapped);tapped=null;actualSize(event,$image,index)}
event.preventDefault()})});$(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom',function(){_this.pageX=$(window).width()/2;_this.pageY=($(window).height()/2)+$(window).scrollTop();zoom(scale)});$('#lg-zoom-out').on('click.lg',function(){if(_this.core.$outer.find('.lg-current .lg-image').length){scale-=_this.core.s.scale;callScale()}});$('#lg-zoom-in').on('click.lg',function(){if(_this.core.$outer.find('.lg-current .lg-image').length){scale+=_this.core.s.scale;callScale()}});$('#lg-actual-size').on('click.lg',function(event){actualSize(event,_this.core.$slide.eq(_this.core.index).find('.lg-image'),_this.core.index,!0)});_this.core.$el.on('onBeforeSlide.lg.tm',function(){scale=1;_this.resetZoom()});_this.zoomDrag();_this.zoomSwipe()};Zoom.prototype.resetZoom=function(){this.core.$outer.removeClass('lg-zoomed');this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y');this.core.$slide.find('.lg-image').removeAttr('style data-scale');this.pageX=$(window).width()/2;this.pageY=($(window).height()/2)+$(window).scrollTop()};Zoom.prototype.zoomSwipe=function(){var _this=this;var startCoords={};var endCoords={};var isMoved=!1;var allowX=!1;var allowY=!1;_this.core.$slide.on('touchstart.lg',function(e){if(_this.core.$outer.hasClass('lg-zoomed')){var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');allowY=$image.prop('offsetHeight')*$image.attr('data-scale')>_this.core.$outer.find('.lg').height();allowX=$image.prop('offsetWidth')*$image.attr('data-scale')>_this.core.$outer.find('.lg').width();if((allowX||allowY)){e.preventDefault();startCoords={x:e.originalEvent.targetTouches[0].pageX,y:e.originalEvent.targetTouches[0].pageY}}}});_this.core.$slide.on('touchmove.lg',function(e){if(_this.core.$outer.hasClass('lg-zoomed')){var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');var distanceX;var distanceY;e.preventDefault();isMoved=!0;endCoords={x:e.originalEvent.targetTouches[0].pageX,y:e.originalEvent.targetTouches[0].pageY};_this.core.$outer.addClass('lg-zoom-dragging');if(allowY){distanceY=(-Math.abs(_$el.attr('data-y')))+(endCoords.y-startCoords.y)}else{distanceY=-Math.abs(_$el.attr('data-y'))}
if(allowX){distanceX=(-Math.abs(_$el.attr('data-x')))+(endCoords.x-startCoords.x)}else{distanceX=-Math.abs(_$el.attr('data-x'))}
if((Math.abs(endCoords.x-startCoords.x)>15)||(Math.abs(endCoords.y-startCoords.y)>15)){if(_this.core.s.useLeftForZoom){_$el.css({left:distanceX+'px',top:distanceY+'px'})}else{_$el.css('transform','translate3d('+distanceX+'px, '+distanceY+'px, 0)')}}}});_this.core.$slide.on('touchend.lg',function(){if(_this.core.$outer.hasClass('lg-zoomed')){if(isMoved){isMoved=!1;_this.core.$outer.removeClass('lg-zoom-dragging');_this.touchendZoom(startCoords,endCoords,allowX,allowY)}}})};Zoom.prototype.zoomDrag=function(){var _this=this;var startCoords={};var endCoords={};var isDraging=!1;var isMoved=!1;var allowX=!1;var allowY=!1;_this.core.$slide.on('mousedown.lg.zoom',function(e){var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');allowY=$image.prop('offsetHeight')*$image.attr('data-scale')>_this.core.$outer.find('.lg').height();allowX=$image.prop('offsetWidth')*$image.attr('data-scale')>_this.core.$outer.find('.lg').width();if(_this.core.$outer.hasClass('lg-zoomed')){if($(e.target).hasClass('lg-object')&&(allowX||allowY)){e.preventDefault();startCoords={x:e.pageX,y:e.pageY};isDraging=!0;_this.core.$outer.scrollLeft+=1;_this.core.$outer.scrollLeft-=1;_this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing')}}});$(window).on('mousemove.lg.zoom',function(e){if(isDraging){var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');var distanceX;var distanceY;isMoved=!0;endCoords={x:e.pageX,y:e.pageY};_this.core.$outer.addClass('lg-zoom-dragging');if(allowY){distanceY=(-Math.abs(_$el.attr('data-y')))+(endCoords.y-startCoords.y)}else{distanceY=-Math.abs(_$el.attr('data-y'))}
if(allowX){distanceX=(-Math.abs(_$el.attr('data-x')))+(endCoords.x-startCoords.x)}else{distanceX=-Math.abs(_$el.attr('data-x'))}
if(_this.core.s.useLeftForZoom){_$el.css({left:distanceX+'px',top:distanceY+'px'})}else{_$el.css('transform','translate3d('+distanceX+'px, '+distanceY+'px, 0)')}}});$(window).on('mouseup.lg.zoom',function(e){if(isDraging){isDraging=!1;_this.core.$outer.removeClass('lg-zoom-dragging');if(isMoved&&((startCoords.x!==endCoords.x)||(startCoords.y!==endCoords.y))){endCoords={x:e.pageX,y:e.pageY};_this.touchendZoom(startCoords,endCoords,allowX,allowY)}
isMoved=!1}
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab')})};Zoom.prototype.touchendZoom=function(startCoords,endCoords,allowX,allowY){var _this=this;var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');var distanceX=(-Math.abs(_$el.attr('data-x')))+(endCoords.x-startCoords.x);var distanceY=(-Math.abs(_$el.attr('data-y')))+(endCoords.y-startCoords.y);var minY=(_this.core.$outer.find('.lg').height()-$image.prop('offsetHeight'))/2;var maxY=Math.abs(($image.prop('offsetHeight')*Math.abs($image.attr('data-scale')))-_this.core.$outer.find('.lg').height()+minY);var minX=(_this.core.$outer.find('.lg').width()-$image.prop('offsetWidth'))/2;var maxX=Math.abs(($image.prop('offsetWidth')*Math.abs($image.attr('data-scale')))-_this.core.$outer.find('.lg').width()+minX);if((Math.abs(endCoords.x-startCoords.x)>15)||(Math.abs(endCoords.y-startCoords.y)>15)){if(allowY){if(distanceY<=-maxY){distanceY=-maxY}else if(distanceY>=-minY){distanceY=-minY}}
if(allowX){if(distanceX<=-maxX){distanceX=-maxX}else if(distanceX>=-minX){distanceX=-minX}}
if(allowY){_$el.attr('data-y',Math.abs(distanceY))}else{distanceY=-Math.abs(_$el.attr('data-y'))}
if(allowX){_$el.attr('data-x',Math.abs(distanceX))}else{distanceX=-Math.abs(_$el.attr('data-x'))}
if(_this.core.s.useLeftForZoom){_$el.css({left:distanceX+'px',top:distanceY+'px'})}else{_$el.css('transform','translate3d('+distanceX+'px, '+distanceY+'px, 0)')}}};Zoom.prototype.destroy=function(){var _this=this;_this.core.$el.off('.lg.zoom');$(window).off('.lg.zoom');_this.core.$slide.off('.lg.zoom');_this.core.$el.off('.lg.tm.zoom');_this.resetZoom();clearTimeout(_this.zoomabletimeout);_this.zoomabletimeout=!1};$.fn.lightGallery.modules.zoom=Zoom})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={hash:!0};var Hash=function(element){this.core=$(element).data('lightGallery');this.core.s=$.extend({},defaults,this.core.s);if(this.core.s.hash){this.oldHash=window.location.hash;this.init()}
return this};Hash.prototype.init=function(){var _this=this;var _hash;_this.core.$el.on('onAfterSlide.lg.tm',function(event,prevIndex,index){if(history.replaceState){history.replaceState(null,null,window.location.pathname+window.location.search+'#lg='+_this.core.s.galleryId+'&slide='+index)}else{window.location.hash='lg='+_this.core.s.galleryId+'&slide='+index}});$(window).on('hashchange.lg.hash',function(){_hash=window.location.hash;var _idx=parseInt(_hash.split('&slide=')[1],10);if((_hash.indexOf('lg='+_this.core.s.galleryId)>-1)){_this.core.slide(_idx,!1,!1)}else if(_this.core.lGalleryOn){_this.core.destroy()}})};Hash.prototype.destroy=function(){if(!this.core.s.hash){return}
if(this.oldHash&&this.oldHash.indexOf('lg='+this.core.s.galleryId)<0){if(history.replaceState){history.replaceState(null,null,this.oldHash)}else{window.location.hash=this.oldHash}}else{if(history.replaceState){history.replaceState(null,document.title,window.location.pathname+window.location.search)}else{window.location.hash=''}}
this.core.$el.off('.lg.hash')};$.fn.lightGallery.modules.hash=Hash})()}));(function(root,factory){if(typeof define==='function'&&define.amd){define(['jquery'],function(a0){return(factory(a0))})}else if(typeof exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(this,function($){(function(){'use strict';var defaults={share:!0,facebook:!0,facebookDropdownText:'Facebook',twitter:!0,twitterDropdownText:'Twitter',googlePlus:!0,googlePlusDropdownText:'GooglePlus',pinterest:!0,pinterestDropdownText:'Pinterest'};var Share=function(element){this.core=$(element).data('lightGallery');this.core.s=$.extend({},defaults,this.core.s);if(this.core.s.share){this.init()}
return this};Share.prototype.init=function(){var _this=this;var shareHtml='<span id="lg-share" class="lg-icon">'+'<ul class="lg-dropdown" style="position: absolute;">';shareHtml+=_this.core.s.facebook?'<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.facebookDropdownText+'</span></a></li>':'';shareHtml+=_this.core.s.twitter?'<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.twitterDropdownText+'</span></a></li>':'';shareHtml+=_this.core.s.googlePlus?'<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.googlePlusDropdownText+'</span></a></li>':'';shareHtml+=_this.core.s.pinterest?'<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.pinterestDropdownText+'</span></a></li>':'';shareHtml+='</ul></span>';this.core.$outer.find('.lg-toolbar').append(shareHtml);this.core.$outer.find('.lg').append('<div id="lg-dropdown-overlay"></div>');$('#lg-share').on('click.lg',function(){_this.core.$outer.toggleClass('lg-dropdown-active')});$('#lg-dropdown-overlay').on('click.lg',function(){_this.core.$outer.removeClass('lg-dropdown-active')});_this.core.$el.on('onAfterSlide.lg.tm',function(event,prevIndex,index){setTimeout(function(){$('#lg-share-facebook').attr('href','https://www.facebook.com/sharer/sharer.php?u='+(encodeURIComponent(_this.getSahreProps(index,'facebookShareUrl')||window.location.href)));$('#lg-share-twitter').attr('href','https://twitter.com/intent/tweet?text='+_this.getSahreProps(index,'tweetText')+'&url='+(encodeURIComponent(_this.getSahreProps(index,'twitterShareUrl')||window.location.href)));$('#lg-share-googleplus').attr('href','https://plus.google.com/share?url='+(encodeURIComponent(_this.getSahreProps(index,'googleplusShareUrl')||window.location.href)));$('#lg-share-pinterest').attr('href','http://www.pinterest.com/pin/create/button/?url='+(encodeURIComponent(_this.getSahreProps(index,'pinterestShareUrl')||window.location.href))+'&media='+encodeURIComponent(_this.getSahreProps(index,'src'))+'&description='+_this.getSahreProps(index,'pinterestText'))},100)})};Share.prototype.getSahreProps=function(index,prop){var shareProp='';if(this.core.s.dynamic){shareProp=this.core.s.dynamicEl[index][prop]}else{var _href=this.core.$items.eq(index).attr('href');var _prop=this.core.$items.eq(index).data(prop);shareProp=prop==='src'?_href||_prop:_prop}
return shareProp};Share.prototype.destroy=function(){};$.fn.lightGallery.modules.share=Share})()}));!function(a,b){function c(a){throw new Error("Pagination: "+a)}function d(a){a.dataSource||c('"dataSource" is required.'),"string"==typeof a.dataSource?void 0===a.totalNumberLocator?void 0===a.totalNumber?c('"totalNumber" is required.'):b.isNumeric(a.totalNumber)||c('"totalNumber" is incorrect. (Number)'):b.isFunction(a.totalNumberLocator)||c('"totalNumberLocator" should be a Function.'):i.isObject(a.dataSource)&&(void 0===a.locator?c('"dataSource" is an Object, please specify "locator".'):"string"==typeof a.locator||b.isFunction(a.locator)||c(a.locator+" is incorrect. (String | Function)")),void 0===a.formatResult||b.isFunction(a.formatResult)||c('"formatResult" should be a Function.')}function e(a){var c=["go","previous","next","disable","enable","refresh","show","hide","destroy"];b.each(c,function(b,c){a.off(h+c)}),a.data("pagination",{}),b(".paginationjs",a).remove()}function f(a,b){return("object"==(b=typeof a)?null==a&&"null"||Object.prototype.toString.call(a).slice(8,-1):b).toLowerCase()}void 0===b&&c("Pagination requires jQuery.");var g="pagination",h="__pagination-";b.fn.pagination&&(g="pagination2"),b.fn[g]=function(f){if(void 0===f)return this;var j=b(this),k=b.extend({},b.fn[g].defaults,f),l={initialize:function(){var a=this;if(j.data("pagination")||j.data("pagination",{}),!1!==a.callHook("beforeInit")){j.data("pagination").initialized&&b(".paginationjs",j).remove(),a.disabled=!!k.disabled;var c=a.model={pageRange:k.pageRange,pageSize:k.pageSize};a.parseDataSource(k.dataSource,function(b){a.isAsync=i.isString(b),i.isArray(b)&&(c.totalNumber=k.totalNumber=b.length),a.isDynamicTotalNumber=a.isAsync&&k.totalNumberLocator;var d=a.render(!0);k.className&&d.addClass(k.className),c.el=d,j["bottom"===k.position?"append":"prepend"](d),a.observer(),j.data("pagination").initialized=!0,a.callHook("afterInit",d)})}},render:function(a){var c=this,d=c.model,e=d.el||b('<div class="paginationjs"></div>'),f=!0!==a;c.callHook("beforeRender",f);var g=d.pageNumber||k.pageNumber,h=k.pageRange||0,i=c.getTotalPage(),j=g-h,l=g+h;return l>i&&(l=i,j=i-2*h,j=j<1?1:j),j<=1&&(j=1,l=Math.min(2*h+1,i)),e.html(c.generateHTML({currentPage:g,pageRange:h,rangeStart:j,rangeEnd:l})),k.hideWhenLessThanOnePage&&e[i<=1?"hide":"show"](),c.callHook("afterRender",f),e},generatePageNumbersHTML:function(a){var b,c=this,d=a.currentPage,e=c.getTotalPage(),f=a.rangeStart,g=a.rangeEnd,h="",i=k.pageLink,j=k.ellipsisText,l=k.classPrefix,m=k.activeClassName,n=k.disableClassName;if(null===k.pageRange){for(b=1;b<=e;b++)h+=b==d?'<li class="'+l+"-page J-paginationjs-page "+m+'" data-num="'+b+'"><a>'+b+"</a></li>":'<li class="'+l+'-page J-paginationjs-page" data-num="'+b+'"><a href="'+i+'">'+b+"</a></li>";return h}if(f<=3)for(b=1;b<f;b++)h+=b==d?'<li class="'+l+"-page J-paginationjs-page "+m+'" data-num="'+b+'"><a>'+b+"</a></li>":'<li class="'+l+'-page J-paginationjs-page" data-num="'+b+'"><a href="'+i+'">'+b+"</a></li>";else k.showFirstOnEllipsisShow&&(h+='<li class="'+l+"-page "+l+'-first J-paginationjs-page" data-num="1"><a href="'+i+'">1</a></li>'),h+='<li class="'+l+"-ellipsis "+n+'"><a>'+j+"</a></li>";for(b=f;b<=g;b++)h+=b==d?'<li class="'+l+"-page J-paginationjs-page "+m+'" data-num="'+b+'"><a>'+b+"</a></li>":'<li class="'+l+'-page J-paginationjs-page" data-num="'+b+'"><a href="'+i+'">'+b+"</a></li>";if(g>=e-2)for(b=g+1;b<=e;b++)h+='<li class="'+l+'-page J-paginationjs-page" data-num="'+b+'"><a href="'+i+'">'+b+"</a></li>";else h+='<li class="'+l+"-ellipsis "+n+'"><a>'+j+"</a></li>",k.showLastOnEllipsisShow&&(h+='<li class="'+l+"-page "+l+'-last J-paginationjs-page" data-num="'+e+'"><a href="'+i+'">'+e+"</a></li>");return h},generateHTML:function(a){var c,d=this,e=a.currentPage,f=d.getTotalPage(),g=d.getTotalNumber(),h=k.showPrevious,i=k.showNext,j=k.showPageNumbers,l=k.showNavigator,m=k.showGoInput,n=k.showGoButton,o=k.pageLink,p=k.prevText,q=k.nextText,r=k.goButtonText,s=k.classPrefix,t=k.disableClassName,u=k.ulClassName,v="",w='<input type="text" class="J-paginationjs-go-pagenumber">',x='<input type="button" class="J-paginationjs-go-button" value="'+r+'">',y=b.isFunction(k.formatNavigator)?k.formatNavigator(e,f,g):k.formatNavigator,z=b.isFunction(k.formatGoInput)?k.formatGoInput(w,e,f,g):k.formatGoInput,A=b.isFunction(k.formatGoButton)?k.formatGoButton(x,e,f,g):k.formatGoButton,B=b.isFunction(k.autoHidePrevious)?k.autoHidePrevious():k.autoHidePrevious,C=b.isFunction(k.autoHideNext)?k.autoHideNext():k.autoHideNext,D=b.isFunction(k.header)?k.header(e,f,g):k.header,E=b.isFunction(k.footer)?k.footer(e,f,g):k.footer;return D&&(c=d.replaceVariables(D,{currentPage:e,totalPage:f,totalNumber:g}),v+=c),(h||j||i)&&(v+='<div class="paginationjs-pages">',v+=u?'<ul class="'+u+'">':"<ul>",h&&(e<=1?B||(v+='<li class="'+s+"-prev "+t+'"><a>'+p+"</a></li>"):v+='<li class="'+s+'-prev J-paginationjs-previous" data-num="'+(e-1)+'" title="Previous page"><a href="'+o+'">'+p+"</a></li>"),j&&(v+=d.generatePageNumbersHTML(a)),i&&(e>=f?C||(v+='<li class="'+s+"-next "+t+'"><a>'+q+"</a></li>"):v+='<li class="'+s+'-next J-paginationjs-next" data-num="'+(e+1)+'" title="Next page"><a href="'+o+'">'+q+"</a></li>"),v+="</ul></div>"),l&&y&&(c=d.replaceVariables(y,{currentPage:e,totalPage:f,totalNumber:g}),v+='<div class="'+s+'-nav J-paginationjs-nav">'+c+"</div>"),m&&z&&(c=d.replaceVariables(z,{currentPage:e,totalPage:f,totalNumber:g,input:w}),v+='<div class="'+s+'-go-input">'+c+"</div>"),n&&A&&(c=d.replaceVariables(A,{currentPage:e,totalPage:f,totalNumber:g,button:x}),v+='<div class="'+s+'-go-button">'+c+"</div>"),E&&(c=d.replaceVariables(E,{currentPage:e,totalPage:f,totalNumber:g}),v+=c),v},findTotalNumberFromRemoteResponse:function(a){this.model.totalNumber=k.totalNumberLocator(a)},go:function(a,c){function d(a){if(!1===e.callHook("beforePaging",g))return!1;if(f.direction=void 0===f.pageNumber?0:g>f.pageNumber?1:-1,f.pageNumber=g,e.render(),e.disabled&&e.isAsync&&e.enable(),j.data("pagination").model=f,k.formatResult){var d=b.extend(!0,[],a);i.isArray(a=k.formatResult(d))||(a=d)}j.data("pagination").currentPageData=a,e.doCallback(a,c),e.callHook("afterPaging",g),1==g&&e.callHook("afterIsFirstPage"),g==e.getTotalPage()&&e.callHook("afterIsLastPage")}var e=this,f=e.model;if(!e.disabled){var g=a;if((g=parseInt(g))&&!(g<1)){var h=k.pageSize,l=e.getTotalNumber(),m=e.getTotalPage();if(!(l>0&&g>m)){if(!e.isAsync)return void d(e.getDataFragment(g));var n={},o=k.alias||{};n[o.pageSize?o.pageSize:"pageSize"]=h,n[o.pageNumber?o.pageNumber:"pageNumber"]=g;var p=b.isFunction(k.ajax)?k.ajax():k.ajax,q={type:"get",cache:!1,data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",async:!0};b.extend(!0,q,p),b.extend(q.data,n),q.url=k.dataSource,q.success=function(a){e.isDynamicTotalNumber?e.findTotalNumberFromRemoteResponse(a):e.model.totalNumber=k.totalNumber,d(e.filterDataByLocator(a))},q.error=function(a,b,c){k.formatAjaxError&&k.formatAjaxError(a,b,c),e.enable()},e.disable(),b.ajax(q)}}}},doCallback:function(a,c){var d=this,e=d.model;b.isFunction(c)?c(a,e):b.isFunction(k.callback)&&k.callback(a,e)},destroy:function(){!1!==this.callHook("beforeDestroy")&&(this.model.el.remove(),j.off(),b("#paginationjs-style").remove(),this.callHook("afterDestroy"))},previous:function(a){this.go(this.model.pageNumber-1,a)},next:function(a){this.go(this.model.pageNumber+1,a)},disable:function(){var a=this,b=a.isAsync?"async":"sync";!1!==a.callHook("beforeDisable",b)&&(a.disabled=!0,a.model.disabled=!0,a.callHook("afterDisable",b))},enable:function(){var a=this,b=a.isAsync?"async":"sync";!1!==a.callHook("beforeEnable",b)&&(a.disabled=!1,a.model.disabled=!1,a.callHook("afterEnable",b))},refresh:function(a){this.go(this.model.pageNumber,a)},show:function(){var a=this;a.model.el.is(":visible")||a.model.el.show()},hide:function(){var a=this;a.model.el.is(":visible")&&a.model.el.hide()},replaceVariables:function(a,b){var c;for(var d in b){var e=b[d],f=new RegExp("<%=\\s*"+d+"\\s*%>","img");c=(c||a).replace(f,e)}return c},getDataFragment:function(a){var b=k.pageSize,c=k.dataSource,d=this.getTotalNumber(),e=b*(a-1)+1,f=Math.min(a*b,d);return c.slice(e-1,f)},getTotalNumber:function(){return this.model.totalNumber||k.totalNumber||0},getTotalPage:function(){return Math.ceil(this.getTotalNumber()/k.pageSize)},getLocator:function(a){var d;return"string"==typeof a?d=a:b.isFunction(a)?d=a():c('"locator" is incorrect. (String | Function)'),d},filterDataByLocator:function(a){var d,e=this.getLocator(k.locator);if(i.isObject(a)){try{b.each(e.split("."),function(b,c){d=(d||a)[c]})}catch(a){}d?i.isArray(d)||c("dataSource."+e+" must be an Array."):c("dataSource."+e+" is undefined.")}return d||a},parseDataSource:function(a,d){var e=this;i.isObject(a)?d(k.dataSource=e.filterDataByLocator(a)):i.isArray(a)?d(k.dataSource=a):b.isFunction(a)?k.dataSource(function(a){i.isArray(a)||c('The parameter of "done" Function should be an Array.'),e.parseDataSource.call(e,a,d)}):"string"==typeof a?(/^https?|file:/.test(a)&&(k.ajaxDataType="jsonp"),d(a)):c('Unexpected type of "dataSource".')},callHook:function(c){var d,e=j.data("pagination"),f=Array.prototype.slice.apply(arguments);return f.shift(),k[c]&&b.isFunction(k[c])&&!1===k[c].apply(a,f)&&(d=!1),e.hooks&&e.hooks[c]&&b.each(e.hooks[c],function(b,c){!1===c.apply(a,f)&&(d=!1)}),!1!==d},observer:function(){var a=this,d=a.model.el;j.on(h+"go",function(d,e,f){(e=parseInt(b.trim(e)))&&(b.isNumeric(e)||c('"pageNumber" is incorrect. (Number)'),a.go(e,f))}),d.delegate(".J-paginationjs-page","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName)&&!d.hasClass(k.activeClassName))return!1!==a.callHook("beforePageOnClick",c,e)&&(a.go(e),a.callHook("afterPageOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-previous","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName))return!1!==a.callHook("beforePreviousOnClick",c,e)&&(a.go(e),a.callHook("afterPreviousOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-next","click",function(c){var d=b(c.currentTarget),e=b.trim(d.attr("data-num"));if(e&&!d.hasClass(k.disableClassName))return!1!==a.callHook("beforeNextOnClick",c,e)&&(a.go(e),a.callHook("afterNextOnClick",c,e),!!k.pageLink&&void 0)}),d.delegate(".J-paginationjs-go-button","click",function(c){var e=b(".J-paginationjs-go-pagenumber",d).val();if(!1===a.callHook("beforeGoButtonOnClick",c,e))return!1;j.trigger(h+"go",e),a.callHook("afterGoButtonOnClick",c,e)}),d.delegate(".J-paginationjs-go-pagenumber","keyup",function(c){if(13===c.which){var e=b(c.currentTarget).val();if(!1===a.callHook("beforeGoInputOnEnter",c,e))return!1;j.trigger(h+"go",e),b(".J-paginationjs-go-pagenumber",d).focus(),a.callHook("afterGoInputOnEnter",c,e)}}),j.on(h+"previous",function(b,c){a.previous(c)}),j.on(h+"next",function(b,c){a.next(c)}),j.on(h+"disable",function(){a.disable()}),j.on(h+"enable",function(){a.enable()}),j.on(h+"refresh",function(b,c){a.refresh(c)}),j.on(h+"show",function(){a.show()}),j.on(h+"hide",function(){a.hide()}),j.on(h+"destroy",function(){a.destroy()});var e=Math.max(a.getTotalPage(),1),f=k.pageNumber;a.isDynamicTotalNumber&&(f=1),k.triggerPagingOnInit&&j.trigger(h+"go",Math.min(f,e))}};if(j.data("pagination")&&!0===j.data("pagination").initialized){if(b.isNumeric(f))return j.trigger.call(this,h+"go",f,arguments[1]),this;if("string"==typeof f){var m=Array.prototype.slice.apply(arguments);switch(m[0]=h+m[0],f){case"previous":case"next":case"go":case"disable":case"enable":case"refresh":case"show":case"hide":case"destroy":j.trigger.apply(this,m);break;case"getSelectedPageNum":return j.data("pagination").model?j.data("pagination").model.pageNumber:j.data("pagination").attributes.pageNumber;case"getTotalPage":return Math.ceil(j.data("pagination").model.totalNumber/j.data("pagination").model.pageSize);case"getSelectedPageData":return j.data("pagination").currentPageData;case"isDisabled":return!0===j.data("pagination").model.disabled;default:c("Unknown action: "+f)}return this}e(j)}else i.isObject(f)||c("Illegal options");return d(k),l.initialize(),this},b.fn[g].defaults={totalNumber:0,pageNumber:1,pageSize:10,pageRange:2,showPrevious:!0,showNext:!0,showPageNumbers:!0,showNavigator:!1,showGoInput:!1,showGoButton:!1,pageLink:"",prevText:"&laquo;",nextText:"&raquo;",ellipsisText:"...",goButtonText:"Go",classPrefix:"paginationjs",activeClassName:"active",disableClassName:"disabled",inlineStyle:!0,formatNavigator:"<%= currentPage %> / <%= totalPage %>",formatGoInput:"<%= input %>",formatGoButton:"<%= button %>",position:"bottom",autoHidePrevious:!1,autoHideNext:!1,triggerPagingOnInit:!0,hideWhenLessThanOnePage:!1,showFirstOnEllipsisShow:!0,showLastOnEllipsisShow:!0,callback:function(){}},b.fn.addHook=function(a,d){arguments.length<2&&c("Missing argument."),b.isFunction(d)||c("callback must be a function.");var e=b(this),f=e.data("pagination");f||(e.data("pagination",{}),f=e.data("pagination")),!f.hooks&&(f.hooks={}),f.hooks[a]=f.hooks[a]||[],f.hooks[a].push(d)},b[g]=function(a,d){arguments.length<2&&c("Requires two parameters.");var e;if(e="string"!=typeof a&&a instanceof jQuery?a:b(a),e.length)return e.pagination(d),e};var i={};b.each(["Object","Array","String"],function(a,b){i["is"+b]=function(a){return f(a)===b.toLowerCase()}}),"function"==typeof define&&define.amd&&define(function(){return b})}(this,window.jQuery);(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{if(typeof module==='object'&&module.exports){module.exports=factory(require('jquery'))}else{factory(window.jQuery)}}}(function($){'use strict';$.fn.fileinputLocales={};$.fn.fileinputThemes={};String.prototype.setTokens=function(replacePairs){var str=this.toString(),key,re;for(key in replacePairs){if(replacePairs.hasOwnProperty(key)){re=new RegExp('\{'+key+'\}','g');str=str.replace(re,replacePairs[key])}}
return str};var $h,FileInput;$h={FRAMES:'.kv-preview-thumb',SORT_CSS:'file-sortable',INIT_FLAG:'init-',OBJECT_PARAMS:'<param name="controller" value="true" />\n'+'<param name="allowFullScreen" value="true" />\n'+'<param name="allowScriptAccess" value="always" />\n'+'<param name="autoPlay" value="false" />\n'+'<param name="autoStart" value="false" />\n'+'<param name="quality" value="high" />\n',DEFAULT_PREVIEW:'<div class="file-preview-other">\n'+'<span class="{previewFileIconClass}">{previewFileIcon}</span>\n'+'</div>',MODAL_ID:'kvFileinputModal',MODAL_EVENTS:['show','shown','hide','hidden','loaded'],logMessages:{ajaxError:'{status}: {error}. Error Details: {text}.',badDroppedFiles:'Error scanning dropped files!',badExifParser:'Error loading the piexif.js library. {details}',badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded '+'the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:'The browser does not support resumable or chunk uploads.',noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:'Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.'},objUrl:window.URL||window.webkitURL,now:function(){return new Date()},round:function(num){num=parseFloat(num);return isNaN(num)?0:Math.floor(Math.round(num))},getFileRelativePath:function(file){return String(file.relativePath||file.webkitRelativePath||$h.getFileName(file)||null)},getFileId:function(file,generateFileId){var relativePath=$h.getFileRelativePath(file);if(typeof generateFileId==='function'){return generateFileId(file)}
if(!file){return null}
if(!relativePath){return null}
return(file.size+'_'+relativePath.replace(/\s/img,'_'))},getFrameSelector:function(id,selector){selector=selector||'';return'[id="'+id+'"]'+selector},getZoomSelector:function(id,selector){selector=selector||'';return'[id="zoom-'+id+'"]'+selector},getFrameElement:function($element,id,selector){return $element.find($h.getFrameSelector(id,selector))},getZoomElement:function($element,id,selector){return $element.find($h.getZoomSelector(id,selector))},getElapsed:function(seconds){var delta=seconds,out='',result={},structure={year:31536000,month:2592000,week:604800,day:86400,hour:3600,minute:60,second:1};Object.keys(structure).forEach(function(key){result[key]=Math.floor(delta/structure[key]);delta-=result[key]*structure[key]});$.each(result,function(key,value){if(value>0){out+=(out?' ':'')+value+key.substring(0,1)}});return out},debounce:function(func,delay){var inDebounce;return function(){var args=arguments,context=this;clearTimeout(inDebounce);inDebounce=setTimeout(function(){func.apply(context,args)},delay)}},stopEvent:function(e){e.stopPropagation();e.preventDefault()},getFileName:function(file){return file?(file.fileName||file.name||''):''},createObjectURL:function(data){if($h.objUrl&&$h.objUrl.createObjectURL&&data){return $h.objUrl.createObjectURL(data)}
return''},revokeObjectURL:function(data){if($h.objUrl&&$h.objUrl.revokeObjectURL&&data){$h.objUrl.revokeObjectURL(data)}},compare:function(input,str,exact){return input!==undefined&&(exact?input===str:input.match(str))},isIE:function(ver){var div,status;if(navigator.appName!=='Microsoft Internet Explorer'){return!1}
if(ver===10){return new RegExp('msie\\s'+ver,'i').test(navigator.userAgent)}
div=document.createElement('div');div.innerHTML='<!--[if IE '+ver+']> <i></i> <![endif]-->';status=div.getElementsByTagName('i').length;document.body.appendChild(div);div.parentNode.removeChild(div);return status},canAssignFilesToInput:function(){var input=document.createElement('input');try{input.type='file';input.files=null;return!0}catch(err){return!1}},getDragDropFolders:function(items){var i,item,len=items?items.length:0,folders=0;if(len>0&&items[0].webkitGetAsEntry()){for(i=0;i<len;i++){item=items[i].webkitGetAsEntry();if(item&&item.isDirectory){folders++}}}
return folders},initModal:function($modal){var $body=$('body');if($body.length){$modal.appendTo($body)}},isFunction:function(v){return typeof v==='function'},isEmpty:function(value,trim){return value===undefined||value===null||(!$h.isFunction(value)&&(value.length===0||(trim&&$.trim(value)==='')))},isArray:function(a){return Array.isArray(a)||Object.prototype.toString.call(a)==='[object Array]'},ifSet:function(needle,haystack,def){def=def||'';return(haystack&&typeof haystack==='object'&&needle in haystack)?haystack[needle]:def},cleanArray:function(arr){if(!(arr instanceof Array)){arr=[]}
return arr.filter(function(e){return(e!==undefined&&e!==null)})},spliceArray:function(arr,index,reverseOrder){var i,j=0,out=[],newArr;if(!(arr instanceof Array)){return[]}
newArr=$.extend(!0,[],arr);if(reverseOrder){newArr.reverse()}
for(i=0;i<newArr.length;i++){if(i!==index){out[j]=newArr[i];j++}}
if(reverseOrder){out.reverse()}
return out},getNum:function(num,def){def=def||0;if(typeof num==='number'){return num}
if(typeof num==='string'){num=parseFloat(num)}
return isNaN(num)?def:num},hasFileAPISupport:function(){return!!(window.File&&window.FileReader)},hasDragDropSupport:function(){var div=document.createElement('div');return!$h.isIE(9)&&(div.draggable!==undefined||(div.ondragstart!==undefined&&div.ondrop!==undefined))},hasFileUploadSupport:function(){return $h.hasFileAPISupport()&&window.FormData},hasBlobSupport:function(){try{return!!window.Blob&&Boolean(new Blob())}catch(e){return!1}},hasArrayBufferViewSupport:function(){try{return new Blob([new Uint8Array(100)]).size===100}catch(e){return!1}},hasResumableUploadSupport:function(){return $h.hasFileUploadSupport()&&$h.hasBlobSupport()&&$h.hasArrayBufferViewSupport()&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice||!1)},dataURI2Blob:function(dataURI){var BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,canBlob=$h.hasBlobSupport(),byteStr,arrayBuffer,intArray,i,mimeStr,bb,canProceed=(canBlob||BlobBuilder)&&window.atob&&window.ArrayBuffer&&window.Uint8Array;if(!canProceed){return null}
if(dataURI.split(',')[0].indexOf('base64')>=0){byteStr=atob(dataURI.split(',')[1])}else{byteStr=decodeURIComponent(dataURI.split(',')[1])}
arrayBuffer=new ArrayBuffer(byteStr.length);intArray=new Uint8Array(arrayBuffer);for(i=0;i<byteStr.length;i+=1){intArray[i]=byteStr.charCodeAt(i)}
mimeStr=dataURI.split(',')[0].split(':')[1].split(';')[0];if(canBlob){return new Blob([$h.hasArrayBufferViewSupport()?intArray:arrayBuffer],{type:mimeStr})}
bb=new BlobBuilder();bb.append(arrayBuffer);return bb.getBlob(mimeStr)},arrayBuffer2String:function(buffer){if(window.TextDecoder){return new TextDecoder('utf-8').decode(buffer)}
var array=Array.prototype.slice.apply(new Uint8Array(buffer)),out='',i=0,len,c,char2,char3;len=array.length;while(i<len){c=array[i++];switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:out+=String.fromCharCode(c);break;case 12:case 13:char2=array[i++];out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));break;case 14:char2=array[i++];char3=array[i++];out+=String.fromCharCode(((c&0x0F)<<12)|((char2&0x3F)<<6)|((char3&0x3F)<<0));break}}
return out},isHtml:function(str){var a=document.createElement('div');a.innerHTML=str;for(var c=a.childNodes,i=c.length;i--;){if(c[i].nodeType===1){return!0}}
return!1},isSvg:function(str){return str.match(/^\s*<\?xml/i)&&(str.match(/<!DOCTYPE svg/i)||str.match(/<svg/i))},getMimeType:function(signature,contents,type){switch(signature){case 'ffd8ffe0':case 'ffd8ffe1':case 'ffd8ffe2':return'image/jpeg';case '89504E47':return'image/png';case '47494638':return'image/gif';case '49492a00':return'image/tiff';case '52494646':return'image/webp';case '66747970':return'video/3gp';case '4f676753':return'video/ogg';case '1a45dfa3':return'video/mkv';case '000001ba':case '000001b3':return'video/mpeg';case '3026b275':return'video/wmv';case '25504446':return'application/pdf';case '25215053':return'application/ps';case '504b0304':case '504b0506':case '504b0508':return'application/zip';case '377abcaf':return'application/7z';case '75737461':return'application/tar';case '7801730d':return'application/dmg';default:switch(signature.substring(0,6)){case '435753':return'application/x-shockwave-flash';case '494433':return'audio/mp3';case '425a68':return'application/bzip';default:switch(signature.substring(0,4)){case '424d':return'image/bmp';case 'fffb':return'audio/mp3';case '4d5a':return'application/exe';case '1f9d':case '1fa0':return'application/zip';case '1f8b':return'application/gzip';default:return contents&&!contents.match(/[^\u0000-\u007f]/)?'application/text-plain':type}}}},addCss:function($el,css){$el.removeClass(css).addClass(css)},getElement:function(options,param,value){return($h.isEmpty(options)||$h.isEmpty(options[param]))?value:$(options[param])},uniqId:function(){return Math.round(new Date().getTime())+'_'+Math.round(Math.random()*100)},htmlEncode:function(str,undefVal){if(str===undefined){return undefVal||null}
return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&apos;')},replaceTags:function(str,tags){var out=str;if(!tags){return out}
$.each(tags,function(key,value){if(typeof value==='function'){value=value()}
out=out.split(key).join(value)});return out},cleanMemory:function($thumb){var data=$thumb.is('img')?$thumb.attr('src'):$thumb.find('source').attr('src');$h.revokeObjectURL(data)},findFileName:function(filePath){var sepIndex=filePath.lastIndexOf('/');if(sepIndex===-1){sepIndex=filePath.lastIndexOf('\\')}
return filePath.split(filePath.substring(sepIndex,sepIndex+1)).pop()},checkFullScreen:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},toggleFullScreen:function(maximize){var doc=document,de=doc.documentElement;if(de&&maximize&&!$h.checkFullScreen()){if(de.requestFullscreen){de.requestFullscreen()}else{if(de.msRequestFullscreen){de.msRequestFullscreen()}else{if(de.mozRequestFullScreen){de.mozRequestFullScreen()}else{if(de.webkitRequestFullscreen){de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}}}}}else{if(doc.exitFullscreen){doc.exitFullscreen()}else{if(doc.msExitFullscreen){doc.msExitFullscreen()}else{if(doc.mozCancelFullScreen){doc.mozCancelFullScreen()}else{if(doc.webkitExitFullscreen){doc.webkitExitFullscreen()}}}}}},moveArray:function(arr,oldIndex,newIndex,reverseOrder){var newArr=$.extend(!0,[],arr);if(reverseOrder){newArr.reverse()}
if(newIndex>=newArr.length){var k=newIndex-newArr.length;while((k--)+1){newArr.push(undefined)}}
newArr.splice(newIndex,0,newArr.splice(oldIndex,1)[0]);if(reverseOrder){newArr.reverse()}
return newArr},cleanZoomCache:function($el){var $cache=$el.closest('.kv-zoom-cache-theme');if(!$cache.length){$cache=$el.closest('.kv-zoom-cache')}
$cache.remove()},closeButton:function(css){css=css?'close '+css:'close';return'<button type="button" class="'+css+'" aria-label="Close">\n'+'  <span aria-hidden="true">&times;</span>\n'+'</button>'},getRotation:function(value){switch(value){case 2:return'rotateY(180deg)';case 3:return'rotate(180deg)';case 4:return'rotate(180deg) rotateY(180deg)';case 5:return'rotate(270deg) rotateY(180deg)';case 6:return'rotate(90deg)';case 7:return'rotate(90deg) rotateY(180deg)';case 8:return'rotate(270deg)';default:return''}},setTransform:function(el,val){if(!el){return}
el.style.transform=val;el.style.webkitTransform=val;el.style['-moz-transform']=val;el.style['-ms-transform']=val;el.style['-o-transform']=val}};FileInput=function(element,options){var self=this;self.$element=$(element);self.$parent=self.$element.parent();if(!self._validate()){return}
self.isPreviewable=$h.hasFileAPISupport();self.isIE9=$h.isIE(9);self.isIE10=$h.isIE(10);if(self.isPreviewable||self.isIE9){self._init(options);self._listen()}
self.$element.removeClass('file-loading')};FileInput.prototype={constructor:FileInput,_cleanup:function(){var self=this;self.reader=null;self.clearFileStack();self.fileBatchCompleted=!0;self.isError=!1;self.cancelling=!1;self.paused=!1;self.lastProgress=0;self._initAjax()},_initAjax:function(){var self=this;self.ajaxQueue=[];self.ajaxRequests=[];self.ajaxQueueIntervalId=null;self.ajaxCurrentThreads=0;self.ajaxAborted=!1},_init:function(options,refreshMode){var self=this,f,$el=self.$element,$cont,t,tmp;self.options=options;$.each(options,function(key,value){switch(key){case 'minFileCount':case 'maxFileCount':case 'maxTotalFileCount':case 'minFileSize':case 'maxFileSize':case 'maxFilePreviewSize':case 'resizeImageQuality':case 'resizeIfSizeMoreThan':case 'progressUploadThreshold':case 'initialPreviewCount':case 'zoomModalHeight':case 'minImageHeight':case 'maxImageHeight':case 'minImageWidth':case 'maxImageWidth':self[key]=$h.getNum(value);break;default:self[key]=value;break}});if(self.maxTotalFileCount>0&&self.maxTotalFileCount<self.maxFileCount){self.maxTotalFileCount=self.maxFileCount}
if(self.rtl){tmp=self.previewZoomButtonIcons.prev;self.previewZoomButtonIcons.prev=self.previewZoomButtonIcons.next;self.previewZoomButtonIcons.next=tmp}
if(!isNaN(self.maxAjaxThreads)&&self.maxAjaxThreads<self.resumableUploadOptions.maxThreads){self.resumableUploadOptions.maxThreads=self.maxAjaxThreads}
self._initFileManager();if(typeof self.autoOrientImage==='function'){self.autoOrientImage=self.autoOrientImage()}
if(typeof self.autoOrientImageInitial==='function'){self.autoOrientImageInitial=self.autoOrientImageInitial()}
if(!refreshMode){self._cleanup()}
self.$form=$el.closest('form');self._initTemplateDefaults();self.uploadFileAttr=!$h.isEmpty($el.attr('name'))?$el.attr('name'):'file_data';t=self._getLayoutTemplate('progress');self.progressTemplate=t.replace('{class}',self.progressClass);self.progressInfoTemplate=t.replace('{class}',self.progressInfoClass);self.progressPauseTemplate=t.replace('{class}',self.progressPauseClass);self.progressCompleteTemplate=t.replace('{class}',self.progressCompleteClass);self.progressErrorTemplate=t.replace('{class}',self.progressErrorClass);self.isDisabled=$el.attr('disabled')||$el.attr('readonly');if(self.isDisabled){$el.attr('disabled',!0)}
self.isClickable=self.browseOnZoneClick&&self.showPreview&&(self.dropZoneEnabled||!$h.isEmpty(self.defaultPreviewContent));self.isAjaxUpload=$h.hasFileUploadSupport()&&!$h.isEmpty(self.uploadUrl);self.dropZoneEnabled=$h.hasDragDropSupport()&&self.dropZoneEnabled;if(!self.isAjaxUpload){self.dropZoneEnabled=self.dropZoneEnabled&&$h.canAssignFilesToInput()}
self.slug=typeof options.slugCallback==='function'?options.slugCallback:self._slugDefault;self.mainTemplate=self.showCaption?self._getLayoutTemplate('main1'):self._getLayoutTemplate('main2');self.captionTemplate=self._getLayoutTemplate('caption');self.previewGenericTemplate=self._getPreviewTemplate('generic');if(!self.imageCanvas&&self.resizeImage&&(self.maxImageWidth||self.maxImageHeight)){self.imageCanvas=document.createElement('canvas');self.imageCanvasContext=self.imageCanvas.getContext('2d')}
if($h.isEmpty($el.attr('id'))){$el.attr('id',$h.uniqId())}
self.namespace='.fileinput_'+$el.attr('id').replace(/-/g,'_');if(self.$container===undefined){self.$container=self._createContainer()}else{self._refreshContainer()}
$cont=self.$container;self.$dropZone=$cont.find('.file-drop-zone');self.$progress=$cont.find('.kv-upload-progress');self.$btnUpload=$cont.find('.fileinput-upload');self.$captionContainer=$h.getElement(options,'elCaptionContainer',$cont.find('.file-caption'));self.$caption=$h.getElement(options,'elCaptionText',$cont.find('.file-caption-name'));if(!$h.isEmpty(self.msgPlaceholder)){f=$el.attr('multiple')?self.filePlural:self.fileSingle;self.$caption.attr('placeholder',self.msgPlaceholder.replace('{files}',f))}
self.$captionIcon=self.$captionContainer.find('.file-caption-icon');self.$previewContainer=$h.getElement(options,'elPreviewContainer',$cont.find('.file-preview'));self.$preview=$h.getElement(options,'elPreviewImage',$cont.find('.file-preview-thumbnails'));self.$previewStatus=$h.getElement(options,'elPreviewStatus',$cont.find('.file-preview-status'));self.$errorContainer=$h.getElement(options,'elErrorContainer',self.$previewContainer.find('.kv-fileinput-error'));self._validateDisabled();if(!$h.isEmpty(self.msgErrorClass)){$h.addCss(self.$errorContainer,self.msgErrorClass)}
if(!refreshMode){self.$errorContainer.hide();self.previewInitId='thumb-'+$el.attr('id');self._initPreviewCache();self._initPreview(!0);self._initPreviewActions();if(self.$parent.hasClass('file-loading')){self.$container.insertBefore(self.$parent);self.$parent.remove()}}else{if(!self._errorsExist()){self.$errorContainer.hide()}}
self._setFileDropZoneTitle();if($el.attr('disabled')){self.disable()}
self._initZoom();if(self.hideThumbnailContent){$h.addCss(self.$preview,'hide-content')}},_initFileManager:function(){var self=this;self.fileManager={stack:{},processed:[],errors:[],loadedImages:{},totalImages:0,totalFiles:null,totalSize:null,uploadedSize:0,stats:{},initStats:function(id){var data={started:$h.now().getTime()};if(id){self.fileManager.stats[id]=data}else{self.fileManager.stats=data}},getUploadStats:function(id,loaded,total){var fm=self.fileManager,started=id?fm.stats[id]&&fm.stats[id].started||null:null;if(!started){started=$h.now().getTime()}
var elapsed=($h.now().getTime()-started)/1000,speeds=['B/s','KB/s','MB/s','GB/s','TB/s','PB/s','EB/s','ZB/s','YB/s'],bps=elapsed?loaded/elapsed:0,bitrate=self._getSize(bps,speeds),pendingBytes=total-loaded,out={fileId:id,started:started,elapsed:elapsed,loaded:loaded,total:total,bps:bps,bitrate:bitrate,pendingBytes:pendingBytes};if(id){fm.stats[id]=out}else{fm.stats=out}
return out},exists:function(id){return $.inArray(id,self.fileManager.getIdList())!==-1},count:function(){return self.fileManager.getIdList().length},total:function(){var fm=self.fileManager;if(!fm.totalFiles){fm.totalFiles=fm.count()}
return fm.totalFiles},getTotalSize:function(){var fm=self.fileManager;if(fm.totalSize){return fm.totalSize}
fm.totalSize=0;$.each(self.fileManager.stack,function(id,f){var size=parseFloat(f.size);fm.totalSize+=isNaN(size)?0:size});return fm.totalSize},add:function(file,id){if(!id){id=self.fileManager.getId(file)}
if(!id){return}
self.fileManager.stack[id]={file:file,name:$h.getFileName(file),relativePath:$h.getFileRelativePath(file),size:file.size,nameFmt:self._getFileName(file,''),sizeFmt:self._getSize(file.size)}},remove:function($thumb){var id=$thumb.attr('data-fileid');if(id){self.fileManager.removeFile(id)}},removeFile:function(id){delete self.fileManager.stack[id];delete self.fileManager.loadedImages[id]},move:function(idFrom,idTo){var result={},stack=self.fileManager.stack;if(!idFrom&&!idTo||idFrom===idTo){return}
$.each(stack,function(k,v){if(k!==idFrom){result[k]=v}
if(k===idTo){result[idFrom]=stack[idFrom]}});self.fileManager.stack=result},list:function(){var files=[];$.each(self.fileManager.stack,function(k,v){if(v&&v.file){files.push(v.file)}});return files},isPending:function(id){return $.inArray(id,self.fileManager.processed)===-1&&self.fileManager.exists(id)},isProcessed:function(){var processed=!0,fm=self.fileManager;$.each(fm.stack,function(id){if(fm.isPending(id)){processed=!1}});return processed},clear:function(){var fm=self.fileManager;fm.totalFiles=null;fm.totalSize=null;fm.uploadedSize=0;fm.stack={};fm.errors=[];fm.processed=[];fm.stats={};fm.clearImages()},clearImages:function(){self.fileManager.loadedImages={};self.fileManager.totalImages=0},addImage:function(id,config){self.fileManager.loadedImages[id]=config},removeImage:function(id){delete self.fileManager.loadedImages[id]},getImageIdList:function(){return Object.keys(self.fileManager.loadedImages)},getImageCount:function(){return self.fileManager.getImageIdList().length},getId:function(file){return self._getFileId(file)},getIndex:function(id){return self.fileManager.getIdList().indexOf(id)},getThumb:function(id){var $thumb=null;self._getThumbs().each(function(){var $t=$(this);if($t.attr('data-fileid')===id){$thumb=$t}});return $thumb},getThumbIndex:function($thumb){var id=$thumb.attr('data-fileid');return self.fileManager.getIndex(id)},getIdList:function(){return Object.keys(self.fileManager.stack)},getFile:function(id){return self.fileManager.stack[id]||null},getFileName:function(id,fmt){var file=self.fileManager.getFile(id);if(!file){return''}
return fmt?(file.nameFmt||''):file.name||''},getFirstFile:function(){var ids=self.fileManager.getIdList(),id=ids&&ids.length?ids[0]:null;return self.fileManager.getFile(id)},setFile:function(id,file){if(self.fileManager.getFile(id)){self.fileManager.stack[id].file=file}else{self.fileManager.add(file,id)}},setProcessed:function(id){self.fileManager.processed.push(id)},getProgress:function(){var total=self.fileManager.total(),processed=self.fileManager.processed.length;if(!total){return 0}
return Math.ceil(processed/total*100)},setProgress:function(id,pct){var f=self.fileManager.getFile(id);if(!isNaN(pct)&&f){f.progress=pct}}}},_setUploadData:function(fd,config){var self=this;$.each(config,function(key,value){var param=self.uploadParamNames[key]||key;if($h.isArray(value)){fd.append(param,value[0],value[1])}else{fd.append(param,value)}})},_initResumableUpload:function(){var self=this,opts=self.resumableUploadOptions,logs=$h.logMessages;if(!self.enableResumableUpload){return}
if(opts.fallback!==!1&&typeof opts.fallback!=='function'){opts.fallback=function(s){s._log(logs.noResumableSupport);s.enableResumableUpload=!1}}
if(!$h.hasResumableUploadSupport()&&opts.fallback!==!1){opts.fallback(self);return}
if(!self.uploadUrl&&self.enableResumableUpload){self._log(logs.noUploadUrl);self.enableResumableUpload=!1;return}
opts.chunkSize=parseFloat(opts.chunkSize);if(opts.chunkSize<=0||isNaN(opts.chunkSize)){self._log(logs.invalidChunkSize,{chunkSize:opts.chunkSize});self.enableResumableUpload=!1;return}
self.resumableManager={init:function(id,f,index){var rm=self.resumableManager,fm=self.fileManager;rm.currThreads=0;rm.logs=[];rm.stack=[];rm.error='';rm.chunkIntervalId=null;rm.id=id;rm.file=f.file;rm.fileName=f.name;rm.fileIndex=index;rm.completed=!1;rm.testing=!1;rm.lastProgress=0;if(self.showPreview){rm.$thumb=fm.getThumb(id)||null;rm.$progress=rm.$btnDelete=null;if(rm.$thumb&&rm.$thumb.length){rm.$progress=rm.$thumb.find('.file-thumb-progress');rm.$btnDelete=rm.$thumb.find('.kv-file-remove')}}
rm.chunkSize=self.resumableUploadOptions.chunkSize*1024;rm.chunkCount=rm.getTotalChunks()},logAjaxError:function(jqXHR,textStatus,errorThrown){if(self.resumableUploadOptions.showErrorLog){self._log(logs.ajaxError,{status:jqXHR.status,error:errorThrown,text:jqXHR.responseText||''})}},reset:function(){var rm=self.resumableManager;rm.processed={}},setProcessed:function(status){var rm=self.resumableManager,fm=self.fileManager,id=rm.id,msg,$thumb=rm.$thumb,$prog=rm.$progress,hasThumb=$thumb&&$thumb.length,params={id:hasThumb?$thumb.attr('id'):'',index:fm.getIndex(id),fileId:id};rm.completed=!0;rm.lastProgress=0;fm.uploadedSize+=rm.file.size;if(hasThumb){$thumb.removeClass('file-uploading')}
if(status==='success'){if(self.showPreview){self._setProgress(101,$prog);self._setThumbStatus($thumb,'Success');self._initUploadSuccess(rm.processed[id].data,$thumb)}
self.fileManager.removeFile(id);delete rm.processed[id];self._raise('fileuploaded',[params.id,params.index,params.fileId]);if(fm.isProcessed()){self._setProgress(101)}}else{if(self.showPreview){self._setThumbStatus($thumb,'Error');self._setPreviewError($thumb,!0);self._setProgress(101,$prog,self.msgProgressError);self._setProgress(101,self.$progress,self.msgProgressError);self.cancelling=!0}
if(!self.$errorContainer.find('li[data-file-id="'+params.fileId+'"]').length){msg=self.msgResumableUploadRetriesExceeded.setTokens({file:rm.fileName,max:self.resumableUploadOptions.maxRetries,error:rm.error});self._showFileError(msg,params)}}
if(fm.isProcessed()){rm.reset()}},check:function(){var rm=self.resumableManager,status=!0;$.each(rm.logs,function(index,value){if(!value){status=!1;return!1}});if(status){clearInterval(rm.chunkIntervalId);rm.setProcessed('success')}},processedResumables:function(){var logs=self.resumableManager.logs,i,count=0;if(!logs||!logs.length){return 0}
for(i=0;i<logs.length;i++){if(logs[i]===!0){count++}}
return count},getUploadedSize:function(){var rm=self.resumableManager,size=rm.processedResumables()*rm.chunkSize;return size>rm.file.size?rm.file.size:size},getTotalChunks:function(){var rm=self.resumableManager,chunkSize=parseFloat(rm.chunkSize);if(!isNaN(chunkSize)&&chunkSize>0){return Math.ceil(rm.file.size/chunkSize)}
return 0},getProgress:function(){var rm=self.resumableManager,processed=rm.processedResumables(),total=rm.chunkCount;if(total===0){return 0}
return Math.ceil(processed/total*100)},checkAborted:function(intervalId){if(self.paused||self.cancelling){clearInterval(intervalId);self.unlock()}},upload:function(){var rm=self.resumableManager,fm=self.fileManager,ids=fm.getIdList(),flag='new',intervalId;intervalId=setInterval(function(){var id;rm.checkAborted(intervalId);if(flag==='new'){self.lock();flag='processing';id=ids.shift();fm.initStats(id);if(fm.stack[id]){rm.init(id,fm.stack[id],fm.getIndex(id));rm.testUpload();rm.uploadResumable()}}
if(!fm.isPending(id)&&rm.completed){flag='new'}
if(fm.isProcessed()){var $initThumbs=self.$preview.find('.file-preview-initial');if($initThumbs.length){$h.addCss($initThumbs,$h.SORT_CSS);self._initSortable()}
clearInterval(intervalId);self._clearFileInput();self.unlock();setTimeout(function(){var data=self.previewCache.data;if(data){self.initialPreview=data.content;self.initialPreviewConfig=data.config;self.initialPreviewThumbTags=data.tags}
self._raise('filebatchuploadcomplete',[self.initialPreview,self.initialPreviewConfig,self.initialPreviewThumbTags,self._getExtraData()])},self.processDelay)}},self.processDelay)},uploadResumable:function(){var i,rm=self.resumableManager,total=rm.chunkCount;for(i=0;i<total;i++){rm.logs[i]=!!(rm.processed[rm.id]&&rm.processed[rm.id][i])}
for(i=0;i<total;i++){rm.pushAjax(i,0)}
rm.chunkIntervalId=setInterval(rm.loopAjax,self.queueDelay)},testUpload:function(){var rm=self.resumableManager,opts=self.resumableUploadOptions,fd,f,fm=self.fileManager,id=rm.id,fnBefore,fnSuccess,fnError,fnComplete,outData;if(!opts.testUrl){rm.testing=!1;return}
rm.testing=!0;fd=new FormData();f=fm.stack[id];self._setUploadData(fd,{fileId:id,fileName:f.fileName,fileSize:f.size,fileRelativePath:f.relativePath,chunkSize:rm.chunkSize,chunkCount:rm.chunkCount});fnBefore=function(jqXHR){outData=self._getOutData(fd,jqXHR);self._raise('filetestbeforesend',[id,fm,rm,outData])};fnSuccess=function(data,textStatus,jqXHR){outData=self._getOutData(fd,jqXHR,data);var pNames=self.uploadParamNames,chunksUploaded=pNames.chunksUploaded||'chunksUploaded',params=[id,fm,rm,outData];if(!data[chunksUploaded]||!$h.isArray(data[chunksUploaded])){self._raise('filetesterror',params)}else{if(!rm.processed[id]){rm.processed[id]={}}
$.each(data[chunksUploaded],function(key,index){rm.logs[index]=!0;rm.processed[id][index]=!0});rm.processed[id].data=data;self._raise('filetestsuccess',params)}
rm.testing=!1};fnError=function(jqXHR,textStatus,errorThrown){outData=self._getOutData(fd,jqXHR);self._raise('filetestajaxerror',[id,fm,rm,outData]);rm.logAjaxError(jqXHR,textStatus,errorThrown);rm.testing=!1};fnComplete=function(){self._raise('filetestcomplete',[id,fm,rm,self._getOutData(fd)]);rm.testing=!1};self._ajaxSubmit(fnBefore,fnSuccess,fnComplete,fnError,fd,id,rm.fileIndex,opts.testUrl)},pushAjax:function(index,retry){self.resumableManager.stack.push([index,retry])},sendAjax:function(index,retry){var fm=self.fileManager,rm=self.resumableManager,opts=self.resumableUploadOptions,f,chunkSize=rm.chunkSize,id=rm.id,file=rm.file,$thumb=rm.$thumb,$btnDelete=rm.$btnDelete;if(rm.processed[id]&&rm.processed[id][index]){return}
rm.currThreads++;if(retry>opts.maxRetries){rm.setProcessed('error');return}
var fd,outData,fnBefore,fnSuccess,fnError,fnComplete,slice=file.slice?'slice':(file.mozSlice?'mozSlice':(file.webkitSlice?'webkitSlice':'slice')),blob=file[slice](chunkSize*index,chunkSize*(index+1));fd=new FormData();f=fm.stack[id];self._setUploadData(fd,{chunkCount:rm.chunkCount,chunkIndex:index,chunkSize:chunkSize,chunkSizeStart:chunkSize*index,fileBlob:[blob,rm.fileName],fileId:id,fileName:rm.fileName,fileRelativePath:f.relativePath,fileSize:file.size,retryCount:retry});if(rm.$progress&&rm.$progress.length){rm.$progress.show()}
fnBefore=function(jqXHR){outData=self._getOutData(fd,jqXHR);if(self.showPreview){if(!$thumb.hasClass('file-preview-success')){self._setThumbStatus($thumb,'Loading');$h.addCss($thumb,'file-uploading')}
$btnDelete.attr('disabled',!0)}
self._raise('filechunkbeforesend',[id,index,retry,fm,rm,outData])};fnSuccess=function(data,textStatus,jqXHR){outData=self._getOutData(fd,jqXHR,data);var paramNames=self.uploadParamNames,chunkIndex=paramNames.chunkIndex||'chunkIndex',opts=self.resumableUploadOptions,params=[id,index,retry,fm,rm,outData];rm.currThreads--;if(data.error){if(opts.showErrorLog){self._log(logs.retryStatus,{retry:retry+1,filename:rm.fileName,chunk:index})}
rm.pushAjax(index,retry+1);rm.error=data.error;self._raise('filechunkerror',params)}else{rm.logs[data[chunkIndex]]=!0;if(!rm.processed[id]){rm.processed[id]={}}
rm.processed[id][data[chunkIndex]]=!0;rm.processed[id].data=data;self._raise('filechunksuccess',params);rm.check()}};fnError=function(jqXHR,textStatus,errorThrown){outData=self._getOutData(fd,jqXHR);rm.currThreads--;rm.error=errorThrown;rm.logAjaxError(jqXHR,textStatus,errorThrown);self._raise('filechunkajaxerror',[id,index,retry,fm,rm,outData]);rm.pushAjax(index,retry+1)};fnComplete=function(){self._raise('filechunkcomplete',[id,index,retry,fm,rm,self._getOutData(fd)])};self._ajaxSubmit(fnBefore,fnSuccess,fnComplete,fnError,fd,id,rm.fileIndex)},loopAjax:function(){var rm=self.resumableManager;if(rm.currThreads<self.resumableUploadOptions.maxThreads&&!rm.testing){var arr=rm.stack.shift(),index;if(typeof arr!=='undefined'){index=arr[0];if(!rm.processed[rm.id]||!rm.processed[rm.id][index]){rm.sendAjax(index,arr[1])}else{if(rm.processedResumables()>=rm.getTotalChunks()){rm.setProcessed('success');clearInterval(rm.chunkIntervalId)}}}}}};self.resumableManager.reset()},_initTemplateDefaults:function(){var self=this,tMain1,tMain2,tPreview,tFileIcon,tClose,tCaption,tBtnDefault,tBtnLink,tBtnBrowse,tModalMain,tModal,tProgress,tSize,tFooter,tActions,tActionDelete,tActionUpload,tActionDownload,tActionZoom,tActionDrag,tIndicator,tTagBef,tTagBef1,tTagBef2,tTagAft,tGeneric,tHtml,tImage,tText,tOffice,tGdocs,tVideo,tAudio,tFlash,tObject,tPdf,tOther,tStyle,tZoomCache,vDefaultDim,tStats;tMain1='{preview}\n'+'<div class="kv-upload-progress kv-hidden"></div><div class="clearfix"></div>\n'+'<div class="input-group {class}">\n'+'  {caption}\n'+'<div class="input-group-btn input-group-append">\n'+'      {remove}\n'+'      {cancel}\n'+'      {pause}\n'+'      {upload}\n'+'      {browse}\n'+'    </div>\n'+'</div>';tMain2='{preview}\n<div class="kv-upload-progress kv-hidden"></div>\n<div class="clearfix"></div>\n'+'{remove}\n{cancel}\n{upload}\n{browse}\n';tPreview='<div class="file-preview {class}">\n'+'  {close}'+'  <div class="{dropClass} clearfix">\n'+'    <div class="file-preview-thumbnails clearfix">\n'+'    </div>\n'+'    <div class="file-preview-status text-center text-success"></div>\n'+'    <div class="kv-fileinput-error"></div>\n'+'  </div>\n'+'</div>';tClose=$h.closeButton('fileinput-remove');tFileIcon='<i class="glyphicon glyphicon-file"></i>';tCaption='<div class="file-caption form-control {class}" tabindex="500">\n'+'  <span class="file-caption-icon"></span>\n'+'  <input class="file-caption-name" onkeydown="return false;" onpaste="return false;">\n'+'</div>';tBtnDefault='<button type="{type}" tabindex="500" title="{title}" class="{css}" '+'{status}>{icon} {label}</button>';tBtnLink='<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>';tBtnBrowse='<div tabindex="500" class="{css}" {status}>{icon} {label}</div>';tModalMain='<div id="'+$h.MODAL_ID+'" class="file-zoom-dialog modal fade" '+'tabindex="-1" aria-labelledby="'+$h.MODAL_ID+'Label"></div>';tModal='<div class="modal-dialog modal-lg{rtl}" role="document">\n'+'  <div class="modal-content">\n'+'    <div class="modal-header">\n'+'      <h5 class="modal-title">{heading}</h5>\n'+'      <span class="kv-zoom-title"></span>\n'+'      <div class="kv-zoom-actions">{toggleheader}{fullscreen}{borderless}{close}</div>\n'+'    </div>\n'+'    <div class="modal-body">\n'+'      <div class="floating-buttons"></div>\n'+'      <div class="kv-zoom-body file-zoom-content {zoomFrameClass}"></div>\n'+'{prev} {next}\n'+'    </div>\n'+'  </div>\n'+'</div>\n';tProgress='<div class="progress">\n'+'    <div class="{class}" role="progressbar"'+' aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n'+'        {status}\n'+'     </div>\n'+'</div>{stats}';tStats='<div class="text-info file-upload-stats">'+'<span class="pending-time">{pendingTime}</span> '+'<span class="upload-speed">{uploadSpeed}</span>'+'</div>';tSize=' <samp>({sizeText})</samp>';tFooter='<div class="file-thumbnail-footer">\n'+'    <div class="file-footer-caption" title="{caption}">\n'+'        <div class="file-caption-info">{caption}</div>\n'+'        <div class="file-size-info">{size}</div>\n'+'    </div>\n'+'    {progress}\n{indicator}\n{actions}\n'+'</div>';tActions='<div class="file-actions">\n'+'    <div class="file-footer-buttons">\n'+'        {download} {upload} {delete} {zoom} {other}'+'    </div>\n'+'</div>\n'+'{drag}\n'+'<div class="clearfix"></div>';tActionDelete='<button type="button" class="kv-file-remove {removeClass}" '+'title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n';tActionUpload='<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">'+'{uploadIcon}</button>';tActionDownload='<a class="kv-file-download {downloadClass}" title="{downloadTitle}" '+'href="{downloadUrl}" download="{caption}" target="_blank">{downloadIcon}</a>';tActionZoom='<button type="button" class="kv-file-zoom {zoomClass}" '+'title="{zoomTitle}">{zoomIcon}</button>';tActionDrag='<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>';tIndicator='<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>';tTagBef='<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}"'+' data-fileid="{fileid}" data-template="{template}"';tTagBef1=tTagBef+'><div class="kv-file-content">\n';tTagBef2=tTagBef+' title="{caption}"><div class="kv-file-content">\n';tTagAft='</div>{footer}\n</div>\n';tGeneric='{content}\n';tStyle=' {style}';tHtml='<div class="kv-preview-data file-preview-html" title="{caption}"'+tStyle+'>{data}</div>\n';tImage='<img src="{data}" class="file-preview-image kv-preview-data" title="{title}" '+'alt="{alt}"'+tStyle+'>\n';tText='<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly'+tStyle+'>'+'{data}</textarea>\n';tOffice='<iframe class="kv-preview-data file-preview-office" '+'src="https://view.officeapps.live.com/op/embed.aspx?src={data}"'+tStyle+'></iframe>';tGdocs='<iframe class="kv-preview-data file-preview-gdocs" '+'src="https://docs.google.com/gview?url={data}&embedded=true"'+tStyle+'></iframe>';tVideo='<video class="kv-preview-data file-preview-video" controls'+tStyle+'>\n'+'<source src="{data}" type="{type}">\n'+$h.DEFAULT_PREVIEW+'\n</video>\n';tAudio='<!--suppress ALL --><audio class="kv-preview-data file-preview-audio" controls'+tStyle+'>\n<source src="{data}" '+'type="{type}">\n'+$h.DEFAULT_PREVIEW+'\n</audio>\n';tFlash='<embed class="kv-preview-data file-preview-flash" src="{data}" type="application/x-shockwave-flash"'+tStyle+'>\n';tPdf='<embed class="kv-preview-data file-preview-pdf" src="{data}" type="application/pdf"'+tStyle+'>\n';tObject='<object class="kv-preview-data file-preview-object file-object {typeCss}" '+'data="{data}" type="{type}"'+tStyle+'>\n'+'<param name="movie" value="{caption}" />\n'+$h.OBJECT_PARAMS+' '+$h.DEFAULT_PREVIEW+'\n</object>\n';tOther='<div class="kv-preview-data file-preview-other-frame"'+tStyle+'>\n'+$h.DEFAULT_PREVIEW+'\n</div>\n';tZoomCache='<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>';vDefaultDim={width:'100%',height:'100%','min-height':'480px'};if(self._isPdfRendered()){tPdf=self.pdfRendererTemplate.replace('{renderer}',self._encodeURI(self.pdfRendererUrl))}
self.defaults={layoutTemplates:{main1:tMain1,main2:tMain2,preview:tPreview,close:tClose,fileIcon:tFileIcon,caption:tCaption,modalMain:tModalMain,modal:tModal,progress:tProgress,stats:tStats,size:tSize,footer:tFooter,indicator:tIndicator,actions:tActions,actionDelete:tActionDelete,actionUpload:tActionUpload,actionDownload:tActionDownload,actionZoom:tActionZoom,actionDrag:tActionDrag,btnDefault:tBtnDefault,btnLink:tBtnLink,btnBrowse:tBtnBrowse,zoomCache:tZoomCache},previewMarkupTags:{tagBefore1:tTagBef1,tagBefore2:tTagBef2,tagAfter:tTagAft},previewContentTemplates:{generic:tGeneric,html:tHtml,image:tImage,text:tText,office:tOffice,gdocs:tGdocs,video:tVideo,audio:tAudio,flash:tFlash,object:tObject,pdf:tPdf,other:tOther},allowedPreviewTypes:['image','html','text','video','audio','flash','pdf','object'],previewTemplates:{},previewSettings:{image:{width:'auto',height:'auto','max-width':'100%','max-height':'100%'},html:{width:'213px',height:'160px'},text:{width:'213px',height:'160px'},office:{width:'213px',height:'160px'},gdocs:{width:'213px',height:'160px'},video:{width:'213px',height:'160px'},audio:{width:'100%',height:'30px'},flash:{width:'213px',height:'160px'},object:{width:'213px',height:'160px'},pdf:{width:'100%',height:'160px'},other:{width:'213px',height:'160px'}},previewSettingsSmall:{image:{width:'auto',height:'auto','max-width':'100%','max-height':'100%'},html:{width:'100%',height:'160px'},text:{width:'100%',height:'160px'},office:{width:'100%',height:'160px'},gdocs:{width:'100%',height:'160px'},video:{width:'100%',height:'auto'},audio:{width:'100%',height:'30px'},flash:{width:'100%',height:'auto'},object:{width:'100%',height:'auto'},pdf:{width:'100%',height:'160px'},other:{width:'100%',height:'160px'}},previewZoomSettings:{image:{width:'auto',height:'auto','max-width':'100%','max-height':'100%'},html:vDefaultDim,text:vDefaultDim,office:{width:'100%',height:'100%','max-width':'100%','min-height':'480px'},gdocs:{width:'100%',height:'100%','max-width':'100%','min-height':'480px'},video:{width:'auto',height:'100%','max-width':'100%'},audio:{width:'100%',height:'30px'},flash:{width:'auto',height:'480px'},object:{width:'auto',height:'100%','max-width':'100%','min-height':'480px'},pdf:vDefaultDim,other:{width:'auto',height:'100%','min-height':'480px'}},mimeTypeAliases:{'video/quicktime':'video/mp4'},fileTypeSettings:{image:function(vType,vName){return($h.compare(vType,'image.*')&&!$h.compare(vType,/(tiff?|wmf)$/i)||$h.compare(vName,/\.(gif|png|jpe?g)$/i))},html:function(vType,vName){return $h.compare(vType,'text/html')||$h.compare(vName,/\.(htm|html)$/i)},office:function(vType,vName){return $h.compare(vType,/(word|excel|powerpoint|office)$/i)||$h.compare(vName,/\.(docx?|xlsx?|pptx?|pps|potx?)$/i)},gdocs:function(vType,vName){return $h.compare(vType,/(word|excel|powerpoint|office|iwork-pages|tiff?)$/i)||$h.compare(vName,/\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)},text:function(vType,vName){return $h.compare(vType,'text.*')||$h.compare(vName,/\.(xml|javascript)$/i)||$h.compare(vName,/\.(txt|md|csv|nfo|ini|json|php|js|css)$/i)},video:function(vType,vName){return $h.compare(vType,'video.*')&&($h.compare(vType,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||$h.compare(vName,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(vType,vName){return $h.compare(vType,'audio.*')&&($h.compare(vName,/(ogg|mp3|mp?g|wav)$/i)||$h.compare(vName,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(vType,vName){return $h.compare(vType,'application/x-shockwave-flash',!0)||$h.compare(vName,/\.(swf)$/i)},pdf:function(vType,vName){return $h.compare(vType,'application/pdf',!0)||$h.compare(vName,/\.(pdf)$/i)},object:function(){return!0},other:function(){return!0}},fileActionSettings:{showRemove:!0,showUpload:!0,showDownload:!0,showZoom:!0,showDrag:!0,removeIcon:'<i class="glyphicon glyphicon-trash"></i>',removeClass:'btn btn-sm btn-kv btn-default btn-outline-secondary',removeErrorClass:'btn btn-sm btn-kv btn-danger',removeTitle:'Remove file',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',uploadClass:'btn btn-sm btn-kv btn-default btn-outline-secondary',uploadTitle:'Upload file',uploadRetryIcon:'<i class="glyphicon glyphicon-repeat"></i>',uploadRetryTitle:'Retry upload',downloadIcon:'<i class="glyphicon glyphicon-download"></i>',downloadClass:'btn btn-sm btn-kv btn-default btn-outline-secondary',downloadTitle:'Download file',zoomIcon:'<i class="glyphicon glyphicon-zoom-in"></i>',zoomClass:'btn btn-sm btn-kv btn-default btn-outline-secondary',zoomTitle:'View Details',dragIcon:'<i class="glyphicon glyphicon-move"></i>',dragClass:'text-info',dragTitle:'Move / Rearrange',dragSettings:{},indicatorNew:'<i class="glyphicon glyphicon-plus-sign text-warning"></i>',indicatorSuccess:'<i class="glyphicon glyphicon-ok-sign text-success"></i>',indicatorError:'<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',indicatorLoading:'<i class="glyphicon glyphicon-hourglass text-muted"></i>',indicatorPaused:'<i class="glyphicon glyphicon-pause text-primary"></i>',indicatorNewTitle:'Not uploaded yet',indicatorSuccessTitle:'Uploaded',indicatorErrorTitle:'Upload Error',indicatorLoadingTitle:'Uploading ...',indicatorPausedTitle:'Upload Paused'}};$.each(self.defaults,function(key,setting){if(key==='allowedPreviewTypes'){if(self.allowedPreviewTypes===undefined){self.allowedPreviewTypes=setting}
return}
self[key]=$.extend(!0,{},setting,self[key])});self._initPreviewTemplates()},_initPreviewTemplates:function(){var self=this,tags=self.previewMarkupTags,tagBef,tagAft=tags.tagAfter;$.each(self.previewContentTemplates,function(key,value){if($h.isEmpty(self.previewTemplates[key])){tagBef=tags.tagBefore2;if(key==='generic'||key==='image'||key==='html'||key==='text'){tagBef=tags.tagBefore1}
if(self._isPdfRendered()&&key==='pdf'){tagBef=tagBef.replace('kv-file-content','kv-file-content kv-pdf-rendered')}
self.previewTemplates[key]=tagBef+value+tagAft}})},_initPreviewCache:function(){var self=this;self.previewCache={data:{},init:function(){var content=self.initialPreview;if(content.length>0&&!$h.isArray(content)){content=content.split(self.initialPreviewDelimiter)}
self.previewCache.data={content:content,config:self.initialPreviewConfig,tags:self.initialPreviewThumbTags}},count:function(skipNull){if(!self.previewCache.data||!self.previewCache.data.content){return 0}
if(skipNull){var chk=self.previewCache.data.content.filter(function(n){return n!==null});return chk.length}
return self.previewCache.data.content.length},get:function(i,isDisabled){var ind=$h.INIT_FLAG+i,data=self.previewCache.data,config=data.config[i],content=data.content[i],out,$tmp,cat,ftr,fname,ftype,frameClass,asData=$h.ifSet('previewAsData',config,self.initialPreviewAsData),a=config?{title:config.title||null,alt:config.alt||null}:{title:null,alt:null},parseTemplate=function(cat,dat,fname,ftype,ftr,ind,fclass,t){var fc=' file-preview-initial '+$h.SORT_CSS+(fclass?' '+fclass:''),id=self.previewInitId+'-'+ind,fileId=config&&config.fileId||id;return self._generatePreviewTemplate(cat,dat,fname,ftype,id,fileId,!1,null,fc,ftr,ind,t,a,config&&config.zoomData||dat)};if(!content||!content.length){return''}
isDisabled=isDisabled===undefined?!0:isDisabled;cat=$h.ifSet('type',config,self.initialPreviewFileType||'generic');fname=$h.ifSet('filename',config,$h.ifSet('caption',config));ftype=$h.ifSet('filetype',config,cat);ftr=self.previewCache.footer(i,isDisabled,(config&&config.size||null));frameClass=$h.ifSet('frameClass',config);if(asData){out=parseTemplate(cat,content,fname,ftype,ftr,ind,frameClass)}else{out=parseTemplate('generic',content,fname,ftype,ftr,ind,frameClass,cat).setTokens({'content':data.content[i]})}
if(data.tags.length&&data.tags[i]){out=$h.replaceTags(out,data.tags[i])}
if(!$h.isEmpty(config)&&!$h.isEmpty(config.frameAttr)){$tmp=$(document.createElement('div')).html(out);$tmp.find('.file-preview-initial').attr(config.frameAttr);out=$tmp.html();$tmp.remove()}
return out},clean:function(data){data.content=$h.cleanArray(data.content);data.config=$h.cleanArray(data.config);data.tags=$h.cleanArray(data.tags);self.previewCache.data=data},add:function(content,config,tags,append){var data=self.previewCache.data,index;if(!content||!content.length){return 0}
index=content.length-1;if(!$h.isArray(content)){content=content.split(self.initialPreviewDelimiter)}
if(append){index=data.content.push(content[0])-1;data.config[index]=config;data.tags[index]=tags}else{data.content=content;data.config=config;data.tags=tags}
self.previewCache.clean(data);return index},set:function(content,config,tags,append){var data=self.previewCache.data,i,chk;if(!content||!content.length){return}
if(!$h.isArray(content)){content=content.split(self.initialPreviewDelimiter)}
chk=content.filter(function(n){return n!==null});if(!chk.length){return}
if(data.content===undefined){data.content=[]}
if(data.config===undefined){data.config=[]}
if(data.tags===undefined){data.tags=[]}
if(append){for(i=0;i<content.length;i++){if(content[i]){data.content.push(content[i])}}
for(i=0;i<config.length;i++){if(config[i]){data.config.push(config[i])}}
for(i=0;i<tags.length;i++){if(tags[i]){data.tags.push(tags[i])}}}else{data.content=content;data.config=config;data.tags=tags}
self.previewCache.clean(data)},unset:function(index){var chk=self.previewCache.count(),rev=self.reversePreviewOrder;if(!chk){return}
if(chk===1){self.previewCache.data.content=[];self.previewCache.data.config=[];self.previewCache.data.tags=[];self.initialPreview=[];self.initialPreviewConfig=[];self.initialPreviewThumbTags=[];return}
self.previewCache.data.content=$h.spliceArray(self.previewCache.data.content,index,rev);self.previewCache.data.config=$h.spliceArray(self.previewCache.data.config,index,rev);self.previewCache.data.tags=$h.spliceArray(self.previewCache.data.tags,index,rev);var data=$.extend(!0,{},self.previewCache.data);self.previewCache.clean(data)},out:function(){var html='',caption,len=self.previewCache.count(),i,content;if(len===0){return{content:'',caption:''}}
for(i=0;i<len;i++){content=self.previewCache.get(i);html=self.reversePreviewOrder?(content+html):(html+content)}
caption=self._getMsgSelected(len);return{content:html,caption:caption}},footer:function(i,isDisabled,size){var data=self.previewCache.data||{};if($h.isEmpty(data.content)){return''}
if($h.isEmpty(data.config)||$h.isEmpty(data.config[i])){data.config[i]={}}
isDisabled=isDisabled===undefined?!0:isDisabled;var config=data.config[i],caption=$h.ifSet('caption',config),a,width=$h.ifSet('width',config,'auto'),url=$h.ifSet('url',config,!1),key=$h.ifSet('key',config,null),fileId=$h.ifSet('fileId',config,null),fs=self.fileActionSettings,initPreviewShowDel=self.initialPreviewShowDelete||!1,downloadInitialUrl=!self.initialPreviewDownloadUrl?'':self.initialPreviewDownloadUrl+'?key='+key+(fileId?'&fileId='+fileId:''),dUrl=config.downloadUrl||downloadInitialUrl,dFil=config.filename||config.caption||'',initPreviewShowDwl=!!(dUrl),sDel=$h.ifSet('showRemove',config,$h.ifSet('showRemove',fs,initPreviewShowDel)),sDwl=$h.ifSet('showDownload',config,$h.ifSet('showDownload',fs,initPreviewShowDwl)),sZm=$h.ifSet('showZoom',config,$h.ifSet('showZoom',fs,!0)),sDrg=$h.ifSet('showDrag',config,$h.ifSet('showDrag',fs,!0)),dis=(url===!1)&&isDisabled;sDwl=sDwl&&config.downloadUrl!==!1&&!!dUrl;a=self._renderFileActions(config,!1,sDwl,sDel,sZm,sDrg,dis,url,key,!0,dUrl,dFil);return self._getLayoutTemplate('footer').setTokens({'progress':self._renderThumbProgress(),'actions':a,'caption':caption,'size':self._getSize(size),'width':width,'indicator':''})}};self.previewCache.init()},_isPdfRendered:function(){var self=this,useLib=self.usePdfRenderer,flag=typeof useLib==='function'?useLib():!!useLib;return flag&&self.pdfRendererUrl},_handler:function($el,event,callback){var self=this,ns=self.namespace,ev=event.split(' ').join(ns+' ')+ns;if(!$el||!$el.length){return}
$el.off(ev).on(ev,callback)},_encodeURI:function(vUrl){var self=this;return self.encodeUrl?encodeURI(vUrl):vUrl},_log:function(msg,tokens){var self=this,id=self.$element.attr('id');if(!self.showConsoleLogs){return}
if(id){msg='"'+id+'": '+msg}
msg='bootstrap-fileinput: '+msg;if(typeof tokens==='object'){msg=msg.setTokens(tokens)}
if(window.console&&typeof window.console.log!=='undefined'){window.console.log(msg)}else{window.alert(msg)}},_validate:function(){var self=this,status=self.$element.attr('type')==='file';if(!status){self._log($h.logMessages.badInputType)}
return status},_errorsExist:function(){var self=this,$err,$errList=self.$errorContainer.find('li');if($errList.length){return!0}
$err=$(document.createElement('div')).html(self.$errorContainer.html());$err.find('.kv-error-close').remove();$err.find('ul').remove();return!!$.trim($err.text()).length},_errorHandler:function(evt,caption){var self=this,err=evt.target.error,showError=function(msg){self._showError(msg.replace('{name}',caption))};if(err.code===err.NOT_FOUND_ERR){showError(self.msgFileNotFound)}else{if(err.code===err.SECURITY_ERR){showError(self.msgFileSecured)}else{if(err.code===err.NOT_READABLE_ERR){showError(self.msgFileNotReadable)}else{if(err.code===err.ABORT_ERR){showError(self.msgFilePreviewAborted)}else{showError(self.msgFilePreviewError)}}}}},_addError:function(msg){var self=this,$error=self.$errorContainer;if(msg&&$error.length){$error.html(self.errorCloseButton+msg);self._handler($error.find('.kv-error-close'),'click',function(){setTimeout(function(){if(self.showPreview&&!self.getFrames().length){self.clear()}
$error.fadeOut('slow')},self.processDelay)})}},_setValidationError:function(css){var self=this;css=(css?css+' ':'')+'has-error';self.$container.removeClass(css).addClass('has-error');$h.addCss(self.$captionContainer,'is-invalid')},_resetErrors:function(fade){var self=this,$error=self.$errorContainer;self.isError=!1;self.$container.removeClass('has-error');self.$captionContainer.removeClass('is-invalid');$error.html('');if(fade){$error.fadeOut('slow')}else{$error.hide()}},_showFolderError:function(folders){var self=this,$error=self.$errorContainer,msg;if(!folders){return}
if(!self.isAjaxUpload){self._clearFileInput()}
msg=self.msgFoldersNotAllowed.replace('{n}',folders);self._addError(msg);self._setValidationError();$error.fadeIn(800);self._raise('filefoldererror',[folders,msg])},_showFileError:function(msg,params,event){var self=this,$error=self.$errorContainer,ev=event||'fileuploaderror',fId=params&&params.fileId||'',e=params&&params.id?'<li data-thumb-id="'+params.id+'" data-file-id="'+fId+'">'+msg+'</li>':'<li>'+msg+'</li>';if($error.find('ul').length===0){self._addError('<ul>'+e+'</ul>')}else{$error.find('ul').append(e)}
$error.fadeIn(800);self._raise(ev,[params,msg]);self._setValidationError('file-input-new');return!0},_showError:function(msg,params,event){var self=this,$error=self.$errorContainer,ev=event||'fileerror';params=params||{};params.reader=self.reader;self._addError(msg);$error.fadeIn(800);self._raise(ev,[params,msg]);if(!self.isAjaxUpload){self._clearFileInput()}
self._setValidationError('file-input-new');self.$btnUpload.attr('disabled',!0);return!0},_noFilesError:function(params){var self=this,label=self.minFileCount>1?self.filePlural:self.fileSingle,msg=self.msgFilesTooLess.replace('{n}',self.minFileCount).replace('{files}',label),$error=self.$errorContainer;self._addError(msg);self.isError=!0;self._updateFileDetails(0);$error.fadeIn(800);self._raise('fileerror',[params,msg]);self._clearFileInput();self._setValidationError()},_parseError:function(operation,jqXHR,errorThrown,fileName){var self=this,errMsg=$.trim(errorThrown+''),textPre,text=jqXHR.responseJSON!==undefined&&jqXHR.responseJSON.error!==undefined?jqXHR.responseJSON.error:jqXHR.responseText;if(self.cancelling&&self.msgUploadAborted){errMsg=self.msgUploadAborted}
if(self.showAjaxErrorDetails&&text){text=$.trim(text.replace(/\n\s*\n/g,'\n'));textPre=text.length?'<pre>'+text+'</pre>':'';errMsg+=errMsg?textPre:text}
if(!errMsg){errMsg=self.msgAjaxError.replace('{operation}',operation)}
self.cancelling=!1;return fileName?'<b>'+fileName+': </b>'+errMsg:errMsg},_parseFileType:function(type,name){var self=this,isValid,vType,cat,i,types=self.allowedPreviewTypes||[];if(type==='application/text-plain'){return'text'}
for(i=0;i<types.length;i++){cat=types[i];isValid=self.fileTypeSettings[cat];vType=isValid(type,name)?cat:'';if(!$h.isEmpty(vType)){return vType}}
return'other'},_getPreviewIcon:function(fname){var self=this,ext,out=null;if(fname&&fname.indexOf('.')>-1){ext=fname.split('.').pop();if(self.previewFileIconSettings){out=self.previewFileIconSettings[ext]||self.previewFileIconSettings[ext.toLowerCase()]||null}
if(self.previewFileExtSettings){$.each(self.previewFileExtSettings,function(key,func){if(self.previewFileIconSettings[key]&&func(ext)){out=self.previewFileIconSettings[key];return}})}}
return out||self.previewFileIcon},_parseFilePreviewIcon:function(content,fname){var self=this,icn=self._getPreviewIcon(fname),out=content;if(out.indexOf('{previewFileIcon}')>-1){out=out.setTokens({'previewFileIconClass':self.previewFileIconClass,'previewFileIcon':icn})}
return out},_raise:function(event,params){var self=this,e=$.Event(event);if(params!==undefined){self.$element.trigger(e,params)}else{self.$element.trigger(e)}
if(e.isDefaultPrevented()||e.result===!1){return!1}
switch(event){case 'filebatchuploadcomplete':case 'filebatchuploadsuccess':case 'fileuploaded':case 'fileclear':case 'filecleared':case 'filereset':case 'fileerror':case 'filefoldererror':case 'fileuploaderror':case 'filebatchuploaderror':case 'filedeleteerror':case 'filecustomerror':case 'filesuccessremove':break;default:if(!self.ajaxAborted){self.ajaxAborted=e.result}
break}
return!0},_listenFullScreen:function(isFullScreen){var self=this,$modal=self.$modal,$btnFull,$btnBord;if(!$modal||!$modal.length){return}
$btnFull=$modal&&$modal.find('.btn-fullscreen');$btnBord=$modal&&$modal.find('.btn-borderless');if(!$btnFull.length||!$btnBord.length){return}
$btnFull.removeClass('active').attr('aria-pressed','false');$btnBord.removeClass('active').attr('aria-pressed','false');if(isFullScreen){$btnFull.addClass('active').attr('aria-pressed','true')}else{$btnBord.addClass('active').attr('aria-pressed','true')}
if($modal.hasClass('file-zoom-fullscreen')){self._maximizeZoomDialog()}else{if(isFullScreen){self._maximizeZoomDialog()}else{$btnBord.removeClass('active').attr('aria-pressed','false')}}},_listen:function(){var self=this,$el=self.$element,$form=self.$form,$cont=self.$container,fullScreenEvents;self._handler($el,'click',function(e){if($el.hasClass('file-no-browse')){if($el.data('zoneClicked')){$el.data('zoneClicked',!1)}else{e.preventDefault()}}});self._handler($el,'change',$.proxy(self._change,self));if(self.showBrowse){self._handler(self.$btnFile,'click',$.proxy(self._browse,self))}
self._handler($cont.find('.fileinput-remove:not([disabled])'),'click',$.proxy(self.clear,self));self._handler($cont.find('.fileinput-cancel'),'click',$.proxy(self.cancel,self));self._handler($cont.find('.fileinput-pause'),'click',$.proxy(self.pause,self));self._initDragDrop();self._handler($form,'reset',$.proxy(self.clear,self));if(!self.isAjaxUpload){self._handler($form,'submit',$.proxy(self._submitForm,self))}
self._handler(self.$container.find('.fileinput-upload'),'click',$.proxy(self._uploadClick,self));self._handler($(window),'resize',function(){self._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)});fullScreenEvents='webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';self._handler($(document),fullScreenEvents,function(){self._listenFullScreen($h.checkFullScreen())});self._autoFitContent();self._initClickable();self._refreshPreview()},_autoFitContent:function(){var width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,self=this,config=width<400?(self.previewSettingsSmall||self.defaults.previewSettingsSmall):(self.previewSettings||self.defaults.previewSettings),sel;$.each(config,function(cat,settings){sel='.file-preview-frame .file-preview-'+cat;self.$preview.find(sel+'.kv-preview-data,'+sel+' .kv-preview-data').css(settings)})},_scanDroppedItems:function(item,files,path){path=path||'';var self=this,i,dirReader,readDir,errorHandler=function(e){self._log($h.logMessages.badDroppedFiles);self._log(e)};if(item.isFile){item.file(function(file){files.push(file)},errorHandler)}else{if(item.isDirectory){dirReader=item.createReader();readDir=function(){dirReader.readEntries(function(entries){if(entries&&entries.length>0){for(i=0;i<entries.length;i++){self._scanDroppedItems(entries[i],files,path+item.name+'/')}
readDir()}
return null},errorHandler)};readDir()}}},_initDragDrop:function(){var self=this,$zone=self.$dropZone;if(self.dropZoneEnabled&&self.showPreview){self._handler($zone,'dragenter dragover',$.proxy(self._zoneDragEnter,self));self._handler($zone,'dragleave',$.proxy(self._zoneDragLeave,self));self._handler($zone,'drop',$.proxy(self._zoneDrop,self));self._handler($(document),'dragenter dragover drop',self._zoneDragDropInit)}},_zoneDragDropInit:function(e){e.stopPropagation();e.preventDefault()},_zoneDragEnter:function(e){var self=this,dataTransfer=e.originalEvent.dataTransfer,hasFiles=$.inArray('Files',dataTransfer.types)>-1;self._zoneDragDropInit(e);if(self.isDisabled||!hasFiles){e.originalEvent.dataTransfer.effectAllowed='none';e.originalEvent.dataTransfer.dropEffect='none';return}
if(self._raise('fileDragEnter',{'sourceEvent':e,'files':dataTransfer.types.Files})){$h.addCss(self.$dropZone,'file-highlighted')}},_zoneDragLeave:function(e){var self=this;self._zoneDragDropInit(e);if(self.isDisabled){return}
if(self._raise('fileDragLeave',{'sourceEvent':e})){self.$dropZone.removeClass('file-highlighted')}},_zoneDrop:function(e){var self=this,i,$el=self.$element,dataTransfer=e.originalEvent.dataTransfer,files=dataTransfer.files,items=dataTransfer.items,folders=$h.getDragDropFolders(items),processFiles=function(){if(!self.isAjaxUpload){self.changeTriggered=!0;$el.get(0).files=files;setTimeout(function(){self.changeTriggered=!1;$el.trigger('change'+self.namespace)},self.processDelay)}else{self._change(e,files)}
self.$dropZone.removeClass('file-highlighted')};e.preventDefault();if(self.isDisabled||$h.isEmpty(files)){return}
if(!self._raise('fileDragDrop',{'sourceEvent':e,'files':files})){return}
if(folders>0){if(!self.isAjaxUpload){self._showFolderError(folders);return}
files=[];for(i=0;i<items.length;i++){var item=items[i].webkitGetAsEntry();if(item){self._scanDroppedItems(item,files)}}
setTimeout(function(){processFiles()},500)}else{processFiles()}},_uploadClick:function(e){var self=this,$btn=self.$container.find('.fileinput-upload'),$form,isEnabled=!$btn.hasClass('disabled')&&$h.isEmpty($btn.attr('disabled'));if(e&&e.isDefaultPrevented()){return}
if(!self.isAjaxUpload){if(isEnabled&&$btn.attr('type')!=='submit'){$form=$btn.closest('form');if($form.length){$form.trigger('submit')}
e.preventDefault()}
return}
e.preventDefault();if(isEnabled){self.upload()}},_submitForm:function(){var self=this;return self._isFileSelectionValid()&&!self._abort({})},_clearPreview:function(){var self=this,$thumbs=self.showUploadedThumbs?self.getFrames(':not(.file-preview-success)'):self.getFrames();$thumbs.each(function(){var $thumb=$(this),id=$thumb.attr('id'),$zoom=self._getZoom(id);$thumb.remove();$h.cleanZoomCache($zoom)});if(!self.getFrames().length||!self.showPreview){self._resetUpload()}
self._validateDefaultPreview()},_initSortable:function(){var self=this,$el=self.$preview,settings,selector='.'+$h.SORT_CSS,rev=self.reversePreviewOrder;if(!window.KvSortable||$el.find(selector).length===0){return}
settings={handle:'.drag-handle-init',dataIdAttr:'data-preview-id',scroll:!1,draggable:selector,onSort:function(e){var oldIndex=e.oldIndex,newIndex=e.newIndex,i=0;self.initialPreview=$h.moveArray(self.initialPreview,oldIndex,newIndex,rev);self.initialPreviewConfig=$h.moveArray(self.initialPreviewConfig,oldIndex,newIndex,rev);self.previewCache.init();self.getFrames('.file-preview-initial').each(function(){$(this).attr('data-fileindex',$h.INIT_FLAG+i);i++});self._raise('filesorted',{previewId:$(e.item).attr('id'),'oldIndex':oldIndex,'newIndex':newIndex,stack:self.initialPreviewConfig})}};if($el.data('kvsortable')){$el.kvsortable('destroy')}
$.extend(!0,settings,self.fileActionSettings.dragSettings);$el.kvsortable(settings)},_setPreviewContent:function(content){var self=this;self.$preview.html(content);self._autoFitContent()},_initPreviewImageOrientations:function(){var self=this,i=0;if(!self.autoOrientImageInitial){return}
self.getFrames('.file-preview-initial').each(function(){var $thumb=$(this),$img,$zoomImg,id,config=self.initialPreviewConfig[i];if(config&&config.exif&&config.exif.Orientation){id=$thumb.attr('id');$img=$thumb.find('>.kv-file-content img');$zoomImg=self._getZoom(id,' >.kv-file-content img');self.setImageOrientation($img,$zoomImg,config.exif.Orientation,$thumb)}
i++})},_initPreview:function(isInit){var self=this,cap=self.initialCaption||'',out;if(!self.previewCache.count(!0)){self._clearPreview();if(isInit){self._setCaption(cap)}else{self._initCaption()}
return}
out=self.previewCache.out();cap=isInit&&self.initialCaption?self.initialCaption:out.caption;self._setPreviewContent(out.content);self._setInitThumbAttr();self._setCaption(cap);self._initSortable();if(!$h.isEmpty(out.content)){self.$container.removeClass('file-input-new')}
self._initPreviewImageOrientations()},_getZoomButton:function(type){var self=this,label=self.previewZoomButtonIcons[type],css=self.previewZoomButtonClasses[type],title=' title="'+(self.previewZoomButtonTitles[type]||'')+'" ',params=title+(type==='close'?' data-dismiss="modal" aria-hidden="true"':'');if(type==='fullscreen'||type==='borderless'||type==='toggleheader'){params+=' data-toggle="button" aria-pressed="false" autocomplete="off"'}
return'<button type="button" class="'+css+' btn-'+type+'"'+params+'>'+label+'</button>'},_getModalContent:function(){var self=this;return self._getLayoutTemplate('modal').setTokens({'rtl':self.rtl?' kv-rtl':'','zoomFrameClass':self.frameClass,'heading':self.msgZoomModalHeading,'prev':self._getZoomButton('prev'),'next':self._getZoomButton('next'),'toggleheader':self._getZoomButton('toggleheader'),'fullscreen':self._getZoomButton('fullscreen'),'borderless':self._getZoomButton('borderless'),'close':self._getZoomButton('close')})},_listenModalEvent:function(event){var self=this,$modal=self.$modal,getParams=function(e){return{sourceEvent:e,previewId:$modal.data('previewId'),modal:$modal}};$modal.on(event+'.bs.modal',function(e){var $btnFull=$modal.find('.btn-fullscreen'),$btnBord=$modal.find('.btn-borderless');self._raise('filezoom'+event,getParams(e));if(event==='shown'){$btnBord.removeClass('active').attr('aria-pressed','false');$btnFull.removeClass('active').attr('aria-pressed','false');if($modal.hasClass('file-zoom-fullscreen')){self._maximizeZoomDialog();if($h.checkFullScreen()){$btnFull.addClass('active').attr('aria-pressed','true')}else{$btnBord.addClass('active').attr('aria-pressed','true')}}}})},_initZoom:function(){var self=this,$dialog,modalMain=self._getLayoutTemplate('modalMain'),modalId='#'+$h.MODAL_ID;if(!self.showPreview){return}
self.$modal=$(modalId);if(!self.$modal||!self.$modal.length){$dialog=$(document.createElement('div')).html(modalMain).insertAfter(self.$container);self.$modal=$(modalId).insertBefore($dialog);$dialog.remove()}
$h.initModal(self.$modal);self.$modal.html(self._getModalContent());$.each($h.MODAL_EVENTS,function(key,event){self._listenModalEvent(event)})},_initZoomButtons:function(){var self=this,previewId=self.$modal.data('previewId')||'',$first,$last,thumbs=self.getFrames().toArray(),len=thumbs.length,$prev=self.$modal.find('.btn-prev'),$next=self.$modal.find('.btn-next');if(thumbs.length<2){$prev.hide();$next.hide();return}else{$prev.show();$next.show()}
if(!len){return}
$first=$(thumbs[0]);$last=$(thumbs[len-1]);$prev.removeAttr('disabled');$next.removeAttr('disabled');if($first.length&&$first.attr('id')===previewId){$prev.attr('disabled',!0)}
if($last.length&&$last.attr('id')===previewId){$next.attr('disabled',!0)}},_maximizeZoomDialog:function(){var self=this,$modal=self.$modal,$head=$modal.find('.modal-header:visible'),$foot=$modal.find('.modal-footer:visible'),$body=$modal.find('.modal-body'),h=$(window).height(),diff=0;$modal.addClass('file-zoom-fullscreen');if($head&&$head.length){h-=$head.outerHeight(!0)}
if($foot&&$foot.length){h-=$foot.outerHeight(!0)}
if($body&&$body.length){diff=$body.outerHeight(!0)-$body.height();h-=diff}
$modal.find('.kv-zoom-body').height(h)},_resizeZoomDialog:function(fullScreen){var self=this,$modal=self.$modal,$btnFull=$modal.find('.btn-fullscreen'),$btnBord=$modal.find('.btn-borderless');if($modal.hasClass('file-zoom-fullscreen')){$h.toggleFullScreen(!1);if(!fullScreen){if(!$btnFull.hasClass('active')){$modal.removeClass('file-zoom-fullscreen');self.$modal.find('.kv-zoom-body').css('height',self.zoomModalHeight)}else{$btnFull.removeClass('active').attr('aria-pressed','false')}}else{if(!$btnFull.hasClass('active')){$modal.removeClass('file-zoom-fullscreen');self._resizeZoomDialog(!0);if($btnBord.hasClass('active')){$btnBord.removeClass('active').attr('aria-pressed','false')}}}}else{if(!fullScreen){self._maximizeZoomDialog();return}
$h.toggleFullScreen(!0)}
$modal.focus()},_setZoomContent:function($frame,animate){var self=this,$content,tmplt,body,title,$body,$dataEl,config,previewId=$frame.attr('id'),$zoomPreview=self._getZoom(previewId),$modal=self.$modal,$tmp,$btnFull=$modal.find('.btn-fullscreen'),$btnBord=$modal.find('.btn-borderless'),cap,size,$btnTogh=$modal.find('.btn-toggleheader');tmplt=$zoomPreview.attr('data-template')||'generic';$content=$zoomPreview.find('.kv-file-content');body=$content.length?$content.html():'';cap=$frame.data('caption')||'';size=$frame.data('size')||'';title=cap+' '+size;$modal.find('.kv-zoom-title').attr('title',$('<div/>').html(title).text()).html(title);$body=$modal.find('.kv-zoom-body');$modal.removeClass('kv-single-content');if(animate){$tmp=$body.addClass('file-thumb-loading').clone().insertAfter($body);$body.html(body).hide();$tmp.fadeOut('fast',function(){$body.fadeIn('fast',function(){$body.removeClass('file-thumb-loading')});$tmp.remove()})}else{$body.html(body)}
config=self.previewZoomSettings[tmplt];if(config){$dataEl=$body.find('.kv-preview-data');$h.addCss($dataEl,'file-zoom-detail');$.each(config,function(key,value){$dataEl.css(key,value);if(($dataEl.attr('width')&&key==='width')||($dataEl.attr('height')&&key==='height')){$dataEl.removeAttr(key)}})}
$modal.data('previewId',previewId);self._handler($modal.find('.btn-prev'),'click',function(){self._zoomSlideShow('prev',previewId)});self._handler($modal.find('.btn-next'),'click',function(){self._zoomSlideShow('next',previewId)});self._handler($btnFull,'click',function(){self._resizeZoomDialog(!0)});self._handler($btnBord,'click',function(){self._resizeZoomDialog(!1)});self._handler($btnTogh,'click',function(){var $header=$modal.find('.modal-header'),$floatBar=$modal.find('.modal-body .floating-buttons'),ht,$actions=$header.find('.kv-zoom-actions'),resize=function(height){var $body=self.$modal.find('.kv-zoom-body'),h=self.zoomModalHeight;if($modal.hasClass('file-zoom-fullscreen')){h=$body.outerHeight(!0);if(!height){h=h-$header.outerHeight(!0)}}
$body.css('height',height?h+height:h)};if($header.is(':visible')){ht=$header.outerHeight(!0);$header.slideUp('slow',function(){$actions.find('.btn').appendTo($floatBar);resize(ht)})}else{$floatBar.find('.btn').appendTo($actions);$header.slideDown('slow',function(){resize()})}
$modal.focus()});self._handler($modal,'keydown',function(e){var key=e.which||e.keyCode,$prev=$(this).find('.btn-prev'),$next=$(this).find('.btn-next'),vId=$(this).data('previewId'),vPrevKey=self.rtl?39:37,vNextKey=self.rtl?37:39;if(key===vPrevKey&&$prev.length&&!$prev.attr('disabled')){self._zoomSlideShow('prev',vId)}
if(key===vNextKey&&$next.length&&!$next.attr('disabled')){self._zoomSlideShow('next',vId)}})},_zoomPreview:function($btn){var self=this,$frame,$modal=self.$modal;if(!$btn.length){throw 'Cannot zoom to detailed preview!'}
$h.initModal($modal);$modal.html(self._getModalContent());$frame=$btn.closest($h.FRAMES);self._setZoomContent($frame);$modal.modal('show');self._initZoomButtons()},_zoomSlideShow:function(dir,previewId){var self=this,$btn=self.$modal.find('.kv-zoom-actions .btn-'+dir),$targFrame,i,thumbs=self.getFrames().toArray(),len=thumbs.length,out;if($btn.attr('disabled')){return}
for(i=0;i<len;i++){if($(thumbs[i]).attr('id')===previewId){out=dir==='prev'?i-1:i+1;break}}
if(out<0||out>=len||!thumbs[out]){return}
$targFrame=$(thumbs[out]);if($targFrame.length){self._setZoomContent($targFrame,!0)}
self._initZoomButtons();self._raise('filezoom'+dir,{'previewId':previewId,modal:self.$modal})},_initZoomButton:function(){var self=this;self.$preview.find('.kv-file-zoom').each(function(){var $el=$(this);self._handler($el,'click',function(){self._zoomPreview($el)})})},_inputFileCount:function(){return this.$element.get(0).files.length},_refreshPreview:function(){var self=this,files;if((!self._inputFileCount()&&!self.isAjaxUpload)||!self.showPreview||!self.isPreviewable){return}
if(self.isAjaxUpload){if(self.fileManager.count()>0){files=$.extend(!0,{},self.fileManager.stack);self.fileManager.clear();self._clearFileInput()}else{files=self.$element.get(0).files}}else{files=self.$element.get(0).files}
if(files&&files.length){self.readFiles(files);self._setFileDropZoneTitle()}},_clearObjects:function($el){$el.find('video audio').each(function(){this.pause();$(this).remove()});$el.find('img object div').each(function(){$(this).remove()})},_clearFileInput:function(){var self=this,$el=self.$element,$srcFrm,$tmpFrm,$tmpEl;if(!self._inputFileCount()){return}
$srcFrm=$el.closest('form');$tmpFrm=$(document.createElement('form'));$tmpEl=$(document.createElement('div'));$el.before($tmpEl);if($srcFrm.length){$srcFrm.after($tmpFrm)}else{$tmpEl.after($tmpFrm)}
$tmpFrm.append($el).trigger('reset');$tmpEl.before($el).remove();$tmpFrm.remove()},_resetUpload:function(){var self=this;self.uploadCache=[];self.$btnUpload.removeAttr('disabled');self._setProgress(0);self.$progress.hide();self._resetErrors(!1);self._initAjax();self.fileManager.clearImages();self._resetCanvas();if(self.overwriteInitial){self.initialPreview=[];self.initialPreviewConfig=[];self.initialPreviewThumbTags=[];self.previewCache.data={content:[],config:[],tags:[]}}},_resetCanvas:function(){var self=this;if(self.canvas&&self.imageCanvasContext){self.imageCanvasContext.clearRect(0,0,self.canvas.width,self.canvas.height)}},_hasInitialPreview:function(){var self=this;return!self.overwriteInitial&&self.previewCache.count(!0)},_resetPreview:function(){var self=this,out,cap;if(self.previewCache.count(!0)){out=self.previewCache.out();self._setPreviewContent(out.content);self._setInitThumbAttr();cap=self.initialCaption?self.initialCaption:out.caption;self._setCaption(cap)}else{self._clearPreview();self._initCaption()}
if(self.showPreview){self._initZoom();self._initSortable()}},_clearDefaultPreview:function(){var self=this;self.$preview.find('.file-default-preview').remove()},_validateDefaultPreview:function(){var self=this;if(!self.showPreview||$h.isEmpty(self.defaultPreviewContent)){return}
self._setPreviewContent('<div class="file-default-preview">'+self.defaultPreviewContent+'</div>');self.$container.removeClass('file-input-new');self._initClickable()},_resetPreviewThumbs:function(isAjax){var self=this,out;if(isAjax){self._clearPreview();self.clearFileStack();return}
if(self._hasInitialPreview()){out=self.previewCache.out();self._setPreviewContent(out.content);self._setInitThumbAttr();self._setCaption(out.caption);self._initPreviewActions()}else{self._clearPreview()}},_getLayoutTemplate:function(t){var self=this,template=self.layoutTemplates[t];if($h.isEmpty(self.customLayoutTags)){return template}
return $h.replaceTags(template,self.customLayoutTags)},_getPreviewTemplate:function(t){var self=this,templates=self.previewTemplates,template=templates[t]||templates.other;if($h.isEmpty(self.customPreviewTags)){return template}
return $h.replaceTags(template,self.customPreviewTags)},_getOutData:function(formdata,jqXHR,responseData,filesData){var self=this;jqXHR=jqXHR||{};responseData=responseData||{};filesData=filesData||self.fileManager.list();return{formdata:formdata,files:filesData,filenames:self.filenames,filescount:self.getFilesCount(),extra:self._getExtraData(),response:responseData,reader:self.reader,jqXHR:jqXHR}},_getMsgSelected:function(n){var self=this,strFiles=n===1?self.fileSingle:self.filePlural;return n>0?self.msgSelected.replace('{n}',n).replace('{files}',strFiles):self.msgNoFilesSelected},_getFrame:function(id,skipWarning){var self=this,$frame=$h.getFrameElement(self.$preview,id);if(self.showPreview&&!skipWarning&&!$frame.length){self._log($h.logMessages.invalidThumb,{id:id})}
return $frame},_getZoom:function(id,selector){var self=this,$frame=$h.getZoomElement(self.$preview,id,selector);if(self.showPreview&&!$frame.length){self._log($h.logMessages.invalidThumb,{id:id})}
return $frame},_getThumbs:function(css){css=css||'';return this.getFrames(':not(.file-preview-initial)'+css)},_getThumbId:function(fileId){var self=this;return self.previewInitId+'-'+fileId},_getExtraData:function(fileId,index){var self=this,data=self.uploadExtraData;if(typeof self.uploadExtraData==='function'){data=self.uploadExtraData(fileId,index)}
return data},_initXhr:function(xhrobj,fileId,fileCount){var self=this,fm=self.fileManager,func=function(event){var pct=0,total=event.total,loaded=event.loaded||event.position,stats=fm.getUploadStats(fileId,loaded,total);if(event.lengthComputable&&!self.enableResumableUpload){pct=$h.round(loaded/total*100)}
if(fileId){self._setFileUploadStats(fileId,pct,fileCount,stats)}else{self._setProgress(pct,null,null,self._getStats(stats))}
self._raise('fileajaxprogress',[stats])};if(xhrobj.upload){if(self.progressDelay){func=$h.debounce(func,self.progressDelay)}
xhrobj.upload.addEventListener('progress',func,!1)}
return xhrobj},_initAjaxSettings:function(){var self=this;self._ajaxSettings=$.extend(!0,{},self.ajaxSettings);self._ajaxDeleteSettings=$.extend(!0,{},self.ajaxDeleteSettings)},_mergeAjaxCallback:function(funcName,srcFunc,type){var self=this,settings=self._ajaxSettings,flag=self.mergeAjaxCallbacks,targFunc;if(type==='delete'){settings=self._ajaxDeleteSettings;flag=self.mergeAjaxDeleteCallbacks}
targFunc=settings[funcName];if(flag&&typeof targFunc==='function'){if(flag==='before'){settings[funcName]=function(){targFunc.apply(this,arguments);srcFunc.apply(this,arguments)}}else{settings[funcName]=function(){srcFunc.apply(this,arguments);targFunc.apply(this,arguments)}}}else{settings[funcName]=srcFunc}},_ajaxSubmit:function(fnBefore,fnSuccess,fnComplete,fnError,formdata,fileId,index,vUrl){var self=this,settings,defaults,data,processQueue;if(!self._raise('filepreajax',[formdata,fileId,index])){return}
formdata.append('initialPreview',JSON.stringify(self.initialPreview));formdata.append('initialPreviewConfig',JSON.stringify(self.initialPreviewConfig));formdata.append('initialPreviewThumbTags',JSON.stringify(self.initialPreviewThumbTags));self._initAjaxSettings();self._mergeAjaxCallback('beforeSend',fnBefore);self._mergeAjaxCallback('success',fnSuccess);self._mergeAjaxCallback('complete',fnComplete);self._mergeAjaxCallback('error',fnError);vUrl=vUrl||self.uploadUrlThumb||self.uploadUrl;if(typeof vUrl==='function'){vUrl=vUrl()}
data=self._getExtraData(fileId,index)||{};if(typeof data==='object'){$.each(data,function(key,value){formdata.append(key,value)})}
defaults={xhr:function(){var xhrobj=$.ajaxSettings.xhr();return self._initXhr(xhrobj,fileId,self.fileManager.count())},url:self._encodeURI(vUrl),type:'POST',dataType:'json',data:formdata,cache:!1,processData:!1,contentType:!1};settings=$.extend(!0,{},defaults,self._ajaxSettings);self.ajaxQueue.push(settings);processQueue=function(){var config,xhr;if(self.ajaxCurrentThreads<self.maxAjaxThreads){config=self.ajaxQueue.shift();if(typeof config!=='undefined'){self.ajaxCurrentThreads++;xhr=$.ajax(config).done(function(){clearInterval(self.ajaxQueueIntervalId);self.ajaxCurrentThreads--});self.ajaxRequests.push(xhr)}}};self.ajaxQueueIntervalId=setInterval(processQueue,self.queueDelay)},_mergeArray:function(prop,content){var self=this,arr1=$h.cleanArray(self[prop]),arr2=$h.cleanArray(content);self[prop]=arr1.concat(arr2)},_initUploadSuccess:function(out,$thumb,allFiles){var self=this,append,data,index,$div,$newCache,content,config,tags,id,i;if(!self.showPreview||typeof out!=='object'||$.isEmptyObject(out)){return}
if(out.initialPreview!==undefined&&out.initialPreview.length>0){self.hasInitData=!0;content=out.initialPreview||[];config=out.initialPreviewConfig||[];tags=out.initialPreviewThumbTags||[];append=out.append===undefined||out.append;if(content.length>0&&!$h.isArray(content)){content=content.split(self.initialPreviewDelimiter)}
if(content.length){self._mergeArray('initialPreview',content);self._mergeArray('initialPreviewConfig',config);self._mergeArray('initialPreviewThumbTags',tags)}
if($thumb!==undefined){if(!allFiles){index=self.previewCache.add(content[0],config[0],tags[0],append);data=self.previewCache.get(index,!1);$div=$(document.createElement('div')).html(data).hide().insertAfter($thumb);$newCache=$div.find('.kv-zoom-cache');if($newCache&&$newCache.length){$newCache.insertAfter($thumb)}
$thumb.fadeOut('slow',function(){var $newThumb=$div.find('.file-preview-frame');if($newThumb&&$newThumb.length){$newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block')}
self._initPreviewActions();self._clearFileInput();$h.cleanZoomCache(self._getZoom($thumb.attr('id')));$thumb.remove();$div.remove();self._initSortable()})}else{id=$thumb.attr('id');i=self._getUploadCacheIndex(id);if(i!==null){self.uploadCache[i]={id:id,content:content[0],config:config[0]||[],tags:tags[0]||[],append:append}}}}else{self.previewCache.set(content,config,tags,append);self._initPreview();self._initPreviewActions()}}},_getUploadCacheIndex:function(id){var self=this,i,len=self.uploadCache.length,config;for(i=0;i<len;i++){config=self.uploadCache[i];if(config.id===id){return i}}
return null},_initSuccessThumbs:function(){var self=this;if(!self.showPreview){return}
self._getThumbs($h.FRAMES+'.file-preview-success').each(function(){var $thumb=$(this),$remove=$thumb.find('.kv-file-remove');$remove.removeAttr('disabled');self._handler($remove,'click',function(){var id=$thumb.attr('id'),out=self._raise('filesuccessremove',[id,$thumb.attr('data-fileindex')]);$h.cleanMemory($thumb);if(out===!1){return}
$thumb.fadeOut('slow',function(){$h.cleanZoomCache(self._getZoom(id));$thumb.remove();if(!self.getFrames().length){self.reset()}})})})},_updateInitialPreview:function(){var self=this,u=self.uploadCache;if(self.showPreview){$.each(u,function(key,setting){self.previewCache.add(setting.content,setting.config,setting.tags,setting.append)});if(self.hasInitData){self._initPreview();self._initPreviewActions()}}},_uploadSingle:function(i,id,isBatch){var self=this,fm=self.fileManager,count=fm.count(),formdata=new FormData(),outData,previewId=self._getThumbId(id),$thumb,chkComplete,$btnUpload,$btnDelete,hasPostData=count>0||!$.isEmptyObject(self.uploadExtraData),uploadFailed,$prog,fnBefore,errMsg,fnSuccess,fnComplete,fnError,updateUploadLog,op=self.ajaxOperations.uploadThumb,fileObj=fm.getFile(id),params={id:previewId,index:i,fileId:id},fileName=self.fileManager.getFileName(id,!0);if(self.enableResumableUpload){return}
if(self.showPreview){$thumb=self.fileManager.getThumb(id);$prog=$thumb.find('.file-thumb-progress');$btnUpload=$thumb.find('.kv-file-upload');$btnDelete=$thumb.find('.kv-file-remove');$prog.show()}
if(count===0||!hasPostData||(self.showPreview&&$btnUpload&&$btnUpload.hasClass('disabled'))||self._abort(params)){return}
updateUploadLog=function(){if(!uploadFailed){fm.removeFile(id)}else{fm.errors.push(id)}
fm.setProcessed(id);if(fm.isProcessed()){self.fileBatchCompleted=!0}};chkComplete=function(){var $initThumbs;if(!self.fileBatchCompleted){return}
setTimeout(function(){var triggerReset=fm.count()===0,errCount=fm.errors.length;self._updateInitialPreview();self.unlock(triggerReset);if(triggerReset){self._clearFileInput()}
$initThumbs=self.$preview.find('.file-preview-initial');if(self.uploadAsync&&$initThumbs.length){$h.addCss($initThumbs,$h.SORT_CSS);self._initSortable()}
self._raise('filebatchuploadcomplete',[fm.stack,self._getExtraData()]);if(!self.retryErrorUploads||errCount===0){fm.clear()}
self._setProgress(101);self.ajaxAborted=!1},self.processDelay)};fnBefore=function(jqXHR){outData=self._getOutData(formdata,jqXHR);fm.initStats(id);self.fileBatchCompleted=!1;if(!isBatch){self.ajaxAborted=!1}
if(self.showPreview){if(!$thumb.hasClass('file-preview-success')){self._setThumbStatus($thumb,'Loading');$h.addCss($thumb,'file-uploading')}
$btnUpload.attr('disabled',!0);$btnDelete.attr('disabled',!0)}
if(!isBatch){self.lock()}
if(fm.errors.indexOf(id)!==-1){delete fm.errors[id]}
self._raise('filepreupload',[outData,previewId,i]);$.extend(!0,params,outData);if(self._abort(params)){jqXHR.abort();if(!isBatch){self._setThumbStatus($thumb,'New');$thumb.removeClass('file-uploading');$btnUpload.removeAttr('disabled');$btnDelete.removeAttr('disabled');self.unlock()}
self._setProgressCancelled()}};fnSuccess=function(data,textStatus,jqXHR){var pid=self.showPreview&&$thumb.attr('id')?$thumb.attr('id'):previewId;outData=self._getOutData(formdata,jqXHR,data);$.extend(!0,params,outData);setTimeout(function(){if($h.isEmpty(data)||$h.isEmpty(data.error)){if(self.showPreview){self._setThumbStatus($thumb,'Success');$btnUpload.hide();self._initUploadSuccess(data,$thumb,isBatch);self._setProgress(101,$prog)}
self._raise('fileuploaded',[outData,pid,i]);if(!isBatch){self.fileManager.remove($thumb)}else{updateUploadLog()}}else{uploadFailed=!0;errMsg=self._parseError(op,jqXHR,self.msgUploadError,self.fileManager.getFileName(id));self._showFileError(errMsg,params);self._setPreviewError($thumb,!0);if(!self.retryErrorUploads){$btnUpload.hide()}
if(isBatch){updateUploadLog()}
self._setProgress(101,self._getFrame(pid).find('.file-thumb-progress'),self.msgUploadError)}},self.processDelay)};fnComplete=function(){setTimeout(function(){if(self.showPreview){$btnUpload.removeAttr('disabled');$btnDelete.removeAttr('disabled');$thumb.removeClass('file-uploading')}
if(!isBatch){self.unlock(!1);self._clearFileInput()}else{chkComplete()}
self._initSuccessThumbs()},self.processDelay)};fnError=function(jqXHR,textStatus,errorThrown){errMsg=self._parseError(op,jqXHR,errorThrown,self.fileManager.getFileName(id));uploadFailed=!0;setTimeout(function(){var $prog;if(isBatch){updateUploadLog()}
self.fileManager.setProgress(id,100);self._setPreviewError($thumb,!0);if(!self.retryErrorUploads){$btnUpload.hide()}
$.extend(!0,params,self._getOutData(formdata,jqXHR));self._setProgress(101,$prog,self.msgAjaxProgressError.replace('{operation}',op));$prog=self.showPreview&&$thumb?$thumb.find('.file-thumb-progress'):'';self._setProgress(101,$prog,self.msgUploadError);self._showFileError(errMsg,params)},self.processDelay)};formdata.append(self.uploadFileAttr,fileObj.file,fileName);self._setUploadData(formdata,{fileId:id});self._ajaxSubmit(fnBefore,fnSuccess,fnComplete,fnError,formdata,id,i)},_uploadBatch:function(){var self=this,fm=self.fileManager,total=fm.total(),params={},fnBefore,fnSuccess,fnError,fnComplete,hasPostData=total>0||!$.isEmptyObject(self.uploadExtraData),errMsg,setAllUploaded,formdata=new FormData(),op=self.ajaxOperations.uploadBatch;if(total===0||!hasPostData||self._abort(params)){return}
setAllUploaded=function(){self.fileManager.clear();self._clearFileInput()};fnBefore=function(jqXHR){self.lock();fm.initStats();var outData=self._getOutData(formdata,jqXHR);self.ajaxAborted=!1;if(self.showPreview){self._getThumbs().each(function(){var $thumb=$(this),$btnUpload=$thumb.find('.kv-file-upload'),$btnDelete=$thumb.find('.kv-file-remove');if(!$thumb.hasClass('file-preview-success')){self._setThumbStatus($thumb,'Loading');$h.addCss($thumb,'file-uploading')}
$btnUpload.attr('disabled',!0);$btnDelete.attr('disabled',!0)})}
self._raise('filebatchpreupload',[outData]);if(self._abort(outData)){jqXHR.abort();self._getThumbs().each(function(){var $thumb=$(this),$btnUpload=$thumb.find('.kv-file-upload'),$btnDelete=$thumb.find('.kv-file-remove');if($thumb.hasClass('file-preview-loading')){self._setThumbStatus($thumb,'New');$thumb.removeClass('file-uploading')}
$btnUpload.removeAttr('disabled');$btnDelete.removeAttr('disabled')});self._setProgressCancelled()}};fnSuccess=function(data,textStatus,jqXHR){var outData=self._getOutData(formdata,jqXHR,data),key=0,$thumbs=self._getThumbs(':not(.file-preview-success)'),keys=$h.isEmpty(data)||$h.isEmpty(data.errorkeys)?[]:data.errorkeys;if($h.isEmpty(data)||$h.isEmpty(data.error)){self._raise('filebatchuploadsuccess',[outData]);setAllUploaded();if(self.showPreview){$thumbs.each(function(){var $thumb=$(this);self._setThumbStatus($thumb,'Success');$thumb.removeClass('file-uploading');$thumb.find('.kv-file-upload').hide().removeAttr('disabled')});self._initUploadSuccess(data)}else{self.reset()}
self._setProgress(101)}else{if(self.showPreview){$thumbs.each(function(){var $thumb=$(this);$thumb.removeClass('file-uploading');$thumb.find('.kv-file-upload').removeAttr('disabled');$thumb.find('.kv-file-remove').removeAttr('disabled');if(keys.length===0||$.inArray(key,keys)!==-1){self._setPreviewError($thumb,!0);if(!self.retryErrorUploads){$thumb.find('.kv-file-upload').hide();self.fileManager.remove($thumb)}}else{$thumb.find('.kv-file-upload').hide();self._setThumbStatus($thumb,'Success');self.fileManager.remove($thumb)}
if(!$thumb.hasClass('file-preview-error')||self.retryErrorUploads){key++}});self._initUploadSuccess(data)}
errMsg=self._parseError(op,jqXHR,self.msgUploadError);self._showFileError(errMsg,outData,'filebatchuploaderror');self._setProgress(101,self.$progress,self.msgUploadError)}};fnComplete=function(){self.unlock();self._initSuccessThumbs();self._clearFileInput();self._raise('filebatchuploadcomplete',[self.fileManager.stack,self._getExtraData()])};fnError=function(jqXHR,textStatus,errorThrown){var outData=self._getOutData(formdata,jqXHR);errMsg=self._parseError(op,jqXHR,errorThrown);self._showFileError(errMsg,outData,'filebatchuploaderror');self.uploadFileCount=total-1;if(!self.showPreview){return}
self._getThumbs().each(function(){var $thumb=$(this);$thumb.removeClass('file-uploading');if(self.fileManager.getFile($thumb.attr('data-fileid'))){self._setPreviewError($thumb)}});self._getThumbs().removeClass('file-uploading');self._getThumbs(' .kv-file-upload').removeAttr('disabled');self._getThumbs(' .kv-file-delete').removeAttr('disabled');self._setProgress(101,self.$progress,self.msgAjaxProgressError.replace('{operation}',op))};var ctr=0;$.each(self.fileManager.stack,function(key,data){if(!$h.isEmpty(data.file)){formdata.append(self.uploadFileAttr,data.file,(data.nameFmt||('untitled_'+ctr)))}
ctr++});self._ajaxSubmit(fnBefore,fnSuccess,fnComplete,fnError,formdata)},_uploadExtraOnly:function(){var self=this,params={},fnBefore,fnSuccess,fnComplete,fnError,formdata=new FormData(),errMsg,op=self.ajaxOperations.uploadExtra;if(self._abort(params)){return}
fnBefore=function(jqXHR){self.lock();var outData=self._getOutData(formdata,jqXHR);self._raise('filebatchpreupload',[outData]);self._setProgress(50);params.data=outData;params.xhr=jqXHR;if(self._abort(params)){jqXHR.abort();self._setProgressCancelled()}};fnSuccess=function(data,textStatus,jqXHR){var outData=self._getOutData(formdata,jqXHR,data);if($h.isEmpty(data)||$h.isEmpty(data.error)){self._raise('filebatchuploadsuccess',[outData]);self._clearFileInput();self._initUploadSuccess(data);self._setProgress(101)}else{errMsg=self._parseError(op,jqXHR,self.msgUploadError);self._showFileError(errMsg,outData,'filebatchuploaderror')}};fnComplete=function(){self.unlock();self._clearFileInput();self._raise('filebatchuploadcomplete',[self.fileManager.stack,self._getExtraData()])};fnError=function(jqXHR,textStatus,errorThrown){var outData=self._getOutData(formdata,jqXHR);errMsg=self._parseError(op,jqXHR,errorThrown);params.data=outData;self._showFileError(errMsg,outData,'filebatchuploaderror');self._setProgress(101,self.$progress,self.msgAjaxProgressError.replace('{operation}',op))};self._ajaxSubmit(fnBefore,fnSuccess,fnComplete,fnError,formdata)},_deleteFileIndex:function($frame){var self=this,ind=$frame.attr('data-fileindex'),rev=self.reversePreviewOrder;if(ind.substring(0,5)===$h.INIT_FLAG){ind=parseInt(ind.replace($h.INIT_FLAG,''));self.initialPreview=$h.spliceArray(self.initialPreview,ind,rev);self.initialPreviewConfig=$h.spliceArray(self.initialPreviewConfig,ind,rev);self.initialPreviewThumbTags=$h.spliceArray(self.initialPreviewThumbTags,ind,rev);self.getFrames().each(function(){var $nFrame=$(this),nInd=$nFrame.attr('data-fileindex');if(nInd.substring(0,5)===$h.INIT_FLAG){nInd=parseInt(nInd.replace($h.INIT_FLAG,''));if(nInd>ind){nInd--;$nFrame.attr('data-fileindex',$h.INIT_FLAG+nInd)}}})}},_initFileActions:function(){var self=this;if(!self.showPreview){return}
self._initZoomButton();self.getFrames(' .kv-file-remove').each(function(){var $el=$(this),$frame=$el.closest($h.FRAMES),hasError,id=$frame.attr('id'),ind=$frame.attr('data-fileindex'),n,cap,status;self._handler($el,'click',function(){status=self._raise('filepreremove',[id,ind]);if(status===!1||!self._validateMinCount()){return!1}
hasError=$frame.hasClass('file-preview-error');$h.cleanMemory($frame);$frame.fadeOut('slow',function(){$h.cleanZoomCache(self._getZoom(id));self.fileManager.remove($frame);self._clearObjects($frame);$frame.remove();if(id&&hasError){self.$errorContainer.find('li[data-thumb-id="'+id+'"]').fadeOut('fast',function(){$(this).remove();if(!self._errorsExist()){self._resetErrors()}})}
self._clearFileInput();var chk=self.previewCache.count(!0),len=self.fileManager.count(),file,hasThumb=self.showPreview&&self.getFrames().length;if(len===0&&chk===0&&!hasThumb){self.reset()}else{n=chk+len;if(n>1){cap=self._getMsgSelected(n)}else{file=self.fileManager.getFirstFile();cap=file?file.nameFmt:'_'}
self._setCaption(cap)}
self._raise('fileremoved',[id,ind])})})});self.getFrames(' .kv-file-upload').each(function(){var $el=$(this);self._handler($el,'click',function(){var $frame=$el.closest($h.FRAMES),fileId=$frame.attr('data-fileid');self.$progress.hide();if($frame.hasClass('file-preview-error')&&!self.retryErrorUploads){return}
self._uploadSingle(self.fileManager.getIndex(fileId),fileId,!1)})})},_initPreviewActions:function(){var self=this,$preview=self.$preview,deleteExtraData=self.deleteExtraData||{},btnRemove=$h.FRAMES+' .kv-file-remove',settings=self.fileActionSettings,origClass=settings.removeClass,errClass=settings.removeErrorClass,resetProgress=function(){var hasFiles=self.isAjaxUpload?self.previewCache.count(!0):self._inputFileCount();if(!self.getFrames().length&&!hasFiles){self._setCaption('');self.reset();self.initialCaption=''}};self._initZoomButton();$preview.find(btnRemove).each(function(){var $el=$(this),vUrl=$el.data('url')||self.deleteUrl,vKey=$el.data('key'),errMsg,fnBefore,fnSuccess,fnError,op=self.ajaxOperations.deleteThumb;if($h.isEmpty(vUrl)||vKey===undefined){return}
if(typeof vUrl==='function'){vUrl=vUrl()}
var $frame=$el.closest($h.FRAMES),cache=self.previewCache.data,settings,params,config,fileName,extraData,index=$frame.attr('data-fileindex');index=parseInt(index.replace($h.INIT_FLAG,''));config=$h.isEmpty(cache.config)&&$h.isEmpty(cache.config[index])?null:cache.config[index];extraData=$h.isEmpty(config)||$h.isEmpty(config.extra)?deleteExtraData:config.extra;fileName=config.filename||config.caption||'';if(typeof extraData==='function'){extraData=extraData()}
params={id:$el.attr('id'),key:vKey,extra:extraData};fnBefore=function(jqXHR){self.ajaxAborted=!1;self._raise('filepredelete',[vKey,jqXHR,extraData]);if(self._abort()){jqXHR.abort()}else{$el.removeClass(errClass);$h.addCss($frame,'file-uploading');$h.addCss($el,'disabled '+origClass)}};fnSuccess=function(data,textStatus,jqXHR){var n,cap;if(!$h.isEmpty(data)&&!$h.isEmpty(data.error)){params.jqXHR=jqXHR;params.response=data;errMsg=self._parseError(op,jqXHR,self.msgDeleteError,fileName);self._showFileError(errMsg,params,'filedeleteerror');$frame.removeClass('file-uploading');$el.removeClass('disabled '+origClass).addClass(errClass);resetProgress();return}
$frame.removeClass('file-uploading').addClass('file-deleted');$frame.fadeOut('slow',function(){index=parseInt(($frame.attr('data-fileindex')).replace($h.INIT_FLAG,''));self.previewCache.unset(index);self._deleteFileIndex($frame);n=self.previewCache.count(!0);cap=n>0?self._getMsgSelected(n):'';self._setCaption(cap);self._raise('filedeleted',[vKey,jqXHR,extraData]);$h.cleanZoomCache(self._getZoom($frame.attr('id')));self._clearObjects($frame);$frame.remove();resetProgress()})};fnError=function(jqXHR,textStatus,errorThrown){var errMsg=self._parseError(op,jqXHR,errorThrown,fileName);params.jqXHR=jqXHR;params.response={};self._showFileError(errMsg,params,'filedeleteerror');$frame.removeClass('file-uploading');$el.removeClass('disabled '+origClass).addClass(errClass);resetProgress()};self._initAjaxSettings();self._mergeAjaxCallback('beforeSend',fnBefore,'delete');self._mergeAjaxCallback('success',fnSuccess,'delete');self._mergeAjaxCallback('error',fnError,'delete');settings=$.extend(!0,{},{url:self._encodeURI(vUrl),type:'POST',dataType:'json',data:$.extend(!0,{},{key:vKey},extraData)},self._ajaxDeleteSettings);self._handler($el,'click',function(){if(!self._validateMinCount()){return!1}
self.ajaxAborted=!1;self._raise('filebeforedelete',[vKey,extraData]);if(self.ajaxAborted instanceof Promise){self.ajaxAborted.then(function(result){if(!result){$.ajax(settings)}})}else{if(!self.ajaxAborted){$.ajax(settings)}}})})},_hideFileIcon:function(){var self=this;if(self.overwriteInitial){self.$captionContainer.removeClass('icon-visible')}},_showFileIcon:function(){var self=this;$h.addCss(self.$captionContainer,'icon-visible')},_getSize:function(bytes,sizes){var self=this,size=parseFloat(bytes),i,func=self.fileSizeGetter,out;if(!$.isNumeric(bytes)||!$.isNumeric(size)){return''}
if(typeof func==='function'){out=func(size)}else{if(size===0){out='0.00 B'}else{i=Math.floor(Math.log(size)/Math.log(1024));if(!sizes){sizes=['B','KB','MB','GB','TB','PB','EB','ZB','YB']}
out=(size/Math.pow(1024,i)).toFixed(2)*1+' '+sizes[i]}}
return self._getLayoutTemplate('size').replace('{sizeText}',out)},_getFileType:function(ftype){var self=this;return self.mimeTypeAliases[ftype]||ftype},_generatePreviewTemplate:function(cat,data,fname,ftype,previewId,fileId,isError,size,frameClass,foot,ind,templ,attrs,zoomData){var self=this,caption=self.slug(fname),prevContent,zoomContent='',styleAttribs='',screenW=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,config,title=caption,alt=caption,typeCss='type-default',getContent,footer=foot||self._renderFileFooter(cat,caption,size,'auto',isError),forcePrevIcon=self.preferIconicPreview,forceZoomIcon=self.preferIconicZoomPreview,newCat=forcePrevIcon?'other':cat;config=screenW<400?(self.previewSettingsSmall[newCat]||self.defaults.previewSettingsSmall[newCat]):(self.previewSettings[newCat]||self.defaults.previewSettings[newCat]);if(config){$.each(config,function(key,val){styleAttribs+=key+':'+val+';'})}
getContent=function(c,d,zoom,frameCss){var id=zoom?'zoom-'+previewId:previewId,tmplt=self._getPreviewTemplate(c),css=(frameClass||'')+' '+frameCss;if(self.frameClass){css=self.frameClass+' '+css}
if(zoom){css=css.replace(' '+$h.SORT_CSS,'')}
tmplt=self._parseFilePreviewIcon(tmplt,fname);if(c==='text'){d=$h.htmlEncode(d)}
if(cat==='object'&&!ftype){$.each(self.defaults.fileTypeSettings,function(key,func){if(key==='object'||key==='other'){return}
if(func(fname,ftype)){typeCss='type-'+key}})}
if(!$h.isEmpty(attrs)){if(attrs.title!==undefined&&attrs.title!==null){title=attrs.title}
if(attrs.alt!==undefined&&attrs.alt!==null){title=attrs.alt}}
return tmplt.setTokens({'previewId':id,'caption':caption,'title':title,'alt':alt,'frameClass':css,'type':self._getFileType(ftype),'fileindex':ind,'fileid':fileId||'','typeCss':typeCss,'footer':footer,'data':d,'template':templ||cat,'style':styleAttribs?'style="'+styleAttribs+'"':''})};ind=ind||previewId.slice(previewId.lastIndexOf('-')+1);if(self.fileActionSettings.showZoom){zoomContent=getContent((forceZoomIcon?'other':cat),zoomData?zoomData:data,!0,'kv-zoom-thumb')}
zoomContent='\n'+self._getLayoutTemplate('zoomCache').replace('{zoomContent}',zoomContent);if(typeof self.sanitizeZoomCache==='function'){zoomContent=self.sanitizeZoomCache(zoomContent)}
prevContent=getContent((forcePrevIcon?'other':cat),data,!1,'kv-preview-thumb');return prevContent+zoomContent},_addToPreview:function($preview,content){var self=this;return self.reversePreviewOrder?$preview.prepend(content):$preview.append(content)},_previewDefault:function(file,isDisabled){var self=this,$preview=self.$preview;if(!self.showPreview){return}
var fname=$h.getFileName(file),ftype=file?file.type:'',content,size=file.size||0,caption=self._getFileName(file,''),isError=isDisabled===!0&&!self.isAjaxUpload,data=$h.createObjectURL(file),fileId=self.fileManager.getId(file),previewId=self._getThumbId(fileId);self._clearDefaultPreview();content=self._generatePreviewTemplate('other',data,fname,ftype,previewId,fileId,isError,size);self._addToPreview($preview,content);self._setThumbAttr(previewId,caption,size);if(isDisabled===!0&&self.isAjaxUpload){self._setThumbStatus(self._getFrame(previewId),'Error')}},_previewFile:function(i,file,theFile,data,fileInfo){if(!this.showPreview){return}
var self=this,fname=$h.getFileName(file),ftype=fileInfo.type,caption=fileInfo.name,cat=self._parseFileType(ftype,fname),content,$preview=self.$preview,fsize=file.size||0,iData=(cat==='text'||cat==='html'||cat==='image')?theFile.target.result:data,fileId=self.fileManager.getId(file),previewId=self._getThumbId(fileId);if(cat==='html'&&self.purifyHtml&&window.DOMPurify){iData=window.DOMPurify.sanitize(iData)}
content=self._generatePreviewTemplate(cat,iData,fname,ftype,previewId,fileId,!1,fsize);self._clearDefaultPreview();self._addToPreview($preview,content);var $thumb=self._getFrame(previewId);self._validateImageOrientation($thumb.find('img'),file,previewId,fileId,caption,ftype,fsize,iData);self._setThumbAttr(previewId,caption,fsize);self._initSortable()},_setThumbAttr:function(id,caption,size){var self=this,$frame=self._getFrame(id);if($frame.length){size=size&&size>0?self._getSize(size):'';$frame.data({'caption':caption,'size':size})}},_setInitThumbAttr:function(){var self=this,data=self.previewCache.data,len=self.previewCache.count(!0),config,caption,size,previewId;if(len===0){return}
for(var i=0;i<len;i++){config=data.config[i];previewId=self.previewInitId+'-'+$h.INIT_FLAG+i;caption=$h.ifSet('caption',config,$h.ifSet('filename',config));size=$h.ifSet('size',config);self._setThumbAttr(previewId,caption,size)}},_slugDefault:function(text){return $h.isEmpty(text)?'':String(text).replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g,'_')},_updateFileDetails:function(numFiles){var self=this,$el=self.$element,label,n,log,nFiles,file,name=($h.isIE(9)&&$h.findFileName($el.val()))||($el[0].files[0]&&$el[0].files[0].name);if(!name&&self.fileManager.count()>0){file=self.fileManager.getFirstFile();label=file.nameFmt}else{label=name?self.slug(name):'_'}
n=self.isAjaxUpload?self.fileManager.count():numFiles;nFiles=self.previewCache.count(!0)+n;log=n===1?label:self._getMsgSelected(nFiles);if(self.isError){self.$previewContainer.removeClass('file-thumb-loading');self.$previewStatus.html('');self.$captionContainer.removeClass('icon-visible')}else{self._showFileIcon()}
self._setCaption(log,self.isError);self.$container.removeClass('file-input-new file-input-ajax-new');if(arguments.length===1){self._raise('fileselect',[numFiles,label])}
if(self.previewCache.count(!0)){self._initPreviewActions()}},_setThumbStatus:function($thumb,status){var self=this;if(!self.showPreview){return}
var icon='indicator'+status,msg=icon+'Title',css='file-preview-'+status.toLowerCase(),$indicator=$thumb.find('.file-upload-indicator'),config=self.fileActionSettings;$thumb.removeClass('file-preview-success file-preview-error file-preview-paused file-preview-loading');if(status==='Success'){$thumb.find('.file-drag-handle').remove()}
$indicator.html(config[icon]);$indicator.attr('title',config[msg]);$thumb.addClass(css);if(status==='Error'&&!self.retryErrorUploads){$thumb.find('.kv-file-upload').attr('disabled',!0)}},_setProgressCancelled:function(){var self=this;self._setProgress(101,self.$progress,self.msgCancelled)},_setProgress:function(p,$el,error,stats){var self=this;$el=$el||self.$progress;if(!$el.length){return}
var pct=Math.min(p,100),out,pctLimit=self.progressUploadThreshold,t=p<=100?self.progressTemplate:self.progressCompleteTemplate,template=pct<100?self.progressTemplate:(error?(self.paused?self.progressPauseTemplate:self.progressErrorTemplate):t);if(p>=100){stats=''}
if(!$h.isEmpty(template)){if(pctLimit&&pct>pctLimit&&p<=100){out=template.setTokens({'percent':pctLimit,'status':self.msgUploadThreshold})}else{out=template.setTokens({'percent':pct,'status':(p>100?self.msgUploadEnd:pct+'%')})}
stats=stats||'';out=out.setTokens({stats:stats});$el.html(out);if(error){$el.find('[role="progressbar"]').html(error)}}},_setFileDropZoneTitle:function(){var self=this,$zone=self.$container.find('.file-drop-zone'),title=self.dropZoneTitle,strFiles;if(self.isClickable){strFiles=$h.isEmpty(self.$element.attr('multiple'))?self.fileSingle:self.filePlural;title+=self.dropZoneClickTitle.replace('{files}',strFiles)}
$zone.find('.'+self.dropZoneTitleClass).remove();if(!self.showPreview||$zone.length===0||self.fileManager.count()>0||!self.dropZoneEnabled||(!self.isAjaxUpload&&self.$element.files)){return}
if($zone.find($h.FRAMES).length===0&&$h.isEmpty(self.defaultPreviewContent)){$zone.prepend('<div class="'+self.dropZoneTitleClass+'">'+title+'</div>')}
self.$container.removeClass('file-input-new');$h.addCss(self.$container,'file-input-ajax-new')},_getStats:function(stats){var self=this,pendingTime,t;if(!self.showUploadStats||!stats||!stats.bitrate){return''}
t=self._getLayoutTemplate('stats');pendingTime=(!stats.elapsed||!stats.bps)?self.msgCalculatingTime:self.msgPendingTime.setTokens({time:$h.getElapsed(Math.ceil(stats.pendingBytes/stats.bps))});return t.setTokens({uploadSpeed:stats.bitrate,pendingTime:pendingTime})},_setResumableProgress:function(pct,stats,$thumb){var self=this,rm=self.resumableManager,obj=$thumb?rm:self,$prog=$thumb?$thumb.find('.file-thumb-progress'):null;if(obj.lastProgress===0){obj.lastProgress=pct}
if(pct<obj.lastProgress){pct=obj.lastProgress}
self._setProgress(pct,$prog,null,self._getStats(stats));obj.lastProgress=pct},_setFileUploadStats:function(id,pct,total,stats){var self=this,$prog=self.$progress;if(!self.showPreview&&(!$prog||!$prog.length)){return}
var fm=self.fileManager,$thumb=fm.getThumb(id),pctTot,rm=self.resumableManager,totUpSize=0,totSize=fm.getTotalSize(),totStats=$.extend(!0,{},stats);if(self.enableResumableUpload){var loaded=stats.loaded,currUplSize=rm.getUploadedSize(),currTotSize=rm.file.size,totLoaded;loaded+=currUplSize;totLoaded=fm.uploadedSize+loaded;pct=$h.round(100*loaded/currTotSize);stats.pendingBytes=currTotSize-currUplSize;self._setResumableProgress(pct,stats,$thumb);pctTot=Math.floor(100*totLoaded/totSize);totStats.pendingBytes=totSize-totLoaded;self._setResumableProgress(pctTot,totStats)}else{fm.setProgress(id,pct);$prog=$thumb&&$thumb.length?$thumb.find('.file-thumb-progress'):null;self._setProgress(pct,$prog,null,self._getStats(stats));$.each(fm.stats,function(id,cfg){totUpSize+=cfg.loaded});totStats.pendingBytes=totSize-totUpSize;pctTot=$h.round(totUpSize/totSize*100);self._setProgress(pctTot,null,null,self._getStats(totStats))}},_validateMinCount:function(){var self=this,len=self.isAjaxUpload?self.fileManager.count():self._inputFileCount();if(self.validateInitialCount&&self.minFileCount>0&&self._getFileCount(len-1)<self.minFileCount){self._noFilesError({});return!1}
return!0},_getFileCount:function(fileCount,includeInitial){var self=this,addCount=0;if(includeInitial===undefined){includeInitial=self.validateInitialCount&&!self.overwriteInitial}
if(includeInitial){addCount=self.previewCache.count(!0);fileCount+=addCount}
return fileCount},_getFileId:function(file){return $h.getFileId(file,this.generateFileId)},_getFileName:function(file,defaultValue){var self=this,fileName=$h.getFileName(file);return fileName?self.slug(fileName):defaultValue},_getFileNames:function(skipNull){var self=this;return self.filenames.filter(function(n){return(skipNull?n!==undefined:n!==undefined&&n!==null)})},_setPreviewError:function($thumb,keepFile){var self=this,removeFrame=self.removeFromPreviewOnError&&!self.retryErrorUploads;if(!keepFile||removeFrame){self.fileManager.remove($thumb)}
if(!self.showPreview){return}
if(removeFrame){$thumb.remove();return}else{self._setThumbStatus($thumb,'Error')}
self._refreshUploadButton($thumb)},_refreshUploadButton:function($thumb){var self=this,$btn=$thumb.find('.kv-file-upload'),cfg=self.fileActionSettings,icon=cfg.uploadIcon,title=cfg.uploadTitle;if(!$btn.length){return}
if(self.retryErrorUploads){icon=cfg.uploadRetryIcon;title=cfg.uploadRetryTitle}
$btn.attr('title',title).html(icon)},_checkDimensions:function(i,chk,$img,$thumb,fname,type,params){var self=this,msg,dim,tag=chk==='Small'?'min':'max',limit=self[tag+'Image'+type],$imgEl,isValid;if($h.isEmpty(limit)||!$img.length){return}
$imgEl=$img[0];dim=(type==='Width')?$imgEl.naturalWidth||$imgEl.width:$imgEl.naturalHeight||$imgEl.height;isValid=chk==='Small'?dim>=limit:dim<=limit;if(isValid){return}
msg=self['msgImage'+type+chk].setTokens({'name':fname,'size':limit});self._showFileError(msg,params);self._setPreviewError($thumb)},_getExifObj:function(data){var self=this,exifObj=null,error=$h.logMessages.exifWarning;if(data.slice(0,23)!=='data:image/jpeg;base64,'&&data.slice(0,22)!=='data:image/jpg;base64,'){exifObj=null;return}
try{exifObj=window.piexif?window.piexif.load(data):null}catch(err){exifObj=null;error=err&&err.message||''}
if(!exifObj){self._log($h.logMessages.badExifParser,{details:error})}
return exifObj},setImageOrientation:function($img,$zoomImg,value,$thumb){var self=this,invalidImg=!$img||!$img.length,invalidZoomImg=!$zoomImg||!$zoomImg.length,$mark,isHidden=!1,$div,zoomOnly=invalidImg&&$thumb&&$thumb.attr('data-template')==='image',ev;if(invalidImg&&invalidZoomImg){return}
ev='load.fileinputimageorient';if(zoomOnly){$img=$zoomImg;$zoomImg=null;$img.css(self.previewSettings.image);$div=$(document.createElement('div')).appendTo($thumb.find('.kv-file-content'));$mark=$(document.createElement('span')).insertBefore($img);$img.css('visibility','hidden').removeClass('file-zoom-detail').appendTo($div)}else{isHidden=!$img.is(':visible')}
$img.off(ev).on(ev,function(){if(isHidden){self.$preview.removeClass('hide-content');$thumb.find('.kv-file-content').css('visibility','hidden')}
var img=$img.get(0),zoomImg=$zoomImg&&$zoomImg.length?$zoomImg.get(0):null,h=img.offsetHeight,w=img.offsetWidth,r=$h.getRotation(value);if(isHidden){$thumb.find('.kv-file-content').css('visibility','visible');self.$preview.addClass('hide-content')}
$img.data('orientation',value);if(zoomImg){$zoomImg.data('orientation',value)}
if(value<5){$h.setTransform(img,r);$h.setTransform(zoomImg,r);return}
var offsetAngle=Math.atan(w/h),origFactor=Math.sqrt(Math.pow(h,2)+Math.pow(w,2)),scale=!origFactor?1:(h/Math.cos(Math.PI/2+offsetAngle))/origFactor,s=' scale('+Math.abs(scale)+')';$h.setTransform(img,r+s);$h.setTransform(zoomImg,r+s);if(zoomOnly){$img.css('visibility','visible').insertAfter($mark).addClass('file-zoom-detail');$mark.remove();$div.remove()}})},_validateImageOrientation:function($img,file,previewId,fileId,caption,ftype,fsize,iData){var self=this,exifObj,value,autoOrientImage=self.autoOrientImage,selector=$h.getZoomSelector(previewId,' img');exifObj=autoOrientImage?self._getExifObj(iData):null;value=exifObj?exifObj['0th'][piexif.ImageIFD.Orientation]:null;if(!value){self._validateImage(previewId,fileId,caption,ftype,fsize,iData,exifObj);return}
self.setImageOrientation($img,$(selector),value,self._getFrame(previewId));self._raise('fileimageoriented',{'$img':$img,'file':file});self._validateImage(previewId,fileId,caption,ftype,fsize,iData,exifObj)},_validateImage:function(previewId,fileId,fname,ftype,fsize,iData,exifObj){var self=this,$preview=self.$preview,params,w1,w2,$thumb=self._getFrame(previewId),i=$thumb.attr('data-fileindex'),$img=$thumb.find('img');fname=fname||'Untitled';$img.one('load',function(){w1=$thumb.width();w2=$preview.width();if(w1>w2){$img.css('width','100%')}
params={ind:i,id:previewId,fileId:fileId};self._checkDimensions(i,'Small',$img,$thumb,fname,'Width',params);self._checkDimensions(i,'Small',$img,$thumb,fname,'Height',params);if(!self.resizeImage){self._checkDimensions(i,'Large',$img,$thumb,fname,'Width',params);self._checkDimensions(i,'Large',$img,$thumb,fname,'Height',params)}
self._raise('fileimageloaded',[previewId]);self.fileManager.addImage(fileId,{ind:i,img:$img,thumb:$thumb,pid:previewId,typ:ftype,siz:fsize,validated:!1,imgData:iData,exifObj:exifObj});$thumb.data('exif',exifObj);self._validateAllImages()}).one('error',function(){self._raise('fileimageloaderror',[previewId])}).each(function(){if(this.complete){$(this).trigger('load')}else{if(this.error){$(this).trigger('error')}}})},_validateAllImages:function(){var self=this,counter={val:0},numImgs=self.fileManager.getImageCount(),fsize,minSize=self.resizeIfSizeMoreThan;if(numImgs!==self.fileManager.totalImages){return}
self._raise('fileimagesloaded');if(!self.resizeImage){return}
$.each(self.fileManager.loadedImages,function(id,config){if(!config.validated){fsize=config.siz;if(fsize&&fsize>minSize*1000){self._getResizedImage(id,config,counter,numImgs)}
config.validated=!0}})},_getResizedImage:function(id,config,counter,numImgs){var self=this,img=$(config.img)[0],width=img.naturalWidth,height=img.naturalHeight,blob,ratio=1,maxWidth=self.maxImageWidth||width,maxHeight=self.maxImageHeight||height,isValidImage=!!(width&&height),chkWidth,chkHeight,canvas=self.imageCanvas,dataURI,context=self.imageCanvasContext,type=config.typ,pid=config.pid,ind=config.ind,$thumb=config.thumb,throwError,msg,exifObj=config.exifObj,exifStr,file,params,evParams;throwError=function(msg,params,ev){if(self.isAjaxUpload){self._showFileError(msg,params,ev)}else{self._showError(msg,params,ev)}
self._setPreviewError($thumb)};file=self.fileManager.getFile(id);params={id:pid,'index':ind,fileId:id};evParams=[id,pid,ind];if(!file||!isValidImage||(width<=maxWidth&&height<=maxHeight)){if(isValidImage&&file){self._raise('fileimageresized',evParams)}
counter.val++;if(counter.val===numImgs){self._raise('fileimagesresized')}
if(!isValidImage){throwError(self.msgImageResizeError,params,'fileimageresizeerror');return}}
type=type||self.resizeDefaultImageType;chkWidth=width>maxWidth;chkHeight=height>maxHeight;if(self.resizePreference==='width'){ratio=chkWidth?maxWidth/width:(chkHeight?maxHeight/height:1)}else{ratio=chkHeight?maxHeight/height:(chkWidth?maxWidth/width:1)}
self._resetCanvas();width*=ratio;height*=ratio;canvas.width=width;canvas.height=height;try{context.drawImage(img,0,0,width,height);dataURI=canvas.toDataURL(type,self.resizeQuality);if(exifObj){exifStr=window.piexif.dump(exifObj);dataURI=window.piexif.insert(exifStr,dataURI)}
blob=$h.dataURI2Blob(dataURI);self.fileManager.setFile(id,blob);self._raise('fileimageresized',evParams);counter.val++;if(counter.val===numImgs){self._raise('fileimagesresized',[undefined,undefined])}
if(!(blob instanceof Blob)){throwError(self.msgImageResizeError,params,'fileimageresizeerror')}}catch(err){counter.val++;if(counter.val===numImgs){self._raise('fileimagesresized',[undefined,undefined])}
msg=self.msgImageResizeException.replace('{errors}',err.message);throwError(msg,params,'fileimageresizeexception')}},_initBrowse:function($container){var self=this,$el=self.$element;if(self.showBrowse){self.$btnFile=$container.find('.btn-file').append($el)}else{$el.appendTo($container).attr('tabindex',-1);$h.addCss($el,'file-no-browse')}},_initClickable:function(){var self=this,$zone,$tmpZone;if(!self.isClickable){return}
$zone=self.$dropZone;if(!self.isAjaxUpload){$tmpZone=self.$preview.find('.file-default-preview');if($tmpZone.length){$zone=$tmpZone}}
$h.addCss($zone,'clickable');$zone.attr('tabindex',-1);self._handler($zone,'click',function(e){var $tar=$(e.target);if(!$(self.elErrorContainer+':visible').length&&(!$tar.parents('.file-preview-thumbnails').length||$tar.parents('.file-default-preview').length)){self.$element.data('zoneClicked',!0).trigger('click');$zone.blur()}})},_initCaption:function(){var self=this,cap=self.initialCaption||'';if(self.overwriteInitial||$h.isEmpty(cap)){self.$caption.val('');return!1}
self._setCaption(cap);return!0},_setCaption:function(content,isError){var self=this,title,out,icon,n,cap,file;if(!self.$caption.length){return}
self.$captionContainer.removeClass('icon-visible');if(isError){title=$('<div>'+self.msgValidationError+'</div>').text();n=self.fileManager.count();if(n){file=self.fileManager.getFirstFile();cap=n===1&&file?file.nameFmt:self._getMsgSelected(n)}else{cap=self._getMsgSelected(self.msgNo)}
out=$h.isEmpty(content)?cap:content;icon='<span class="'+self.msgValidationErrorClass+'">'+self.msgValidationErrorIcon+'</span>'}else{if($h.isEmpty(content)){return}
title=$('<div>'+content+'</div>').text();out=title;icon=self._getLayoutTemplate('fileIcon')}
self.$captionContainer.addClass('icon-visible');self.$caption.attr('title',title).val(out);self.$captionIcon.html(icon)},_createContainer:function(){var self=this,attribs={'class':'file-input file-input-new'+(self.rtl?' kv-rtl':'')},$container=$(document.createElement('div')).attr(attribs).html(self._renderMain());$container.insertBefore(self.$element);self._initBrowse($container);if(self.theme){$container.addClass('theme-'+self.theme)}
return $container},_refreshContainer:function(){var self=this,$container=self.$container,$el=self.$element;$el.insertAfter($container);$container.html(self._renderMain());self._initBrowse($container);self._validateDisabled()},_validateDisabled:function(){var self=this;self.$caption.attr({readonly:self.isDisabled})},_renderMain:function(){var self=this,dropCss=self.dropZoneEnabled?' file-drop-zone':'file-drop-disabled',close=!self.showClose?'':self._getLayoutTemplate('close'),preview=!self.showPreview?'':self._getLayoutTemplate('preview').setTokens({'class':self.previewClass,'dropClass':dropCss}),css=self.isDisabled?self.captionClass+' file-caption-disabled':self.captionClass,caption=self.captionTemplate.setTokens({'class':css+' kv-fileinput-caption'});return self.mainTemplate.setTokens({'class':self.mainClass+(!self.showBrowse&&self.showCaption?' no-browse':''),'preview':preview,'close':close,'caption':caption,'upload':self._renderButton('upload'),'remove':self._renderButton('remove'),'cancel':self._renderButton('cancel'),'pause':self._renderButton('pause'),'browse':self._renderButton('browse')})},_renderButton:function(type){var self=this,tmplt=self._getLayoutTemplate('btnDefault'),css=self[type+'Class'],title=self[type+'Title'],icon=self[type+'Icon'],label=self[type+'Label'],status=self.isDisabled?' disabled':'',btnType='button';switch(type){case 'remove':if(!self.showRemove){return''}
break;case 'cancel':if(!self.showCancel){return''}
css+=' kv-hidden';break;case 'pause':if(!self.showPause){return''}
css+=' kv-hidden';break;case 'upload':if(!self.showUpload){return''}
if(self.isAjaxUpload&&!self.isDisabled){tmplt=self._getLayoutTemplate('btnLink').replace('{href}',self.uploadUrl)}else{btnType='submit'}
break;case 'browse':if(!self.showBrowse){return''}
tmplt=self._getLayoutTemplate('btnBrowse');break;default:return''}
css+=type==='browse'?' btn-file':' fileinput-'+type+' fileinput-'+type+'-button';if(!$h.isEmpty(label)){label=' <span class="'+self.buttonLabelClass+'">'+label+'</span>'}
return tmplt.setTokens({'type':btnType,'css':css,'title':title,'status':status,'icon':icon,'label':label})},_renderThumbProgress:function(){var self=this;return'<div class="file-thumb-progress kv-hidden">'+self.progressInfoTemplate.setTokens({percent:101,status:self.msgUploadBegin,stats:''})+'</div>'},_renderFileFooter:function(cat,caption,size,width,isError){var self=this,config=self.fileActionSettings,rem=config.showRemove,drg=config.showDrag,upl=config.showUpload,zoom=config.showZoom,out,params,template=self._getLayoutTemplate('footer'),tInd=self._getLayoutTemplate('indicator'),ind=isError?config.indicatorError:config.indicatorNew,title=isError?config.indicatorErrorTitle:config.indicatorNewTitle,indicator=tInd.setTokens({'indicator':ind,'indicatorTitle':title});size=self._getSize(size);params={type:cat,caption:caption,size:size,width:width,progress:'',indicator:indicator};if(self.isAjaxUpload){params.progress=self._renderThumbProgress();params.actions=self._renderFileActions(params,upl,!1,rem,zoom,drg,!1,!1,!1)}else{params.actions=self._renderFileActions(params,!1,!1,!1,zoom,drg,!1,!1,!1)}
out=template.setTokens(params);out=$h.replaceTags(out,self.previewThumbTags);return out},_renderFileActions:function(cfg,showUpl,showDwn,showDel,showZoom,showDrag,disabled,url,key,isInit,dUrl,dFile){var self=this;if(!cfg.type&&isInit){cfg.type='image'}
if(self.enableResumableUpload){showUpl=!1}else{if(typeof showUpl==='function'){showUpl=showUpl(cfg)}}
if(typeof showDwn==='function'){showDwn=showDwn(cfg)}
if(typeof showDel==='function'){showDel=showDel(cfg)}
if(typeof showZoom==='function'){showZoom=showZoom(cfg)}
if(typeof showDrag==='function'){showDrag=showDrag(cfg)}
if(!showUpl&&!showDwn&&!showDel&&!showZoom&&!showDrag){return''}
var vUrl=url===!1?'':' data-url="'+url+'"',btnZoom='',btnDrag='',css,vKey=key===!1?'':' data-key="'+key+'"',btnDelete='',btnUpload='',btnDownload='',template=self._getLayoutTemplate('actions'),config=self.fileActionSettings,otherButtons=self.otherActionButtons.setTokens({'dataKey':vKey,'key':key}),removeClass=disabled?config.removeClass+' disabled':config.removeClass;if(showDel){btnDelete=self._getLayoutTemplate('actionDelete').setTokens({'removeClass':removeClass,'removeIcon':config.removeIcon,'removeTitle':config.removeTitle,'dataUrl':vUrl,'dataKey':vKey,'key':key})}
if(showUpl){btnUpload=self._getLayoutTemplate('actionUpload').setTokens({'uploadClass':config.uploadClass,'uploadIcon':config.uploadIcon,'uploadTitle':config.uploadTitle})}
if(showDwn){btnDownload=self._getLayoutTemplate('actionDownload').setTokens({'downloadClass':config.downloadClass,'downloadIcon':config.downloadIcon,'downloadTitle':config.downloadTitle,'downloadUrl':dUrl||self.initialPreviewDownloadUrl});btnDownload=btnDownload.setTokens({'filename':dFile,'key':key})}
if(showZoom){btnZoom=self._getLayoutTemplate('actionZoom').setTokens({'zoomClass':config.zoomClass,'zoomIcon':config.zoomIcon,'zoomTitle':config.zoomTitle})}
if(showDrag&&isInit){css='drag-handle-init '+config.dragClass;btnDrag=self._getLayoutTemplate('actionDrag').setTokens({'dragClass':css,'dragTitle':config.dragTitle,'dragIcon':config.dragIcon})}
return template.setTokens({'delete':btnDelete,'upload':btnUpload,'download':btnDownload,'zoom':btnZoom,'drag':btnDrag,'other':otherButtons})},_browse:function(e){var self=this;if(e&&e.isDefaultPrevented()||!self._raise('filebrowse')){return}
if(self.isError&&!self.isAjaxUpload){self.clear()}
if(self.focusCaptionOnBrowse){self.$captionContainer.focus()}},_change:function(e){var self=this;if(self.changeTriggered){return}
var $el=self.$element,isDragDrop=arguments.length>1,isAjaxUpload=self.isAjaxUpload,tfiles,files=isDragDrop?arguments[1]:$el.get(0).files,ctr=self.fileManager.count(),total,initCount,len,isSingleUpl=$h.isEmpty($el.attr('multiple')),maxCount=!isAjaxUpload&&isSingleUpl?1:self.maxFileCount,maxTotCount=self.maxTotalFileCount,inclAll=maxTotCount>0&&maxTotCount>maxCount,flagSingle=(isSingleUpl&&ctr>0),throwError=function(mesg,file,previewId,index){var p1=$.extend(!0,{},self._getOutData(null,{},{},files),{id:previewId,index:index}),p2={id:previewId,index:index,file:file,files:files};return isAjaxUpload?self._showFileError(mesg,p1):self._showError(mesg,p2)},maxCountCheck=function(n,m,all){var msg=all?self.msgTotalFilesTooMany:self.msgFilesTooMany;msg=msg.replace('{m}',m).replace('{n}',n);self.isError=throwError(msg,null,null,null);self.$captionContainer.removeClass('icon-visible');self._setCaption('',!0);self.$container.removeClass('file-input-new file-input-ajax-new')};self.reader=null;self._resetUpload();self._hideFileIcon();if(self.dropZoneEnabled){self.$container.find('.file-drop-zone .'+self.dropZoneTitleClass).remove()}
if(!isAjaxUpload){if(e.target&&e.target.files===undefined){files=e.target.value?[{name:e.target.value.replace(/^.+\\/,'')}]:[]}else{files=e.target.files||{}}}
tfiles=files;if($h.isEmpty(tfiles)||tfiles.length===0){if(!isAjaxUpload){self.clear()}
self._raise('fileselectnone');return}
self._resetErrors();len=tfiles.length;initCount=isAjaxUpload?(self.fileManager.count()+len):len;total=self._getFileCount(initCount,inclAll?!1:undefined);if(maxCount>0&&total>maxCount){if(!self.autoReplace||len>maxCount){maxCountCheck((self.autoReplace&&len>maxCount?len:total),maxCount);return}
if(total>maxCount){self._resetPreviewThumbs(isAjaxUpload)}}else{if(inclAll){total=self._getFileCount(initCount,!0);if(maxTotCount>0&&total>maxTotCount){if(!self.autoReplace||len>maxCount){maxCountCheck((self.autoReplace&&len>maxTotCount?len:total),maxTotCount,!0);return}
if(total>maxCount){self._resetPreviewThumbs(isAjaxUpload)}}}
if(!isAjaxUpload||flagSingle){self._resetPreviewThumbs(!1);if(flagSingle){self.clearFileStack()}}else{if(isAjaxUpload&&ctr===0&&(!self.previewCache.count(!0)||self.overwriteInitial)){self._resetPreviewThumbs(!0)}}}
self.readFiles(tfiles)},_abort:function(params){var self=this,data;if(self.ajaxAborted&&typeof self.ajaxAborted==='object'&&self.ajaxAborted.message!==undefined){data=$.extend(!0,{},self._getOutData(null),params);data.abortData=self.ajaxAborted.data||{};data.abortMessage=self.ajaxAborted.message;self._setProgress(101,self.$progress,self.msgCancelled);self._showFileError(self.ajaxAborted.message,data,'filecustomerror');self.cancel();return!0}
return!!self.ajaxAborted},_resetFileStack:function(){var self=this,i=0;self._getThumbs().each(function(){var $thumb=$(this),ind=$thumb.attr('data-fileindex'),pid=$thumb.attr('id');if(ind==='-1'||ind===-1){return}
if(!self.fileManager.getFile($thumb.attr('data-fileid'))){$thumb.attr({'data-fileindex':i});i++}else{$thumb.attr({'data-fileindex':'-1'})}
self._getZoom(pid).attr({'data-fileindex':$thumb.attr('data-fileindex')})})},_isFileSelectionValid:function(cnt){var self=this;cnt=cnt||0;if(self.required&&!self.getFilesCount()){self.$errorContainer.html('');self._showFileError(self.msgFileRequired);return!1}
if(self.minFileCount>0&&self._getFileCount(cnt)<self.minFileCount){self._noFilesError({});return!1}
return!0},_canPreview:function(file){var self=this;if(!file||!self.showPreview||!self.$preview||!self.$preview.length){return!1}
var name=file.name||'',type=file.type||'',size=(file.size||0)/1000,cat=self._parseFileType(type,name),allowedTypes,allowedMimes,allowedExts,skipPreview,types=self.allowedPreviewTypes,mimes=self.allowedPreviewMimeTypes,exts=self.allowedPreviewExtensions||[],dTypes=self.disabledPreviewTypes,dMimes=self.disabledPreviewMimeTypes,dExts=self.disabledPreviewExtensions||[],maxSize=self.maxFilePreviewSize&&parseFloat(self.maxFilePreviewSize)||0,expAllExt=new RegExp('\\.('+exts.join('|')+')$','i'),expDisExt=new RegExp('\\.('+dExts.join('|')+')$','i');allowedTypes=!types||types.indexOf(cat)!==-1;allowedMimes=!mimes||mimes.indexOf(type)!==-1;allowedExts=!exts.length||$h.compare(name,expAllExt);skipPreview=(dTypes&&dTypes.indexOf(cat)!==-1)||(dMimes&&dMimes.indexOf(type)!==-1)||(dExts.length&&$h.compare(name,expDisExt))||(maxSize&&!isNaN(maxSize)&&size>maxSize);return!skipPreview&&(allowedTypes||allowedMimes||allowedExts)},addToStack:function(file,id){this.fileManager.add(file,id)},clearFileStack:function(){var self=this;self.fileManager.clear();self._initResumableUpload();if(self.enableResumableUpload){if(self.showPause===null){self.showPause=!0}
if(self.showCancel===null){self.showCancel=!1}}else{self.showPause=!1;if(self.showCancel===null){self.showCancel=!0}}
return self.$element},getFileStack:function(){return this.fileManager.stack},getFileList:function(){return this.fileManager.list()},getFilesCount:function(){var self=this,len=self.isAjaxUpload?self.fileManager.count():self._inputFileCount();return self._getFileCount(len)},readFiles:function(files){this.reader=new FileReader();var self=this,$el=self.$element,reader=self.reader,$container=self.$previewContainer,$status=self.$previewStatus,msgLoading=self.msgLoading,msgProgress=self.msgProgress,previewInitId=self.previewInitId,numFiles=files.length,settings=self.fileTypeSettings,readFile,fileTypes=self.allowedFileTypes,typLen=fileTypes?fileTypes.length:0,fileExt=self.allowedFileExtensions,strExt=$h.isEmpty(fileExt)?'':fileExt.join(', '),throwError=function(msg,file,previewId,index,fileId,removeThumb){var p1=$.extend(!0,{},self._getOutData(null,{},{},files),{id:previewId,index:index,fileId:fileId}),$thumb='',p2={id:previewId,index:index,fileId:fileId,file:file,files:files};removeThumb=removeThumb||self.removeFromPreviewOnError;if(!removeThumb){self._previewDefault(file,!0)}
$thumb=self._getFrame(previewId,!0);if(self.isAjaxUpload){setTimeout(function(){readFile(index+1)},self.processDelay)}else{self.unlock();numFiles=0}
if(removeThumb&&$thumb.length){$thumb.remove()}else{self._initFileActions();$thumb.find('.kv-file-upload').remove()}
self.isError=self.isAjaxUpload?self._showFileError(msg,p1):self._showError(msg,p2);self._updateFileDetails(numFiles)};self.fileManager.clearImages();$.each(files,function(key,file){var func=self.fileTypeSettings.image;if(func&&func(file.type)){self.fileManager.totalImages++}});readFile=function(i){if($h.isEmpty($el.attr('multiple'))){numFiles=1}
if(i>=numFiles){self.unlock();if(self.isAjaxUpload&&self.fileManager.count()>0){self._raise('filebatchselected',[self.fileManager.stack])}else{self._raise('filebatchselected',[files])}
$container.removeClass('file-thumb-loading');$status.html('');return}
self.lock(!0);var file=files[i],previewId=previewInitId+'-'+self._getFileId(file),fSizeKB,j,msg,fnText=settings.text,fnImage=settings.image,fnHtml=settings.html,typ,chk,typ1,typ2,caption=self._getFileName(file,''),fileSize=(file&&file.size||0)/1000,fileExtExpr='',previewData=$h.createObjectURL(file),fileCount=0,strTypes='',fileId,func,knownTypes=0,isText,isHtml,isImage,txtFlag,processFileLoaded=function(){var msg=msgProgress.setTokens({'index':i+1,'files':numFiles,'percent':50,'name':caption});setTimeout(function(){$status.html(msg);self._updateFileDetails(numFiles);readFile(i+1)},self.processDelay);self._raise('fileloaded',[file,previewId,i,reader])};if(!file){return}
fileId=self.fileManager.getId(file);if(typLen>0){for(j=0;j<typLen;j++){typ1=fileTypes[j];typ2=self.msgFileTypes[typ1]||typ1;strTypes+=j===0?typ2:', '+typ2}}
if(caption===!1){readFile(i+1);return}
if(caption.length===0){msg=self.msgInvalidFileName.replace('{name}',$h.htmlEncode($h.getFileName(file),'[unknown]'));throwError(msg,file,previewId,i,fileId);return}
if(!$h.isEmpty(fileExt)){fileExtExpr=new RegExp('\\.('+fileExt.join('|')+')$','i')}
fSizeKB=fileSize.toFixed(2);if(self.isAjaxUpload&&self.fileManager.exists(fileId)||self._getFrame(previewId,!0).length){msg=self.msgDuplicateFile.setTokens({name:caption,size:fSizeKB});throwError(msg,file,previewId,i,fileId,!0);if(!self.isAjaxUpload){self._clearFileInput();self.reset()}
return}
if(self.maxFileSize>0&&fileSize>self.maxFileSize){msg=self.msgSizeTooLarge.setTokens({'name':caption,'size':fSizeKB,'maxSize':self.maxFileSize});throwError(msg,file,previewId,i,fileId);return}
if(self.minFileSize!==null&&fileSize<=$h.getNum(self.minFileSize)){msg=self.msgSizeTooSmall.setTokens({'name':caption,'size':fSizeKB,'minSize':self.minFileSize});throwError(msg,file,previewId,i,fileId);return}
if(!$h.isEmpty(fileTypes)&&$h.isArray(fileTypes)){for(j=0;j<fileTypes.length;j+=1){typ=fileTypes[j];func=settings[typ];fileCount+=!func||(typeof func!=='function')?0:(func(file.type,$h.getFileName(file))?1:0)}
if(fileCount===0){msg=self.msgInvalidFileType.setTokens({name:caption,types:strTypes});throwError(msg,file,previewId,i,fileId);return}}
if(fileCount===0&&!$h.isEmpty(fileExt)&&$h.isArray(fileExt)&&!$h.isEmpty(fileExtExpr)){chk=$h.compare(caption,fileExtExpr);fileCount+=$h.isEmpty(chk)?0:chk.length;if(fileCount===0){msg=self.msgInvalidFileExtension.setTokens({name:caption,extensions:strExt});throwError(msg,file,previewId,i,fileId);return}}
if(!self._canPreview(file)){if(self.isAjaxUpload){self.fileManager.add(file)}
if(self.showPreview){$container.addClass('file-thumb-loading');self._previewDefault(file);self._initFileActions()}
setTimeout(function(){self._updateFileDetails(numFiles);readFile(i+1);self._raise('fileloaded',[file,previewId,i])},10);return}
isText=fnText(file.type,caption);isHtml=fnHtml(file.type,caption);isImage=fnImage(file.type,caption);$status.html(msgLoading.replace('{index}',i+1).replace('{files}',numFiles));$container.addClass('file-thumb-loading');reader.onerror=function(evt){self._errorHandler(evt,caption)};reader.onload=function(theFile){var hex,fileInfo,uint,byte,bytes=[],contents,mime,readTextImage=function(textFlag){var newReader=new FileReader();newReader.onerror=function(theFileNew){self._errorHandler(theFileNew,caption)};newReader.onload=function(theFileNew){self._previewFile(i,file,theFileNew,previewData,fileInfo);self._initFileActions();processFileLoaded()};if(textFlag){newReader.readAsText(file,self.textEncoding)}else{newReader.readAsDataURL(file)}};fileInfo={'name':caption,'type':file.type};$.each(settings,function(k,f){if(k!=='object'&&k!=='other'&&typeof f==='function'&&f(file.type,caption)){knownTypes++}});if(knownTypes===0){uint=new Uint8Array(theFile.target.result);for(j=0;j<uint.length;j++){byte=uint[j].toString(16);bytes.push(byte)}
hex=bytes.join('').toLowerCase().substring(0,8);mime=$h.getMimeType(hex,'','');if($h.isEmpty(mime)){contents=$h.arrayBuffer2String(reader.result);mime=$h.isSvg(contents)?'image/svg+xml':$h.getMimeType(hex,contents,file.type)}
fileInfo={'name':caption,'type':mime};isText=fnText(mime,'');isHtml=fnHtml(mime,'');isImage=fnImage(mime,'');txtFlag=isText||isHtml;if(txtFlag||isImage){readTextImage(txtFlag);return}}
self._previewFile(i,file,theFile,previewData,fileInfo);self._initFileActions();processFileLoaded()};reader.onprogress=function(data){if(data.lengthComputable){var fact=(data.loaded/data.total)*100,progress=Math.ceil(fact);msg=msgProgress.setTokens({'index':i+1,'files':numFiles,'percent':progress,'name':caption});setTimeout(function(){$status.html(msg)},self.processDelay)}};if(isText||isHtml){reader.readAsText(file,self.textEncoding)}else{if(isImage){reader.readAsDataURL(file)}else{reader.readAsArrayBuffer(file)}}
self.fileManager.add(file)};readFile(0);self._updateFileDetails(numFiles,!1)},lock:function(selectMode){var self=this,$container=self.$container;self._resetErrors();self.disable();$container.addClass('is-locked');if(!selectMode&&self.showCancel){$container.find('.fileinput-cancel').show()}
if(!selectMode&&self.showPause){$container.find('.fileinput-pause').show()}
self._raise('filelock',[self.fileManager.stack,self._getExtraData()]);return self.$element},unlock:function(reset){var self=this,$container=self.$container;if(reset===undefined){reset=!0}
self.enable();$container.removeClass('is-locked');if(self.showCancel){$container.find('.fileinput-cancel').hide()}
if(self.showPause){$container.find('.fileinput-pause').hide()}
if(reset){self._resetFileStack()}
self._raise('fileunlock',[self.fileManager.stack,self._getExtraData()]);return self.$element},resume:function(){var self=this,flag=!1,$pr=self.$progress,rm=self.resumableManager;if(!self.enableResumableUpload){return self.$element}
if(self.paused){$pr.html(self.progressPauseTemplate.setTokens({percent:101,status:self.msgUploadResume,stats:''}))}else{flag=!0}
self.paused=!1;if(flag){$pr.html(self.progressInfoTemplate.setTokens({percent:101,status:self.msgUploadBegin,stats:''}))}
setTimeout(function(){rm.upload()},self.processDelay);return self.$element},pause:function(){var self=this,rm=self.resumableManager,xhr=self.ajaxRequests,len=xhr.length,i,pct=rm.getProgress(),actions=self.fileActionSettings;if(!self.enableResumableUpload){return self.$element}
if(rm.chunkIntervalId){clearInterval(rm.chunkIntervalId)}
if(self.ajaxQueueIntervalId){clearInterval(self.ajaxQueueIntervalId)}
self._raise('fileuploadpaused',[self.fileManager,rm]);if(len>0){for(i=0;i<len;i+=1){self.paused=!0;xhr[i].abort()}}
if(self.showPreview){self._getThumbs().each(function(){var $thumb=$(this),fileId=$thumb.attr('data-fileid'),t=self._getLayoutTemplate('stats'),stats,$indicator=$thumb.find('.file-upload-indicator');$thumb.removeClass('file-uploading');if($indicator.attr('title')===actions.indicatorLoadingTitle){self._setThumbStatus($thumb,'Paused');stats=t.setTokens({pendingTime:self.msgPaused,uploadSpeed:''});self.paused=!0;self._setProgress(pct,$thumb.find('.file-thumb-progress'),pct+'%',stats)}
if(!self.fileManager.getFile(fileId)){$thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled')}})}
self._setProgress(101,self.$progress,self.msgPaused);return self.$element},cancel:function(){var self=this,xhr=self.ajaxRequests,rm=self.resumableManager,len=xhr.length,i;if(self.enableResumableUpload&&rm.chunkIntervalId){clearInterval(rm.chunkIntervalId);rm.reset();self._raise('fileuploadcancelled',[self.fileManager,rm])}else{self._raise('fileuploadcancelled',[self.fileManager])}
if(self.ajaxQueueIntervalId){clearInterval(self.ajaxQueueIntervalId)}
self._initAjax();if(len>0){for(i=0;i<len;i+=1){self.cancelling=!0;xhr[i].abort()}}
self._getThumbs().each(function(){var $thumb=$(this),fileId=$thumb.attr('data-fileid'),$prog=$thumb.find('.file-thumb-progress');$thumb.removeClass('file-uploading');self._setProgress(0,$prog);$prog.hide();if(!self.fileManager.getFile(fileId)){$thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled');$thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled')}
self.unlock()});setTimeout(function(){self._setProgressCancelled()},self.processDelay);return self.$element},clear:function(){var self=this,cap;if(!self._raise('fileclear')){return}
self.$btnUpload.removeAttr('disabled');self._getThumbs().find('video,audio,img').each(function(){$h.cleanMemory($(this))});self._clearFileInput();self._resetUpload();self.clearFileStack();self._resetErrors(!0);if(self._hasInitialPreview()){self._showFileIcon();self._resetPreview();self._initPreviewActions();self.$container.removeClass('file-input-new')}else{self._getThumbs().each(function(){self._clearObjects($(this))});if(self.isAjaxUpload){self.previewCache.data={}}
self.$preview.html('');cap=(!self.overwriteInitial&&self.initialCaption.length>0)?self.initialCaption:'';self.$caption.attr('title','').val(cap);$h.addCss(self.$container,'file-input-new');self._validateDefaultPreview()}
if(self.$container.find($h.FRAMES).length===0){if(!self._initCaption()){self.$captionContainer.removeClass('icon-visible')}}
self._hideFileIcon();if(self.focusCaptionOnClear){self.$captionContainer.focus()}
self._setFileDropZoneTitle();self._raise('filecleared');return self.$element},reset:function(){var self=this;if(!self._raise('filereset')){return}
self.lastProgress=0;self._resetPreview();self.$container.find('.fileinput-filename').text('');$h.addCss(self.$container,'file-input-new');if(self.getFrames().length||self.dropZoneEnabled){self.$container.removeClass('file-input-new')}
self.clearFileStack();self._setFileDropZoneTitle();return self.$element},disable:function(){var self=this;self.isDisabled=!0;self._raise('filedisabled');self.$element.attr('disabled','disabled');self.$container.find('.kv-fileinput-caption').addClass('file-caption-disabled');self.$container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button').attr('disabled',!0);$h.addCss(self.$container.find('.btn-file'),'disabled');self._initDragDrop();return self.$element},enable:function(){var self=this;self.isDisabled=!1;self._raise('fileenabled');self.$element.removeAttr('disabled');self.$container.find('.kv-fileinput-caption').removeClass('file-caption-disabled');self.$container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button').removeAttr('disabled');self.$container.find('.btn-file').removeClass('disabled');self._initDragDrop();return self.$element},upload:function(){var self=this,fm=self.fileManager,totLen=fm.count(),i,outData,hasExtraData=!$.isEmptyObject(self._getExtraData());if(!self.isAjaxUpload||self.isDisabled||!self._isFileSelectionValid(totLen)){return}
self.lastProgress=0;self._resetUpload();if(totLen===0&&!hasExtraData){self._showFileError(self.msgUploadEmpty);return}
self.cancelling=!1;self.$progress.show();self.lock();if(totLen===0&&hasExtraData){self._setProgress(2);self._uploadExtraOnly();return}
if(self.enableResumableUpload){return self.resume()}
if(self.uploadAsync||self.enableResumableUpload){outData=self._getOutData(null);self._raise('filebatchpreupload',[outData]);self.fileBatchCompleted=!1;self.uploadCache=[];$.each(self.getFileStack(),function(id){var previewId=self._getThumbId(id);self.uploadCache.push({id:previewId,content:null,config:null,tags:null,append:!0})});self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS);self._initSortable()}
self._setProgress(2);self.hasInitData=!1;if(self.uploadAsync){i=0;$.each(fm.stack,function(id){self._uploadSingle(i,id,!0);i++});return}
self._uploadBatch();return self.$element},destroy:function(){var self=this,$form=self.$form,$cont=self.$container,$el=self.$element,ns=self.namespace;$(document).off(ns);$(window).off(ns);if($form&&$form.length){$form.off(ns)}
if(self.isAjaxUpload){self._clearFileInput()}
self._cleanup();self._initPreviewCache();$el.insertBefore($cont).off(ns).removeData();$cont.off().remove();return $el},refresh:function(options){var self=this,$el=self.$element;if(typeof options!=='object'||$h.isEmpty(options)){options=self.options}else{options=$.extend(!0,{},self.options,options)}
self._init(options,!0);self._listen();return $el},zoom:function(frameId){var self=this,$frame=self._getFrame(frameId),$modal=self.$modal;if(!$frame){return}
$h.initModal($modal);$modal.html(self._getModalContent());self._setZoomContent($frame);$modal.modal('show');self._initZoomButtons()},getExif:function(frameId){var self=this,$frame=self._getFrame(frameId);return $frame&&$frame.data('exif')||null},getFrames:function(cssFilter){var self=this,$frames;cssFilter=cssFilter||'';$frames=self.$preview.find($h.FRAMES+cssFilter);if(self.reversePreviewOrder){$frames=$($frames.get().reverse())}
return $frames},getPreview:function(){var self=this;return{content:self.initialPreview,config:self.initialPreviewConfig,tags:self.initialPreviewThumbTags}}};$.fn.fileinput=function(option){if(!$h.hasFileAPISupport()&&!$h.isIE(9)){return}
var args=Array.apply(null,arguments),retvals=[];args.shift();this.each(function(){var self=$(this),data=self.data('fileinput'),options=typeof option==='object'&&option,theme=options.theme||self.data('theme'),l={},t={},lang=options.language||self.data('language')||$.fn.fileinput.defaults.language||'en',opt;if(!data){if(theme){t=$.fn.fileinputThemes[theme]||{}}
if(lang!=='en'&&!$h.isEmpty($.fn.fileinputLocales[lang])){l=$.fn.fileinputLocales[lang]||{}}
opt=$.extend(!0,{},$.fn.fileinput.defaults,t,$.fn.fileinputLocales.en,l,options,self.data());data=new FileInput(this,opt);self.data('fileinput',data)}
if(typeof option==='string'){retvals.push(data[option].apply(data,args))}});switch(retvals.length){case 0:return this;case 1:return retvals[0];default:return retvals}};$.fn.fileinput.defaults={language:'en',showCaption:!0,showBrowse:!0,showPreview:!0,showRemove:!0,showUpload:!0,showUploadStats:!0,showCancel:null,showPause:null,showClose:!0,showUploadedThumbs:!0,showConsoleLogs:!0,browseOnZoneClick:!1,autoReplace:!1,autoOrientImage:function(){var ua=window.navigator.userAgent,webkit=!!ua.match(/WebKit/i),iOS=!!ua.match(/iP(od|ad|hone)/i),iOSSafari=iOS&&webkit&&!ua.match(/CriOS/i);return!iOSSafari},autoOrientImageInitial:!0,required:!1,rtl:!1,hideThumbnailContent:!1,encodeUrl:!0,focusCaptionOnBrowse:!0,focusCaptionOnClear:!0,generateFileId:null,previewClass:'',captionClass:'',frameClass:'krajee-default',mainClass:'file-caption-main',mainTemplate:null,purifyHtml:!0,fileSizeGetter:null,initialCaption:'',initialPreview:[],initialPreviewDelimiter:'*$$*',initialPreviewAsData:!1,initialPreviewFileType:'image',initialPreviewConfig:[],initialPreviewThumbTags:[],previewThumbTags:{},initialPreviewShowDelete:!0,initialPreviewDownloadUrl:'',removeFromPreviewOnError:!1,deleteUrl:'',deleteExtraData:{},overwriteInitial:!0,sanitizeZoomCache:function(content){var $container=$(document.createElement('div')).append(content);$container.find('input,select,.file-thumbnail-footer').remove();return $container.html()},previewZoomButtonIcons:{prev:'<i class="glyphicon glyphicon-triangle-left"></i>',next:'<i class="glyphicon glyphicon-triangle-right"></i>',toggleheader:'<i class="glyphicon glyphicon-resize-vertical"></i>',fullscreen:'<i class="glyphicon glyphicon-fullscreen"></i>',borderless:'<i class="glyphicon glyphicon-resize-full"></i>',close:'<i class="glyphicon glyphicon-remove"></i>'},previewZoomButtonClasses:{prev:'btn btn-navigate',next:'btn btn-navigate',toggleheader:'btn btn-sm btn-kv btn-default btn-outline-secondary',fullscreen:'btn btn-sm btn-kv btn-default btn-outline-secondary',borderless:'btn btn-sm btn-kv btn-default btn-outline-secondary',close:'btn btn-sm btn-kv btn-default btn-outline-secondary'},previewTemplates:{},previewContentTemplates:{},preferIconicPreview:!1,preferIconicZoomPreview:!1,allowedFileTypes:null,allowedFileExtensions:null,allowedPreviewTypes:undefined,allowedPreviewMimeTypes:null,allowedPreviewExtensions:null,disabledPreviewTypes:undefined,disabledPreviewExtensions:['msi','exe','com','zip','rar','app','vb','scr'],disabledPreviewMimeTypes:null,defaultPreviewContent:null,customLayoutTags:{},customPreviewTags:{},previewFileIcon:'<i class="glyphicon glyphicon-file"></i>',previewFileIconClass:'file-other-icon',previewFileIconSettings:{},previewFileExtSettings:{},buttonLabelClass:'hidden-xs',browseIcon:'<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',browseClass:'btn btn-primary',removeIcon:'<i class="glyphicon glyphicon-trash"></i>',removeClass:'btn btn-default btn-secondary',cancelIcon:'<i class="glyphicon glyphicon-ban-circle"></i>',cancelClass:'btn btn-default btn-secondary',pauseIcon:'<i class="glyphicon glyphicon-pause"></i>',pauseClass:'btn btn-default btn-secondary',uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',uploadClass:'btn btn-default btn-secondary',uploadUrl:null,uploadUrlThumb:null,uploadAsync:!0,uploadParamNames:{chunkCount:'chunkCount',chunkIndex:'chunkIndex',chunkSize:'chunkSize',chunkSizeStart:'chunkSizeStart',chunksUploaded:'chunksUploaded',fileBlob:'fileBlob',fileId:'fileId',fileName:'fileName',fileRelativePath:'fileRelativePath',fileSize:'fileSize',retryCount:'retryCount'},maxAjaxThreads:5,processDelay:100,queueDelay:10,progressDelay:0,enableResumableUpload:!1,resumableUploadOptions:{fallback:null,testUrl:null,chunkSize:2*1024,maxThreads:4,maxRetries:3,showErrorLog:!0},uploadExtraData:{},zoomModalHeight:480,minImageWidth:null,minImageHeight:null,maxImageWidth:null,maxImageHeight:null,resizeImage:!1,resizePreference:'width',resizeQuality:0.92,resizeDefaultImageType:'image/jpeg',resizeIfSizeMoreThan:0,minFileSize:0,maxFileSize:0,maxFilePreviewSize:25600,minFileCount:0,maxFileCount:0,maxTotalFileCount:0,validateInitialCount:!1,msgValidationErrorClass:'text-danger',msgValidationErrorIcon:'<i class="glyphicon glyphicon-exclamation-sign"></i> ',msgErrorClass:'file-error-message',progressThumbClass:'progress-bar progress-bar-striped active',progressClass:'progress-bar bg-success progress-bar-success progress-bar-striped active',progressInfoClass:'progress-bar bg-info progress-bar-info progress-bar-striped active',progressCompleteClass:'progress-bar bg-success progress-bar-success',progressPauseClass:'progress-bar bg-primary progress-bar-primary progress-bar-striped active',progressErrorClass:'progress-bar bg-danger progress-bar-danger',progressUploadThreshold:99,previewFileType:'image',elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,errorCloseButton:$h.closeButton('kv-error-close'),slugCallback:null,dropZoneEnabled:!0,dropZoneTitleClass:'file-drop-zone-title',fileActionSettings:{},otherActionButtons:'',textEncoding:'UTF-8',ajaxSettings:{},ajaxDeleteSettings:{},showAjaxErrorDetails:!0,mergeAjaxCallbacks:!1,mergeAjaxDeleteCallbacks:!1,retryErrorUploads:!0,reversePreviewOrder:!1,usePdfRenderer:function(){var isIE11=!!window.MSInputMethodContext&&!!document.documentMode;return!!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)||isIE11},pdfRendererUrl:'',pdfRendererTemplate:'<iframe class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}></iframe>'};$.fn.fileinputLocales.en={fileSingle:'file',filePlural:'files',browseLabel:'Browse &hellip;',removeLabel:'Remove',removeTitle:'Clear all unprocessed files',cancelLabel:'Cancel',cancelTitle:'Abort ongoing upload',pauseLabel:'Pause',pauseTitle:'Pause ongoing upload',uploadLabel:'Upload',uploadTitle:'Upload selected files',msgNo:'No',msgNoFilesSelected:'No files selected',msgCancelled:'Cancelled',msgPaused:'Paused',msgPlaceholder:'Select {files}...',msgZoomModalHeading:'Detailed Preview',msgFileRequired:'You must select a file to upload.',msgSizeTooSmall:'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',msgSizeTooLarge:'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',msgFilesTooLess:'You must select at least <b>{n}</b> {files} to upload.',msgFilesTooMany:'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',msgTotalFilesTooMany:'You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).',msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileName:'Invalid or unsupported characters in file name "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgFileTypes:{'image':'image','html':'HTML','text':'text','video':'video','audio':'audio','flash':'flash','pdf':'PDF','object':'object'},msgUploadAborted:'The file upload was aborted',msgUploadThreshold:'Processing...',msgUploadBegin:'Initializing...',msgUploadEnd:'Done',msgUploadResume:'Resuming upload...',msgUploadEmpty:'No valid data available for upload.',msgUploadError:'Upload Error',msgDeleteError:'Delete Error',msgProgressError:'Error',msgValidationError:'Validation Error',msgLoading:'Loading file {index} of {files} &hellip;',msgProgress:'Loading file {index} of {files} - {name} - {percent}% completed.',msgSelected:'{n} {files} selected',msgFoldersNotAllowed:'Drag & drop files only! {n} folder(s) dropped were skipped.',msgImageWidthSmall:'Width of image file "{name}" must be at least {size} px.',msgImageHeightSmall:'Height of image file "{name}" must be at least {size} px.',msgImageWidthLarge:'Width of image file "{name}" cannot exceed {size} px.',msgImageHeightLarge:'Height of image file "{name}" cannot exceed {size} px.',msgImageResizeError:'Could not get the image dimensions to resize.',msgImageResizeException:'Error while resizing the image.<pre>{errors}</pre>',msgAjaxError:'Something went wrong with the {operation} operation. Please try again later!',msgAjaxProgressError:'{operation} failed',msgDuplicateFile:'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:'Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>',msgPendingTime:'{time} remaining',msgCalculatingTime:'calculating time remaining',ajaxOperations:{deleteThumb:'file delete',uploadThumb:'file upload',uploadBatch:'batch file upload',uploadExtra:'form data upload'},dropZoneTitle:'Drag & drop files here &hellip;',dropZoneClickTitle:'<br>(or click to select {files})',previewZoomButtonTitles:{prev:'View previous file',next:'View next file',toggleheader:'Toggle header',fullscreen:'Toggle full screen',borderless:'Toggle borderless mode',close:'Close detailed preview'}};$.fn.fileinput.Constructor=FileInput;$(document).ready(function(){var $input=$('input.file[type=file]');if($input.length){$input.fileinput()}})}));(function($){"use strict";$.fn.fileinputThemes.fas={fileActionSettings:{removeIcon:'<i class="fas fa-trash-alt"></i>',uploadIcon:'<i class="fas fa-upload"></i>',uploadRetryIcon:'<i class="fas fa-redo-alt"></i>',downloadIcon:'<i class="fas fa-download"></i>',zoomIcon:'<i class="fas fa-search-plus"></i>',dragIcon:'<i class="fas fa-arrows-alt"></i>',indicatorNew:'<i class="fas fa-plus-circle text-warning"></i>',indicatorSuccess:'<i class="fas fa-check-circle text-success"></i>',indicatorError:'<i class="fas fa-exclamation-circle text-danger"></i>',indicatorLoading:'<i class="fas fa-hourglass text-muted"></i>',indicatorPaused:'<i class="fa fa-pause text-info"></i>'},layoutTemplates:{fileIcon:'<i class="fas fa-file kv-caption-icon"></i> '},previewZoomButtonIcons:{prev:'<i class="fas fa-caret-left fa-lg"></i>',next:'<i class="fas fa-caret-right fa-lg"></i>',toggleheader:'<i class="fas fa-fw fa-arrows-alt-v"></i>',fullscreen:'<i class="fas fa-fw fa-arrows-alt"></i>',borderless:'<i class="fas fa-fw fa-external-link-alt"></i>',close:'<i class="fas fa-fw fa-times"></i>'},previewFileIcon:'<i class="fas fa-file"></i>',browseIcon:'<i class="fas fa-folder-open"></i>',removeIcon:'<i class="fas fa-trash-alt"></i>',cancelIcon:'<i class="fas fa-ban"></i>',pauseIcon:'<i class="fas fa-pause"></i>',uploadIcon:'<i class="fas fa-upload"></i>',msgValidationErrorIcon:'<i class="fas fa-exclamation-circle"></i> '}})(window.jQuery);(function($){"use strict";$.fn.fileinputLocales.de={fileSingle:'Datei',filePlural:'Dateien',browseLabel:'Auswählen &hellip;',removeLabel:'Löschen',removeTitle:'Ausgewählte löschen',cancelLabel:'Abbrechen',cancelTitle:'Hochladen abbrechen',pauseLabel:'Pause',pauseTitle:'Pause ongoing upload',uploadLabel:'Hochladen',uploadTitle:'Hochladen der ausgewählten Dateien',msgNo:'Keine',msgNoFilesSelected:'Keine Dateien ausgewählt',msgPaused:'Paused',msgCancelled:'Abgebrochen',msgPlaceholder:'{files} auswählen...',msgZoomModalHeading:'ausführliche Vorschau',msgFileRequired:'Sie müssen eine Datei zum Hochladen auswählen.',msgSizeTooSmall:'Datei "{name}" (<b>{size} KB</b>) unterschreitet mindestens notwendige Upload-Größe von <b>{minSize} KB</b>.',msgSizeTooLarge:'Datei "{name}" (<b>{size} KB</b>) überschreitet maximal zulässige Upload-Größe von <b>{maxSize} KB</b>.',msgFilesTooLess:'Sie müssen mindestens <b>{n}</b> {files} zum Hochladen auswählen.',msgFilesTooMany:'Anzahl der zum Hochladen ausgewählten Dateien <b>({n})</b>, überschreitet maximal zulässige Grenze von <b>{m}</b> Stück.',msgTotalFilesTooMany:'You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).',msgFileNotFound:'Datei "{name}" wurde nicht gefunden!',msgFileSecured:'Sicherheitseinstellungen verhindern das Lesen der Datei "{name}".',msgFileNotReadable:'Die Datei "{name}" ist nicht lesbar.',msgFilePreviewAborted:'Dateivorschau abgebrochen für "{name}".',msgFilePreviewError:'Beim Lesen der Datei "{name}" ein Fehler aufgetreten.',msgInvalidFileName:'Ungültige oder nicht unterstützte Zeichen im Dateinamen "{name}".',msgInvalidFileType:'Ungültiger Typ für Datei "{name}". Nur Dateien der Typen "{types}" werden unterstützt.',msgInvalidFileExtension:'Ungültige Erweiterung für Datei "{name}". Nur Dateien mit der Endung "{extensions}" werden unterstützt.',msgFileTypes:{'image':'image','html':'HTML','text':'text','video':'video','audio':'audio','flash':'flash','pdf':'PDF','object':'object'},msgUploadAborted:'Der Datei-Upload wurde abgebrochen',msgUploadThreshold:'Wird bearbeitet ...',msgUploadBegin:'Wird initialisiert ...',msgUploadEnd:'Erledigt',msgUploadResume:'Resuming upload...',msgUploadEmpty:'Keine gültigen Daten zum Hochladen verfügbar.',msgUploadError:'Upload Error',msgDeleteError:'Delete Error',msgProgressError:'Fehler',msgValidationError:'Validierungsfehler',msgLoading:'Lade Datei {index} von {files} hoch&hellip;',msgProgress:'Datei {index} von {files} - {name} - zu {percent}% fertiggestellt.',msgSelected:'{n} {files} ausgewählt',msgFoldersNotAllowed:'Drag & Drop funktioniert nur bei Dateien! {n} Ordner übersprungen.',msgImageWidthSmall:'Breite der Bilddatei "{name}" muss mindestens {size} px betragen.',msgImageHeightSmall:'Höhe der Bilddatei "{name}" muss mindestens {size} px betragen.',msgImageWidthLarge:'Breite der Bilddatei "{name}" nicht überschreiten {size} px.',msgImageHeightLarge:'Höhe der Bilddatei "{name}" nicht überschreiten {size} px.',msgImageResizeError:'Konnte nicht die Bildabmessungen zu ändern.',msgImageResizeException:'Fehler beim Ändern der Größe des Bildes.<pre>{errors}</pre>',msgAjaxError:'Bei der Aktion {operation} ist ein Fehler aufgetreten. Bitte versuche es später noch einmal!',msgAjaxProgressError:'{operation} fehlgeschlagen',msgDuplicateFile:'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:'Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>',msgPendingTime:'{time} remaining',msgCalculatingTime:'calculating time remaining',ajaxOperations:{deleteThumb:'Datei löschen',uploadThumb:'Datei hochladen',uploadBatch:'Batch-Datei-Upload',uploadExtra:'Formular-Datei-Upload'},dropZoneTitle:'Dateien hierher ziehen &hellip;',dropZoneClickTitle:'<br>(oder klicken um {files} auszuwählen)',fileActionSettings:{removeTitle:'Datei entfernen',uploadTitle:'Datei hochladen',uploadRetryTitle:'Upload erneut versuchen',downloadTitle:'Datei herunterladen',zoomTitle:'Details anzeigen',dragTitle:'Verschieben / Neuordnen',indicatorNewTitle:'Noch nicht hochgeladen',indicatorSuccessTitle:'Hochgeladen',indicatorErrorTitle:'Upload Fehler',indicatorPausedTitle:'Upload Paused',indicatorLoadingTitle:'Hochladen ...'},previewZoomButtonTitles:{prev:'Vorherige Datei anzeigen',next:'Nächste Datei anzeigen',toggleheader:'Header umschalten',fullscreen:'Vollbildmodus umschalten',borderless:'Randlosen Modus umschalten',close:'Detailansicht schließen'}}})(window.jQuery);!function(a){"use strict";a.ThreeSixty=function(b,c){var d,e=this,f=[];e.$el=a(b),e.el=b,e.$el.data("ThreeSixty",e),e.init=function(){d=a.extend({},a.ThreeSixty.defaultOptions,c),d.disableSpin&&(d.currentFrame=1,d.endFrame=1),e.initProgress(),e.loadImages()},e.resize=function(){},e.initProgress=function(){e.$el.css({width:d.width+"px",height:d.height+"px","background-image":"none !important"}),d.styles&&e.$el.css(d.styles),e.responsive(),e.$el.find(d.progress).css({marginTop:d.height/2-15+"px"}),e.$el.find(d.progress).fadeIn("slow"),e.$el.find(d.imgList).hide()},e.loadImages=function(){var b,c,g,h;b=document.createElement("li"),h=d.zeroBased?0:1,c=d.imgArray?d.imgArray[d.loadedImages]:d.domain+d.imagePath+d.filePrefix+e.zeroPad(d.loadedImages+h)+d.ext+(e.browser.isIE()?"?"+(new Date).getTime():""),g=a("<img>").attr("src",c).addClass("previous-image").appendTo(b),f.push(g),e.$el.find(d.imgList).append(b),a(g).load(function(){e.imageLoaded()})},e.imageLoaded=function(){d.loadedImages+=1,a(d.progress+" span").text(Math.floor(d.loadedImages/d.totalFrames*100)+"%"),d.loadedImages>=d.totalFrames?(d.disableSpin&&f[0].removeClass("previous-image").addClass("current-image"),a(d.progress).fadeOut("slow",function(){a(this).hide(),e.showImages(),e.showNavigation()})):e.loadImages()},e.showImages=function(){e.$el.find(".txtC").fadeIn(),e.$el.find(d.imgList).fadeIn(),e.ready=!0,d.ready=!0,d.drag&&e.initEvents(),e.refresh(),e.initPlugins(),d.onReady(),setTimeout(function(){e.responsive()},50)},e.initPlugins=function(){a.each(d.plugins,function(b,c){if("function"!=typeof a[c])throw new Error(c+" not available.");a[c].call(e,e.$el,d)})},e.showNavigation=function(){if(d.navigation&&!d.navigation_init){var b,c,f,g;b=a("<div/>").attr("class","nav_bar"),c=a("<a/>").attr({href:"#","class":"nav_bar_next"}).html("next"),f=a("<a/>").attr({href:"#","class":"nav_bar_previous"}).html("previous"),g=a("<a/>").attr({href:"#","class":"nav_bar_play"}).html("play"),b.append(f),b.append(g),b.append(c),e.$el.prepend(b),c.bind("mousedown touchstart",e.next),f.bind("mousedown touchstart",e.previous),g.bind("mousedown touchstart",e.play_stop),d.navigation_init=!0}},e.play_stop=function(b){b.preventDefault(),d.autoplay?(d.autoplay=!1,a(b.currentTarget).removeClass("nav_bar_stop").addClass("nav_bar_play"),clearInterval(d.play),d.play=null):(d.autoplay=!0,d.play=setInterval(e.moveToNextFrame,d.playSpeed),a(b.currentTarget).removeClass("nav_bar_play").addClass("nav_bar_stop"))},e.next=function(a){a&&a.preventDefault(),d.endFrame-=5,e.refresh()},e.previous=function(a){a&&a.preventDefault(),d.endFrame+=5,e.refresh()},e.play=function(a,b){var c=a||d.playSpeed,f=b||d.autoplayDirection;d.autoplayDirection=f,d.autoplay||(d.autoplay=!0,d.play=setInterval(e.moveToNextFrame,c))},e.stop=function(){d.autoplay&&(d.autoplay=!1,clearInterval(d.play),d.play=null)},e.moveToNextFrame=function(){1===d.autoplayDirection?d.endFrame-=1:d.endFrame+=1,e.refresh()},e.gotoAndPlay=function(a){if(d.disableWrap)d.endFrame=a,e.refresh();else{var b=Math.ceil(d.endFrame/d.totalFrames);0===b&&(b=1);var c=b>1?d.endFrame-(b-1)*d.totalFrames:d.endFrame,f=d.totalFrames-c,g=0;g=a-c>0?a-c<c+(d.totalFrames-a)?d.endFrame+(a-c):d.endFrame-(c+(d.totalFrames-a)):f+a>c-a?d.endFrame-(c-a):d.endFrame+(f+a),c!==a&&(d.endFrame=g,e.refresh())}},e.initEvents=function(){e.$el.bind("mousedown touchstart touchmove touchend mousemove click",function(a){a.preventDefault(),"mousedown"===a.type&&1===a.which||"touchstart"===a.type?(d.pointerStartPosX=e.getPointerEvent(a).pageX,d.dragging=!0,d.onDragStart(d.currentFrame)):"touchmove"===a.type?e.trackPointer(a):"touchend"===a.type&&(d.dragging=!1,d.onDragStop(d.endFrame))}),a(document).bind("mouseup",function(b){d.dragging=!1,d.onDragStop(d.endFrame),a(this).css("cursor","none")}),a(window).bind("resize",function(a){e.responsive()}),a(document).bind("mousemove",function(a){d.dragging?(a.preventDefault(),!e.browser.isIE&&d.showCursor&&e.$el.css("cursor","url(assets/images/hand_closed.png), auto")):!e.browser.isIE&&d.showCursor&&e.$el.css("cursor","url(assets/images/hand_open.png), auto"),e.trackPointer(a)}),a(window).resize(function(){e.resize()})},e.getPointerEvent=function(a){return a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:a},e.trackPointer=function(a){d.ready&&d.dragging&&(d.pointerEndPosX=e.getPointerEvent(a).pageX,d.monitorStartTime<(new Date).getTime()-d.monitorInt&&(d.pointerDistance=d.pointerEndPosX-d.pointerStartPosX,d.pointerDistance>0?d.endFrame=d.currentFrame+Math.ceil((d.totalFrames-1)*d.speedMultiplier*(d.pointerDistance/e.$el.width())):d.endFrame=d.currentFrame+Math.floor((d.totalFrames-1)*d.speedMultiplier*(d.pointerDistance/e.$el.width())),d.disableWrap&&(d.endFrame=Math.min(d.totalFrames-(d.zeroBased?1:0),d.endFrame),d.endFrame=Math.max(d.zeroBased?0:1,d.endFrame)),e.refresh(),d.monitorStartTime=(new Date).getTime(),d.pointerStartPosX=e.getPointerEvent(a).pageX))},e.refresh=function(){0===d.ticker&&(d.ticker=setInterval(e.render,Math.round(1e3/d.framerate)))},e.render=function(){var a;d.currentFrame!==d.endFrame?(a=d.endFrame<d.currentFrame?Math.floor(.1*(d.endFrame-d.currentFrame)):Math.ceil(.1*(d.endFrame-d.currentFrame)),e.hidePreviousFrame(),d.currentFrame+=a,e.showCurrentFrame(),e.$el.trigger("frameIndexChanged",[e.getNormalizedCurrentFrame(),d.totalFrames])):(window.clearInterval(d.ticker),d.ticker=0)},e.hidePreviousFrame=function(){f[e.getNormalizedCurrentFrame()].removeClass("current-image").addClass("previous-image")},e.showCurrentFrame=function(){f[e.getNormalizedCurrentFrame()].removeClass("previous-image").addClass("current-image")},e.getNormalizedCurrentFrame=function(){var a,b;return d.disableWrap?(a=Math.min(d.currentFrame,d.totalFrames-(d.zeroBased?1:0)),b=Math.min(d.endFrame,d.totalFrames-(d.zeroBased?1:0)),a=Math.max(a,d.zeroBased?0:1),b=Math.max(b,d.zeroBased?0:1),d.currentFrame=a,d.endFrame=b):(a=Math.ceil(d.currentFrame%d.totalFrames),0>a&&(a+=d.totalFrames-(d.zeroBased?1:0))),a},e.getCurrentFrame=function(){return d.currentFrame},e.responsive=function(){d.responsive&&e.$el.css({height:e.$el.find(".current-image").first().css("height"),width:"100%"})},e.zeroPad=function(a){function b(a,b){var c=a.toString();if(d.zeroPadding)for(;c.length<b;)c="0"+c;return c}var c=Math.log(d.totalFrames)/Math.LN10,e=1e3,f=Math.round(c*e)/e,g=Math.floor(f)+1;return b(a,g)},e.browser={},e.browser.isIE=function(){var a=-1;if("Microsoft Internet Explorer"===navigator.appName){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");null!==c.exec(b)&&(a=parseFloat(RegExp.$1))}return-1!==a},e.getConfig=function(){return d},a.ThreeSixty.defaultOptions={dragging:!1,ready:!1,pointerStartPosX:0,pointerEndPosX:0,pointerDistance:0,monitorStartTime:0,monitorInt:10,ticker:0,speedMultiplier:7,totalFrames:180,currentFrame:0,endFrame:0,loadedImages:0,framerate:60,domains:null,domain:"",parallel:!1,queueAmount:8,idle:0,filePrefix:"",ext:"png",height:300,width:300,styles:{},navigation:!1,autoplay:!1,autoplayDirection:1,disableSpin:!1,disableWrap:!1,responsive:!1,zeroPadding:!1,zeroBased:!1,plugins:[],showCursor:!1,drag:!0,onReady:function(){},onDragStart:function(){},onDragStop:function(){},imgList:".threesixty_images",imgArray:null,playSpeed:100},e.init()},a.fn.ThreeSixty=function(b){return Object.create(new a.ThreeSixty(this,b))}}(jQuery),"function"!=typeof Object.create&&(Object.create=function(a){"use strict";function b(){}return b.prototype=a,new b});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).FullCalendar={})}(this,function(e){"use strict";var t={className:!0,colSpan:!0,rowSpan:!0},n={"<tr":"tbody","<td":"tr"};function r(e,n,r){var i=document.createElement(e);if(n)for(var o in n)"style"===o?y(i,n[o]):t[o]?i[o]=n[o]:i.setAttribute(o,n[o]);return"string"==typeof r?i.innerHTML=r:null!=r&&s(i,r),i}function i(e){e=e.trim();var t=document.createElement(a(e));return t.innerHTML=e,t.firstChild}function o(e){return Array.prototype.slice.call(function(e){e=e.trim();var t=document.createElement(a(e));return t.innerHTML=e,t.childNodes}(e))}function a(e){return n[e.substr(0,3)]||"div"}function s(e,t){for(var n=l(t),r=0;r<n.length;r++)e.appendChild(n[r])}function u(e,t){for(var n=l(t),r=e.firstChild||null,i=0;i<n.length;i++)e.insertBefore(n[i],r)}function l(e){return"string"==typeof e?o(e):e instanceof Node?[e]:Array.prototype.slice.call(e)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}var d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector,f=Element.prototype.closest||function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(h(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null};function p(e,t){return f.call(e,t)}function h(e,t){return d.call(e,t)}function v(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),a=0;a<o.length;a++)r.push(o[a]);return r}var g=/(top|left|right|bottom|width|height)$/i;function y(e,t){for(var n in t)m(e,n,t[n])}function m(e,t,n){null==n?e.style[t]="":"number"==typeof n&&g.test(t)?e.style[t]=n+"px":e.style[t]=n}function E(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}var S=null;function b(){return null===S&&(S=function(){var e=r("div",{style:{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}},"<div></div>");document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return c(e),t}()),S}function D(e){return e=Math.max(0,e),e=Math.round(e)}function T(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=D(e.offsetWidth-e.clientWidth-r-i),u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:a,scrollbarBottom:D(e.offsetHeight-e.clientHeight-o-a),scrollbarLeft:0,scrollbarRight:0};return b()&&"rtl"===n.direction?u.scrollbarLeft=s:u.scrollbarRight=s,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function w(e,t){void 0===t&&(t=!1);var n=R(e),r=T(e,t),i={left:n.left+r.borderLeft+r.scrollbarLeft,right:n.right-r.borderRight-r.scrollbarRight,top:n.top+r.borderTop,bottom:n.bottom-r.borderBottom-r.scrollbarBottom};return t&&(i.left+=r.paddingLeft,i.right-=r.paddingRight,i.top+=r.paddingTop,i.bottom-=r.paddingBottom),i}function R(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function I(e){return e.getBoundingClientRect().height+C(e)}function C(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}function M(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function k(e){e.preventDefault()}function O(e,t,n,r){function i(e){var t=p(e.target,n);t&&r.call(t,e,t)}return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var _=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];var P=["sun","mon","tue","wed","thu","fri","sat"];function x(e,t){var n=Z(e);return n[2]+=t,j(n)}function H(e,t){var n=Z(e);return n[6]+=t,j(n)}function N(e,t){return(t.valueOf()-e.valueOf())/864e5}function z(e,t){var n=B(e),r=B(t);return{years:0,months:0,days:Math.round(N(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function U(e,t){var n=L(e,t);return null!==n&&n%7==0?n/7:null}function L(e,t){return q(e)===q(t)?Math.round(N(e,t)):null}function B(e){return j([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function V(e,t,n,r){var i=j([t,0,1+A(t,n,r)]),o=B(e),a=Math.round(N(i,o));return Math.floor(a/7)+1}function A(e,t,n){var r=7+t-n;return-((7+j([e,0,r]).getUTCDay()-t)%7)+r-1}function F(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function W(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Z(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function j(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Y(e){return!isNaN(e.valueOf())}function q(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}var G=["years","months","days","milliseconds"],X=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function J(e,t){var n;return"string"==typeof e?function(e){var t=X.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?K(e):"number"==typeof e?K(((n={})[t||"milliseconds"]=e,n)):null}function K(e){return{years:e.years||e.year||0,months:e.months||e.month||0,days:(e.days||e.day||0)+7*Q(e),milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)}}function Q(e){return e.weeks||e.week||0}function $(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function ee(e){return te(e)/864e5}function te(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function ne(e,t){var n=e.milliseconds;if(n){if(n%1e3!=0)return{unit:"millisecond",value:n};if(n%6e4!=0)return{unit:"second",value:n/1e3};if(n%36e5!=0)return{unit:"minute",value:n/6e4};if(n)return{unit:"hour",value:n/36e5}}return e.days?t||e.days%7!=0?{unit:"day",value:e.days}:{unit:"week",value:e.days/7}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function re(e){e.forEach(function(e){e.style.height=""})}function ie(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function oe(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):se(e[n.field],t[n.field])*(n.order||1)}function se(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e){return e.charAt(0).toUpperCase()+e.slice(1)}function le(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e){return e%1==0}function de(e,t,n){if("function"==typeof e&&(e=[e]),e){var r=void 0,i=void 0;for(r=0;r<e.length;r++)i=e[r].apply(t,n)||i;return i}}function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)if(void 0!==e[n])return e[n]}function pe(e,t){var n,r,i,o,a,s=function(){var u=(new Date).valueOf()-o;u<t?n=setTimeout(s,t-u):(n=null,a=e.apply(i,r),i=r=null)};return function(){return i=this,r=arguments,o=(new Date).valueOf(),n||(n=setTimeout(s,t)),a}}function he(e,t,n,r){void 0===n&&(n={});var i={};for(var o in t){var a=t[o];void 0!==e[o]?a===Function?i[o]="function"==typeof e[o]?e[o]:null:i[o]=a?a(e[o]):e[o]:void 0!==n[o]?i[o]=n[o]:a===String?i[o]="":a&&a!==Number&&a!==Boolean&&a!==Function?i[o]=a(null):i[o]=null}if(r)for(var o in e)void 0===t[o]&&(r[o]=e[o]);return i}function ve(e){var t=Math.floor(N(e.start,e.end))||1,n=B(e.start);return{start:n,end:x(n,t)}}function ge(e,t){void 0===t&&(t=J(0));var n=null,r=null;if(e.end){r=B(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=te(t)&&(r=x(r,1))}return e.start&&(n=B(e.start),r&&r<=n&&(r=x(n,1))),{start:n,end:r}}function ye(e,t,n,r){return"year"===r?J(n.diffWholeYears(e,t),"year"):"month"===r?J(n.diffWholeMonths(e,t),"month"):z(e,t)}var me=function(e,t){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function Ee(e,t){function n(){this.constructor=e}me(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Se=function(){return(Se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function be(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(B)),o}var De=Object.prototype.hasOwnProperty;function Te(e,t){var n,r,i,o,a,s,u={};if(t)for(n=0;n<t.length;n++){for(r=t[n],i=[],o=e.length-1;o>=0;o--)if("object"==typeof(a=e[o][r])&&a)i.unshift(a);else if(void 0!==a){u[r]=a;break}i.length&&(u[r]=Te(i))}for(n=e.length-1;n>=0;n--)for(r in s=e[n])r in u||(u[r]=s[r]);return u}function we(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Ie(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Ce(e){var t=[];for(var n in e)t.push(e[n]);return t}function Me(e,t){for(var n in e)if(De.call(e,n)&&!(n in t))return!1;for(var n in t)if(De.call(t,n)&&e[n]!==t[n])return!1;return!0}function ke(e,t,n,r){for(var i={defs:{},instances:{}},o=0,a=e;o<a.length;o++){var s=Ft(a[o],t,n,r);s&&Oe(s,i)}return i}function Oe(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function _e(e,t,n){var r=n.dateEnv,i=e.defs,o=e.instances;for(var a in o=we(o,function(e){return!i[e.defId].recurringDef}),i){var s=i[a];if(s.recurringDef){var u=s.recurringDef.duration;u||(u=s.allDay?n.defaultAllDayEventDuration:n.defaultTimedEventDuration);for(var l=0,c=be(s,u,t,n.dateEnv,n.pluginSystem.hooks.recurringTypes);l<c.length;l++){var d=c[l],f=Zt(a,{start:d,end:r.add(d,u)});o[f.instanceId]=f}}}return{defs:i,instances:o}}function Pe(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=ze(e,function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n});return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function xe(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],a=t(o);a?n.push(a):null==a&&n.push(o)}}else n=e;return n}function He(){return{defs:{},instances:{}}}function Ne(e,t){return{defs:Se({},e.defs,t.defs),instances:Se({},e.instances,t.instances)}}function ze(e,t){var n=we(e.defs,t),r=we(e.instances,function(e){return n[e.defId]});return{defs:n,instances:r}}function Ue(e,t){var n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}function Le(e,t){var n,r,i=[],o=t.start;for(e.sort(Be),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function Be(e,t){return e.start.valueOf()-t.start.valueOf()}function Ve(e,t){var n=e.start,r=e.end,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function Ae(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function Fe(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function We(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Ze(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function je(e,t){var n,r=e.length;if(r!==t.length)return!1;for(n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Ye(e){var t,n;return function(){return t&&je(t,arguments)||(t=arguments,n=e.apply(this,arguments)),n}}function qe(e,t){var n=null;return function(){var r=e.apply(this,arguments);return(null===n||n!==r&&!t(n,r))&&(n=r),n}}var Ge={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Xe={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Je=/\s*([ap])\.?m\.?/i,Ke=/,/g,Qe=/\s+/g,$e=/\u200e/g,et=/UTC|GMT/,tt=function(){function e(e){var t={},n={},r=0;for(var i in e)i in Ge?(n[i]=e[i],r=Math.max(Ge[i],r)):(t[i]=e[i],i in Xe&&(r=Math.max(Xe[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Ye(nt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n){var r=this.standardDateProps,i=this.extendedSettings,o=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(q(e)!==q(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);var a=o;!(a>1)||"numeric"!==r.year&&"2-digit"!==r.year||"numeric"!==r.month&&"2-digit"!==r.month||"numeric"!==r.day&&"2-digit"!==r.day||(a=1);var s=this.format(e,n),u=this.format(t,n);if(s===u)return s;var l=nt(function(e,t){var n={};for(var r in e)r in Xe&&!(Xe[r]<=t)||(n[r]=e[r]);return n}(r,a),i,n),c=l(e),d=l(t),f=function(e,t,n,r){var i=0;for(;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var a=e.substr(0,o);i=o+t.length;for(var s=e.substr(i),u=0;u<n.length;){var l=n.indexOf(r,u);if(-1===l)break;var c=n.substr(0,l);u=l+r.length;var d=n.substr(u);if(a===c&&s===d)return{before:a,after:s}}}return null}(s,c,u,d),p=i.separator||"";return f?f.before+c+p+d+f.after:s+p+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";default:return"day"}},e}();function nt(e,t,n){var r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?function(e){return at(e.timeZoneOffset)}:0===r&&t.week?function(e){return function(e,t,n,r){var i=[];"narrow"===r?i.push(t):"short"===r&&i.push(t," ");i.push(n.simpleNumberFormat.format(e)),n.options.isRtl&&i.reverse();return i.join("")}(n.computeWeekNumber(e.marker),n.weekLabel,n.locale,t.week)}:function(e,t,n){e=Se({},e),t=Se({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var o=Se({},e);delete o.minute,r=new Intl.DateTimeFormat(n.locale.codes,o)}return function(o){var a=o.marker,s=(r&&!a.getUTCMinutes()?r:i).format(a);return function(e,t,n,r,i){e=e.replace($e,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(et,function(){return n=!0,t}),n||(e+=" "+t);return e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":at(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(Ke,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(Je,"").trim():"narrow"===r.meridiem?e=e.replace(Je,function(e,t){return t.toLocaleLowerCase()}):"short"===r.meridiem?e=e.replace(Je,function(e,t){return t.toLocaleLowerCase()+"m"}):"lowercase"===r.meridiem&&(e=e.replace(Je,function(e){return e.toLocaleLowerCase()}));return e=(e=e.replace(Qe," ")).trim()}(s,o,e,t,n)}}(e,t,n)}var rt=function(){function e(e,t){this.cmdStr=e,this.separator=t}return e.prototype.format=function(e,t){return t.cmdFormatter(this.cmdStr,st(e,null,t,this.separator))},e.prototype.formatRange=function(e,t,n){return n.cmdFormatter(this.cmdStr,st(e,t,n,this.separator))},e}(),it=function(){function e(e){this.func=e}return e.prototype.format=function(e,t){return this.func(st(e,null,t))},e.prototype.formatRange=function(e,t,n){return this.func(st(e,t,n))},e}();function ot(e,t){return"object"==typeof e&&e?("string"==typeof t&&(e=Se({separator:t},e)),new tt(e)):"string"==typeof e?new rt(e,t):"function"==typeof e?new it(e):void 0}function at(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+le(i,2)+":"+le(o,2):"GMT"+n+i+(o?":"+le(o,2):"")}function st(e,t,n,r){var i=ut(e,n.calendarSystem);return{date:i,start:i,end:t?ut(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,separator:r}}function ut(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}var lt=function(){function e(e,t){this.calendar=e,this.internalEventSource=t}return e.prototype.remove=function(){this.calendar.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.calendar.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!0,configurable:!0}),e}(),ct=function(){function e(e,t,n){this._calendar=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Vt);else if(e in Bt)"function"==typeof Bt[e]&&(t=Bt[e](t)),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in xt){var i=void 0;"function"==typeof xt[e]&&(t=xt[e](t)),"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._calendar.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=ye(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._calendar.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=ye(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i=this._calendar.dateEnv,o={allDay:n.allDay},a=i.createMarker(e);if(a&&(null==t||(r=i.createMarker(t)))&&this._instance){var s=this._instance.range;!0===n.allDay&&(s=ve(s));var u=ye(s.start,a,i,n.granularity);if(r){var l=ye(s.end,r,i,n.granularity);$(u,l)?this.mutate({datesDelta:u,standardProps:o}):this.mutate({startDelta:u,endDelta:l,standardProps:o})}else o.hasEnd=!1,this.mutate({datesDelta:u,standardProps:o})}},e.prototype.moveStart=function(e){var t=J(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=J(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=J(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._calendar.opt("allDayMaintainDuration")),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._calendar.dateEnv,n=this._instance,r=ot(e,this._calendar.opt("defaultRangeSeparator"));return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(e){var t=this._def,n=this._instance;if(n){this._calendar.dispatch({type:"MUTATE_EVENTS",instanceId:n.instanceId,mutation:e,fromApi:!0});var r=this._calendar.state.eventStore;this._def=r.defs[t.defId],this._instance=r.instances[n.instanceId]}},e.prototype.remove=function(){this._calendar.dispatch({type:"REMOVE_EVENT_DEF",defId:this._def.defId})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new lt(this._calendar,this._calendar.state.eventSources[e]):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._calendar.dateEnv.toDate(this._instance.range.start):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._calendar.dateEnv.toDate(this._instance.range.end):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rendering",{get:function(){return this._def.rendering},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!0,configurable:!0}),e}();function dt(e,t,n,r){var i={},o={},a={},s=[],u=[],l=vt(e.defs,t);for(var c in e.defs){"inverse-background"===(S=e.defs[c]).rendering&&(S.groupId?(i[S.groupId]=[],a[S.groupId]||(a[S.groupId]=S)):o[c]=[])}for(var d in e.instances){var f=e.instances[d],p=l[(S=e.defs[f.defId]).defId],h=f.range,v=!S.allDay&&r?ge(h,r):h,g=Ve(v,n);g&&("inverse-background"===S.rendering?S.groupId?i[S.groupId].push(g):o[f.defId].push(g):("background"===S.rendering?s:u).push({def:S,ui:p,instance:f,range:g,isStart:v.start&&v.start.valueOf()===g.start.valueOf(),isEnd:v.end&&v.end.valueOf()===g.end.valueOf()}))}for(var y in i)for(var m=0,E=Le(i[y],n);m<E.length;m++){var S,b=E[m];p=l[(S=a[y]).defId];s.push({def:S,ui:p,instance:null,range:b,isStart:!1,isEnd:!1})}for(var c in o)for(var D=0,T=Le(o[c],n);D<T.length;D++){b=T[D];s.push({def:e.defs[c],ui:l[c],instance:null,range:b,isStart:!1,isEnd:!1})}return{bg:s,fg:u}}function ft(e,t,n){e.hasPublicHandlers("eventRender")&&(t=t.filter(function(t){var r=e.publiclyTrigger("eventRender",[{event:new ct(e.calendar,t.eventRange.def,t.eventRange.instance),isMirror:n,isStart:t.isStart,isEnd:t.isEnd,el:t.el,view:e}]);return!1!==r&&(r&&!0!==r&&(t.el=r),!0)}));for(var r=0,i=t;r<i.length;r++){var o=i[r];pt(o.el,o)}return t}function pt(e,t){e.fcSeg=t}function ht(e){return e.fcSeg||null}function vt(e,t){return Re(e,function(e){return gt(e,t)})}function gt(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Ut(n)}function yt(e,t,n,r){var i=vt(e.defs,t),o={defs:{},instances:{}};for(var a in e.defs){var s=e.defs[a];o.defs[a]=mt(s,i[a],n,r.pluginSystem.hooks.eventDefMutationAppliers,r)}for(var u in e.instances){var l=e.instances[u];s=o.defs[l.defId];o.instances[u]=Et(l,s,i[l.defId],n,r)}return o}function mt(e,t,n,r,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var a=Se({},e,o,{ui:Se({},e.ui,o.ui)});n.extendedProps&&(a.extendedProps=Se({},a.extendedProps,n.extendedProps));for(var s=0,u=r;s<u.length;s++){(0,u[s])(a,n,i)}return!a.hasEnd&&i.opt("forceEventDuration")&&(a.hasEnd=!0),a}function Et(e,t,n,r,i){var o=i.dateEnv,a=r.standardProps&&!0===r.standardProps.allDay,s=r.standardProps&&!1===r.standardProps.hasEnd,u=Se({},e);return a&&(u.range=ve(u.range)),r.datesDelta&&n.startEditable&&(u.range={start:o.add(u.range.start,r.datesDelta),end:o.add(u.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(u.range={start:o.add(u.range.start,r.startDelta),end:u.range.end}),r.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:o.add(u.range.end,r.endDelta)}),s&&(u.range={start:u.range.start,end:i.getDefaultEventEnd(t.allDay,u.range.start)}),t.allDay&&(u.range={start:B(u.range.start),end:B(u.range.end)}),u.range.end<u.range.start&&(u.range.end=i.getDefaultEventEnd(t.allDay,u.range.start)),u}function St(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var a=ke(function(e,t,n){var r=n.opt("eventDataTransform"),i=t?t.eventDataTransform:null;return i&&(e=xe(e,i)),r&&(e=xe(e,r)),e}(i,t,o),t.sourceId,o);return r&&(a=_e(a,r,o)),Ne(bt(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=_e(t,n,r));return Ne(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Ne(e,t.eventStore);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return r?_e(e,r.activeRange,i):e;case"CHANGE_TIMEZONE":return function(e,t,n){var r=e.defs,i=Re(e.instances,function(e){var i=r[e.defId];return i.allDay||i.recurringDef?e:Se({},e,{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})});return{defs:r,instances:i}}(e,t.oldDateEnv,i.dateEnv);case"MUTATE_EVENTS":return function(e,t,n,r,i){var o=Pe(e,t),a=r?{"":{startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}:i.eventUiBases;return o=yt(o,a,n,i),Ne(e,o)}(e,t.instanceId,t.mutation,t.fromApi,i);case"REMOVE_EVENT_INSTANCES":return Dt(e,t.instances);case"REMOVE_EVENT_DEF":return ze(e,function(e){return e.defId!==t.defId});case"REMOVE_EVENT_SOURCE":return bt(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return ze(e,function(e){return!e.sourceId});case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};case"RESET_EVENTS":return{defs:e.defs,instances:e.instances};default:return e}}function bt(e,t){return ze(e,function(e){return e.sourceId!==t})}function Dt(e,t){return{defs:e.defs,instances:we(e.instances,function(e){return!t[e.instanceId]})}}function Tt(e,t){return wt({eventDrag:e},t)}function wt(e,t){var n=t.view,r=Se({businessHours:n?n.props.businessHours:{defs:{},instances:{}},dateSelection:"",eventStore:t.state.eventStore,eventUiBases:t.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginSystem.hooks.isPropsValid||Rt)(r,t)}function Rt(e,t,n,r){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,r){var i=e.eventDrag,o=i.mutatedEvents,a=o.defs,s=o.instances,u=vt(a,i.isEvent?e.eventUiBases:{"":t.selectionConfig});r&&(u=Re(u,r));var l=Dt(e.eventStore,i.affectedEvents.instances),c=l.defs,d=l.instances,f=vt(c,e.eventUiBases);for(var p in s){var h=s[p],v=h.range,g=u[h.defId],y=a[h.defId];if(!It(g.constraints,v,l,e.businessHours,t))return!1;var m=t.opt("eventOverlap");for(var E in"function"!=typeof m&&(m=null),d){var S=d[E];if(Fe(v,S.range)){var b=f[S.defId].overlap;if(!1===b&&i.isEvent)return!1;if(!1===g.overlap)return!1;if(m&&!m(new ct(t,c[S.defId],S),new ct(t,y,h)))return!1}}for(var D=t.state.eventStore,T=0,w=g.allows;T<w.length;T++){var R=w[T],I=Se({},n,{range:h.range,allDay:y.allDay}),C=D.defs[y.defId],M=D.instances[p],k=void 0;if(k=C?new ct(t,C,M):new ct(t,y),!R(t.buildDateSpanApi(I),k))return!1}}return!0}(e,t,n,r))&&!(e.dateSelection&&!function(e,t,n,r){var i=e.eventStore,o=i.defs,a=i.instances,s=e.dateSelection,u=s.range,l=t.selectionConfig;r&&(l=r(l));if(!It(l.constraints,u,i,e.businessHours,t))return!1;var c=t.opt("selectOverlap");"function"!=typeof c&&(c=null);for(var d in a){var f=a[d];if(Fe(u,f.range)){if(!1===l.overlap)return!1;if(c&&!c(new ct(t,o[f.defId],f)))return!1}}for(var p=0,h=l.allows;p<h.length;p++){var v=h[p],g=Se({},n,s);if(!v(t.buildDateSpanApi(g),null))return!1}return!0}(e,t,n,r))}function It(e,t,n,r,i){for(var o=0,a=e;o<a.length;o++){if(!kt(Ct(a[o],t,n,r,i),t))return!1}return!0}function Ct(e,t,n,r,i){return"businessHours"===e?Mt(_e(r,t,i)):"string"==typeof e?Mt(ze(n,function(t){return t.groupId===e})):"object"==typeof e&&e?Mt(_e(e,t,i)):[]}function Mt(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function kt(e,t){for(var n=0,r=e;n<r.length;n++){if(We(r[n],t))return!0}return!1}function Ot(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function _t(e){var t=[];for(var n in e){var r=e[n];null!=r&&""!==r&&t.push(n+":"+r)}return t.join(";")}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var xt={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function Ht(e,t,n){var r=he(e,xt,{},n),i=function(e,t){return Array.isArray(e)?ke(e,"",t,!0):"object"==typeof e&&e?ke([e],"",t,!0):null!=e?String(e):null}(r.constraint,t);return{startEditable:null!=r.startEditable?r.startEditable:r.editable,durationEditable:null!=r.durationEditable?r.durationEditable:r.editable,constraints:null!=i?[i]:[],overlap:r.overlap,allows:null!=r.allow?[r.allow]:[],backgroundColor:r.backgroundColor||r.color,borderColor:r.borderColor||r.color,textColor:r.textColor,classNames:r.classNames.concat(r.className)}}function Nt(e,t,n,r){var i={},o={};for(var a in xt){var s=e+ue(a);i[a]=t[s],o[s]=!0}if("event"===e&&(i.editable=t.editable),r)for(var a in t)o[a]||(r[a]=t[a]);return Ht(i,n)}var zt={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Ut(e){return e.reduce(Lt,zt)}function Lt(e,t){return{startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Bt={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},Vt={start:null,date:null,end:null,allDay:null},At=0;function Ft(e,t,n,r){var i=function(e,t){var n=null;if(e){var r=t.state.eventSources[e];n=r.allDayDefault}null==n&&(n=t.opt("allDayDefault"));return n}(t,n),o={},a=function(e,t,n,r,i){for(var o=0;o<r.length;o++){var a={},s=r[o].parse(e,a,n);if(s){var u=a.allDay;return delete a.allDay,null==u&&null==(u=t)&&null==(u=s.allDayGuess)&&(u=!1),Se(i,a),{allDay:u,duration:s.duration,typeData:s.typeData,typeId:o}}}return null}(e,i,n.dateEnv,n.pluginSystem.hooks.recurringTypes,o);if(a)return(s=Wt(o,t,a.allDay,Boolean(a.duration),n)).recurringDef={typeId:a.typeId,typeData:a.typeData,duration:a.duration},{def:s,instance:null};var s,u={},l=function(e,t,n,r,i){var o,a,s=function(e,t){var n=he(e,Vt,{},t);return n.start=null!==n.start?n.start:n.date,delete n.date,n}(e,r),u=s.allDay,l=null,c=!1,d=null;if(o=n.dateEnv.createMarkerMeta(s.start))l=o.marker;else if(!i)return null;null!=s.end&&(a=n.dateEnv.createMarkerMeta(s.end));null==u&&(u=null!=t?t:(!o||o.isTimeUnspecified)&&(!a||a.isTimeUnspecified));u&&l&&(l=B(l));a&&(d=a.marker,u&&(d=B(d)),l&&d<=l&&(d=null));d?c=!0:i||(c=n.opt("forceEventDuration")||!1,d=n.dateEnv.add(l,u?n.defaultAllDayEventDuration:n.defaultTimedEventDuration));return{allDay:u,hasEnd:c,range:{start:l,end:d},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:a?a.forcedTzo:null}}(e,i,n,u,r);return l?{def:s=Wt(u,t,l.allDay,l.hasEnd,n),instance:Zt(s.defId,l.range,l.forcedStartTzo,l.forcedEndTzo)}:null}function Wt(e,t,n,r,i){var o={},a=function(e,t,n){var r={},i=he(e,Bt,{},r),o=Ht(r,t,n);return i.publicId=i.id,delete i.id,i.ui=o,i}(e,i,o);a.defId=String(At++),a.sourceId=t,a.allDay=n,a.hasEnd=r;for(var s=0,u=i.pluginSystem.hooks.eventDefParsers;s<u.length;s++){var l={};(0,u[s])(a,o,l),o=l}return a.extendedProps=Se(o,a.extendedProps||{}),Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Zt(e,t,n,r){return{instanceId:String(At++),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var jt={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],rendering:"inverse-background",classNames:"fc-nonbusiness",groupId:"_businessHours"};function Yt(e,t){return ke(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter(function(e){return e.daysOfWeek}):"object"==typeof e&&e?[e]:[];return t=t.map(function(e){return Se({},jt,e)})}(e),"",t)}function qt(e,t,n){void 0===n&&(n=[]);var r,i,o=[];function a(){if(i){for(var e=0,n=o;e<n.length;e++){n[e].unrender()}t&&t.apply(r,i),i=null}}function s(){i&&je(i,arguments)||(a(),r=this,i=arguments,e.apply(this,arguments))}s.dependents=o,s.unrender=a;for(var u=0,l=n;u<l.length;u++){l[u].dependents.push(s)}return s}var Gt={defs:{},instances:{}},Xt=function(){function e(){this.getKeysForEventDefs=Ye(this._getKeysForEventDefs),this.splitDateSelection=Ye(this._splitDateSpan),this.splitEventStore=Ye(this._splitEventStore),this.splitIndividualUi=Ye(this._splitIndividualUi),this.splitEventDrag=Ye(this._splitInteraction),this.splitEventResize=Ye(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),u=this.splitEventResize(e.eventResize),l={};for(var c in this.eventUiBuilders=Re(n,function(e,n){return t.eventUiBuilders[n]||Ye(Jt)}),n){var d=n[c],f=a[c]||Gt,p=this.eventUiBuilders[c];l[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:f,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:u[c]||null}}return l},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,function(e){return t.getKeysForEventDef(e)})},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var a=0,s=t[o];a<s.length;a++){i[f=s[a]]||(i[f]={defs:{},instances:{}}),i[f].defs[o]=n[o]}for(var u in r)for(var l=r[u],c=0,d=t[l.defId];c<d.length;c++){var f;i[f=d[c]]&&(i[f].instances[u]=l)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var a=o[i];n[a]||(n[a]={}),n[a][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||Gt,mutatedEvents:i[r]||Gt,isEvent:e.isEvent,origSeg:e.origSeg})};for(var a in n)o(a);for(var a in i)o(a)}return t},e}();function Jt(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var i={"":Ut(r)};return n&&Se(i,n),i}function Kt(e,t,n,r){var i,o,a,s,u=e.dateEnv;return t instanceof Date?i=t:(i=t.date,o=t.type,a=t.forceOff),s={date:u.formatIso(i,{omitTime:!0}),type:o||"day"},"string"==typeof n&&(r=n,n=null),n=n?" "+function(e){var t=[];for(var n in e){var r=e[n];null!=r&&t.push(n+'="'+Ot(r)+'"')}return t.join(" ")}(n):"",r=r||"",!a&&e.opt("navLinks")?"<a"+n+' data-goto="'+Ot(JSON.stringify(s))+'">'+r+"</a>":"<span"+n+">"+r+"</span>"}function Qt(e,t,n,r){var i,o,a=n.calendar,s=n.view,u=n.theme,l=n.dateEnv,c=[];return Ze(t.activeRange,e)?(c.push("fc-"+P[e.getUTCDay()]),s.opt("monthMode")&&l.getMonth(e)!==l.getMonth(t.currentRange.start)&&c.push("fc-other-month"),o=x(i=B(a.getNow()),1),e<i?c.push("fc-past"):e>=o?c.push("fc-future"):(c.push("fc-today"),!0!==r&&c.push(u.getClass("today")))):c.push("fc-disabled-day"),c}function $t(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(i,o);a&&"function"==typeof a.then&&a.then(i,o)}var en=function(){function e(){}return e.mixInto=function(e){this.mixIntoObj(e.prototype)},e.mixIntoObj=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e[n]||(e[n]=t.prototype[n])})},e.mixOver=function(e){var t=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){e.prototype[n]=t.prototype[n]})},e}(),tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ee(t,e),t.prototype.on=function(e,t){return nn(this._handlers||(this._handlers={}),e,t),this},t.prototype.one=function(e,t){return nn(this._oneHandlers||(this._oneHandlers={}),e,t),this},t.prototype.off=function(e,t){return this._handlers&&rn(this._handlers,e,t),this._oneHandlers&&rn(this._oneHandlers,e,t),this},t.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.triggerWith(e,this,t),this},t.prototype.triggerWith=function(e,t,n){return this._handlers&&de(this._handlers[e],t,n),this._oneHandlers&&(de(this._oneHandlers[e],t,n),delete this._oneHandlers[e]),this},t.prototype.hasHandlers=function(e){return this._handlers&&this._handlers[e]&&this._handlers[e].length||this._oneHandlers&&this._oneHandlers[e]&&this._oneHandlers[e].length},t}(en);function nn(e,t,n){(e[t]||(e[t]=[])).push(n)}function rn(e,t,n){n?e[t]&&(e[t]=e[t].filter(function(e){return e!==n})):delete e[t]}var on=function(){function e(e,t,n,r){this.originEl=e,this.els=t,this.isHorizontal=n,this.isVertical=r}return e.prototype.build=function(){var e=this.originEl,t=this.originClientRect=e.getBoundingClientRect();this.isHorizontal&&this.buildElHorizontals(t.left),this.isVertical&&this.buildElVerticals(t.top)},e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),an=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),sn=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return Ee(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(an),un=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ee(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(an),ln=function(e){function t(t,n){var i=e.call(this,r("div",{className:"fc-scroller"}))||this;return i.overflowX=t,i.overflowY=n,i.applyOverflow(),i}return Ee(t,e),t.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},t.prototype.destroy=function(){c(this.el)},t.prototype.applyOverflow=function(){y(this.el,{overflowX:this.overflowX,overflowY:this.overflowY})},t.prototype.lockOverflow=function(e){var t=this.overflowX,n=this.overflowY;e=e||this.getScrollbarWidths(),"auto"===t&&(t=e.bottom||this.canScrollHorizontally()?"scroll":"hidden"),"auto"===n&&(n=e.left||e.right||this.canScrollVertically()?"scroll":"hidden"),y(this.el,{overflowX:t,overflowY:n})},t.prototype.setHeight=function(e){m(this.el,"height",e)},t.prototype.getScrollbarWidths=function(){var e=T(this.el);return{left:e.scrollbarLeft,right:e.scrollbarRight,bottom:e.scrollbarBottom}},t}(sn),cn=function(){function e(e){this.calendarOptions=e,this.processIconOverride()}return e.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.calendarOptions[this.iconOverrideOption])},e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=Se({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e){var t=this.iconClasses[e];return t?this.baseIconClass+" "+t:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();cn.prototype.classes={},cn.prototype.iconClasses={},cn.prototype.baseIconClass="",cn.prototype.iconOverridePrefix="";var dn=0,fn=function(){function e(e,t){t&&(e.view=this),this.uid=String(dn++),this.context=e,this.dateEnv=e.dateEnv,this.theme=e.theme,this.view=e.view,this.calendar=e.calendar,this.isRtl="rtl"===this.opt("dir")}return e.addEqualityFuncs=function(e){this.prototype.equalityFuncs=Se({},this.prototype.equalityFuncs,e)},e.prototype.opt=function(e){return this.context.options[e]},e.prototype.receiveProps=function(e){var t=function(e,t,n){var r={},i=!1;for(var o in t)o in e&&(e[o]===t[o]||n[o]&&n[o](e[o],t[o]))?r[o]=e[o]:(r[o]=t[o],i=!0);for(var o in e)if(!(o in t)){i=!0;break}return{anyChanges:i,comboProps:r}}(this.props||{},e,this.equalityFuncs),n=t.anyChanges,r=t.comboProps;this.props=r,n&&this.render(r)},e.prototype.render=function(e){},e.prototype.destroy=function(){},e}();fn.prototype.equalityFuncs={};var pn=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.el=n,i}return Ee(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),c(this.el)},t.prototype.buildPositionCaches=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.calendar,n=this.props.dateProfile,r=e.mutatedEvents.instances;if(n)for(var i in r)if(!We(n.validRange,r[i].range))return!1;return Tt(e,t)},t.prototype.isDateSelectionValid=function(e){var t,n,r=this.props.dateProfile;return!(r&&!We(r.validRange,e.range))&&(t=e,n=this.calendar,wt({dateSelection:t},n))},t.prototype.publiclyTrigger=function(e,t){return this.calendar.publiclyTrigger(e,t)},t.prototype.publiclyTriggerAfterSizing=function(e,t){return this.calendar.publiclyTriggerAfterSizing(e,t)},t.prototype.hasPublicHandlers=function(e){return this.calendar.hasPublicHandlers(e)},t.prototype.triggerRenderedSegs=function(e,t){var n=this.calendar;if(this.hasPublicHandlers("eventPositioned"))for(var r=0,i=e;r<i.length;r++){var o=i[r];this.publiclyTriggerAfterSizing("eventPositioned",[{event:new ct(n,o.eventRange.def,o.eventRange.instance),isMirror:t,isStart:o.isStart,isEnd:o.isEnd,el:o.el,view:this}])}n.state.loadingLevel||(n.afterSizingTriggers._eventsPositioned=[null])},t.prototype.triggerWillRemoveSegs=function(e,t){for(var n=this.calendar,r=0,i=e;r<i.length;r++){var o=i[r];n.trigger("eventElRemove",o.el)}if(this.hasPublicHandlers("eventDestroy"))for(var a=0,s=e;a<s.length;a++){o=s[a];this.publiclyTrigger("eventDestroy",[{event:new ct(n,o.eventRange.def,o.eventRange.instance),isMirror:t,el:o.el,view:this}])}},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!p(e,".fc-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){var t=p(e,this.fgSegSelector);return(!t||t.classList.contains("fc-mirror"))&&!p(e,".fc-more")&&!p(e,"a[data-goto]")&&!this.isInPopover(e)},t.prototype.isPopover=function(){return this.el.classList.contains("fc-popover")},t.prototype.isInPopover=function(e){return Boolean(p(e,".fc-popover"))},t}(fn);pn.prototype.fgSegSelector=".fc-event-container > *",pn.prototype.bgSegSelector=".fc-bgevent:not(.fc-nonbusiness)";var hn=0;function vn(e){return{id:String(hn++),deps:e.deps||[],reducers:e.reducers||[],eventDefParsers:e.eventDefParsers||[],isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerModifiers:e.viewContainerModifiers||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,defaultView:e.defaultView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{}}}var gn=function(){function e(){this.hooks={reducers:[],eventDefParsers:[],isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerModifiers:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,defaultView:"",elementDraggingImpl:null,optionChangeHandlers:{}},this.addedHash={}}return e.prototype.add=function(e){if(!this.addedHash[e.id]){this.addedHash[e.id]=!0;for(var t=0,n=e.deps;t<n.length;t++){var r=n[t];this.add(r)}this.hooks=(i=this.hooks,o=e,{reducers:i.reducers.concat(o.reducers),eventDefParsers:i.eventDefParsers.concat(o.eventDefParsers),isDraggableTransformers:i.isDraggableTransformers.concat(o.isDraggableTransformers),eventDragMutationMassagers:i.eventDragMutationMassagers.concat(o.eventDragMutationMassagers),eventDefMutationAppliers:i.eventDefMutationAppliers.concat(o.eventDefMutationAppliers),dateSelectionTransformers:i.dateSelectionTransformers.concat(o.dateSelectionTransformers),datePointTransforms:i.datePointTransforms.concat(o.datePointTransforms),dateSpanTransforms:i.dateSpanTransforms.concat(o.dateSpanTransforms),views:Se({},i.views,o.views),viewPropsTransformers:i.viewPropsTransformers.concat(o.viewPropsTransformers),isPropsValid:o.isPropsValid||i.isPropsValid,externalDefTransforms:i.externalDefTransforms.concat(o.externalDefTransforms),eventResizeJoinTransforms:i.eventResizeJoinTransforms.concat(o.eventResizeJoinTransforms),viewContainerModifiers:i.viewContainerModifiers.concat(o.viewContainerModifiers),eventDropTransformers:i.eventDropTransformers.concat(o.eventDropTransformers),calendarInteractions:i.calendarInteractions.concat(o.calendarInteractions),componentInteractions:i.componentInteractions.concat(o.componentInteractions),themeClasses:Se({},i.themeClasses,o.themeClasses),eventSourceDefs:i.eventSourceDefs.concat(o.eventSourceDefs),cmdFormatter:o.cmdFormatter||i.cmdFormatter,recurringTypes:i.recurringTypes.concat(o.recurringTypes),namedTimeZonedImpl:o.namedTimeZonedImpl||i.namedTimeZonedImpl,defaultView:i.defaultView||o.defaultView,elementDraggingImpl:i.elementDraggingImpl||o.elementDraggingImpl,optionChangeHandlers:Se({},i.optionChangeHandlers,o.optionChangeHandlers)})}var i,o},e}();var yn=vn({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e)?e:Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),mn=vn({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e?e:"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.calendar.dateEnv;$t(e.eventSource.meta.bind(null,{start:r.toDate(e.range.start),end:r.toDate(e.range.end),startStr:r.formatIso(e.range.start),endStr:r.formatIso(e.range.end),timeZone:r.timeZone}),function(e){t({rawEvents:e})},n)}}]});function En(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Sn(t)}(t,n):o=Sn(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400)try{var e=JSON.parse(a.responseText);r(e,a)}catch(e){i("Failure parsing JSON",a)}else i("Request failed",a)},a.onerror=function(){i("Request failed",a)},a.send(o)}function Sn(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var bn=vn({eventSourceDefs:[{parseMeta:function(e){if("string"==typeof e)e={url:e};else if(!e||"object"!=typeof e||!e.url)return null;return{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}},fetch:function(e,t,n){var r=e.eventSource.meta,i=function(e,t,n){var r,i,o,a,s=n.dateEnv,u={};null==(r=e.startParam)&&(r=n.opt("startParam"));null==(i=e.endParam)&&(i=n.opt("endParam"));null==(o=e.timeZoneParam)&&(o=n.opt("timeZoneParam"));a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};Se(u,a),u[r]=s.formatIso(t.start),u[i]=s.formatIso(t.end),"local"!==s.timeZone&&(u[o]=s.timeZone);return u}(r,e.range,e.calendar);En(r.method,r.url,i,function(e,n){t({rawEvents:e,xhr:n})},function(e,t){n({message:e,xhr:t})})}}]});var Dn=vn({recurringTypes:[{parse:function(e,t,n){var r,i,o=n.createMarker.bind(n),a=he(e,{daysOfWeek:null,startTime:J,endTime:J,startRecur:o,endRecur:o},{},t),s=!1;for(var u in a)if(null!=a[u]){s=!0;break}if(s){var l=null;return"duration"in t&&(l=J(t.duration),delete t.duration),!l&&a.startTime&&a.endTime&&(r=a.endTime,i=a.startTime,l={years:r.years-i.years,months:r.months-i.months,days:r.days-i.days,milliseconds:r.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!a.startTime&&!a.endTime),duration:l,typeData:a}}return null},expand:function(e,t,n){var r=Ve(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var i=e?Ie(e):null,o=B(n.start),a=n.end,s=[];for(;o<a;){var u=void 0;i&&!i[o.getUTCDay()]||(u=t?r.add(o,t):o,s.push(u)),o=x(o,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}]});var Tn=vn({optionChangeHandlers:{events:function(e,t,n){wn([e],t,n)},eventSources:wn,plugins:function(e,t){t.addPluginInputs(e)}}});function wn(e,t,n){for(var r=Ce(t.state.eventSources),i=[],o=0,a=e;o<a.length;o++){for(var s=a[o],u=!1,l=0;l<r.length;l++)if(n(r[l]._raw,s)){r.splice(l,1),u=!0;break}u||i.push(s)}for(var c=0,d=r;c<d.length;c++){var f=d[c];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:f.sourceId})}for(var p=0,h=i;p<h.length;p++){var v=h[p];t.addEventSource(v)}}var Rn={defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",columnHeader:!0,defaultView:"",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",timeGridEventMinHeight:0,themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",eventLimit:!1,eventLimitClick:"popover",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5},In={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"}},Cn=["header","footer","buttonText","buttonIcons"];var Mn=[yn,mn,bn,Dn,Tn];var kn={code:"en",week:{dow:0,doy:4},dir:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekLabel:"W",allDayText:"all-day",eventLimitText:"more",noEventsMessage:"No events to display"};function On(e){for(var t=e.length>0?e[0].code:"en",n=window.FullCalendarLocalesAll||[],r=window.FullCalendarLocales||{},i=n.concat(Ce(r),e),o={en:kn},a=0,s=i;a<s.length;a++){var u=s[a];o[u.code]=u}return{map:o,defaultCode:t}}function _n(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||kn;return Pn(e,n,r)}(e,t):Pn(e.code,[e.code],e)}function Pn(e,t,n){var r=Te([kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var xn=function(){function e(e){this.overrides=Se({},e),this.dynamicOverrides={},this.compute()}return e.prototype.mutate=function(e,t,n){var r=n?this.dynamicOverrides:this.overrides;Se(r,e);for(var i=0,o=t;i<o.length;i++){delete r[o[i]]}this.compute()},e.prototype.compute=function(){var e=fe(this.dynamicOverrides.locales,this.overrides.locales,Rn.locales),t=fe(this.dynamicOverrides.locale,this.overrides.locale,Rn.locale),n=On(e),r=_n(t||n.defaultCode,n.map).options,i="rtl"===fe(this.dynamicOverrides.dir,this.overrides.dir,r.dir)?In:{};this.dirDefaults=i,this.localeDefaults=r,this.computed=Te([Rn,i,r,this.overrides,this.dynamicOverrides],Cn)},e}(),Hn={};var Nn,zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return j(e)},e.prototype.markerToArray=function(e){return Z(e)},e}();Nn=zn,Hn.gregory=Nn;var Un=/^\s*(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Ln(e){var t=Un.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(Y(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var Bn=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Hn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekLabel=null!=e.weekLabel?e.weekLabel:e.locale.options.weekLabel,this.cmdFormatter=e.cmdFormatter}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):j(F(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=j(e)),null!==t&&Y(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Ln(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return q(e)===q(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return q(e)===q(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=U(e,t))?{unit:"week",value:n}:null!==(n=L(e,t))?{unit:"day",value:n}:ce(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:ce(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:ce(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(ee(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return ee(e)/30}(n):n.days&&null!==(r=L(e,t))?r/ee(n):(t.valueOf()-e.valueOf())/te(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?B(e):"hour"===t?function(e){return j([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return j([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return j([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=V(e,r,t,n);if(i<1)return V(e,r-1,t,n);var o=V(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=H(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",at(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?j(F(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?j(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-W(Z(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Z(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?W(Z(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Z(e))*60):new Date(e.valueOf()-(t||0))},e}(),Vn={id:String,allDayDefault:Boolean,eventDataTransform:Function,success:Function,failure:Function},An=0;function Fn(e,t){return!t.pluginSystem.hooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Wn(e,t){for(var n=t.pluginSystem.hooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i){var o=Zn("object"==typeof e?e:{},i,r,t);return o._raw=e,o}}return null}function Zn(e,t,n,r){var i={},o=he(e,Vn,{},i),a={},s=Ht(i,r,a);return o.isFetching=!1,o.latestFetchId="",o.fetchRange=null,o.publicId=String(e.id||""),o.sourceId=String(An++),o.sourceDefId=n,o.meta=t,o.ui=s,o.extendedProps=a,o}function jn(e,t,n,r){switch(t.type){case"ADD_EVENT_SOURCES":return function(e,t,n,r){for(var i={},o=0,a=t;o<a.length;o++){var s=a[o];i[s.sourceId]=s}n&&(i=qn(i,n,r));return Se({},e,i)}(e,t.sources,n?n.activeRange:null,r);case"REMOVE_EVENT_SOURCE":return i=e,o=t.sourceId,we(i,function(e){return e.sourceId!==o});case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return n?qn(e,n.activeRange,r):e;case"FETCH_EVENT_SOURCES":case"CHANGE_TIMEZONE":return Gn(e,t.sourceIds?Ie(t.sourceIds):function(e,t){return we(e,function(e){return Fn(e,t)})}(e,r),n?n.activeRange:null,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){var i,o=e[t];if(o&&n===o.latestFetchId)return Se({},e,((i={})[t]=Se({},o,{isFetching:!1,fetchRange:r}),i));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var i,o}var Yn=0;function qn(e,t,n){return Gn(e,we(e,function(e){return function(e,t,n){return Fn(e,n)?!n.opt("lazyFetching")||!e.fetchRange||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)}),t,n)}function Gn(e,t,n,r){var i={};for(var o in e){var a=e[o];t[o]?i[o]=Xn(a,n,r):i[o]=a}return i}function Xn(e,t,n){var r=n.pluginSystem.hooks.eventSourceDefs[e.sourceDefId],i=String(Yn++);return r.fetch({eventSource:e,calendar:n,range:t},function(r){var o,a,s=r.rawEvents,u=n.opt("eventSourceSuccess");e.success&&(a=e.success(s,r.xhr)),u&&(o=u(s,r.xhr)),s=a||o||s,n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:i,fetchRange:t,rawEvents:s})},function(r){var o=n.opt("eventSourceFailure");console.warn(r.message,r),e.failure&&e.failure(r),o&&o(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:i,fetchRange:t,error:r})}),Se({},e,{isFetching:!0,latestFetchId:i})}var Jn=function(){function e(e,t){this.viewSpec=e,this.options=e.options,this.dateEnv=t.dateEnv,this.calendar=t,this.initHiddenDays()}return e.prototype.buildPrev=function(e,t){var n=this.dateEnv,r=n.subtract(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,-1)},e.prototype.buildNext=function(e,t){var n=this.dateEnv,r=n.add(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(r,1)},e.prototype.build=function(e,t,n){var r;void 0===n&&(n=!1);var i,o,a,s,u,l,c,d,f;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(d=e,e=null!=(f=r).start&&d<f.start?f.start:null!=f.end&&d>=f.end?new Date(f.end.valueOf()-1):d),a=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(a.unit),u=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,s),l=u=this.trimHiddenDays(u),this.options.showNonCurrentDates||(l=Ve(l,a.range)),i=J(this.options.minTime),o=J(this.options.maxTime),l=Ve(l=this.adjustActiveRange(l,i,o),r),c=Fe(a.range,r),{validRange:r,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:s,activeRange:l,renderRange:u,minTime:i,maxTime:o,isValid:c,dateIncrement:this.buildDateIncrement(a.duration)}},e.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.viewSpec,i=this.dateEnv,o=null,a=null,s=null;return r.duration?(o=r.duration,a=r.durationUnit,s=this.buildRangeFromDuration(e,t,o,a)):(n=this.options.dayCount)?(a="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?a=i.greatestWholeUnit(s.start,s.end).unit:(a=ne(o=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,o,a)),{duration:o,unit:a,range:s}},e.prototype.getFallbackDuration=function(){return J({day:1})},e.prototype.adjustActiveRange=function(e,t,n){var r=this.dateEnv,i=e.start,o=e.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(ee(t)<0&&(i=B(i),i=r.add(i,t)),ee(n)>1&&(o=x(o=B(o),-1),o=r.add(o,n))),{start:i,end:o}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,a,s,u,l=this.dateEnv,c=this.options.dateAlignment;function d(){a=l.startOf(e,c),s=l.add(a,n),u={start:a,end:s}}return c||((i=this.options.dateIncrement)?(o=J(i),c=te(o)<te(n)?ne(o,!Q(i)).unit:r):c=r),ee(n)<=1&&this.isHiddenDay(a)&&(a=B(a=this.skipHiddenDays(a,t))),d(),this.trimHiddenDays(u)||(e=this.skipHiddenDays(e,t),d()),u},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.dateEnv,o=this.options.dateAlignment,a=0,s=e;o&&(s=i.startOf(s,o)),s=B(s),r=s=this.skipHiddenDays(s,t);do{r=x(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:s,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.dateEnv,n=this.getRangeOption("visibleRange",t.toDate(e));return!n||null!=n.start&&null!=n.end?n:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.options.dateIncrement;return n?J(n):(t=this.options.dateAlignment)?J(1,t):e||J({days:1})},e.prototype.getRangeOption=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.options[e];return"function"==typeof r&&(r=r.apply(null,t)),r&&(r=Ue(r,this.dateEnv)),r&&(r=ge(r)),r},e.prototype.initHiddenDays=function(){var e,t=this.options.hiddenDays||[],n=[],r=0;for(!1===this.options.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=x(e,t);return e},e}();function Kn(e,t,n){for(var r=function(e,t){switch(t.type){case"SET_VIEW_TYPE":return t.viewType;default:return e}}(e.viewType,t),i=function(e,t,n,r,i){var o;switch(t.type){case"PREV":o=i.dateProfileGenerators[r].buildPrev(e,n);break;case"NEXT":o=i.dateProfileGenerators[r].buildNext(e,n);break;case"SET_DATE":e.activeRange&&Ze(e.currentRange,t.dateMarker)||(o=i.dateProfileGenerators[r].build(t.dateMarker,void 0,!0));break;case"SET_VIEW_TYPE":var a=i.dateProfileGenerators[r];if(!a)throw new Error(r?'The FullCalendar view "'+r+'" does not exist. Make sure your plugins are loaded correctly.':"No available FullCalendar view plugins.");o=a.build(t.dateMarker||n,void 0,!0)}return!o||!o.isValid||e&&(s=e,u=o,Ae(s.validRange,u.validRange)&&Ae(s.activeRange,u.activeRange)&&Ae(s.renderRange,u.renderRange)&&$(s.minTime,u.minTime)&&$(s.maxTime,u.maxTime))?e:o;var s,u}(e.dateProfile,t,e.currentDate,r,n),o=jn(e.eventSources,t,i,n),a=Se({},e,{viewType:r,dateProfile:i,currentDate:Qn(e.currentDate,t,i),eventSources:o,eventStore:St(e.eventStore,t,o,i,n),dateSelection:$n(e.dateSelection,t,n),eventSelection:er(e.eventSelection,t),eventDrag:tr(e.eventDrag,t,o,n),eventResize:nr(e.eventResize,t,o,n),eventSourceLoadingLevel:rr(o),loadingLevel:rr(o)}),s=0,u=n.pluginSystem.hooks.reducers;s<u.length;s++){a=(0,u[s])(a,t,n)}return a}function Qn(e,t,n){switch(t.type){case"PREV":case"NEXT":return Ze(n.currentRange,e)?e:n.currentRange.start;case"SET_DATE":case"SET_VIEW_TYPE":var r=t.dateMarker||e;return n.activeRange&&!Ze(n.activeRange,r)?n.currentRange.start:r;default:return e}}function $n(e,t,n){switch(t.type){case"SELECT_DATES":return t.selection;case"UNSELECT_DATES":return null;default:return e}}function er(e,t){switch(t.type){case"SELECT_EVENT":return t.eventInstanceId;case"UNSELECT_EVENT":return"";default:return e}}function tr(e,t,n,r){switch(t.type){case"SET_EVENT_DRAG":var i=t.state;return{affectedEvents:i.affectedEvents,mutatedEvents:i.mutatedEvents,isEvent:i.isEvent,origSeg:i.origSeg};case"UNSET_EVENT_DRAG":return null;default:return e}}function nr(e,t,n,r){switch(t.type){case"SET_EVENT_RESIZE":var i=t.state;return{affectedEvents:i.affectedEvents,mutatedEvents:i.mutatedEvents,isEvent:i.isEvent,origSeg:i.origSeg};case"UNSET_EVENT_RESIZE":return null;default:return e}}function rr(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}var ir={start:null,end:null,allDay:Boolean};function or(e,t,n){var r=function(e,t){var n={},r=he(e,ir,{},n),i=r.start?t.createMarkerMeta(r.start):null,o=r.end?t.createMarkerMeta(r.end):null,a=r.allDay;null==a&&(a=i&&i.isTimeUnspecified&&(!o||o.isTimeUnspecified));return n.range={start:i?i.marker:null,end:o?o.marker:null},n.allDay=a,n}(e,t),i=r.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}function ar(e,t,n){var r=Wt({editable:!1},"",e.allDay,!0,n);return{def:r,ui:gt(r,t),instance:Zt(r.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function sr(e,t,n,r){if(t[e])return t[e];var i=function(e,t,n,r){var i=n[e],o=r[e],a=function(e){return i&&null!==i[e]?i[e]:o&&null!==o[e]?o[e]:null},s=a("class"),u=a("superType");!u&&s&&(u=ur(s,r)||ur(s,n));var l=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");l=sr(u,t,n,r)}!s&&l&&(s=l.class);if(!s)return null;return{type:e,class:s,defaults:Se({},l?l.defaults:{},i?i.options:{}),overrides:Se({},l?l.overrides:{},o?o.options:{})}}(e,t,n,r);return i&&(t[e]=i),i}function ur(e,t){var n=Object.getPrototypeOf(e.prototype);for(var r in t){var i=t[r];if(i.class&&i.class.prototype===n)return r}return""}function lr(e){return Re(e,dr)}var cr={type:String,class:null};function dr(e){"function"==typeof e&&(e={class:e});var t={},n=he(e,cr,{},t);return{superType:n.type,class:n.class,options:t}}function fr(e,t){var n=lr(e),r=lr(t.overrides.views);return Re(function(e,t){var n,r={};for(n in e)sr(n,r,e,t);for(n in t)sr(n,r,e,t);return r}(n,r),function(e){return function(e,t,n){var r=e.overrides.duration||e.defaults.duration||n.dynamicOverrides.duration||n.overrides.duration,i=null,o="",a="",s={};if(r&&(i=J(r))){var u=ne(i,!Q(r));o=u.unit,1===u.value&&(a=o,s=t[o]?t[o].options:{})}var l=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[a]?n[a]:void 0};return{type:e.type,class:e.class,duration:i,durationUnit:o,singleUnit:a,options:Se({},Rn,e.defaults,n.dirDefaults,n.localeDefaults,n.overrides,s,e.overrides,n.dynamicOverrides),buttonTextOverride:l(n.dynamicOverrides)||l(n.overrides)||e.overrides.buttonText,buttonTextDefault:l(n.localeDefaults)||l(n.dirDefaults)||e.defaults.buttonText||l(Rn)||e.type}}(e,r,t)})}var pr=function(e){function t(t,n){var i=e.call(this,t)||this;return i._renderLayout=qt(i.renderLayout,i.unrenderLayout),i._updateTitle=qt(i.updateTitle,null,[i._renderLayout]),i._updateActiveButton=qt(i.updateActiveButton,null,[i._renderLayout]),i._updateToday=qt(i.updateToday,null,[i._renderLayout]),i._updatePrev=qt(i.updatePrev,null,[i._renderLayout]),i._updateNext=qt(i.updateNext,null,[i._renderLayout]),i.el=r("div",{className:"fc-toolbar "+n}),i}return Ee(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),this._renderLayout.unrender(),c(this.el)},t.prototype.render=function(e){this._renderLayout(e.layout),this._updateTitle(e.title),this._updateActiveButton(e.activeButton),this._updateToday(e.isTodayEnabled),this._updatePrev(e.isPrevEnabled),this._updateNext(e.isNextEnabled)},t.prototype.renderLayout=function(e){var t=this.el;this.viewsWithButtons=[],s(t,this.renderSection("left",e.left)),s(t,this.renderSection("center",e.center)),s(t,this.renderSection("right",e.right))},t.prototype.unrenderLayout=function(){this.el.innerHTML=""},t.prototype.renderSection=function(e,t){var n=this,o=this.theme,a=this.calendar,u=a.optionsManager,l=a.viewSpecs,c=r("div",{className:"fc-"+e}),d=u.computed.customButtons||{},f=u.overrides.buttonText||{},p=u.computed.buttonText||{};return t&&t.split(" ").forEach(function(e,t){var r,u=[],h=!0;if(e.split(",").forEach(function(e,t){var r,s,c,v,g,y,m,E,S;"title"===e?(u.push(i("<h2>&nbsp;</h2>")),h=!1):((r=d[e])?(c=function(e){r.click&&r.click.call(E,e)},(v=o.getCustomButtonIconClass(r))||(v=o.getIconClass(e))||(g=r.text)):(s=l[e])?(n.viewsWithButtons.push(e),c=function(){a.changeView(e)},(g=s.buttonTextOverride)||(v=o.getIconClass(e))||(g=s.buttonTextDefault)):a[e]&&(c=function(){a[e]()},(g=f[e])||(v=o.getIconClass(e))||(g=p[e])),c&&(m=["fc-"+e+"-button",o.getClass("button")],g?(y=Ot(g),S=""):v&&(y="<span class='"+v+"'></span>",S=' aria-label="'+e+'"'),(E=i('<button type="button" class="'+m.join(" ")+'"'+S+">"+y+"</button>")).addEventListener("click",c),u.push(E)))}),u.length>1){r=document.createElement("div");var v=o.getClass("buttonGroup");h&&v&&r.classList.add(v),s(r,u),c.appendChild(r)}else s(c,u)}),c},t.prototype.updateToday=function(e){this.toggleButtonEnabled("today",e)},t.prototype.updatePrev=function(e){this.toggleButtonEnabled("prev",e)},t.prototype.updateNext=function(e){this.toggleButtonEnabled("next",e)},t.prototype.updateTitle=function(e){v(this.el,"h2").forEach(function(t){t.innerText=e})},t.prototype.updateActiveButton=function(e){var t=this.theme.getClass("buttonActive");v(this.el,"button").forEach(function(n){e&&n.classList.contains("fc-"+e+"-button")?n.classList.add(t):n.classList.remove(t)})},t.prototype.toggleButtonEnabled=function(e,t){v(this.el,".fc-"+e+"-button").forEach(function(e){e.disabled=!t})},t}(fn),hr=function(e){function t(t,n){var i=e.call(this,t)||this;i._renderToolbars=qt(i.renderToolbars),i.buildViewPropTransformers=Ye(gr),i.el=n,u(n,i.contentEl=r("div",{className:"fc-view-container"}));for(var o=i.calendar,a=0,s=o.pluginSystem.hooks.viewContainerModifiers;a<s.length;a++){(0,s[a])(i.contentEl,o)}return i.toggleElClassNames(!0),i.computeTitle=Ye(vr),i.parseBusinessHours=Ye(function(e){return Yt(e,i.calendar)}),i}return Ee(t,e),t.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.view&&this.view.destroy(),c(this.contentEl),this.toggleElClassNames(!1),e.prototype.destroy.call(this)},t.prototype.toggleElClassNames=function(e){var t=this.el.classList,n="fc-"+this.opt("dir"),r=this.theme.getClass("widget");e?(t.add("fc"),t.add(n),t.add(r)):(t.remove("fc"),t.remove(n),t.remove(r))},t.prototype.render=function(e){this.freezeHeight();var t=this.computeTitle(e.dateProfile,e.viewSpec.options);this._renderToolbars(e.viewSpec,e.dateProfile,e.currentDate,e.dateProfileGenerator,t),this.renderView(e,t),this.updateSize(),this.thawHeight()},t.prototype.renderToolbars=function(e,t,n,r,i){var o=this.opt("header"),a=this.opt("footer"),l=this.calendar.getNow(),c=r.build(l),d=r.buildPrev(t,n),f=r.buildNext(t,n),p={title:i,activeButton:e.type,isTodayEnabled:c.isValid&&!Ze(t.currentRange,l),isPrevEnabled:d.isValid,isNextEnabled:f.isValid};o?(this.header||(this.header=new pr(this.context,"fc-header-toolbar"),u(this.el,this.header.el)),this.header.receiveProps(Se({layout:o},p))):this.header&&(this.header.destroy(),this.header=null),a?(this.footer||(this.footer=new pr(this.context,"fc-footer-toolbar"),s(this.el,this.footer.el)),this.footer.receiveProps(Se({layout:a},p))):this.footer&&(this.footer.destroy(),this.footer=null)},t.prototype.renderView=function(e,t){var n=this.view,r=e.viewSpec,i=e.dateProfileGenerator;n&&n.viewSpec===r?n.addScroll(n.queryScroll()):(n&&n.destroy(),n=this.view=new r.class({calendar:this.calendar,view:null,dateEnv:this.dateEnv,theme:this.theme,options:r.options},r,i,this.contentEl)),n.title=t;for(var o={dateProfile:e.dateProfile,businessHours:this.parseBusinessHours(r.options.businessHours),eventStore:e.eventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize},a=0,s=this.buildViewPropTransformers(this.calendar.pluginSystem.hooks.viewPropsTransformers);a<s.length;a++){var u=s[a];Se(o,u.transform(o,r,e,n))}n.receiveProps(o)},t.prototype.updateSize=function(e){void 0===e&&(e=!1);var t=this.view;e&&t.addScroll(t.queryScroll()),(e||null==this.isHeightAuto)&&this.computeHeightVars(),t.updateSize(e,this.viewHeight,this.isHeightAuto),t.updateNowIndicator(),t.popScroll(e)},t.prototype.computeHeightVars=function(){var e=this.calendar,t=e.opt("height"),n=e.opt("contentHeight");if(this.isHeightAuto="auto"===t||"auto"===n,"number"==typeof n)this.viewHeight=n;else if("function"==typeof n)this.viewHeight=n();else if("number"==typeof t)this.viewHeight=t-this.queryToolbarsHeight();else if("function"==typeof t)this.viewHeight=t()-this.queryToolbarsHeight();else if("parent"===t){var r=this.el.parentNode;this.viewHeight=r.getBoundingClientRect().height-this.queryToolbarsHeight()}else this.viewHeight=Math.round(this.contentEl.getBoundingClientRect().width/Math.max(e.opt("aspectRatio"),.5))},t.prototype.queryToolbarsHeight=function(){var e=0;return this.header&&(e+=I(this.header.el)),this.footer&&(e+=I(this.footer.el)),e},t.prototype.freezeHeight=function(){y(this.el,{height:this.el.getBoundingClientRect().height,overflow:"hidden"})},t.prototype.thawHeight=function(){y(this.el,{height:"",overflow:""})},t}(fn);function vr(e,t){var n;return n=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,this.dateEnv.formatRange(n.start,n.end,ot(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=L(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e),t.titleRangeSeparator),{isEndExclusive:e.isRangeAllDay})}function gr(e){return e.map(function(e){return new e})}var yr=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();var mr={},Er=function(e){function t(t){var n=e.call(this,t)||this;n.handleSegClick=function(e,t){var r=n.component,i=ht(t);if(i&&r.isValidSegDownEl(e.target)){var o=p(e.target,".fc-has-url"),a=o?o.querySelector("a[href]").href:"";r.publiclyTrigger("eventClick",[{el:t,event:new ct(r.calendar,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.view}]),a&&!e.defaultPrevented&&(window.location.href=a)}};var r=t.component;return n.destroy=O(r.el,"click",r.fgSegSelector+","+r.bgSegSelector,n.handleSegClick),n}return Ee(t,e),t}(yr),Sr=function(e){function t(t){var n=e.call(this,t)||this;n.handleEventElRemove=function(e){e===n.currentSegEl&&n.handleSegLeave(null,n.currentSegEl)},n.handleSegEnter=function(e,t){ht(t)&&(t.classList.add("fc-allow-mouse-resize"),n.currentSegEl=t,n.triggerEvent("eventMouseEnter",e,t))},n.handleSegLeave=function(e,t){n.currentSegEl&&(t.classList.remove("fc-allow-mouse-resize"),n.currentSegEl=null,n.triggerEvent("eventMouseLeave",e,t))};var r,i,o,a,s,u=t.component;return n.removeHoverListeners=(r=u.el,i=u.fgSegSelector+","+u.bgSegSelector,o=n.handleSegEnter,a=n.handleSegLeave,O(r,"mouseover",i,function(e,t){if(t!==s){s=t,o(e,t);var n=function(e){s=null,a(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}})),u.calendar.on("eventElRemove",n.handleEventElRemove),n}return Ee(t,e),t.prototype.destroy=function(){this.removeHoverListeners(),this.component.calendar.off("eventElRemove",this.handleEventElRemove)},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=ht(n);t&&!r.isValidSegDownEl(t.target)||r.publiclyTrigger(e,[{el:n,event:new ct(this.component.calendar,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:r.view}])},t}(yr),br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ee(t,e),t}(cn);br.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},br.prototype.baseIconClass="fc-icon",br.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},br.prototype.iconOverrideOption="buttonIcons",br.prototype.iconOverrideCustomButtonOption="icon",br.prototype.iconOverridePrefix="fc-icon-";var Dr=function(){function e(e,t){var n=this;this.parseRawLocales=Ye(On),this.buildLocale=Ye(_n),this.buildDateEnv=Ye(Tr),this.buildTheme=Ye(wr),this.buildEventUiSingleBase=Ye(this._buildEventUiSingleBase),this.buildSelectionConfig=Ye(this._buildSelectionConfig),this.buildEventUiBySource=qe(Ir,Me),this.buildEventUiBases=Ye(Cr),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.needsFullRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=Ye(Rr),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=e,this.optionsManager=new xn(t||{}),this.pluginSystem=new gn,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map(function(e){return new e(n)})}return e.prototype.addPluginInputs=function(e){for(var t=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];if("string"==typeof i){var o="FullCalendar"+ue(i);window[o]?t.push(window[o].default):console.warn("Plugin file not loaded for "+i)}else t.push(i)}return Mn.concat(t)}(e),n=0,r=t;n<r.length;n++){var i=r[n];this.pluginSystem.add(i)}},Object.defineProperty(e.prototype,"view",{get:function(){return this.component?this.component.view:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){this.component?this.requestRerender(!0):(this.renderableEventStore={defs:{},instances:{}},this.bindHandlers(),this.executeRender())},e.prototype.destroy=function(){if(this.component){this.unbindHandlers(),this.component.destroy(),this.component=null;for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.publiclyTrigger("_destroyed")}},e.prototype.bindHandlers=function(){var e=this;this.removeNavLinkListener=O(this.el,"click","a[data-goto]",function(t,n){var r=n.getAttribute("data-goto");r=r?JSON.parse(r):{};var i=e.dateEnv,o=i.createMarker(r.date),a=r.type,s=e.viewOpt("navLink"+ue(a)+"Click");"function"==typeof s?s(i.toDate(o),t):("string"==typeof s&&(a=s),e.zoomTo(o,a))}),this.opt("handleWindowResize")&&window.addEventListener("resize",this.windowResizeProxy=pe(this.windowResize.bind(this),this.opt("windowResizeDelay")))},e.prototype.unbindHandlers=function(){this.removeNavLinkListener(),this.windowResizeProxy&&(window.removeEventListener("resize",this.windowResizeProxy),this.windowResizeProxy=null)},e.prototype.hydrate=function(){var e=this;this.state=this.buildInitialState();var t=this.opt("eventSources")||[],n=this.opt("events"),r=[];n&&t.unshift(n);for(var i=0,o=t;i<o.length;i++){var a=Wn(o[i],this);a&&r.push(a)}this.batchRendering(function(){e.dispatch({type:"INIT"}),e.dispatch({type:"ADD_EVENT_SOURCES",sources:r}),e.dispatch({type:"SET_VIEW_TYPE",viewType:e.opt("defaultView")||e.pluginSystem.hooks.defaultView})})},e.prototype.buildInitialState=function(){return{viewType:null,loadingLevel:0,eventSourceLoadingLevel:0,currentDate:this.getInitialDate(),dateProfile:null,eventSources:{},eventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null}},e.prototype.dispatch=function(e){if(this.actionQueue.push(e),!this.isReducing){this.isReducing=!0;for(var t=this.state;this.actionQueue.length;)this.state=this.reduce(this.state,this.actionQueue.shift(),this);var n=this.state;this.isReducing=!1,!t.loadingLevel&&n.loadingLevel?this.publiclyTrigger("loading",[!0]):t.loadingLevel&&!n.loadingLevel&&this.publiclyTrigger("loading",[!1]);var r=this.component&&this.component.view;(t.eventStore!==n.eventStore||this.needsFullRerender)&&t.eventStore&&(this.isEventsUpdated=!0),(t.dateProfile!==n.dateProfile||this.needsFullRerender)&&(t.dateProfile&&r&&this.publiclyTrigger("datesDestroy",[{view:r,el:r.el}]),this.isDatesUpdated=!0),(t.viewType!==n.viewType||this.needsFullRerender)&&(t.viewType&&r&&this.publiclyTrigger("viewSkeletonDestroy",[{view:r,el:r.el}]),this.isViewUpdated=!0),this.requestRerender()}},e.prototype.reduce=function(e,t,n){return Kn(e,t,n)},e.prototype.requestRerender=function(e){void 0===e&&(e=!1),this.needsRerender=!0,this.needsFullRerender=this.needsFullRerender||e,this.delayedRerender()},e.prototype.tryRerender=function(){this.component&&this.needsRerender&&!this.renderingPauseDepth&&!this.isRendering&&this.executeRender()},e.prototype.batchRendering=function(e){this.renderingPauseDepth++,e(),this.renderingPauseDepth--,this.needsRerender&&this.requestRerender()},e.prototype.executeRender=function(){var e=this.needsFullRerender;this.needsRerender=!1,this.needsFullRerender=!1,this.isRendering=!0,this.renderComponent(e),this.isRendering=!1,this.needsRerender&&this.delayedRerender()},e.prototype.renderComponent=function(e){var t=this.state,n=this.component,r=t.viewType,i=this.viewSpecs[r],o=e&&n?n.view.queryScroll():null;if(!i)throw new Error('View type "'+r+'" is not valid');var a=this.renderableEventStore=t.eventSourceLoadingLevel&&!this.opt("progressiveEventRendering")?this.renderableEventStore:t.eventStore,s=this.buildEventUiSingleBase(i.options),u=this.buildEventUiBySource(t.eventSources),l=this.eventUiBases=this.buildEventUiBases(a.defs,s,u);!e&&n||(n&&(n.freezeHeight(),n.destroy()),n=this.component=new hr({calendar:this,view:null,dateEnv:this.dateEnv,theme:this.theme,options:this.optionsManager.computed},this.el),this.isViewUpdated=!0,this.isDatesUpdated=!0,this.isEventsUpdated=!0),n.receiveProps(Se({},t,{viewSpec:i,dateProfile:t.dateProfile,dateProfileGenerator:this.dateProfileGenerators[r],eventStore:a,eventUiBases:l,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize})),o&&n.view.applyScroll(o,!1),this.isViewUpdated&&(this.isViewUpdated=!1,this.publiclyTrigger("viewSkeletonRender",[{view:n.view,el:n.view.el}])),this.isDatesUpdated&&(this.isDatesUpdated=!1,this.publiclyTrigger("datesRender",[{view:n.view,el:n.view.el}])),this.isEventsUpdated&&(this.isEventsUpdated=!1),this.releaseAfterSizingTriggers()},e.prototype.setOption=function(e,t){var n;this.mutateOptions(((n={})[e]=t,n),[],!0)},e.prototype.getOption=function(e){return this.optionsManager.computed[e]},e.prototype.opt=function(e){return this.optionsManager.computed[e]},e.prototype.viewOpt=function(e){return this.viewOpts()[e]},e.prototype.viewOpts=function(){return this.viewSpecs[this.state.viewType].options},e.prototype.mutateOptions=function(e,t,n,r){var i=this,o=this.pluginSystem.hooks.optionChangeHandlers,a={},s={},u=this.dateEnv,l=!1,c=!1,d=Boolean(t.length);for(var f in e)o[f]?s[f]=e[f]:a[f]=e[f];for(var p in a)/^(height|contentHeight|aspectRatio)$/.test(p)?c=!0:/^(defaultDate|defaultView)$/.test(p)||(d=!0,"timeZone"===p&&(l=!0));this.optionsManager.mutate(a,t,n),d&&(this.handleOptions(this.optionsManager.computed),this.needsFullRerender=!0),this.batchRendering(function(){if(d?(l&&i.dispatch({type:"CHANGE_TIMEZONE",oldDateEnv:u}),i.dispatch({type:"SET_VIEW_TYPE",viewType:i.state.viewType})):c&&i.updateSize(),r)for(var e in s)o[e](s[e],i,r)})},e.prototype.handleOptions=function(e){var t=this,n=this.pluginSystem.hooks;this.defaultAllDayEventDuration=J(e.defaultAllDayEventDuration),this.defaultTimedEventDuration=J(e.defaultTimedEventDuration),this.delayedRerender=this.buildDelayedRerender(e.rerenderDelay),this.theme=this.buildTheme(e);var r=this.parseRawLocales(e.locales);this.availableRawLocales=r.map;var i=this.buildLocale(e.locale||r.defaultCode,r.map);this.dateEnv=this.buildDateEnv(i,e.timeZone,n.namedTimeZonedImpl,e.firstDay,e.weekNumberCalculation,e.weekLabel,n.cmdFormatter),this.selectionConfig=this.buildSelectionConfig(e),this.viewSpecs=fr(n.views,this.optionsManager),this.dateProfileGenerators=Re(this.viewSpecs,function(e){return new e.class.prototype.dateProfileGeneratorClass(e,t)})},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.availableRawLocales)},e.prototype._buildSelectionConfig=function(e){return Nt("select",e,this)},e.prototype._buildEventUiSingleBase=function(e){return e.editable&&(e=Se({},e,{eventEditable:!0})),Nt("event",e,this)},e.prototype.hasPublicHandlers=function(e){return this.hasHandlers(e)||this.opt(e)},e.prototype.publiclyTrigger=function(e,t){var n=this.opt(e);if(this.triggerWith(e,this,t),n)return n.apply(this,t)},e.prototype.publiclyTriggerAfterSizing=function(e,t){var n=this.afterSizingTriggers;(n[e]||(n[e]=[])).push(t)},e.prototype.releaseAfterSizingTriggers=function(){var e=this.afterSizingTriggers;for(var t in e)for(var n=0,r=e[t];n<r.length;n++){var i=r[n];this.publiclyTrigger(t,i)}this.afterSizingTriggers={}},e.prototype.isValidViewType=function(e){return Boolean(this.viewSpecs[e])},e.prototype.changeView=function(e,t){var n=null;t&&(t.start&&t.end?(this.optionsManager.mutate({visibleRange:t},[]),this.handleOptions(this.optionsManager.computed)):n=this.dateEnv.createMarker(t)),this.unselect(),this.dispatch({type:"SET_VIEW_TYPE",viewType:e,dateMarker:n})},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"SET_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"SET_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.component,i=[];for(var o in r.header&&i.push.apply(i,r.header.viewsWithButtons),r.footer&&i.push.apply(i,r.footer.viewsWithButtons),this.viewSpecs)i.push(o);for(t=0;t<i.length;t++)if((n=this.viewSpecs[i[t]])&&n.singleUnit===e)return n},e.prototype.getInitialDate=function(){var e=this.opt("defaultDate");return null!=e?this.dateEnv.createMarker(e):this.getNow()},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,-1)})},e.prototype.nextYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,1)})},e.prototype.today=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.getNow()})},e.prototype.gotoDate=function(e){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=J(e);t&&(this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.add(this.state.currentDate,t)}))},e.prototype.getDate=function(){return this.dateEnv.toDate(this.state.currentDate)},e.prototype.formatDate=function(e,t){var n=this.dateEnv;return n.format(n.createMarker(e),ot(t))},e.prototype.formatRange=function(e,t,n){var r=this.dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),ot(n,this.opt("defaultRangeSeparator")),n)},e.prototype.formatIso=function(e,t){var n=this.dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.windowResize=function(e){!this.isHandlingWindowResize&&this.component&&e.target===window&&(this.isHandlingWindowResize=!0,this.updateSize(),this.publiclyTrigger("windowResize",[this.view]),this.isHandlingWindowResize=!1)},e.prototype.updateSize=function(){this.component&&this.component.updateSize(!0)},e.prototype.registerInteractiveComponent=function(e,t){var n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,t),r=[Er,Sr].concat(this.pluginSystem.hooks.componentInteractions).map(function(e){return new e(n)});this.interactionsStore[e.uid]=r,mr[e.uid]=n},e.prototype.unregisterInteractiveComponent=function(e){for(var t=0,n=this.interactionsStore[e.uid];t<n.length;t++){n[t].destroy()}delete this.interactionsStore[e.uid],delete mr[e.uid]},e.prototype.select=function(e,t){var n=or(null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t},this.dateEnv,J({days:1}));n&&(this.dispatch({type:"SELECT_DATES",selection:n}),this.triggerDateSelect(n))},e.prototype.unselect=function(e){this.state.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),this.triggerDateUnselect(e))},e.prototype.triggerDateSelect=function(e,t){var n=Se({},this.buildDateSpanApi(e),{jsEvent:t?t.origEvent:null,view:this.view});this.publiclyTrigger("select",[n])},e.prototype.triggerDateUnselect=function(e){this.publiclyTrigger("unselect",[{jsEvent:e?e.origEvent:null,view:this.view}])},e.prototype.triggerDateClick=function(e,t,n,r){var i=Se({},this.buildDatePointApi(e),{dayEl:t,jsEvent:r,view:n});this.publiclyTrigger("dateClick",[i])},e.prototype.buildDatePointApi=function(e){for(var t,n,r={},i=0,o=this.pluginSystem.hooks.datePointTransforms;i<o.length;i++){var a=o[i];Se(r,a(e,this))}return Se(r,(t=e,{date:(n=this.dateEnv).toDate(t.range.start),dateStr:n.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay})),r},e.prototype.buildDateSpanApi=function(e){for(var t,n,r={},i=0,o=this.pluginSystem.hooks.dateSpanTransforms;i<o.length;i++){var a=o[i];Se(r,a(e,this))}return Se(r,(t=e,{start:(n=this.dateEnv).toDate(t.range.start),end:n.toDate(t.range.end),startStr:n.formatIso(t.range.start,{omitTime:t.allDay}),endStr:n.formatIso(t.range.end,{omitTime:t.allDay}),allDay:t.allDay})),r},e.prototype.getNow=function(){var e=this.opt("now");return"function"==typeof e&&(e=e()),null==e?this.dateEnv.createNowMarker():this.dateEnv.createMarker(e)},e.prototype.getDefaultEventEnd=function(e,t){var n=t;return e?(n=B(n),n=this.dateEnv.add(n,this.defaultAllDayEventDuration)):n=this.dateEnv.add(n,this.defaultTimedEventDuration),n},e.prototype.addEvent=function(e,t){if(e instanceof ct){var n=e._def,r=e._instance;return this.state.eventStore.defs[n.defId]||this.dispatch({type:"ADD_EVENTS",eventStore:Oe({def:n,instance:r})}),e}var i;if(t instanceof lt)i=t.internalEventSource.sourceId;else if(null!=t){var o=this.getEventSourceById(t);if(!o)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=o.internalEventSource.sourceId}var a=Ft(e,i,this);return a?(this.dispatch({type:"ADD_EVENTS",eventStore:Oe(a)}),new ct(this,a.def,a.def.recurringDef?null:a.instance)):null},e.prototype.getEventById=function(e){var t=this.state.eventStore,n=t.defs,r=t.instances;for(var i in e=String(e),n){var o=n[i];if(o.publicId===e){if(o.recurringDef)return new ct(this,o,null);for(var a in r){var s=r[a];if(s.defId===o.defId)return new ct(this,o,s)}}}return null},e.prototype.getEvents=function(){var e=this.state.eventStore,t=e.defs,n=e.instances,r=[];for(var i in n){var o=n[i],a=t[o.defId];r.push(new ct(this,a,o))}return r},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.rerenderEvents=function(){this.dispatch({type:"RESET_EVENTS"})},e.prototype.getEventSources=function(){var e=this.state.eventSources,t=[];for(var n in e)t.push(new lt(this,e[n]));return t},e.prototype.getEventSourceById=function(e){var t=this.state.eventSources;for(var n in e=String(e),t)if(t[n].publicId===e)return new lt(this,t[n]);return null},e.prototype.addEventSource=function(e){if(e instanceof lt)return this.state.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var t=Wn(e,this);return t?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[t]}),new lt(this,t)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=J(e);t&&this.component.view.scrollToDuration(t)},e}();function Tr(e,t,n,r,i,o,a){return new Bn({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:n,locale:e,weekNumberCalculation:i,firstDay:r,weekLabel:o,cmdFormatter:a})}function wr(e){return new(this.pluginSystem.hooks.themeClasses[e.themeSystem]||br)(e)}function Rr(e){var t=this.tryRerender.bind(this);return null!=e&&(t=pe(t,e)),t}function Ir(e){return Re(e,function(e){return e.ui})}function Cr(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}tn.mixInto(Dr);var Mr=function(e){function t(t,n,i,o){var a=e.call(this,t,r("div",{className:"fc-view fc-"+n.type+"-view"}),!0)||this;return a.renderDatesMem=qt(a.renderDatesWrap,a.unrenderDatesWrap),a.renderBusinessHoursMem=qt(a.renderBusinessHours,a.unrenderBusinessHours,[a.renderDatesMem]),a.renderDateSelectionMem=qt(a.renderDateSelectionWrap,a.unrenderDateSelectionWrap,[a.renderDatesMem]),a.renderEventsMem=qt(a.renderEvents,a.unrenderEvents,[a.renderDatesMem]),a.renderEventSelectionMem=qt(a.renderEventSelectionWrap,a.unrenderEventSelectionWrap,[a.renderEventsMem]),a.renderEventDragMem=qt(a.renderEventDragWrap,a.unrenderEventDragWrap,[a.renderDatesMem]),a.renderEventResizeMem=qt(a.renderEventResizeWrap,a.unrenderEventResizeWrap,[a.renderDatesMem]),a.viewSpec=n,a.dateProfileGenerator=i,a.type=n.type,a.eventOrderSpecs=ie(a.opt("eventOrder")),a.nextDayThreshold=J(a.opt("nextDayThreshold")),o.appendChild(a.el),a.initialize(),a}return Ee(t,e),t.prototype.initialize=function(){},Object.defineProperty(t.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.props.dateProfile.activeRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.props.dateProfile.activeRange.end)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.props.dateProfile.currentRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.props.dateProfile.currentRange.end)},enumerable:!0,configurable:!0}),t.prototype.render=function(e){this.renderDatesMem(e.dateProfile),this.renderBusinessHoursMem(e.businessHours),this.renderDateSelectionMem(e.dateSelection),this.renderEventsMem(e.eventStore),this.renderEventSelectionMem(e.eventSelection),this.renderEventDragMem(e.eventDrag),this.renderEventResizeMem(e.eventResize)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderDatesMem.unrender()},t.prototype.updateSize=function(e,t,n){var r=this.calendar;(e||r.isViewUpdated||r.isDatesUpdated||r.isEventsUpdated)&&this.updateBaseSize(e,t,n)},t.prototype.updateBaseSize=function(e,t,n){},t.prototype.renderDatesWrap=function(e){this.renderDates(e),this.addScroll({duration:J(this.opt("scrollTime"))}),this.startNowIndicator(e)},t.prototype.unrenderDatesWrap=function(){this.stopNowIndicator(),this.unrenderDates()},t.prototype.renderDates=function(e){},t.prototype.unrenderDates=function(){},t.prototype.renderBusinessHours=function(e){},t.prototype.unrenderBusinessHours=function(){},t.prototype.renderDateSelectionWrap=function(e){e&&this.renderDateSelection(e)},t.prototype.unrenderDateSelectionWrap=function(e){e&&this.unrenderDateSelection(e)},t.prototype.renderDateSelection=function(e){},t.prototype.unrenderDateSelection=function(e){},t.prototype.renderEvents=function(e){},t.prototype.unrenderEvents=function(){},t.prototype.sliceEvents=function(e,t){var n=this.props;return dt(e,n.eventUiBases,n.dateProfile.activeRange,t?this.nextDayThreshold:null).fg},t.prototype.computeEventDraggable=function(e,t){for(var n=this.calendar.pluginSystem.hooks.isDraggableTransformers,r=t.startEditable,i=0,o=n;i<o.length;i++){r=(0,o[i])(r,e,t,this)}return r},t.prototype.computeEventStartResizable=function(e,t){return t.durationEditable&&this.opt("eventResizableFromStart")},t.prototype.computeEventEndResizable=function(e,t){return t.durationEditable},t.prototype.renderEventSelectionWrap=function(e){e&&this.renderEventSelection(e)},t.prototype.unrenderEventSelectionWrap=function(e){e&&this.unrenderEventSelection(e)},t.prototype.renderEventSelection=function(e){},t.prototype.unrenderEventSelection=function(e){},t.prototype.renderEventDragWrap=function(e){e&&this.renderEventDrag(e)},t.prototype.unrenderEventDragWrap=function(e){e&&this.unrenderEventDrag(e)},t.prototype.renderEventDrag=function(e){},t.prototype.unrenderEventDrag=function(e){},t.prototype.renderEventResizeWrap=function(e){e&&this.renderEventResize(e)},t.prototype.unrenderEventResizeWrap=function(e){e&&this.unrenderEventResize(e)},t.prototype.renderEventResize=function(e){},t.prototype.unrenderEventResize=function(e){},t.prototype.startNowIndicator=function(e){var t,n,r,i=this,o=this.dateEnv;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit(e))&&(n=this.updateNowIndicator.bind(this),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),r=o.add(o.startOf(this.initialNowDate,t),J(1,t)).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout(function(){i.nowIndicatorTimeoutID=null,n(),r="second"===t?1e3:6e4,i.nowIndicatorIntervalID=setInterval(n,r)},r))},t.prototype.updateNowIndicator=function(){this.props.dateProfile&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(H(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},t.prototype.stopNowIndicator=function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},t.prototype.getNowIndicatorUnit=function(e){},t.prototype.renderNowIndicator=function(e){},t.prototype.unrenderNowIndicator=function(){},t.prototype.addScroll=function(e){var t=this.queuedScroll||(this.queuedScroll={});Se(t,e)},t.prototype.popScroll=function(e){this.applyQueuedScroll(e),this.queuedScroll=null},t.prototype.applyQueuedScroll=function(e){this.applyScroll(this.queuedScroll||{},e)},t.prototype.queryScroll=function(){var e={};return this.props.dateProfile&&Se(e,this.queryDateScroll()),e},t.prototype.applyScroll=function(e,t){var n=e.duration;null!=n&&(delete e.duration,this.props.dateProfile&&Se(e,this.computeDateScroll(n))),this.props.dateProfile&&this.applyDateScroll(e)},t.prototype.computeDateScroll=function(e){return{}},t.prototype.queryDateScroll=function(){return{}},t.prototype.applyDateScroll=function(e){},t.prototype.scrollToDuration=function(e){this.applyScroll({duration:e},!1)},t}(pn);tn.mixInto(Mr),Mr.prototype.usesMinMaxTime=!1,Mr.prototype.dateProfileGeneratorClass=Jn;var kr=function(){function e(e){this.segs=[],this.isSizeDirty=!1,this.context=e}return e.prototype.renderSegs=function(e,t){this.rangeUpdated(),e=this.renderSegEls(e,t),this.segs=e,this.attachSegs(e,t),this.isSizeDirty=!0,this.context.view.triggerRenderedSegs(this.segs,Boolean(t))},e.prototype.unrender=function(e,t){this.context.view.triggerWillRemoveSegs(this.segs,Boolean(t)),this.detachSegs(this.segs),this.segs=[]},e.prototype.rangeUpdated=function(){var e,t,n=this.context.options;this.eventTimeFormat=ot(n.eventTimeFormat||this.computeEventTimeFormat(),n.defaultRangeSeparator),null==(e=n.displayEventTime)&&(e=this.computeDisplayEventTime()),null==(t=n.displayEventEnd)&&(t=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=t},e.prototype.renderSegEls=function(e,t){var n,r="";if(e.length){for(n=0;n<e.length;n++)r+=this.renderSegHtml(e[n],t);o(r).forEach(function(t,n){var r=e[n];t&&(r.el=t)}),e=ft(this.context.view,e,Boolean(t))}return e},e.prototype.getSegClasses=function(e,t,n,r){var i=["fc-event",e.isStart?"fc-start":"fc-not-start",e.isEnd?"fc-end":"fc-not-end"].concat(e.eventRange.ui.classNames);return t&&i.push("fc-draggable"),n&&i.push("fc-resizable"),r&&(i.push("fc-mirror"),r.isDragging&&i.push("fc-dragging"),r.isResizing&&i.push("fc-resizing")),i},e.prototype.getTimeText=function(e,t,n){var r=e.def,i=e.instance;return this._getTimeText(i.range.start,r.hasEnd?i.range.end:null,r.allDay,t,n,i.forcedStartTzo,i.forcedEndTzo)},e.prototype._getTimeText=function(e,t,n,r,i,o,a){var s=this.context.dateEnv;return null==r&&(r=this.eventTimeFormat),null==i&&(i=this.displayEventEnd),this.displayEventTime&&!n?i&&t?s.formatRange(e,t,r,{forcedStartTzo:o,forcedEndTzo:a}):s.format(e,r,{forcedTzo:o}):""},e.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0}},e.prototype.computeDisplayEventTime=function(){return!0},e.prototype.computeDisplayEventEnd=function(){return!0},e.prototype.getSkinCss=function(e){return{"background-color":e.backgroundColor,"border-color":e.borderColor,color:e.textColor}},e.prototype.sortEventSegs=function(e){var t=this.context.view.eventOrderSpecs,n=e.map(Or);return n.sort(function(e,n){return oe(e,n,t)}),n.map(function(e){return e._seg})},e.prototype.computeSizes=function(e){(e||this.isSizeDirty)&&this.computeSegSizes(this.segs)},e.prototype.assignSizes=function(e){(e||this.isSizeDirty)&&(this.assignSegSizes(this.segs),this.isSizeDirty=!1)},e.prototype.computeSegSizes=function(e){},e.prototype.assignSegSizes=function(e){},e.prototype.hideByHash=function(e){if(e)for(var t=0,n=this.segs;t<n.length;t++){var r=n[t];e[r.eventRange.instance.instanceId]&&(r.el.style.visibility="hidden")}},e.prototype.showByHash=function(e){if(e)for(var t=0,n=this.segs;t<n.length;t++){var r=n[t];e[r.eventRange.instance.instanceId]&&(r.el.style.visibility="")}},e.prototype.selectByInstanceId=function(e){if(e)for(var t=0,n=this.segs;t<n.length;t++){var r=n[t],i=r.eventRange.instance;i&&i.instanceId===e&&r.el&&r.el.classList.add("fc-selected")}},e.prototype.unselectByInstanceId=function(e){if(e)for(var t=0,n=this.segs;t<n.length;t++){var r=n[t];r.el&&r.el.classList.remove("fc-selected")}},e}();function Or(e){var t=e.eventRange.def,n=e.eventRange.instance.range,r=n.start?n.start.valueOf():0,i=n.end?n.end.valueOf():0;return Se({},t.extendedProps,t,{id:t.publicId,start:r,end:i,duration:i-r,allDay:Number(t.allDay),_seg:e})}var _r=function(){function e(e){this.fillSegTag="div",this.dirtySizeFlags={},this.context=e,this.containerElsByType={},this.segsByType={}}return e.prototype.getSegsByType=function(e){return this.segsByType[e]||[]},e.prototype.renderSegs=function(e,t){var n,r=this.renderSegEls(e,t),i=this.attachSegs(e,r);i&&(n=this.containerElsByType[e]||(this.containerElsByType[e]=[])).push.apply(n,i),this.segsByType[e]=r,"bgEvent"===e&&this.context.view.triggerRenderedSegs(r,!1),this.dirtySizeFlags[e]=!0},e.prototype.unrender=function(e){var t=this.segsByType[e];t&&("bgEvent"===e&&this.context.view.triggerWillRemoveSegs(t,!1),this.detachSegs(e,t))},e.prototype.renderSegEls=function(e,t){var n,r=this,i="";if(t.length){for(n=0;n<t.length;n++)i+=this.renderSegHtml(e,t[n]);o(i).forEach(function(e,n){var r=t[n];e&&(r.el=e)}),"bgEvent"===e&&(t=ft(this.context.view,t,!1)),t=t.filter(function(e){return h(e.el,r.fillSegTag)})}return t},e.prototype.renderSegHtml=function(e,t){var n=null,r=[];return"highlight"!==e&&"businessHours"!==e&&(n={"background-color":t.eventRange.ui.backgroundColor}),"highlight"!==e&&(r=r.concat(t.eventRange.ui.classNames)),"businessHours"===e?r.push("fc-bgevent"):r.push("fc-"+e.toLowerCase()),"<"+this.fillSegTag+(r.length?' class="'+r.join(" ")+'"':"")+(n?' style="'+_t(n)+'"':"")+"></"+this.fillSegTag+">"},e.prototype.detachSegs=function(e,t){var n=this.containerElsByType[e];n&&(n.forEach(c),delete this.containerElsByType[e])},e.prototype.computeSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.computeSegSizes(this.segsByType[t])},e.prototype.assignSizes=function(e){for(var t in this.segsByType)(e||this.dirtySizeFlags[t])&&this.assignSegSizes(this.segsByType[t]);this.dirtySizeFlags={}},e.prototype.computeSegSizes=function(e){},e.prototype.assignSegSizes=function(e){},e}(),Pr=function(e){this.timeZoneName=e},xr=function(){function e(e){this.emitter=new tn}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}();function Hr(e){var t=_n(e.locale||"en",On([]).map);return e=Se({timeZone:Rn.timeZone,calendarSystem:"gregory"},e,{locale:t}),new Bn(e)}var Nr={startTime:J,duration:J,create:Boolean,sourceId:String},zr={create:!0};function Ur(e,t){return!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}function Lr(e,t,n,r,i,o,a,s){var u,l=o.view,c=o.dateEnv,d=o.theme,f=o.options,p=Ze(t.activeRange,e),h=["fc-day-header",d.getClass("widgetHeader")];return u="function"==typeof f.columnHeaderHtml?f.columnHeaderHtml(c.toDate(e)):"function"==typeof f.columnHeaderText?Ot(f.columnHeaderText(c.toDate(e))):Ot(c.format(e,i)),n?h=h.concat(Qt(e,t,o,!0)):h.push("fc-"+P[e.getUTCDay()]),'<th class="'+h.join(" ")+'"'+(p&&n?' data-date="'+c.formatIso(e,{omitTime:!0})+'"':"")+(a>1?' colspan="'+a+'"':"")+(s?" "+s:"")+">"+(p?Kt(l,{date:e,forceOff:!n||1===r},u):u)+"</th>"}var Br=function(e){function t(t,n){var r=e.call(this,t)||this;return n.innerHTML="",n.appendChild(r.el=i('<div class="fc-row '+r.theme.getClass("headerRow")+'"><table class="'+r.theme.getClass("tableGrid")+'"><thead></thead></table></div>')),r.thead=r.el.querySelector("thead"),r}return Ee(t,e),t.prototype.destroy=function(){c(this.el)},t.prototype.render=function(e){var t=e.dates,n=e.datesRepDistinctDays,r=[];e.renderIntroHtml&&r.push(e.renderIntroHtml());for(var i=ot(this.opt("columnHeaderFormat")||Ur(n,t.length)),o=0,a=t;o<a.length;o++){var s=a[o];r.push(Lr(s,e.dateProfile,n,t.length,i,this.context))}this.isRtl&&r.reverse(),this.thead.innerHTML="<tr>"+r.join("")+"</tr>"},t}(fn),Vr=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],a=-1;n<r;)t.isHiddenDay(n)?i.push(a+.5):(a++,i.push(a),o.push(n)),n=x(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(x(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(N(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),Ar=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){return{date:this.daySeries.dates[e*this.colCnt+t]}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,a=i;a<=o;){var s=Math.floor(a/t),u=Math.min((s+1)*t,o+1);r.push({row:s,firstCol:a%t,lastCol:(u-1)%t,isStart:n.isStart&&a===i,isEnd:n.isEnd&&u-1===o}),a=u}return r},e}(),Fr=function(){function e(){this.sliceBusinessHours=Ye(this._sliceBusinessHours),this.sliceDateSelection=Ye(this._sliceDateSpan),this.sliceEventStore=Ye(this._sliceEventStore),this.sliceEventDrag=Ye(this._sliceInteraction),this.sliceEventResize=Ye(this._sliceInteraction)}return e.prototype.sliceProps=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];var a=e.eventUiBases,s=this.sliceEventStore.apply(this,[e.eventStore,a,t,n,r].concat(i));return{dateSelectionSegs:this.sliceDateSelection.apply(this,[e.dateSelection,a,r].concat(i)),businessHourSegs:this.sliceBusinessHours.apply(this,[e.businessHours,t,n,r].concat(i)),fgEventSegs:s.fg,bgEventSegs:s.bg,eventDrag:this.sliceEventDrag.apply(this,[e.eventDrag,a,t,n,r].concat(i)),eventResize:this.sliceEventResize.apply(this,[e.eventResize,a,t,n,r].concat(i)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,[{range:{start:e,end:H(e,1)},allDay:!1},{},t].concat(n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];return e?this._sliceEventStore.apply(this,[_e(e,Wr(t,Boolean(n)),r.calendar),{},t,n,r].concat(i)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r,i){for(var o=[],a=5;a<arguments.length;a++)o[a-5]=arguments[a];if(e){var s=dt(e,t,Wr(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i,o),fg:this.sliceEventRanges(s.fg,i,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r,i){for(var o=[],a=5;a<arguments.length;a++)o[a-5]=arguments[a];if(!e)return null;var s=dt(e.mutatedEvents,t,Wr(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent,sourceSeg:e.origSeg}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];if(!e)return[];for(var o=ar(e,t,n.calendar),a=this.sliceRange.apply(this,[e.range].concat(r)),s=0,u=a;s<u.length;s++){var l=u[s];l.component=n,l.eventRange=o}return a},e.prototype.sliceEventRanges=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i];r.push.apply(r,this.sliceEventRange(a,t,n))}return r},e.prototype.sliceEventRange=function(e,t,n){for(var r=this.sliceRange.apply(this,[e.range].concat(n)),i=0,o=r;i<o.length;i++){var a=o[i];a.component=t,a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Wr(e,t){var n=e.activeRange;return t?n:{start:H(n.start,e.minTime.milliseconds),end:H(n.end,e.maxTime.milliseconds-864e5)}}e.Calendar=Dr,e.Component=fn,e.DateComponent=pn,e.DateEnv=Bn,e.DateProfileGenerator=Jn,e.DayHeader=Br,e.DaySeries=Vr,e.DayTable=Ar,e.ElementDragging=xr,e.ElementScrollController=sn,e.EmitterMixin=tn,e.EventApi=ct,e.FgEventRenderer=kr,e.FillRenderer=_r,e.Interaction=yr,e.Mixin=en,e.NamedTimeZoneImpl=Pr,e.PositionCache=on,e.ScrollComponent=ln,e.ScrollController=an,e.Slicer=Fr,e.Splitter=Xt,e.Theme=cn,e.View=Mr,e.WindowScrollController=un,e.addDays=x,e.addDurations=function(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}},e.addMs=H,e.addWeeks=function(e,t){var n=Z(e);return n[2]+=7*t,j(n)},e.allowContextMenu=function(e){e.removeEventListener("contextmenu",k)},e.allowSelection=function(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",k)},e.appendToElement=s,e.applyAll=de,e.applyMutationToEventStore=yt,e.applyStyle=y,e.applyStyleProp=m,e.asRoughMinutes=function(e){return te(e)/6e4},e.asRoughMs=te,e.asRoughSeconds=function(e){return te(e)/1e3},e.buildGotoAnchorHtml=Kt,e.buildSegCompareObj=Or,e.capitaliseFirstLetter=ue,e.combineEventUis=Ut,e.compareByFieldSpec=ae,e.compareByFieldSpecs=oe,e.compareNumbers=function(e,t){return e-t},e.compensateScroll=function(e,t){t.left&&y(e,{borderLeftWidth:1,marginLeft:t.left-1}),t.right&&y(e,{borderRightWidth:1,marginRight:t.right-1})},e.computeClippingRect=function(e){return M(e).map(function(e){return w(e)}).concat({left:window.pageXOffset,right:window.pageXOffset+document.documentElement.clientWidth,top:window.pageYOffset,bottom:window.pageYOffset+document.documentElement.clientHeight}).reduce(function(e,t){return E(e,t)||t})},e.computeEdges=T,e.computeFallbackHeaderFormat=Ur,e.computeHeightAndMargins=I,e.computeInnerRect=w,e.computeRect=R,e.computeVisibleDayRange=ge,e.config={},e.constrainPoint=function(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}},e.createDuration=J,e.createElement=r,e.createEmptyEventStore=He,e.createEventInstance=Zt,e.createFormatter=ot,e.createPlugin=vn,e.cssToStr=_t,e.debounce=pe,e.diffDates=ye,e.diffDayAndTime=z,e.diffDays=N,e.diffPoints=function(e,t){return{left:e.left-t.left,top:e.top-t.top}},e.diffWeeks=function(e,t){return N(e,t)/7},e.diffWholeDays=L,e.diffWholeWeeks=U,e.disableCursor=function(){document.body.classList.add("fc-not-allowed")},e.distributeHeight=function(e,t,n){var r=Math.floor(t/e.length),i=Math.floor(t-r*(e.length-1)),o=[],a=[],s=[],u=0;re(e),e.forEach(function(t,n){var l=n===e.length-1?i:r,c=t.getBoundingClientRect().height,d=c+C(t);d<l?(o.push(t),a.push(d),s.push(c)):u+=d}),n&&(t-=u,r=Math.floor(t/o.length),i=Math.floor(t-r*(o.length-1))),o.forEach(function(e,t){var n=t===o.length-1?i:r,u=a[t],l=n-(u-s[t]);u<n&&(e.style.height=l+"px")})},e.elementClosest=p,e.elementMatches=h,e.enableCursor=function(){document.body.classList.remove("fc-not-allowed")},e.eventTupleToStore=Oe,e.filterEventStoreDefs=ze,e.filterHash=we,e.findChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,a=0;a<o.length;a++){var s=o[a];t&&!h(s,t)||r.push(s)}return r},e.findElements=v,e.flexibleCompare=se,e.forceClassName=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.formatDate=function(e,t){void 0===t&&(t={});var n=Hr(t),r=ot(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatIsoTimeString=function(e){return le(e.getUTCHours(),2)+":"+le(e.getUTCMinutes(),2)+":"+le(e.getUTCSeconds(),2)},e.formatRange=function(e,t,n){var r=Hr("object"==typeof n&&n?n:{}),i=ot(n,Rn.defaultRangeSeparator),o=r.createMarkerMeta(e),a=r.createMarkerMeta(t);return o&&a?r.formatRange(o.marker,a.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:a.forcedTzo,isEndExclusive:n.isEndExclusive}):""},e.getAllDayHtml=function(e){return e.opt("allDayHtml")||Ot(e.opt("allDayText"))},e.getClippingParents=M,e.getDayClasses=Qt,e.getElSeg=ht,e.getRectCenter=function(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}},e.getRelevantEvents=Pe,e.globalDefaults=Rn,e.greatestDurationDenominator=ne,e.hasBgRendering=function(e){return"background"===e.rendering||"inverse-background"===e.rendering},e.htmlEscape=Ot,e.htmlToElement=i,e.insertAfterElement=function(e,t){for(var n=l(t),r=e.nextSibling||null,i=0;i<n.length;i++)e.parentNode.insertBefore(n[i],r)},e.interactionSettingsStore=mr,e.interactionSettingsToStore=function(e){var t;return(t={})[e.component.uid]=e,t},e.intersectRanges=Ve,e.intersectRects=E,e.isArraysEqual=je,e.isDateSpansEqual=function(e,t){return Ae(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)},e.isInt=ce,e.isInteractionValid=Tt,e.isMultiDayRange=function(e){var t=ge(e);return N(t.start,t.end)>1},e.isPropsEqual=Me,e.isPropsValid=Rt,e.isSingleDay=function(e){return 0===e.years&&0===e.months&&1===e.days&&0===e.milliseconds},e.isValidDate=Y,e.listenBySelector=O,e.mapHash=Re,e.matchCellWidths=function(e){var t=0;return e.forEach(function(e){var n=e.firstChild;if(n instanceof HTMLElement){var r=n.getBoundingClientRect().width;r>t&&(t=r)}}),t++,e.forEach(function(e){e.style.width=t+"px"}),t},e.memoize=Ye,e.memoizeOutput=qe,e.memoizeRendering=qt,e.mergeEventStores=Ne,e.multiplyDuration=function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}},e.padStart=le,e.parseBusinessHours=Yt,e.parseDragMeta=function(e){var t={},n=he(e,Nr,zr,t);return n.leftoverProps=t,n},e.parseEventDef=Wt,e.parseFieldSpecs=ie,e.parseMarker=Ln,e.pointInsideRect=function(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom},e.prependToElement=u,e.preventContextMenu=function(e){e.addEventListener("contextmenu",k)},e.preventDefault=k,e.preventSelection=function(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",k)},e.processScopedUiProps=Nt,e.rangeContainsMarker=Ze,e.rangeContainsRange=We,e.rangesEqual=Ae,e.rangesIntersect=Fe,e.refineProps=he,e.removeElement=c,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.renderDateCell=Lr,e.requestJson=En,e.sliceEventStore=dt,e.startOfDay=B,e.subtractInnerElHeight=function(e,t){var n={position:"relative",left:-1};y(e,n),y(t,n);var r=e.getBoundingClientRect().height-t.getBoundingClientRect().height,i={position:"",left:""};return y(e,i),y(t,i),r},e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.uncompensateScroll=function(e){y(e,{marginLeft:"",marginRight:"",borderLeftWidth:"",borderRightWidth:""})},e.undistributeHeight=re,e.unpromisify=$t,e.version="4.3.1",e.whenTransitionDone=function(e,t){var n=function(r){t(r),_.forEach(function(t){e.removeEventListener(t,n)})};_.forEach(function(t){e.addEventListener(t,n)})},e.wholeDivideDurations=function(e,t){for(var n=null,r=0;r<G.length;r++){var i=G[r];if(t[i]){var o=e[i]/t[i];if(!ce(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n},Object.defineProperty(e,"__esModule",{value:!0})});(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=global||self,global.FullCalendarLocalesAll=factory())}(this,function(){'use strict';var _m0={code:"af",week:{dow:1,doy:4},buttonText:{prev:"Vorige",next:"Volgende",today:"Vandag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayHtml:"Heeldag",eventLimitText:"Addisionele",noEventsMessage:"Daar is geen gebeurtenisse nie"};var _m1={code:"ar-dz",week:{dow:0,doy:4},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m2={code:"ar-kw",week:{dow:0,doy:12},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m3={code:"ar-ly",week:{dow:6,doy:12},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m4={code:"ar-ma",week:{dow:6,doy:12},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m5={code:"ar-sa",week:{dow:0,doy:6},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m6={code:"ar-tn",week:{dow:1,doy:4},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m7={code:"ar",week:{dow:6,doy:12},dir:'rtl',buttonText:{prev:"السابق",next:"التالي",today:"اليوم",month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},weekLabel:"أسبوع",allDayText:"اليوم كله",eventLimitText:"أخرى",noEventsMessage:"أي أحداث لعرض"};var _m8={code:"bg",week:{dow:1,doy:7},buttonText:{prev:"назад",next:"напред",today:"днес",month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",eventLimitText:function(n){return"+още "+n},noEventsMessage:"Няма събития за показване"};var _m9={code:"bs",week:{dow:1,doy:7},buttonText:{prev:"Prošli",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Sedmica",day:"Dan",list:"Raspored"},weekLabel:"Sed",allDayText:"Cijeli dan",eventLimitText:function(n){return"+ još "+n},noEventsMessage:"Nema događaja za prikazivanje"};var _m10={code:"ca",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Següent",today:"Avui",month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},weekLabel:"Set",allDayText:"Tot el dia",eventLimitText:"més",noEventsMessage:"No hi ha esdeveniments per mostrar"};var _m11={code:"cs",week:{dow:1,doy:4},buttonText:{prev:"Dříve",next:"Později",today:"Nyní",month:"Měsíc",week:"Týden",day:"Den",list:"Agenda"},weekLabel:"Týd",allDayText:"Celý den",eventLimitText:function(n){return"+další: "+n},noEventsMessage:"Žádné akce k zobrazení"};var _m12={code:"da",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Næste",today:"I dag",month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},weekLabel:"Uge",allDayText:"Hele dagen",eventLimitText:"flere",noEventsMessage:"Ingen arrangementer at vise"};var _m13={code:"de",week:{dow:1,doy:4},buttonText:{prev:"Zurück",next:"Vor",today:"Heute",year:"Jahr",month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},weekLabel:"KW",allDayText:"Ganztägig",eventLimitText:function(n){return"+ weitere "+n},noEventsMessage:"Keine Ereignisse anzuzeigen"};var _m14={code:"el",week:{dow:1,doy:4},buttonText:{prev:"Προηγούμενος",next:"Επόμενος",today:"Σήμερα",month:"Μήνας",week:"Εβδομάδα",day:"Ημέρα",list:"Ατζέντα"},weekLabel:"Εβδ",allDayText:"Ολοήμερο",eventLimitText:"περισσότερα",noEventsMessage:"Δεν υπάρχουν γεγονότα για να εμφανιστεί"};var _m15={code:"en-au",week:{dow:1,doy:4}};var _m16={code:"en-gb",week:{dow:1,doy:4}};var _m17={code:"en-nz",week:{dow:1,doy:4}};var _m18={code:"es",week:{dow:0,doy:6},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekLabel:"Sm",allDayHtml:"Todo<br/>el día",eventLimitText:"más",noEventsMessage:"No hay eventos para mostrar"};var _m19={code:"es",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Sig",today:"Hoy",month:"Mes",week:"Semana",day:"Día",list:"Agenda"},weekLabel:"Sm",allDayHtml:"Todo<br/>el día",eventLimitText:"más",noEventsMessage:"No hay eventos para mostrar"};var _m20={code:"et",week:{dow:1,doy:4},buttonText:{prev:"Eelnev",next:"Järgnev",today:"Täna",month:"Kuu",week:"Nädal",day:"Päev",list:"Päevakord"},weekLabel:"näd",allDayText:"Kogu päev",eventLimitText:function(n){return"+ veel "+n},noEventsMessage:"Kuvamiseks puuduvad sündmused"};var _m21={code:"eu",week:{dow:1,doy:7},buttonText:{prev:"Aur",next:"Hur",today:"Gaur",month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},weekLabel:"As",allDayHtml:"Egun<br/>osoa",eventLimitText:"gehiago",noEventsMessage:"Ez dago ekitaldirik erakusteko"};var _m22={code:"fa",week:{dow:6,doy:12},dir:'rtl',buttonText:{prev:"قبلی",next:"بعدی",today:"امروز",month:"ماه",week:"هفته",day:"روز",list:"برنامه"},weekLabel:"هف",allDayText:"تمام روز",eventLimitText:function(n){return"بیش از "+n},noEventsMessage:"هیچ رویدادی به نمایش"};var _m23={code:"fi",week:{dow:1,doy:4},buttonText:{prev:"Edellinen",next:"Seuraava",today:"Tänään",month:"Kuukausi",week:"Viikko",day:"Päivä",list:"Tapahtumat"},weekLabel:"Vk",allDayText:"Koko päivä",eventLimitText:"lisää",noEventsMessage:"Ei näytettäviä tapahtumia"};var _m24={code:"fr",buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekLabel:"Sem.",allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"};var _m25={code:"fr-ch",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Courant",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekLabel:"Sm",allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"};var _m26={code:"fr",week:{dow:1,doy:4},buttonText:{prev:"Précédent",next:"Suivant",today:"Aujourd'hui",year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},weekLabel:"Sem.",allDayHtml:"Toute la<br/>journée",eventLimitText:"en plus",noEventsMessage:"Aucun événement à afficher"};var _m27={code:"gl",week:{dow:1,doy:4},buttonText:{prev:"Ant",next:"Seg",today:"Hoxe",month:"Mes",week:"Semana",day:"Día",list:"Axenda"},weekLabel:"Sm",allDayHtml:"Todo<br/>o día",eventLimitText:"máis",noEventsMessage:"Non hai eventos para amosar"};var _m28={code:"he",dir:'rtl',buttonText:{prev:"הקודם",next:"הבא",today:"היום",month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},allDayText:"כל היום",eventLimitText:"אחר",noEventsMessage:"אין אירועים להצגה",weekLabel:"שבוע"};var _m29={code:"hi",week:{dow:0,doy:6},buttonText:{prev:"पिछला",next:"अगला",today:"आज",month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},weekLabel:"हफ्ता",allDayText:"सभी दिन",eventLimitText:function(n){return"+अधिक "+n},noEventsMessage:"कोई घटनाओं को प्रदर्शित करने के लिए"};var _m30={code:"hr",week:{dow:1,doy:7},buttonText:{prev:"Prijašnji",next:"Sljedeći",today:"Danas",month:"Mjesec",week:"Tjedan",day:"Dan",list:"Raspored"},weekLabel:"Tje",allDayText:"Cijeli dan",eventLimitText:function(n){return"+ još "+n},noEventsMessage:"Nema događaja za prikaz"};var _m31={code:"hu",week:{dow:1,doy:4},buttonText:{prev:"vissza",next:"előre",today:"ma",month:"Hónap",week:"Hét",day:"Nap",list:"Napló"},weekLabel:"Hét",allDayText:"Egész nap",eventLimitText:"további",noEventsMessage:"Nincs megjeleníthető esemény"};var _m32={code:"id",week:{dow:1,doy:7},buttonText:{prev:"mundur",next:"maju",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekLabel:"Mg",allDayHtml:"Sehari<br/>penuh",eventLimitText:"lebih",noEventsMessage:"Tidak ada acara untuk ditampilkan"};var _m33={code:"is",week:{dow:1,doy:4},buttonText:{prev:"Fyrri",next:"Næsti",today:"Í dag",month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},weekLabel:"Vika",allDayHtml:"Allan<br/>daginn",eventLimitText:"meira",noEventsMessage:"Engir viðburðir til að sýna"};var _m34={code:"it",week:{dow:1,doy:4},buttonText:{prev:"Prec",next:"Succ",today:"Oggi",month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},weekLabel:"Sm",allDayHtml:"Tutto il<br/>giorno",eventLimitText:function(n){return"+altri "+n},noEventsMessage:"Non ci sono eventi da visualizzare"};var _m35={code:"ja",buttonText:{prev:"前",next:"次",today:"今日",month:"月",week:"週",day:"日",list:"予定リスト"},weekLabel:"週",allDayText:"終日",eventLimitText:function(n){return"他 "+n+" 件"},noEventsMessage:"表示する予定はありません"};var _m36={code:"ka",week:{dow:1,doy:7},buttonText:{prev:"წინა",next:"შემდეგი",today:"დღეს",month:"თვე",week:"კვირა",day:"დღე",list:"დღის წესრიგი"},weekLabel:"კვ",allDayText:"მთელი დღე",eventLimitText:function(n){return"+ კიდევ "+n},noEventsMessage:"ღონისძიებები არ არის"};var _m37={code:"kk",week:{dow:1,doy:7},buttonText:{prev:"Алдыңғы",next:"Келесі",today:"Бүгін",month:"Ай",week:"Апта",day:"Күн",list:"Күн тәртібі"},weekLabel:"Не",allDayText:"Күні бойы",eventLimitText:function(n){return"+ тағы "+n},noEventsMessage:"Көрсету үшін оқиғалар жоқ"};var _m38={code:"ko",buttonText:{prev:"이전달",next:"다음달",today:"오늘",month:"월",week:"주",day:"일",list:"일정목록"},weekLabel:"주",allDayText:"종일",eventLimitText:"개",noEventsMessage:"일정이 없습니다"};var _m39={code:"lb",week:{dow:1,doy:4},buttonText:{prev:"Zréck",next:"Weider",today:"Haut",month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},weekLabel:"W",allDayText:"Ganzen Dag",eventLimitText:"méi",noEventsMessage:"Nee Evenementer ze affichéieren"};var _m40={code:"lt",week:{dow:1,doy:4},buttonText:{prev:"Atgal",next:"Pirmyn",today:"Šiandien",month:"Mėnuo",week:"Savaitė",day:"Diena",list:"Darbotvarkė"},weekLabel:"SAV",allDayText:"Visą dieną",eventLimitText:"daugiau",noEventsMessage:"Nėra įvykių rodyti"};var _m41={code:"lv",week:{dow:1,doy:4},buttonText:{prev:"Iepr.",next:"Nāk.",today:"Šodien",month:"Mēnesis",week:"Nedēļa",day:"Diena",list:"Dienas kārtība"},weekLabel:"Ned.",allDayText:"Visu dienu",eventLimitText:function(n){return"+vēl "+n},noEventsMessage:"Nav notikumu"};var _m42={code:"mk",buttonText:{prev:"претходно",next:"следно",today:"Денес",month:"Месец",week:"Недела",day:"Ден",list:"График"},weekLabel:"Сед",allDayText:"Цел ден",eventLimitText:function(n){return"+повеќе "+n},noEventsMessage:"Нема настани за прикажување"};var _m43={code:"ms",week:{dow:1,doy:7},buttonText:{prev:"Sebelum",next:"Selepas",today:"hari ini",month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},weekLabel:"Mg",allDayText:"Sepanjang hari",eventLimitText:function(n){return"masih ada "+n+" acara"},noEventsMessage:"Tiada peristiwa untuk dipaparkan"};var _m44={code:"nb",week:{dow:1,doy:4},buttonText:{prev:"Forrige",next:"Neste",today:"I dag",month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},weekLabel:"Uke",allDayText:"Hele dagen",eventLimitText:"til",noEventsMessage:"Ingen hendelser å vise"};var _m45={code:"nl",week:{dow:1,doy:4},buttonText:{prev:"Voorgaand",next:"Volgende",today:"Vandaag",year:"Jaar",month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",eventLimitText:"extra",noEventsMessage:"Geen evenementen om te laten zien"};var _m46={code:"nn",week:{dow:1,doy:4},buttonText:{prev:"Førre",next:"Neste",today:"I dag",month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},weekLabel:"Veke",allDayText:"Heile dagen",eventLimitText:"til",noEventsMessage:"Ingen hendelser å vise"};var _m47={code:"pl",week:{dow:1,doy:4},buttonText:{prev:"Poprzedni",next:"Następny",today:"Dziś",month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},weekLabel:"Tydz",allDayText:"Cały dzień",eventLimitText:"więcej",noEventsMessage:"Brak wydarzeń do wyświetlenia"};var _m48={code:"pt-br",buttonText:{prev:"Anterior",next:"Próximo",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Compromissos"},weekLabel:"Sm",allDayText:"dia inteiro",eventLimitText:function(n){return"mais +"+n},noEventsMessage:"Não há eventos para mostrar"};var _m49={code:"pt",week:{dow:1,doy:4},buttonText:{prev:"Anterior",next:"Seguinte",today:"Hoje",month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},weekLabel:"Sem",allDayText:"Todo o dia",eventLimitText:"mais",noEventsMessage:"Não há eventos para mostrar"};var _m50={code:"ro",week:{dow:1,doy:7},buttonText:{prev:"precedentă",next:"următoare",today:"Azi",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},weekLabel:"Săpt",allDayText:"Toată ziua",eventLimitText:function(n){return"+alte "+n},noEventsMessage:"Nu există evenimente de afișat"};var _m51={code:"ru",week:{dow:1,doy:4},buttonText:{prev:"Пред",next:"След",today:"Сегодня",month:"Месяц",week:"Неделя",day:"День",list:"Повестка дня"},weekLabel:"Нед",allDayText:"Весь день",eventLimitText:function(n){return"+ ещё "+n},noEventsMessage:"Нет событий для отображения"};var _m52={code:"sk",week:{dow:1,doy:4},buttonText:{prev:"Predchádzajúci",next:"Nasledujúci",today:"Dnes",month:"Mesiac",week:"Týždeň",day:"Deň",list:"Rozvrh"},weekLabel:"Ty",allDayText:"Celý deň",eventLimitText:function(n){return"+ďalšie: "+n},noEventsMessage:"Žiadne akcie na zobrazenie"};var _m53={code:"sl",week:{dow:1,doy:7},buttonText:{prev:"Prejšnji",next:"Naslednji",today:"Trenutni",month:"Mesec",week:"Teden",day:"Dan",list:"Dnevni red"},weekLabel:"Teden",allDayText:"Ves dan",eventLimitText:"več",noEventsMessage:"Ni dogodkov za prikaz"};var _m54={code:"sq",week:{dow:1,doy:4},buttonText:{prev:"mbrapa",next:"Përpara",today:"sot",month:"Muaj",week:"Javë",day:"Ditë",list:"Listë"},weekLabel:"Ja",allDayHtml:"Gjithë<br/>ditën",eventLimitText:function(n){return"+më tepër "+n},noEventsMessage:"Nuk ka evente për të shfaqur"};var _m55={code:"sr-cyrl",week:{dow:1,doy:7},buttonText:{prev:"Претходна",next:"следећи",today:"Данас",month:"Месец",week:"Недеља",day:"Дан",list:"Планер"},weekLabel:"Сед",allDayText:"Цео дан",eventLimitText:function(n){return"+ још "+n},noEventsMessage:"Нема догађаја за приказ"};var _m56={code:"sr",week:{dow:1,doy:7},buttonText:{prev:"Prethodna",next:"Sledeći",today:"Danas",month:"Mеsеc",week:"Nеdеlja",day:"Dan",list:"Planеr"},weekLabel:"Sed",allDayText:"Cеo dan",eventLimitText:function(n){return"+ još "+n},noEventsMessage:"Nеma događaja za prikaz"};var _m57={code:"sv",week:{dow:1,doy:4},buttonText:{prev:"Förra",next:"Nästa",today:"Idag",month:"Månad",week:"Vecka",day:"Dag",list:"Program"},weekLabel:"v.",allDayText:"Heldag",eventLimitText:"till",noEventsMessage:"Inga händelser att visa"};var _m58={code:"th",buttonText:{prev:"ย้อน",next:"ถัดไป",today:"วันนี้",month:"เดือน",week:"สัปดาห์",day:"วัน",list:"แผนงาน"},allDayText:"ตลอดวัน",eventLimitText:"เพิ่มเติม",noEventsMessage:"ไม่มีกิจกรรมที่จะแสดง"};var _m59={code:"tr",week:{dow:1,doy:7},buttonText:{prev:"geri",next:"ileri",today:"bugün",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},weekLabel:"Hf",allDayText:"Tüm gün",eventLimitText:"daha fazla",noEventsMessage:"Gösterilecek etkinlik yok"};var _m60={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekLabel:"Тиж",allDayText:"Увесь день",eventLimitText:function(n){return"+ще "+n+"..."},noEventsMessage:"Немає подій для відображення"};var _m61={code:"vi",week:{dow:1,doy:4},buttonText:{prev:"Trước",next:"Tiếp",today:"Hôm nay",month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},weekLabel:"Tu",allDayText:"Cả ngày",eventLimitText:function(n){return"+ thêm "+n},noEventsMessage:"Không có sự kiện để hiển thị"};var _m62={code:"zh-cn",week:{dow:1,doy:4},buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"周",day:"日",list:"日程"},weekLabel:"周",allDayText:"全天",eventLimitText:function(n){return"另外 "+n+" 个"},noEventsMessage:"没有事件显示"};var _m63={code:"zh-tw",buttonText:{prev:"上月",next:"下月",today:"今天",month:"月",week:"週",day:"天",list:"活動列表"},weekLabel:"周",allDayText:"整天",eventLimitText:'顯示更多',noEventsMessage:"没有任何活動"};var _rollupPluginMultiEntry_entryPoint=[_m0,_m1,_m2,_m3,_m4,_m5,_m6,_m7,_m8,_m9,_m10,_m11,_m12,_m13,_m14,_m15,_m16,_m17,_m18,_m19,_m20,_m21,_m22,_m23,_m24,_m25,_m26,_m27,_m28,_m29,_m30,_m31,_m32,_m33,_m34,_m35,_m36,_m37,_m38,_m39,_m40,_m41,_m42,_m43,_m44,_m45,_m46,_m47,_m48,_m49,_m50,_m51,_m52,_m53,_m54,_m55,_m56,_m57,_m58,_m59,_m60,_m61,_m62,_m63];return _rollupPluginMultiEntry_entryPoint}));!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):t((e=e||self).FullCalendarDayGrid={},e.FullCalendar)}(this,function(e,t){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.buildRenderRange=function(r,n,i){var o,s=this.dateEnv,l=e.prototype.buildRenderRange.call(this,r,n,i),a=l.start,d=l.end;if(/^(year|month)$/.test(n)&&(a=s.startOfWeek(a),(o=s.startOfWeek(d)).valueOf()!==d.valueOf()&&(d=t.addWeeks(o,1))),this.options.monthMode&&this.options.fixedWeekCount){var c=Math.ceil(t.diffWeeks(a,d));d=t.addWeeks(d,6-c)}return{start:a,end:d}},r}(t.DateProfileGenerator),s=function(){function e(e){var t=this;this.isHidden=!0,this.margin=10,this.documentMousedown=function(e){t.el&&!t.el.contains(e.target)&&t.hide()},this.options=e}return e.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.style.display="",this.position(),this.isHidden=!1,this.trigger("show"))},e.prototype.hide=function(){this.isHidden||(this.el.style.display="none",this.isHidden=!0,this.trigger("hide"))},e.prototype.render=function(){var e=this,r=this.options,n=this.el=t.createElement("div",{className:"fc-popover "+(r.className||""),style:{top:"0",left:"0"}});"function"==typeof r.content&&r.content(n),r.parentEl.appendChild(n),t.listenBySelector(n,"click",".fc-close",function(t){e.hide()}),r.autoHide&&document.addEventListener("mousedown",this.documentMousedown)},e.prototype.destroy=function(){this.hide(),this.el&&(t.removeElement(this.el),this.el=null),document.removeEventListener("mousedown",this.documentMousedown)},e.prototype.position=function(){var e,r,n=this.options,i=this.el,o=i.getBoundingClientRect(),s=t.computeRect(i.offsetParent),l=t.computeClippingRect(n.parentEl);e=n.top||0,r=void 0!==n.left?n.left:void 0!==n.right?n.right-o.width:0,e=Math.min(e,l.bottom-o.height-this.margin),e=Math.max(e,l.top+this.margin),r=Math.min(r,l.right-o.width-this.margin),r=Math.max(r,l.left+this.margin),t.applyStyle(i,{top:e-s.top,left:r-s.left})},e.prototype.trigger=function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))},e}(),l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.renderSegHtml=function(e,r){var n,i,o=this.context,s=o.view,l=o.options,a=e.eventRange,d=a.def,c=a.ui,h=d.allDay,p=s.computeEventDraggable(d,c),u=h&&e.isStart&&s.computeEventStartResizable(d,c),f=h&&e.isEnd&&s.computeEventEndResizable(d,c),g=this.getSegClasses(e,p,u||f,r),m=t.cssToStr(this.getSkinCss(c)),y="";return g.unshift("fc-day-grid-event","fc-h-event"),e.isStart&&(n=this.getTimeText(a))&&(y='<span class="fc-time">'+t.htmlEscape(n)+"</span>"),i='<span class="fc-title">'+(t.htmlEscape(d.title||"")||"&nbsp;")+"</span>",'<a class="'+g.join(" ")+'"'+(d.url?' href="'+t.htmlEscape(d.url)+'"':"")+(m?' style="'+m+'"':"")+'><div class="fc-content">'+("rtl"===l.dir?i+" "+y:y+" "+i)+"</div>"+(u?'<div class="fc-resizer fc-start-resizer"></div>':"")+(f?'<div class="fc-resizer fc-end-resizer"></div>':"")+"</a>"},r.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},r.prototype.computeDisplayEventEnd=function(){return!1},r}(t.FgEventRenderer),a=function(e){function r(t){var r=e.call(this,t.context)||this;return r.dayGrid=t,r}return n(r,e),r.prototype.attachSegs=function(e,t){var r=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,t){e.querySelector(".fc-content-skeleton > table").appendChild(r[t].tbodyEl)}),t||this.dayGrid.removeSegPopover()},r.prototype.detachSegs=function(){for(var e,r=this.rowStructs||[];e=r.pop();)t.removeElement(e.tbodyEl);this.rowStructs=null},r.prototype.renderSegRows=function(e){var t,r,n=[];for(t=this.groupSegRows(e),r=0;r<t.length;r++)n.push(this.renderSegRow(r,t[r]));return n},r.prototype.renderSegRow=function(e,r){var n,i,o,s,l,a,d,c=this.dayGrid,h=c.colCnt,p=c.isRtl,u=this.buildSegLevels(r),f=Math.max(1,u.length),g=document.createElement("tbody"),m=[],y=[],v=[];function b(e){for(;o<e;)(d=(v[n-1]||[])[o])?d.rowSpan=(d.rowSpan||1)+1:(d=document.createElement("td"),s.appendChild(d)),y[n][o]=d,v[n][o]=d,o++}for(n=0;n<f;n++){if(i=u[n],o=0,s=document.createElement("tr"),m.push([]),y.push([]),v.push([]),i)for(l=0;l<i.length;l++){a=i[l];var w=p?h-1-a.lastCol:a.firstCol,S=p?h-1-a.firstCol:a.lastCol;for(b(w),d=t.createElement("td",{className:"fc-event-container"},a.el),w!==S?d.colSpan=S-w+1:v[n][o]=d;o<=S;)y[n][o]=d,m[n][o]=a,o++;s.appendChild(d)}b(h);var C=c.renderProps.renderIntroHtml();C&&(c.isRtl?t.appendToElement(s,C):t.prependToElement(s,C)),g.appendChild(s)}return{row:e,tbodyEl:g,cellMatrix:y,segMatrix:m,segLevels:u,segs:r}},r.prototype.buildSegLevels=function(e){var t,r,n,i=this.dayGrid,o=i.isRtl,s=i.colCnt,l=[];for(e=this.sortEventSegs(e),t=0;t<e.length;t++){for(r=e[t],n=0;n<l.length&&d(r,l[n]);n++);r.level=n,r.leftCol=o?s-1-r.lastCol:r.firstCol,r.rightCol=o?s-1-r.firstCol:r.lastCol,(l[n]||(l[n]=[])).push(r)}for(n=0;n<l.length;n++)l[n].sort(c);return l},r.prototype.groupSegRows=function(e){var t,r=[];for(t=0;t<this.dayGrid.rowCnt;t++)r.push([]);for(t=0;t<e.length;t++)r[e[t].row].push(e[t]);return r},r.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},r}(l);function d(e,t){var r,n;for(r=0;r<t.length;r++)if((n=t[r]).firstCol<=e.lastCol&&n.lastCol>=e.firstCol)return!0;return!1}function c(e,t){return e.leftCol-t.leftCol}var h=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.attachSegs=function(e,r){var n=r.sourceSeg,i=this.rowStructs=this.renderSegRows(e);this.dayGrid.rowEls.forEach(function(e,r){var o,s,l=t.htmlToElement('<div class="fc-mirror-skeleton"><table></table></div>');n&&n.row===r?o=n.el:(o=e.querySelector(".fc-content-skeleton tbody"))||(o=e.querySelector(".fc-content-skeleton table")),s=o.getBoundingClientRect().top-e.getBoundingClientRect().top,l.style.top=s+"px",l.querySelector("table").appendChild(i[r].tbodyEl),e.appendChild(l)})},r}(a),p=function(e){function r(t){var r=e.call(this,t.context)||this;return r.fillSegTag="td",r.dayGrid=t,r}return n(r,e),r.prototype.renderSegs=function(t,r){"bgEvent"===t&&(r=r.filter(function(e){return e.eventRange.def.allDay})),e.prototype.renderSegs.call(this,t,r)},r.prototype.attachSegs=function(e,t){var r,n,i,o=[];for(r=0;r<t.length;r++)n=t[r],i=this.renderFillRow(e,n),this.dayGrid.rowEls[n.row].appendChild(i),o.push(i);return o},r.prototype.renderFillRow=function(e,r){var n,i,o,s=this.dayGrid,l=s.colCnt,a=s.isRtl,d=a?l-1-r.lastCol:r.firstCol,c=(a?l-1-r.firstCol:r.lastCol)+1;n="businessHours"===e?"bgevent":e.toLowerCase(),o=(i=t.htmlToElement('<div class="fc-'+n+'-skeleton"><table><tr></tr></table></div>')).getElementsByTagName("tr")[0],d>0&&t.appendToElement(o,new Array(d+1).join('<td style="pointer-events:none"></td>')),r.el.colSpan=c-d,o.appendChild(r.el),c<l&&t.appendToElement(o,new Array(l-c+1).join('<td style="pointer-events:none"></td>'));var h=s.renderProps.renderIntroHtml();return h&&(s.isRtl?t.appendToElement(o,h):t.prependToElement(o,h)),i},r}(t.FillRenderer),u=function(e){function r(r,n){var i=e.call(this,r,n)||this,o=i.eventRenderer=new f(i),s=i.renderFrame=t.memoizeRendering(i._renderFrame);return i.renderFgEvents=t.memoizeRendering(o.renderSegs.bind(o),o.unrender.bind(o),[s]),i.renderEventSelection=t.memoizeRendering(o.selectByInstanceId.bind(o),o.unselectByInstanceId.bind(o),[i.renderFgEvents]),i.renderEventDrag=t.memoizeRendering(o.hideByHash.bind(o),o.showByHash.bind(o),[s]),i.renderEventResize=t.memoizeRendering(o.hideByHash.bind(o),o.showByHash.bind(o),[s]),r.calendar.registerInteractiveComponent(i,{el:i.el,useEventCenter:!1}),i}return n(r,e),r.prototype.render=function(e){this.renderFrame(e.date),this.renderFgEvents(e.fgSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDragInstances),this.renderEventResize(e.eventResizeInstances)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderFrame.unrender(),this.calendar.unregisterInteractiveComponent(this)},r.prototype._renderFrame=function(e){var r=this.theme,n=this.dateEnv.format(e,t.createFormatter(this.opt("dayPopoverFormat")));this.el.innerHTML='<div class="fc-header '+r.getClass("popoverHeader")+'"><span class="fc-title">'+t.htmlEscape(n)+'</span><span class="fc-close '+r.getIconClass("close")+'"></span></div><div class="fc-body '+r.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>',this.segContainerEl=this.el.querySelector(".fc-event-container")},r.prototype.queryHit=function(e,r,n,i){var o=this.props.date;if(e<n&&r<i)return{component:this,dateSpan:{allDay:!0,range:{start:o,end:t.addDays(o,1)}},dayEl:this.el,rect:{left:0,top:0,right:n,bottom:i},layer:1}},r}(t.DateComponent),f=function(e){function r(t){var r=e.call(this,t.context)||this;return r.dayTile=t,r}return n(r,e),r.prototype.attachSegs=function(e){for(var t=0,r=e;t<r.length;t++){var n=r[t];this.dayTile.segContainerEl.appendChild(n.el)}},r.prototype.detachSegs=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];t.removeElement(i.el)}},r}(l),g=function(){function e(e){this.context=e}return e.prototype.renderHtml=function(e){var t=[];e.renderIntroHtml&&t.push(e.renderIntroHtml());for(var r=0,n=e.cells;r<n.length;r++){var i=n[r];t.push(m(i.date,e.dateProfile,this.context,i.htmlAttrs))}return e.cells.length||t.push('<td class="fc-day '+this.context.theme.getClass("widgetContent")+'"></td>'),"rtl"===this.context.options.dir&&t.reverse(),"<tr>"+t.join("")+"</tr>"},e}();function m(e,r,n,i){var o=n.dateEnv,s=n.theme,l=t.rangeContainsMarker(r.activeRange,e),a=t.getDayClasses(e,r,n);return a.unshift("fc-day",s.getClass("widgetContent")),'<td class="'+a.join(" ")+'"'+(l?' data-date="'+o.formatIso(e,{omitTime:!0})+'"':"")+(i?" "+i:"")+"></td>"}var y=t.createFormatter({day:"numeric"}),v=t.createFormatter({week:"numeric"}),b=function(e){function r(r,n,i){var o=e.call(this,r,n)||this;o.bottomCoordPadding=0,o.isCellSizesDirty=!1;var s=o.eventRenderer=new a(o),l=o.fillRenderer=new p(o);o.mirrorRenderer=new h(o);var d=o.renderCells=t.memoizeRendering(o._renderCells,o._unrenderCells);return o.renderBusinessHours=t.memoizeRendering(l.renderSegs.bind(l,"businessHours"),l.unrender.bind(l,"businessHours"),[d]),o.renderDateSelection=t.memoizeRendering(l.renderSegs.bind(l,"highlight"),l.unrender.bind(l,"highlight"),[d]),o.renderBgEvents=t.memoizeRendering(l.renderSegs.bind(l,"bgEvent"),l.unrender.bind(l,"bgEvent"),[d]),o.renderFgEvents=t.memoizeRendering(s.renderSegs.bind(s),s.unrender.bind(s),[d]),o.renderEventSelection=t.memoizeRendering(s.selectByInstanceId.bind(s),s.unselectByInstanceId.bind(s),[o.renderFgEvents]),o.renderEventDrag=t.memoizeRendering(o._renderEventDrag,o._unrenderEventDrag,[d]),o.renderEventResize=t.memoizeRendering(o._renderEventResize,o._unrenderEventResize,[d]),o.renderProps=i,o}return n(r,e),r.prototype.render=function(e){var t=e.cells;this.rowCnt=t.length,this.colCnt=t[0].length,this.renderCells(t,e.isRigid),this.renderBusinessHours(e.businessHourSegs),this.renderDateSelection(e.dateSelectionSegs),this.renderBgEvents(e.bgEventSegs),this.renderFgEvents(e.fgEventSegs),this.renderEventSelection(e.eventSelection),this.renderEventDrag(e.eventDrag),this.renderEventResize(e.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderCells.unrender()},r.prototype.getCellRange=function(e,r){var n=this.props.cells[e][r].date;return{start:n,end:t.addDays(n,1)}},r.prototype.updateSegPopoverTile=function(e,t){var r=this.props;this.segPopoverTile.receiveProps({date:e||this.segPopoverTile.props.date,fgSegs:t||this.segPopoverTile.props.fgSegs,eventSelection:r.eventSelection,eventDragInstances:r.eventDrag?r.eventDrag.affectedInstances:null,eventResizeInstances:r.eventResize?r.eventResize.affectedInstances:null})},r.prototype._renderCells=function(e,r){var n,i,o=this.view,s=this.dateEnv,l=this.rowCnt,a=this.colCnt,d="";for(n=0;n<l;n++)d+=this.renderDayRowHtml(n,r);for(this.el.innerHTML=d,this.rowEls=t.findElements(this.el,".fc-row"),this.cellEls=t.findElements(this.el,".fc-day, .fc-disabled-day"),this.isRtl&&this.cellEls.reverse(),this.rowPositions=new t.PositionCache(this.el,this.rowEls,!1,!0),this.colPositions=new t.PositionCache(this.el,this.cellEls.slice(0,a),!0,!1),n=0;n<l;n++)for(i=0;i<a;i++)this.publiclyTrigger("dayRender",[{date:s.toDate(e[n][i].date),el:this.getCellEl(n,i),view:o}]);this.isCellSizesDirty=!0},r.prototype._unrenderCells=function(){this.removeSegPopover()},r.prototype.renderDayRowHtml=function(e,t){var r=this.theme,n=["fc-row","fc-week",r.getClass("dayRow")];t&&n.push("fc-rigid");var i=new g(this.context);return'<div class="'+n.join(" ")+'"><div class="fc-bg"><table class="'+r.getClass("tableGrid")+'">'+i.renderHtml({cells:this.props.cells[e],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(e)+"</thead>":"")+"</table></div></div>"},r.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},r.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},r.prototype.renderNumberTrHtml=function(e){var t=this.renderProps.renderNumberIntroHtml(e,this);return"<tr>"+(this.isRtl?"":t)+this.renderNumberCellsHtml(e)+(this.isRtl?t:"")+"</tr>"},r.prototype.renderNumberCellsHtml=function(e){var t,r,n=[];for(t=0;t<this.colCnt;t++)r=this.props.cells[e][t].date,n.push(this.renderNumberCellHtml(r));return this.isRtl&&n.reverse(),n.join("")},r.prototype.renderNumberCellHtml=function(e){var r,n,i=this.view,o=this.dateEnv,s="",l=t.rangeContainsMarker(this.props.dateProfile.activeRange,e),a=this.getIsDayNumbersVisible()&&l;return a||this.renderProps.cellWeekNumbersVisible?((r=t.getDayClasses(e,this.props.dateProfile,this.context)).unshift("fc-day-top"),this.renderProps.cellWeekNumbersVisible&&(n=o.weekDow),s+='<td class="'+r.join(" ")+'"'+(l?' data-date="'+o.formatIso(e,{omitTime:!0})+'"':"")+">",this.renderProps.cellWeekNumbersVisible&&e.getUTCDay()===n&&(s+=t.buildGotoAnchorHtml(i,{date:e,type:"week"},{class:"fc-week-number"},o.format(e,v))),a&&(s+=t.buildGotoAnchorHtml(i,e,{class:"fc-day-number"},o.format(e,y))),s+="</td>"):"<td></td>"},r.prototype.updateSize=function(e){var t=this.fillRenderer,r=this.eventRenderer,n=this.mirrorRenderer;(e||this.isCellSizesDirty||this.view.calendar.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),t.computeSizes(e),r.computeSizes(e),n.computeSizes(e),t.assignSizes(e),r.assignSizes(e),n.assignSizes(e)},r.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},r.prototype.buildColPositions=function(){this.colPositions.build()},r.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},r.prototype.positionToHit=function(e,t){var r=this.colPositions,n=this.rowPositions,i=r.leftToIndex(e),o=n.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:r.lefts[i],right:r.rights[i],top:n.tops[o],bottom:n.bottoms[o]}}},r.prototype.getCellEl=function(e,t){return this.cellEls[e*this.colCnt+t]},r.prototype._renderEventDrag=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",e.segs))},r.prototype._unrenderEventDrag=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight"))},r.prototype._renderEventResize=function(e){e&&(this.eventRenderer.hideByHash(e.affectedInstances),this.fillRenderer.renderSegs("highlight",e.segs),this.mirrorRenderer.renderSegs(e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},r.prototype._unrenderEventResize=function(e){e&&(this.eventRenderer.showByHash(e.affectedInstances),this.fillRenderer.unrender("highlight"),this.mirrorRenderer.unrender(e.segs,{isResizing:!0,sourceSeg:e.sourceSeg}))},r.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},r.prototype.limitRows=function(e){var t,r,n=this.eventRenderer.rowStructs||[];for(t=0;t<n.length;t++)this.unlimitRow(t),!1!==(r=!!e&&("number"==typeof e?e:this.computeRowLevelLimit(t)))&&this.limitRow(t,r)},r.prototype.computeRowLevelLimit=function(e){var r,n,i=this.rowEls[e].getBoundingClientRect().bottom,o=t.findChildren(this.eventRenderer.rowStructs[e].tbodyEl);for(r=0;r<o.length;r++)if((n=o[r]).classList.remove("fc-limited"),n.getBoundingClientRect().bottom>i)return r;return!1},r.prototype.limitRow=function(e,r){var n,i,o,s,l,a,d,c,h,p,u,f,g,m,y,v=this,b=this.colCnt,w=this.isRtl,S=this.eventRenderer.rowStructs[e],C=[],E=0,R=function(n){for(;E<n;)(a=v.getCellSegs(e,E,r)).length&&(h=i[r-1][E],y=v.renderMoreLink(e,E,a),m=t.createElement("div",null,y),h.appendChild(m),C.push(m)),E++};if(r&&r<S.segLevels.length){for(n=S.segLevels[r-1],i=S.cellMatrix,(o=t.findChildren(S.tbodyEl).slice(r)).forEach(function(e){e.classList.add("fc-limited")}),s=0;s<n.length;s++){l=n[s];var H=w?b-1-l.lastCol:l.firstCol,D=w?b-1-l.firstCol:l.lastCol;for(R(H),c=[],d=0;E<=D;)a=this.getCellSegs(e,E,r),c.push(a),d+=a.length,E++;if(d){for(p=(h=i[r-1][H]).rowSpan||1,u=[],f=0;f<c.length;f++)g=t.createElement("td",{className:"fc-more-cell",rowSpan:p}),a=c[f],y=this.renderMoreLink(e,H+f,[l].concat(a)),m=t.createElement("div",null,y),g.appendChild(m),u.push(g),C.push(g);h.classList.add("fc-limited"),t.insertAfterElement(h,u),o.push(h)}}R(this.colCnt),S.moreEls=C,S.limitedEls=o}},r.prototype.unlimitRow=function(e){var r=this.eventRenderer.rowStructs[e];r.moreEls&&(r.moreEls.forEach(t.removeElement),r.moreEls=null),r.limitedEls&&(r.limitedEls.forEach(function(e){e.classList.remove("fc-limited")}),r.limitedEls=null)},r.prototype.renderMoreLink=function(e,r,n){var i=this,o=this.view,s=this.dateEnv,l=t.createElement("a",{className:"fc-more"});return l.innerText=this.getMoreLinkText(n.length),l.addEventListener("click",function(t){var l=i.opt("eventLimitClick"),a=i.isRtl?i.colCnt-r-1:r,d=i.props.cells[e][a].date,c=t.currentTarget,h=i.getCellEl(e,r),p=i.getCellSegs(e,r),u=i.resliceDaySegs(p,d),f=i.resliceDaySegs(n,d);"function"==typeof l&&(l=i.publiclyTrigger("eventLimitClick",[{date:s.toDate(d),allDay:!0,dayEl:h,moreEl:c,segs:u,hiddenSegs:f,jsEvent:t,view:o}])),"popover"===l?i.showSegPopover(e,r,c,u):"string"==typeof l&&o.calendar.zoomTo(d,l)}),l},r.prototype.showSegPopover=function(e,r,n,i){var o,l,a=this,d=this.calendar,c=this.view,h=this.theme,p=this.isRtl?this.colCnt-r-1:r,f=n.parentNode;o=1===this.rowCnt?c.el:this.rowEls[e],l={className:"fc-more-popover "+h.getClass("popover"),parentEl:c.el,top:t.computeRect(o).top,autoHide:!0,content:function(t){a.segPopoverTile=new u(a.context,t),a.updateSegPopoverTile(a.props.cells[e][p].date,i)},hide:function(){a.segPopoverTile.destroy(),a.segPopoverTile=null,a.segPopover.destroy(),a.segPopover=null}},this.isRtl?l.right=t.computeRect(f).right+1:l.left=t.computeRect(f).left-1,this.segPopover=new s(l),this.segPopover.show(),d.releaseAfterSizingTriggers()},r.prototype.resliceDaySegs=function(e,r){for(var n=r,o={start:n,end:t.addDays(n,1)},s=[],l=0,a=e;l<a.length;l++){var d=a[l],c=d.eventRange,h=c.range,p=t.intersectRanges(h,o);p&&s.push(i({},d,{eventRange:{def:c.def,ui:i({},c.ui,{durationEditable:!1}),instance:c.instance,range:p},isStart:d.isStart&&p.start.valueOf()===h.start.valueOf(),isEnd:d.isEnd&&p.end.valueOf()===h.end.valueOf()}))}return s},r.prototype.getMoreLinkText=function(e){var t=this.opt("eventLimitText");return"function"==typeof t?t(e):"+"+e+" "+t},r.prototype.getCellSegs=function(e,t,r){for(var n,i=this.eventRenderer.rowStructs[e].segMatrix,o=r||0,s=[];o<i.length;)(n=i[o][t])&&s.push(n),o++;return s},r}(t.DateComponent),w=t.createFormatter({week:"numeric"}),S=function(e){function r(r,n,i,o){var s=e.call(this,r,n,i,o)||this;s.renderHeadIntroHtml=function(){var e=s.theme;return s.colWeekNumbersVisible?'<th class="fc-week-number '+e.getClass("widgetHeader")+'" '+s.weekNumberStyleAttr()+"><span>"+t.htmlEscape(s.opt("weekLabel"))+"</span></th>":""},s.renderDayGridNumberIntroHtml=function(e,r){var n=s.dateEnv,i=r.props.cells[e][0].date;return s.colWeekNumbersVisible?'<td class="fc-week-number" '+s.weekNumberStyleAttr()+">"+t.buildGotoAnchorHtml(s,{date:i,type:"week",forceOff:1===r.colCnt},n.format(i,w))+"</td>":""},s.renderDayGridBgIntroHtml=function(){var e=s.theme;return s.colWeekNumbersVisible?'<td class="fc-week-number '+e.getClass("widgetContent")+'" '+s.weekNumberStyleAttr()+"></td>":""},s.renderDayGridIntroHtml=function(){return s.colWeekNumbersVisible?'<td class="fc-week-number" '+s.weekNumberStyleAttr()+"></td>":""},s.el.classList.add("fc-dayGrid-view"),s.el.innerHTML=s.renderSkeletonHtml(),s.scroller=new t.ScrollComponent("hidden","auto");var l=s.scroller.el;s.el.querySelector(".fc-body > tr > td").appendChild(l),l.classList.add("fc-day-grid-container");var a,d=t.createElement("div",{className:"fc-day-grid"});return l.appendChild(d),s.opt("weekNumbers")?s.opt("weekNumbersWithinDays")?(a=!0,s.colWeekNumbersVisible=!1):(a=!1,s.colWeekNumbersVisible=!0):(s.colWeekNumbersVisible=!1,a=!1),s.dayGrid=new b(s.context,d,{renderNumberIntroHtml:s.renderDayGridNumberIntroHtml,renderBgIntroHtml:s.renderDayGridBgIntroHtml,renderIntroHtml:s.renderDayGridIntroHtml,colWeekNumbersVisible:s.colWeekNumbersVisible,cellWeekNumbersVisible:a}),s}return n(r,e),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.dayGrid.destroy(),this.scroller.destroy()},r.prototype.renderSkeletonHtml=function(){var e=this.theme;return'<table class="'+e.getClass("tableGrid")+'">'+(this.opt("columnHeader")?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'"></td></tr></tbody></table>'},r.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},r.prototype.hasRigidRows=function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},r.prototype.updateSize=function(t,r,n){e.prototype.updateSize.call(this,t,r,n),this.dayGrid.updateSize(t)},r.prototype.updateBaseSize=function(e,r,n){var i,o,s=this.dayGrid,l=this.opt("eventLimit"),a=this.header?this.header.el:null;s.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=t.matchCellWidths(t.findElements(this.el,".fc-week-number"))),this.scroller.clear(),a&&t.uncompensateScroll(a),s.removeSegPopover(),l&&"number"==typeof l&&s.limitRows(l),i=this.computeScrollerHeight(r),this.setGridHeight(i,n),l&&"number"!=typeof l&&s.limitRows(l),n||(this.scroller.setHeight(i),((o=this.scroller.getScrollbarWidths()).left||o.right)&&(a&&t.compensateScroll(a,o),i=this.computeScrollerHeight(r),this.scroller.setHeight(i)),this.scroller.lockOverflow(o))):n||(i=this.computeScrollerHeight(r),this.scroller.setHeight(i))},r.prototype.computeScrollerHeight=function(e){return e-t.subtractInnerElHeight(this.el,this.scroller.el)},r.prototype.setGridHeight=function(e,r){this.opt("monthMode")?(r&&(e*=this.dayGrid.rowCnt/6),t.distributeHeight(this.dayGrid.rowEls,e,!r)):r?t.undistributeHeight(this.dayGrid.rowEls):t.distributeHeight(this.dayGrid.rowEls,e,!0)},r.prototype.computeDateScroll=function(e){return{top:0}},r.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},r.prototype.applyDateScroll=function(e){void 0!==e.top&&this.scroller.setScrollTop(e.top)},r}(t.View);S.prototype.dateProfileGeneratorClass=o;var C=function(e){function t(t,r){var n=e.call(this,t,r.el)||this;return n.slicer=new E,n.dayGrid=r,t.calendar.registerInteractiveComponent(n,{el:n.dayGrid.el}),n}return n(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),this.calendar.unregisterInteractiveComponent(this)},t.prototype.render=function(e){var t=this.dayGrid,r=e.dateProfile,n=e.dayTable;t.receiveProps(i({},this.slicer.sliceProps(e,r,e.nextDayThreshold,t,n),{dateProfile:r,cells:n.cells,isRigid:e.isRigid}))},t.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},t.prototype.queryHit=function(e,t){var r=this.dayGrid.positionToHit(e,t);if(r)return{component:this.dayGrid,dateSpan:r.dateSpan,dayEl:r.dayEl,rect:{left:r.relativeRect.left,right:r.relativeRect.right,top:r.relativeRect.top,bottom:r.relativeRect.bottom},layer:0}},t}(t.DateComponent),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(t.Slicer),R=function(e){function r(r,n,i,o){var s=e.call(this,r,n,i,o)||this;return s.buildDayTable=t.memoize(H),s.opt("columnHeader")&&(s.header=new t.DayHeader(s.context,s.el.querySelector(".fc-head-container"))),s.simpleDayGrid=new C(s.context,s.dayGrid),s}return n(r,e),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},r.prototype.render=function(t){e.prototype.render.call(this,t);var r=this.props.dateProfile,n=this.dayTable=this.buildDayTable(r,this.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:r,dates:n.headerDates,datesRepDistinctDays:1===n.rowCnt,renderIntroHtml:this.renderHeadIntroHtml}),this.simpleDayGrid.receiveProps({dateProfile:r,dayTable:n,businessHours:t.businessHours,dateSelection:t.dateSelection,eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.nextDayThreshold})},r}(S);function H(e,r){var n=new t.DaySeries(e.renderRange,r);return new t.DayTable(n,/year|month|week/.test(e.currentRangeUnit))}var D=t.createPlugin({defaultView:"dayGridMonth",views:{dayGrid:R,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});e.AbstractDayGridView=S,e.DayBgRow=g,e.DayGrid=b,e.DayGridSlicer=E,e.DayGridView=R,e.SimpleDayGrid=C,e.buildBasicDayTable=H,e.default=D,Object.defineProperty(e,"__esModule",{value:!0})});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],t):t((e=e||self).FullCalendarList={},e.FullCalendar)}(this,function(e,t){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function r(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(e){function n(t){var n=e.call(this,t.context)||this;return n.listView=t,n}return r(n,e),n.prototype.attachSegs=function(e){e.length?this.listView.renderSegList(e):this.listView.renderEmptyMessage()},n.prototype.detachSegs=function(){},n.prototype.renderSegHtml=function(e){var n,r=this.context,s=r.view,a=r.theme,i=e.eventRange,o=i.def,l=i.instance,d=i.ui,c=o.url,p=["fc-list-item"].concat(d.classNames),h=d.backgroundColor;return n=o.allDay?t.getAllDayHtml(s):t.isMultiDayRange(i.range)?e.isStart?t.htmlEscape(this._getTimeText(l.range.start,e.end,!1)):e.isEnd?t.htmlEscape(this._getTimeText(e.start,l.range.end,!1)):t.getAllDayHtml(s):t.htmlEscape(this.getTimeText(i)),c&&p.push("fc-has-url"),'<tr class="'+p.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+a.getClass("widgetContent")+'">'+(n||"")+"</td>":"")+'<td class="fc-list-item-marker '+a.getClass("widgetContent")+'"><span class="fc-event-dot"'+(h?' style="background-color:'+h+'"':"")+'></span></td><td class="fc-list-item-title '+a.getClass("widgetContent")+'"><a'+(c?' href="'+t.htmlEscape(c)+'"':"")+">"+t.htmlEscape(o.title||"")+"</a></td></tr>"},n.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},n}(t.FgEventRenderer),a=function(e){function n(n,r,a,o){var l=e.call(this,n,r,a,o)||this;l.computeDateVars=t.memoize(i),l.eventStoreToSegs=t.memoize(l._eventStoreToSegs);var d=l.eventRenderer=new s(l);l.renderContent=t.memoizeRendering(d.renderSegs.bind(d),d.unrender.bind(d)),l.el.classList.add("fc-list-view");for(var c=0,p=(l.theme.getClass("listView")||"").split(" ");c<p.length;c++){var h=p[c];h&&l.el.classList.add(h)}return l.scroller=new t.ScrollComponent("hidden","auto"),l.el.appendChild(l.scroller.el),l.contentEl=l.scroller.el,n.calendar.registerInteractiveComponent(l,{el:l.el}),l}return r(n,e),n.prototype.render=function(e){var t=this.computeDateVars(e.dateProfile),n=t.dayDates,r=t.dayRanges;this.dayDates=n,this.renderContent(this.eventStoreToSegs(e.eventStore,e.eventUiBases,r))},n.prototype.destroy=function(){e.prototype.destroy.call(this),this.renderContent.unrender(),this.scroller.destroy(),this.calendar.unregisterInteractiveComponent(this)},n.prototype.updateSize=function(t,n,r){e.prototype.updateSize.call(this,t,n,r),this.eventRenderer.computeSizes(t),this.eventRenderer.assignSizes(t),this.scroller.clear(),r||this.scroller.setHeight(this.computeScrollerHeight(n))},n.prototype.computeScrollerHeight=function(e){return e-t.subtractInnerElHeight(this.el,this.scroller.el)},n.prototype._eventStoreToSegs=function(e,n,r){return this.eventRangesToSegs(t.sliceEventStore(e,n,this.props.dateProfile.activeRange,this.nextDayThreshold).fg,r)},n.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,s=e;r<s.length;r++){var a=s[r];n.push.apply(n,this.eventRangeToSegs(a,t))}return n},n.prototype.eventRangeToSegs=function(e,n){var r,s,a,i=this.dateEnv,o=this.nextDayThreshold,l=e.range,d=e.def.allDay,c=[];for(r=0;r<n.length;r++)if((s=t.intersectRanges(l,n[r]))&&(a={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===l.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===l.end.valueOf(),dayIndex:r},c.push(a),!a.isEnd&&!d&&r+1<n.length&&l.end<i.add(n[r+1].start,o))){a.end=l.end,a.isEnd=!0;break}return c},n.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+t.htmlEscape(this.opt("noEventsMessage"))+"</div></div></div>"},n.prototype.renderSegList=function(e){var n,r,s,a=this.groupSegsByDay(e),i=t.htmlToElement('<table class="fc-list-table '+this.calendar.theme.getClass("tableList")+'"><tbody></tbody></table>'),o=i.querySelector("tbody");for(n=0;n<a.length;n++)if(r=a[n])for(o.appendChild(this.buildDayHeaderRow(this.dayDates[n])),r=this.eventRenderer.sortEventSegs(r),s=0;s<r.length;s++)o.appendChild(r[s].el);this.contentEl.innerHTML="",this.contentEl.appendChild(i)},n.prototype.groupSegsByDay=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r},n.prototype.buildDayHeaderRow=function(e){var n=this.dateEnv,r=t.createFormatter(this.opt("listDayFormat")),s=t.createFormatter(this.opt("listDayAltFormat"));return t.createElement("tr",{className:"fc-list-heading","data-date":n.formatIso(e,{omitTime:!0})},'<td class="'+(this.calendar.theme.getClass("tableListHeading")||this.calendar.theme.getClass("widgetHeader"))+'" colspan="3">'+(r?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-main"},t.htmlEscape(n.format(e,r))):"")+(s?t.buildGotoAnchorHtml(this,e,{class:"fc-list-heading-alt"},t.htmlEscape(n.format(e,s))):"")+"</td>")},n}(t.View);function i(e){for(var n=t.startOfDay(e.renderRange.start),r=e.renderRange.end,s=[],a=[];n<r;)s.push(n),a.push({start:n,end:t.addDays(n,1)}),n=t.addDays(n,1);return{dayDates:s,dayRanges:a}}a.prototype.fgSegSelector=".fc-list-item";var o=t.createPlugin({views:{list:{class:a,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});e.ListView=a,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})});window.google=window.google||{};google.maps=google.maps||{};(function(){var modules=google.maps.modules={};google.maps.__gjsload__=function(name,text){modules[name]=text};google.maps.Load=function(apiLoad){delete google.maps.Load;apiLoad([0.009999999776482582,[null,[["https://khms0.googleapis.com/kh?v=894\u0026hl=en-US\u0026","https://khms1.googleapis.com/kh?v=894\u0026hl=en-US\u0026"],null,null,null,1,"894",["https://khms0.google.com/kh?v=894\u0026hl=en-US\u0026","https://khms1.google.com/kh?v=894\u0026hl=en-US\u0026"]],null,null,null,null,[["https://cbks0.googleapis.com/cbk?","https://cbks1.googleapis.com/cbk?"]],[["https://khms0.googleapis.com/kh?v=128\u0026hl=en-US\u0026","https://khms1.googleapis.com/kh?v=128\u0026hl=en-US\u0026"],null,null,null,null,"128",["https://khms0.google.com/kh?v=128\u0026hl=en-US\u0026","https://khms1.google.com/kh?v=128\u0026hl=en-US\u0026"]]],["en-US","US",null,0,null,null,"https://maps.gstatic.com/mapfiles/",null,"https://maps.googleapis.com","https://maps.googleapis.com",null,"https://maps.google.com",null,"https://maps.gstatic.com/maps-api-v3/api/images/","https://www.google.com/maps",null,"https://www.google.com",0,""],["https://maps.googleapis.com/maps-api-v3/api/js/44/5","3.44.5"],[1868565639],null,null,null,null,null,null,"",["places","geometry"],null,1,"https://khms.googleapis.com/mz?v=894\u0026","AIzaSyD59Vnx7YzaBMkSiPJ9fr54MY02DlYuC18","https://earthbuilder.googleapis.com","https://earthbuilder.googleapis.com",null,"https://mts.googleapis.com/maps/vt/icon",[["https://maps.googleapis.com/maps/vt"],["https://maps.googleapis.com/maps/vt"],null,null,null,null,null,null,null,null,null,null,["https://www.google.com/maps/vt"],"/maps/vt",545000000,545,545271183],2,500,[null,null,null,null,"https://www.google.com/maps/preview/log204","","https://static.panoramio.com.storage.googleapis.com/photos/",["https://geo0.ggpht.com/cbk","https://geo1.ggpht.com/cbk","https://geo2.ggpht.com/cbk","https://geo3.ggpht.com/cbk"],"https://maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata","https://maps.googleapis.com/maps/api/js/GeoPhotoService.SingleImageSearch",["https://lh3.ggpht.com/","https://lh4.ggpht.com/","https://lh5.ggpht.com/","https://lh6.ggpht.com/"]],null,null,null,null,"/maps/api/js/ApplicationService.GetEntityDetails",0,null,null,null,null,[],["44.5"],1,0,[1]],loadScriptTime)};var loadScriptTime=(new Date).getTime()})();google.maps.__gjsload__('places',function(_){var Bv=function(a){a=_.ne(function(b){b=(0,_.bl)(b);if(b.includes("/"))throw _.he('Field with "/" specified: '+b);b=b.replace(/\./g,"/");"utc_offset_minutes"===b?b="utc_offset":"utc_offset"===b&&_.fe("utc_offset is deprecated as of November 2019. Use utc_offset_minutes instead. See https://goo.gle/js-open-now");"opening_hours/open_now"===b&&_.fe("opening_hours.open_now is deprecated as of November 2019. Use the isOpen() method from a PlacesService.getDetails() result instead. See https://goo.gle/js-open-now.");"permanently_closed"===b&&_.fe("permanently_closed is deprecated as of May 2020 and will beturned off in May 2021. Use business_status instead.");return b})(a);if(!a.length)throw _.he("At least one field must be specified.");return a},Cv=function(a,b){var c=this;try{_.le(HTMLInputElement,"HTMLInputElement")(a)}catch(d){if(_.ie(d),!a)return}_.J("places_impl").then(function(d){b=b||{};c.setValues(b);d.Cl(c,a);_.cg(a)})},Dv=function(){var a=this;this.g=null;_.J("places_impl").then(function(b){a.g=b.Ml()})},Ev=function(a){var b=this;this.g=null;_.J("places_impl").then(function(c){b.g=c.Dl(a)})},Fv=function(a,b){var c=this;_.J("places_impl").then(function(d){d.El(c,a);b=b||{};c.setValues(b)})};_.Wb(_.Bb(".RLOVFM-maps-autocomplete-view{border-radius:8px;box-shadow:0 2px 6px 1px #ccc;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-orient:vertical;-webkit-flex-direction:column;-moz-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;width:352px}.RLOVFM-maps-autocomplete-view,.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal}.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-moz-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container .KUVRMh-maps-autocomplete-view-input{border:none;-webkit-box-flex:1;-webkit-flex:1 1 auto;-moz-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;font-family:Google Sans,Roboto,Arial,sans-serif;font-size:16px}.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container .KUVRBN-maps-autocomplete-view-icon{background-image:url(https://maps.gstatic.com/mapfiles/api-3/images/autocomplete-icons.png);background-size:34px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-webkit-flex:0 0 auto;-moz-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:20px;margin:5px;width:15px}.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container .QmLwGb-maps-autocomplete-view-input-icon-start{background-position:-1px -1px}.RLOVFM-maps-autocomplete-view .QmLwHN-maps-autocomplete-view-input-container .QmLwsC-maps-autocomplete-view-input-icon-end{display:none}.RLOVFM-maps-autocomplete-view .cjSTXO-maps-autocomplete-view-predictions-container{list-style-type:none;padding:0;margin:0;border-top:1px solid #e8e7e7;font-family:Google Sans,Roboto,Arial,sans-serif}.RLOVFM-maps-autocomplete-view .cjSTXO-maps-autocomplete-view-predictions-container .DnLcLO-maps-autocomplete-view-prediction{padding:1px 8px}.RLOVFM-maps-autocomplete-view .cjSTXO-maps-autocomplete-view-predictions-container .DnLcLO-maps-autocomplete-view-prediction:hover{background-color:#e8e7e7;cursor:default}.RLOVFM-maps-autocomplete-view .cjSTXO-maps-autocomplete-view-predictions-container .DnLUEF-maps-autocomplete-view-highlighted{background-color:#f0f8ff}@media only screen and (max-width:412px){.RLOVFM-maps-autocomplete-view.QmLJmF-maps-autocomplete-view--allow-fullscreen{background-color:#fff;height:100%;left:0;position:fixed;top:0;width:100%}.RLOVFM-maps-autocomplete-view.QmLJmF-maps-autocomplete-view--allow-fullscreen .QmLwHN-maps-autocomplete-view-input-container{border-radius:0;box-shadow:none}.RLOVFM-maps-autocomplete-view.QmLJmF-maps-autocomplete-view--allow-fullscreen .QmLwHN-maps-autocomplete-view-input-container .QmLwGb-maps-autocomplete-view-input-icon-start{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+Cjxzdmcgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyI+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLjA2MDA5LDAsMCwyLjgxMTM0LDAuNjE2NDU4LC0xMTAuOTAxKSI+CiAgICAgICAgPHJlY3QgeD0iNy41ODgiIHk9IjYwLjUwMyIgd2lkdGg9IjExMi41NzQiIGhlaWdodD0iMy40OTciLz4KICAgIDwvZz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDAuMzExMDI0LDAuMzExMDI0LC0xLjk4NzkyLDEuOTg3OTIsMTI0Ljg2NywtNjUuNDc4NSkiPgogICAgICAgIDxyZWN0IHg9IjcuNTg4IiB5PSI2MC41MDMiIHdpZHRoPSIxMTIuNTc0IiBoZWlnaHQ9IjMuNDk3Ii8+CiAgICA8L2c+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgwLjI5MjkzNSwtMC4yOTI5MzUsMS45ODc5MiwxLjk4NzkyLC0xMjAuNDYxLC01Ni4xOTU5KSI+CiAgICAgICAgPHJlY3QgeD0iNy41ODgiIHk9IjYwLjUwMyIgd2lkdGg9IjExMi41NzQiIGhlaWdodD0iMy40OTciLz4KICAgIDwvZz4KPC9zdmc+Cg==);background-position:-1px -7px}.RLOVFM-maps-autocomplete-view.QmLJmF-maps-autocomplete-view--allow-fullscreen .QmLwHN-maps-autocomplete-view-input-container .QmLwsC-maps-autocomplete-view-input-icon-end{background-position:-1px -1px;display:inline}}\n"));_.z(Cv,_.M);Cv.prototype.setTypes=_.Wf("types",_.ne(_.bl));Cv.prototype.setTypes=Cv.prototype.setTypes;Cv.prototype.setComponentRestrictions=_.Wf("componentRestrictions",_.re(_.je({country:_.pe([_.bl,_.ne(_.bl)])},!0)));Cv.prototype.setComponentRestrictions=Cv.prototype.setComponentRestrictions;_.Xf(Cv.prototype,{place:null,bounds:_.re(_.Uf),fields:_.re(Bv)});Dv.prototype.getPlacePredictions=function(a,b){var c=this;a=Gv(a);return _.J("places_impl").then(function(){return c.g.getPlacePredictions(a,b)})};Dv.prototype.getPlacePredictions=Dv.prototype.getPlacePredictions;Dv.prototype.getPredictions=Dv.prototype.getPlacePredictions;Dv.prototype.getQueryPredictions=function(a,b){var c=this;_.J("places_impl").then(function(){c.g.getQueryPredictions(a,b)})};Dv.prototype.getQueryPredictions=Dv.prototype.getQueryPredictions;var Gv=_.je({sessionToken:_.re(_.le(_.Zj,"AutocompleteSessionToken")),origin:_.re(_.Ce)},!0);Ev.prototype.getDetails=function(a,b){var c=this;a=Hv(a);_.J("places_impl").then(function(){c.g.getDetails(a,b)})};Ev.prototype.getDetails=Ev.prototype.getDetails;Ev.prototype.nearbySearch=function(a,b){var c=this;_.J("places_impl").then(function(){c.g.nearbySearch(a,b)})};Ev.prototype.nearbySearch=Ev.prototype.nearbySearch;Ev.prototype.search=Ev.prototype.nearbySearch;Ev.prototype.textSearch=function(a,b){var c=this;_.J("places_impl").then(function(){c.g.textSearch(a,b)})};Ev.prototype.textSearch=Ev.prototype.textSearch;Ev.prototype.radarSearch=function(){_.fe("Radar Search was deprecated on June 30, 2017 and turned off on July 30, 2018.")};Ev.prototype.findPlaceFromQuery=function(a,b){var c=this;a=Iv(a);_.J("places_impl").then(function(){c.g.findPlaceFromQuery(a,b)})};Ev.prototype.findPlaceFromQuery=Ev.prototype.findPlaceFromQuery;Ev.prototype.findPlaceFromPhoneNumber=function(a,b){var c=this;a=Jv(a);_.J("places_impl").then(function(){c.g.findPlaceFromPhoneNumber(a,b)})};Ev.prototype.findPlaceFromPhoneNumber=Ev.prototype.findPlaceFromPhoneNumber;var Hv=_.je({fields:_.re(Bv),sessionToken:_.re(_.le(_.Zj,"AutocompleteSessionToken"))},!0),Iv=_.je({fields:Bv,query:function(a){return(0,_.bl)(a)},locationBias:_.re(_.kk)}),Jv=_.je({fields:Bv,phoneNumber:function(a){return(0,_.bl)(a)},locationBias:_.re(_.kk)});_.z(Fv,_.M);_.Xf(Fv.prototype,{places:null,bounds:_.re(_.Uf)});for(var Kv=new Map([["geometry",["location","viewport"]]]),Lv=new Map,Mv=_.p((new Map([["adr_address","adr_format_address"],["formatted_phone_number","national_phone_number"],["html_attributions","attributions"],["name","display_name"],["url","google_maps_uri"],["user_ratings_total","user_ratings_count"],["website","website_uri"]])).entries()),Nv=Mv.next();!Nv.done;Nv=Mv.next()){var Ov=_.p(Nv.value),Pv=Ov.next().value,Qv=Ov.next().value;Lv.set(Qv,Pv)}
for(var Rv={},Sv=_.p(Kv.entries()),Tv=Sv.next();!Tv.done;Rv={vg:Rv.vg},Tv=Sv.next()){var Uv=_.p(Tv.value);Rv.vg=Uv.next().value;Uv.next().value.forEach(function(a){return function(b){Lv.set(b,a.vg)}}(Rv))};_.t.google.maps.places={PlacesService:Ev,PlacesServiceStatus:{OK:_.ia,UNKNOWN_ERROR:_.ma,OVER_QUERY_LIMIT:_.ja,REQUEST_DENIED:_.ka,INVALID_REQUEST:_.ba,ZERO_RESULTS:_.na,NOT_FOUND:_.ha},AutocompleteService:Dv,AutocompleteSessionToken:_.Zj,Autocomplete:Cv,SearchBox:Fv,RankBy:{PROMINENCE:0,DISTANCE:1},RatingLevel:{GOOD:0,VERY_GOOD:1,EXCELLENT:2,EXTRAORDINARY:3}};_.Xe("places",{})});google.maps.__gjsload__('geometry',function(_){var iv=function(a,b){return Math.abs(_.Wd(b-a,-180,180))},jv=function(a,b,c,d,e){if(!d){c=iv(a.lng(),c)/iv(a.lng(),b.lng());if(!e)return e=Math.sin(_.Ec(a.lat())),e=Math.log((1+e)/(1-e))/2,b=Math.sin(_.Ec(b.lat())),_.Fc(2*Math.atan(Math.exp(e+c*(Math.log((1+b)/(1-b))/2-e)))-Math.PI/2);a=e.fromLatLngToPoint(a);b=e.fromLatLngToPoint(b);return e.fromPointToLatLng(new _.N(a.x+c*(b.x-a.x),a.y+c*(b.y-a.y))).lat()}e=_.Ec(a.lat());a=_.Ec(a.lng());d=_.Ec(b.lat());b=_.Ec(b.lng());c=_.Ec(c);return _.Wd(_.Fc(Math.atan2(Math.sin(e)*Math.cos(d)*Math.sin(c-b)-Math.sin(d)*Math.cos(e)*Math.sin(c-a),Math.cos(e)*Math.cos(d)*Math.sin(a-b))),-90,90)},kv=function(){},lv={containsLocation:function(a,b){var c=_.Wd(a.lng(),-180,180),d=!!b.get("geodesic"),e=b.get("latLngs"),f=b.get("map");f=!d&&f?f.getProjection():null;for(var g=!1,h=0,k=e.getLength();h<k;++h)for(var l=e.getAt(h),m=0,q=l.getLength();m<q;++m){var r=l.getAt(m),u=l.getAt((m+1)%q),v=_.Wd(r.lng(),-180,180),x=_.Wd(u.lng(),-180,180),w=Math.max(v,x);v=Math.min(v,x);(180<w-v?c>=w||c<v:c<w&&c>=v)&&jv(r,u,c,d,f)<a.lat()&&(g=!g)}return g||lv.isLocationOnEdge(a,b)}};_.Ta("module$exports$PolyGeometry.containsLocation",lv.containsLocation);lv.isLocationOnEdge=function(a,b,c){c=c||1E-9;var d=_.Wd(a.lng(),-180,180),e=b instanceof _.aj,f=!!b.get("geodesic"),g=b.get("latLngs");b=b.get("map");b=!f&&b?b.getProjection():null;for(var h=0,k=g.getLength();h<k;++h)for(var l=g.getAt(h),m=l.getLength(),q=e?m:m-1,r=0;r<q;++r){var u=l.getAt(r),v=l.getAt((r+1)%m),x=_.Wd(u.lng(),-180,180),w=_.Wd(v.lng(),-180,180),F=Math.max(x,w),C=Math.min(x,w);if(x=1E-9>=Math.abs(_.Wd(x-w,-180,180))&&(Math.abs(_.Wd(x-d,-180,180))<=c||Math.abs(_.Wd(w-d,-180,180))<=c)){x=a.lat();w=Math.min(u.lat(),v.lat())-c;var L=Math.max(u.lat(),v.lat())+c;x=x>=w&&x<=L}if(x)return!0;if(180<F-C?d+c>=F||d-c<=C:d+c>=C&&d-c<=F)if(u=jv(u,v,d,f,b),Math.abs(u-a.lat())<c)return!0}return!1};_.Ta("module$exports$PolyGeometry.isLocationOnEdge",lv.isLocationOnEdge);var mv={},nv={},ov;for(ov in lv)nv.fe=ov,mv[nv.fe]=function(a){return function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];console.warn('Invoking "PolyGeometry.'+a.fe+'()" is not supported, use "google.maps.geometry.poly.'+a.fe+'()" instead.');_.ng(mv,"Lagpg");return lv[a.fe].apply(lv,_.xa(c))}}(nv),nv={fe:nv.fe};_.t.PolyGeometry=mv;var pv={computeHeading:function(a,b){var c=_.ve(a),d=_.xe(a);a=_.ve(b);b=_.xe(b)-d;return _.Wd(_.Fc(Math.atan2(Math.sin(b)*Math.cos(a),Math.cos(c)*Math.sin(a)-Math.sin(c)*Math.cos(a)*Math.cos(b))),-180,180)}};_.Ta("module$exports$Spherical.computeHeading",pv.computeHeading);pv.computeOffset=function(a,b,c,d){b/=d||6378137;c=_.Ec(c);var e=_.ve(a);a=_.xe(a);d=Math.cos(b);b=Math.sin(b);var f=Math.sin(e);e=Math.cos(e);var g=d*f+b*e*Math.cos(c);return new _.I(_.Fc(Math.asin(g)),_.Fc(a+Math.atan2(b*e*Math.sin(c),d-f*g)))};_.Ta("module$exports$Spherical.computeOffset",pv.computeOffset);pv.computeOffsetOrigin=function(a,b,c,d){c=_.Ec(c);b/=d||6378137;d=Math.cos(b);var e=Math.sin(b)*Math.cos(c);b=Math.sin(b)*Math.sin(c);c=Math.sin(_.ve(a));var f=e*e*d*d+d*d*d*d-d*d*c*c;if(0>f)return null;var g=e*c+Math.sqrt(f);g/=d*d+e*e;var h=(c-e*g)/d;g=Math.atan2(h,g);if(g<-Math.PI/2||g>Math.PI/2)g=e*c-Math.sqrt(f),g=Math.atan2(h,g/(d*d+e*e));if(g<-Math.PI/2||g>Math.PI/2)return null;a=_.xe(a)-Math.atan2(b,d*Math.cos(g)-e*Math.sin(g));return new _.I(_.Fc(g),_.Fc(a))};_.Ta("module$exports$Spherical.computeOffsetOrigin",pv.computeOffsetOrigin);pv.interpolate=function(a,b,c){var d=_.ve(a),e=_.xe(a),f=_.ve(b),g=_.xe(b),h=Math.cos(d),k=Math.cos(f);b=pv.Ng(a,b);var l=Math.sin(b);if(1E-6>l)return new _.I(a.lat(),a.lng());a=Math.sin((1-c)*b)/l;c=Math.sin(c*b)/l;b=a*h*Math.cos(e)+c*k*Math.cos(g);e=a*h*Math.sin(e)+c*k*Math.sin(g);return new _.I(_.Fc(Math.atan2(a*Math.sin(d)+c*Math.sin(f),Math.sqrt(b*b+e*e))),_.Fc(Math.atan2(e,b)))};_.Ta("module$exports$Spherical.interpolate",pv.interpolate);pv.Ng=function(a,b){var c=_.ve(a);a=_.xe(a);var d=_.ve(b);b=_.xe(b);return 2*Math.asin(Math.sqrt(Math.pow(Math.sin((c-d)/2),2)+Math.cos(c)*Math.cos(d)*Math.pow(Math.sin((a-b)/2),2)))};pv.computeDistanceBetween=function(a,b,c){c=c||6378137;return pv.Ng(a,b)*c};_.Ta("module$exports$Spherical.computeDistanceBetween",pv.computeDistanceBetween);pv.computeLength=function(a,b){b=b||6378137;var c=0;a instanceof _.ih&&(a=a.getArray());for(var d=0,e=a.length-1;d<e;++d)c+=pv.computeDistanceBetween(a[d],a[d+1],b);return c};_.Ta("module$exports$Spherical.computeLength",pv.computeLength);pv.computeArea=function(a,b){return Math.abs(pv.computeSignedArea(a,b))};_.Ta("module$exports$Spherical.computeArea",pv.computeArea);pv.computeSignedArea=function(a,b){b=b||6378137;a instanceof _.ih&&(a=a.getArray());for(var c=a[0],d=0,e=1,f=a.length-1;e<f;++e)d+=pv.Kl(c,a[e],a[e+1]);return d*b*b};_.Ta("module$exports$Spherical.computeSignedArea",pv.computeSignedArea);pv.Kl=function(a,b,c){return pv.Ll(a,b,c)*pv.Om(a,b,c)};pv.Ll=function(a,b,c){var d=[a,b,c,a];a=[];for(c=b=0;3>c;++c)a[c]=pv.Ng(d[c],d[c+1]),b+=a[c];b/=2;d=Math.tan(b/2);for(c=0;3>c;++c)d*=Math.tan((b-a[c])/2);return 4*Math.atan(Math.sqrt(Math.abs(d)))};pv.Om=function(a,b,c){a=[a,b,c];b=[];for(c=0;3>c;++c){var d=a[c],e=_.ve(d);d=_.xe(d);var f=b[c]=[];f[0]=Math.cos(e)*Math.cos(d);f[1]=Math.cos(e)*Math.sin(d);f[2]=Math.sin(e)}return 0<b[0][0]*b[1][1]*b[2][2]+b[1][0]*b[2][1]*b[0][2]+b[2][0]*b[0][1]*b[1][2]-b[0][0]*b[2][1]*b[1][2]-b[1][0]*b[0][1]*b[2][2]-b[2][0]*b[1][1]*b[0][2]?1:-1};var qv={},rv={},sv;for(sv in pv)rv.de=sv,qv[rv.de]=function(a){return function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];console.warn('Invoking "Spherical.'+a.de+'()" is not supported, use "google.maps.geometry.spherical.'+a.de+'()" instead.');_.ng(qv,"Lags");return pv[a.de].apply(pv,_.xa(c))}}(rv),rv={de:rv.de};_.t.Spherical=qv;var tv={decodePath:function(a){for(var b=_.Sd(a),c=Array(Math.floor(a.length/2)),d=0,e=0,f=0,g=0;d<b;++g){var h=1,k=0;do{var l=a.charCodeAt(d++)-63-1;h+=l<<k;k+=5}while(31<=l);e+=h&1?~(h>>1):h>>1;h=1;k=0;do l=a.charCodeAt(d++)-63-1,h+=l<<k,k+=5;while(31<=l);f+=h&1?~(h>>1):h>>1;c[g]=new _.I(1E-5*e,1E-5*f,!0)}c.length=g;return c}};_.Ta("module$exports$PolylineCodec.decodePath",tv.decodePath);tv.encodePath=function(a){a instanceof _.ih&&(a=a.getArray());return tv.fo(a,function(b){return[Math.round(1E5*b.lat()),Math.round(1E5*b.lng())]})};_.Ta("module$exports$PolylineCodec.encodePath",tv.encodePath);tv.fo=function(a,b){for(var c=[],d=[0,0],e,f=0,g=_.Sd(a);f<g;++f)e=b?b(a[f]):a[f],tv.Gj(e[0]-d[0],c),tv.Gj(e[1]-d[1],c),d=e;return c.join("")};tv.Gj=function(a,b){tv.ho(0>a?~(a<<1):a<<1,b)};tv.ho=function(a,b){for(;32<=a;)b.push(String.fromCharCode((32|a&31)+63)),a>>=5;b.push(String.fromCharCode(a+63))};var uv={},vv={},wv;for(wv in tv)vv.ee=wv,uv[vv.ee]=function(a){return function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];console.warn('Invoking "PolylineCodec.'+a.ee+'()" is not supported, use "google.maps.geometry.encoding.'+a.ee+'()" instead.');_.ng(uv,"Lagpc");return tv[a.ee].apply(tv,_.xa(c))}}(vv),vv={ee:vv.ee};_.t.PolylineCodec=uv;_.t.google.maps.geometry={encoding:tv,spherical:pv,poly:lv};_.n=kv.prototype;_.n.decodePath=tv.decodePath;_.n.encodePath=tv.encodePath;_.n.computeDistanceBetween=pv.computeDistanceBetween;_.n.interpolate=pv.interpolate;_.n.computeHeading=pv.computeHeading;_.n.computeOffset=pv.computeOffset;_.n.computeOffsetOrigin=pv.computeOffsetOrigin;_.Xe("geometry",new kv)});(function(_){var qa,ra,va,wa,Ca,Da,Ea,Fa,Ga,Qa,Ra,Ua,Wa,fb,hb,gb,mb,nb,qb,wb,Nb,$b,mc,oc,pc,tc,sc,Uc,Vc,Wc,Xc,Yc,cd,fd,kd,hd,jd,dd,ad,pd,yd,xd,zd,Ad,Bd,ud,Cd,Ld,Md,Od,Qd,ee,ge,ke,se,te,ye,Ee,Je,Le,Ke,Ie,Ne,Pe,Qe,Ue,Te,Ve,We,Me,Oe,Re,Se,bf,cf,df,ef,gf,hf,mf,pf,lf,rf,sf,tf,Kf,Qf,Zf,$f,ag,dg,eg,fg,gg,hg,ig,jg,lg,kg,pg,qg,rg,sg,tg,ug,vg,xg,Bg,Gg,Fg,Ng,Sg,Tg,Wg,ah,eh,fh,gh,hh,rh,sh,th,vh,wh,Eh,Fh,Gh,Hh,Jh,Kh,Sh,Th,Vh,Uh,Yh,$h,ai,ei,gi,Wh,hi,di,bi,ci,ji,ii,fi,ti,oi,vi,ri,si,yi,zi,Ai,Bi,Fi,Gi,Ji,Ki,Oi,Li,Pi,Qi,Ri,Ti,Xi,Yi,$i,dj,gj,fj,jj,mj,pj,oj,qj,rj,sj,Tj,Wj,ak,bk,ik,hk,ck,dk,ua,sa,Ja,Ha,Na,Oa;_.aa="ERROR";_.ba="INVALID_REQUEST";_.da="MAX_DIMENSIONS_EXCEEDED";_.ea="MAX_ELEMENTS_EXCEEDED";_.fa="MAX_WAYPOINTS_EXCEEDED";_.ha="NOT_FOUND";_.ia="OK";_.ja="OVER_QUERY_LIMIT";_.ka="REQUEST_DENIED";_.ma="UNKNOWN_ERROR";_.na="ZERO_RESULTS";_.pa=function(a){return function(){return _.oa[a].apply(this,arguments)}};qa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};ra=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object")};va=function(a,b){if(b)a:{var c=sa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ua(c,a,{configurable:!0,writable:!0,value:b})}};wa=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a};_.p=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:qa(a)}};_.xa=function(a){if(!(a instanceof Array)){a=_.p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a};_.Ba=function(a,b){a.prototype=za(b.prototype);a.prototype.constructor=a;if(_.Aa)(0,_.Aa)(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Uc=b.prototype};Ca=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};Da=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};Ea=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};Fa=function(a){return a?a:Array.prototype.fill};_.Ia=function(a){if(a&&a!=_.t)return Ga(a.document);null===Ha&&(Ha=Ga(_.t.document));return Ha};Ga=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&Ja.test(a)?a:""};_.Ka=function(){};_.La=function(a){var b=typeof a;b="object"!=b?b:a?Array.isArray(a)?"array":b:"null";return"array"==b||"object"==b&&"number"==typeof a.length};_.Ma=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};_.Pa=function(a){return Object.prototype.hasOwnProperty.call(a,Na)&&a[Na]||(a[Na]=++Oa)};Qa=function(a,b,c){return a.call.apply(a.bind,arguments)};Ra=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}};_.y=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_.y=Qa:_.y=Ra;return _.y.apply(null,arguments)};_.Sa=function(){return Date.now()};_.Ta=function(a,b){a=a.split(".");var c=_.t;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.z=function(a,b){function c(){}c.prototype=b.prototype;a.Uc=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Zp=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};Ua=function(a){return a};_.Va=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,_.Va);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};_.Xa=function(a,b){var c=a[b-1];if(null==c||Wa(c))a=a[a.length-1],Wa(a)&&(c=a[b]);return c};Wa=function(a){return _.Ma(a)&&!_.La(a)};_.Ya=function(a,b){a[b]||(a[b]=[]);return a[b]};_.Za=function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};_.A=function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};_.$a=function(a,b){for(var c=a.length,d=[],e=0,f="string"===typeof a?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d};_.ab=function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1};_.bb=function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};_.cb=function(a,b){b=_.Za(a,b);var c;(c=0<=b)&&Array.prototype.splice.call(a,b,1);return c};fb=function(a,b,c,d){Array.prototype.splice.apply(a,_.eb(arguments,1))};_.eb=function(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};hb=function(a,b){return a===b?!0:_.bb(a,function(c,d){if(Wa(c)){d=c;for(var e in d)if(c=d[e],!gb(c,_.Xa(b,+e)))return!1;return!0}return gb(c,_.Xa(b,d+1))})&&_.bb(b,function(c,d){if(Wa(c)){for(var e in c)if(null==_.Xa(a,+e))return!1;return!0}return null==c==(null==_.Xa(a,d+1))})};gb=function(a,b){return a===b||null==a&&null==b||!(!0!==a&&1!==a||!0!==b&&1!==b)||!(!1!==a&&0!==a||!1!==b&&0!==b)?!0:Array.isArray(a)&&Array.isArray(b)?hb(a,b):!1};_.kb=function(a){"string"===typeof a?this.g=a:(this.g=a.V,this.i=a.$);a=this.g;var b=ib[a];if(!b){ib[a]=b=[];for(var c=jb.lastIndex=0,d;d=jb.exec(a);)d=d[0],b[c++]=jb.lastIndex-d.length,b[c++]=parseInt(d,10);b[c]=a.length}this.j=b};mb=function(a,b,c,d){var e=b&-33;a.type=lb[e];a.value=d&&_.Xa(d,a.number);d&&null==a.value||(a.xf=b==e,a.rj=0<=e&&0<(4321&1<<e-75),c(a))};nb=function(a,b){this.g=a[b]};_.ob=function(){return null};_.pb=function(a){return a};qb=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}};_.rb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};_.sb=function(a){for(var b in a)return!1;return!0};_.ub=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<tb.length;f++)c=tb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};wb=function(){if(void 0===vb){var a=null,b=_.t.trustedTypes;if(b&&b.createPolicy){try{a=b.createPolicy("google-maps-api#html",{createHTML:Ua,createScript:Ua,createScriptURL:Ua})}catch(c){_.t.console&&_.t.console.error(c.message)}vb=a}else vb=a}return vb};_.zb=function(a,b){this.g=a===xb&&b||"";this.i=yb};_.Ab=function(a){return a instanceof _.zb&&a.constructor===_.zb&&a.i===yb?a.g:"type_error:Const"};_.Bb=function(a){return new _.zb(xb,a)};_.Db=function(a,b){this.g=b===Cb?a:"";this.Rc=!0};_.Eb=function(a){var b=wb();a=b?b.createScript(a):a;return new _.Db(a,Cb)};_.Ib=function(a,b){this.g=b===Fb?a:""};_.Jb=function(a){return a instanceof _.Ib&&a.constructor===_.Ib?a.g:"type_error:TrustedResourceUrl"};_.Kb=function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};_.Mb=function(){return-1!=_.Lb.toLowerCase().indexOf("webkit")};_.Ob=function(a,b){var c=0;a=_.Kb(String(a)).split(".");b=_.Kb(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=Nb(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||Nb(0==f[2].length,0==g[2].length)||Nb(f[2],g[2]);f=f[3];g=g[3]}while(0==c)}return c};Nb=function(a,b){return a<b?-1:a>b?1:0};_.Qb=function(a,b){this.g=b===_.Pb?a:""};_.Sb=function(a,b){this.g=b===_.Rb?a:""};_.Ub=function(a,b){this.g=b===_.Tb?a:"";this.Rc=!0};_.Wb=function(a){a=_.Ab(a);return 0===a.length?_.Vb:new _.Ub(a,_.Tb)};_.Xb=function(a){return-1!=_.Lb.indexOf(a)};_.Yb=function(){return _.Xb("Trident")||_.Xb("MSIE")};_.Zb=function(){return _.Xb("Firefox")||_.Xb("FxiOS")};_.ac=function(){return _.Xb("Safari")&&!($b()||_.Xb("Coast")||_.Xb("Opera")||_.Xb("Edge")||_.Xb("Edg/")||_.Xb("OPR")||_.Zb()||_.Xb("Silk")||_.Xb("Android"))};$b=function(){return(_.Xb("Chrome")||_.Xb("CriOS"))&&!_.Xb("Edge")};_.bc=function(){return _.Xb("Android")&&!($b()||_.Zb()||_.Xb("Opera")||_.Xb("Silk"))};_.dc=function(a,b,c){this.g=c===cc?a:"";this.i=b};_.ec=function(a){return a instanceof _.dc&&a.constructor===_.dc?a.g:"type_error:SafeHtml"};_.fc=function(a,b){var c=wb();a=c?c.createHTML(a):a;return new _.dc(a,b,cc)};_.hc=function(a,b){if(gc())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=_.ec(b)};_.ic=function(a){var b=_.Ia(a.ownerDocument&&a.ownerDocument.defaultView);b&&a.setAttribute("nonce",b)};_.kc=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^_.Sa()).toString(36)};_.lc=function(){return _.Xb("iPhone")&&!_.Xb("iPod")&&!_.Xb("iPad")};mc=function(a){mc[" "](a);return a};oc=function(a,b){var c=nc;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};pc=function(){var a=_.t.document;return a?a.documentMode:void 0};_.rc=function(a){return oc(a,function(){return 0<=_.Ob(_.qc,a)})};_.B=function(){};_.D=function(a,b,c,d,e){a.N=b=b||[];if(b.length){var f=b.length-1,g=Wa(b[f]);f=g?b[f]:{};g&&b.length--;g=0;for(var h in f){var k=+h;k<=c?(b[k-1]=f[h],delete f[h]):g++}for(k=h=0;e&&k<e.length;){h+=e[k++];var l=e[k++];g+=sc(h,l,b,f);h+=l}b.length>c&&(g+=sc(c,b.length-c,b,f),b.length=c);g&&(b[c]=f)}d&&(a.g=new nb(a.N,c))};tc=function(a,b,c){a=a.N[b];return null!=a?a:c};_.uc=function(a,b){return!!tc(a,b,void 0)};_.vc=function(a,b,c){return tc(a,b,c||0)};_.wc=function(a,b,c){return+tc(a,b,c||0)};_.E=function(a,b,c){return tc(a,b,c||"")};_.G=function(a,b){var c=a.N[b];c||(c=a.N[b]=[]);return c};_.xc=function(a,b){delete a.N[b]};_.yc=function(a,b,c){_.Ya(a.N,b).push(c)};_.zc=function(a,b,c){return _.Ya(a.N,b)[c]};_.Ac=function(a,b){var c=[];_.Ya(a.N,b).push(c);return c};_.Bc=function(a,b,c){return _.Ya(a.N,b)[c]};_.Cc=function(a,b){return(a=a.N[b])?a.length:0};sc=function(a,b,c,d){for(var e=0;0<b;--b,++a)null!=c[a]&&(d[a+1]=c[a],delete c[a],e++);return e};_.Dc=function(a){var b=_.t.document;if(b&&!b.createEvent&&b.createEventObject)try{return b.createEventObject(a)}catch(c){return a}else return a};_.Ec=function(a){return a*Math.PI/180};_.Fc=function(a){return 180*a/Math.PI};_.Hc=function(a){return _.Gc(document,a)};_.Gc=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)};_.Ic=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)};_.Jc=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};_.Kc=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};_.Lc=function(a){this.g=a||_.t.document||document};_.Mc=function(a,b){return _.Gc(a.g,b)};_.Nc=function(){this.O=this.O;this.T=this.T};_.Oc=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.i=!1};_.Sc=function(a,b){_.Oc.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.g=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(_.Pc){a:{try{mc(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=_.Qc||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=_.Qc||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:Rc[a.pointerType]||"";this.state=a.state;this.g=a;a.defaultPrevented&&_.Sc.Uc.preventDefault.call(this)}};Uc=function(a,b,c,d,e){this.listener=a;this.g=null;this.src=b;this.type=c;this.capture=!!d;this.Cd=e;this.key=++Tc;this.yc=this.Gf=!1};Vc=function(a){a.yc=!0;a.listener=null;a.g=null;a.src=null;a.Cd=null};Wc=function(a){this.src=a;this.listeners={};this.g=0};Xc=function(a,b){var c=b.type;c in a.listeners&&_.cb(a.listeners[c],b)&&(Vc(b),0==a.listeners[c].length&&(delete a.listeners[c],a.g--))};Yc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.yc&&f.listener==b&&f.capture==!!c&&f.Cd==d)return e}return-1};_.$c=function(a,b,c,d,e){if(d&&d.once)return _.Zc(a,b,c,d,e);if(Array.isArray(b)){for(var f=0;f<b.length;f++)_.$c(a,b[f],c,d,e);return null}c=ad(c);return a&&a[bd]?a.listen(b,c,_.Ma(d)?!!d.capture:!!d,e):cd(a,b,c,!1,d,e)};cd=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=_.Ma(e)?!!e.capture:!!e,h=dd(a);h||(a[ed]=h=new Wc(a));c=h.add(b,c,d,g,f);if(c.g)return c;d=fd();c.g=d;d.src=a;d.listener=c;if(a.addEventListener)gd||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(hd(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");id++;return c};fd=function(){function a(c){return b.call(a.src,a.listener,c)}var b=jd;return a};_.Zc=function(a,b,c,d,e){if(Array.isArray(b)){for(var f=0;f<b.length;f++)_.Zc(a,b[f],c,d,e);return null}c=ad(c);return a&&a[bd]?a.o.add(String(b),c,!0,_.Ma(d)?!!d.capture:!!d,e):cd(a,b,c,!0,d,e)};kd=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)kd(a,b[f],c,d,e);else(d=_.Ma(d)?!!d.capture:!!d,c=ad(c),a&&a[bd])?a.o.remove(String(b),c,d,e):a&&(a=dd(a))&&(b=a.listeners[b.toString()],a=-1,b&&(a=Yc(b,c,d,e)),(c=-1<a?b[a]:null)&&_.ld(c))};_.ld=function(a){if("number"!==typeof a&&a&&!a.yc){var b=a.src;if(b&&b[bd])Xc(b.o,a);else{var c=a.type,d=a.g;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(hd(c),d):b.addListener&&b.removeListener&&b.removeListener(d);id--;(c=dd(b))?(Xc(c,a),0==c.g&&(c.src=null,b[ed]=null)):Vc(a)}}};hd=function(a){return a in md?md[a]:md[a]="on"+a};jd=function(a,b){if(a.yc)a=!0;else{b=new _.Sc(b,this);var c=a.listener,d=a.Cd||a.src;a.Gf&&_.ld(a);a=c.call(d,b)}return a};dd=function(a){a=a[ed];return a instanceof Wc?a:null};ad=function(a){if("function"===typeof a)return a;a[nd]||(a[nd]=function(b){return a.handleEvent(b)});return a[nd]};_.od=function(){_.Nc.call(this);this.o=new Wc(this);this.$b=this;this.oa=null};_.qd=function(a,b){var c=a.oa;if(c){var d=[];for(var e=1;c;c=c.oa)d.push(c),++e}a=a.$b;c=b.type||b;"string"===typeof b?b=new _.Oc(b,a):b instanceof _.Oc?b.target=b.target||a:(e=b,b=new _.Oc(c,a),_.ub(b,e));e=!0;if(d)for(var f=d.length-1;!b.i&&0<=f;f--){var g=b.currentTarget=d[f];e=pd(g,c,!0,b)&&e}b.i||(g=b.currentTarget=a,e=pd(g,c,!0,b)&&e,b.i||(e=pd(g,c,!1,b)&&e));if(d)for(f=0;!b.i&&f<d.length;f++)g=b.currentTarget=d[f],e=pd(g,c,!1,b)&&e;return e};pd=function(a,b,c,d){b=a.o.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.yc&&g.capture==c){var h=g.listener,k=g.Cd||g.src;g.Gf&&Xc(a.o,g);e=!1!==h.call(k,d)&&e}}return e&&!d.defaultPrevented};_.wd=function(a,b,c,d,e,f){_.od.call(this);this.Ya=a.replace(rd,"_");this.W=b||null;this.Fa=c?_.Dc(c):null;this.oc=e||null;this.ha=f||null;if(a=!this.ha&&c&&c.target)a=c.target,a=_.Ma(a)&&1==a.nodeType;a&&(this.ha=c.target);this.H=[];this.Oa={};this.lb=this.Na=d||_.Sa();this.g={};this.g["main-actionflow-branch"]=1;this.ka={};this.i=!1;this.j={};this.ma={};c&&b&&"click"==c.type&&this.action(b);sd.push(this);this.Bb=++td;b=new ud("created",this);null!=vd&&_.qd(vd,b)};yd=function(a,b,c){a.i&&xd(a,"branch",b,c);c&&a.tick(c,void 0);a.g[b]?a.g[b]++:a.g[b]=1};xd=function(a,b,c,d){if(vd){var e=new ud("error",a);e.error=b;e.g=c;e.tick=d;e.j=a.i;_.qd(vd,e)}};zd=function(a){var b=[];_.rb(a,function(c,d){d=encodeURIComponent(d);c=encodeURIComponent(c).replace(/%7C/g,"|");b.push(d+":"+c)});return b.join(",")};Ad=function(a,b){a.i&&xd(a,"extradata");a.ma.oi=b.toString().replace(/[:;,\s]/g,"_")};Bd=function(a,b){for(;a&&1==a.nodeType;a=a.parentNode)b(a)};ud=function(a,b){_.Oc.call(this,a,b)};Cd=function(a){_.D(this,a,19)};_.Dd=function(a){return _.E(a,0)};_.Gd=function(){var a=_.Ed(_.H);return _.E(a,9)};_.Hd=function(a){_.D(this,a,12)};_.Id=function(a){_.D(this,a,7)};_.Jd=function(a){_.D(this,a,13)};_.Kd=function(a){_.D(this,a,2)};Ld=function(a){_.D(this,a,17)};Md=function(a){_.D(this,a,1)};_.Nd=function(a){_.D(this,a,3)};Od=function(a){_.D(this,a,101)};_.Pd=function(){return new Ld(_.H.N[21])};_.Ed=function(a){return new Cd(a.N[2])};Qd=function(){};_.Sd=function(a){return a?a.length:0};_.Ud=function(a,b){_.Td(b,function(c){a[c]=b[c]})};_.Vd=function(a,b,c){null!=b&&(a=Math.max(a,b));null!=c&&(a=Math.min(a,c));return a};_.Wd=function(a,b,c){a>=b&&a<c||(c-=b,a=((a-b)%c+c)%c+b);return a};_.Xd=function(a,b,c){return Math.abs(a-b)<=(c||1E-9)};_.Yd=function(a,b){for(var c=[],d=_.Sd(a),e=0;e<d;++e)c.push(b(a[e],e));return c};_.$d=function(a,b){for(var c=_.Zd(void 0,_.Sd(b)),d=_.Zd(void 0,0);d<c;++d)a.push(b[d])};_.ae=function(a){return"number"==typeof a};_.be=function(a){return"object"==typeof a};_.Zd=function(a,b){return null==a?b:a};_.ce=function(a){return"string"==typeof a};_.de=function(a){return a===!!a};_.Td=function(a,b){for(var c in a)b(c,a[c])};ee=function(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]};_.fe=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];_.t.console&&_.t.console.error&&_.t.console.error.apply(_.t.console,_.xa(b))};ge=function(a){this.message=a;this.name="InvalidValueError";this.stack=Error().stack};_.he=function(a,b){var c="";if(null!=b){if(!(b instanceof ge))return b;c=": "+b.message}return new ge(a+c)};_.ie=function(a){if(!(a instanceof ge))throw a;_.fe(a.name+": "+a.message)};_.je=function(a,b){var c=c?c+": ":"";return function(d){if(!d||!_.be(d))throw _.he(c+"not an Object");var e={},f;for(f in d)if(e[f]=d[f],!b&&!a[f])throw _.he(c+"unknown property "+f);for(f in a)try{var g=a[f](e[f]);if(void 0!==g||Object.prototype.hasOwnProperty.call(d,f))e[f]=g}catch(h){throw _.he(c+"in property "+f,h)}return e}};ke=function(a){try{return!!a.cloneNode}catch(b){return!1}};_.le=function(a,b,c){return c?function(d){if(d instanceof a)return d;try{return new a(d)}catch(e){throw _.he("when calling new "+b,e)}}:function(d){if(d instanceof a)return d;throw _.he("not an instance of "+b)}};_.me=function(a){return function(b){for(var c in a)if(a[c]==b)return b;throw _.he(b)}};_.ne=function(a){return function(b){if(!Array.isArray(b))throw _.he("not an Array");return _.Yd(b,function(c,d){try{return a(c)}catch(e){throw _.he("at index "+d,e)}})}};_.oe=function(a,b){return function(c){if(a(c))return c;throw _.he(b||""+c)}};_.pe=function(a){return function(b){for(var c=[],d=0,e=a.length;d<e;++d){var f=a[d];try{(f.Yh||f)(b)}catch(g){if(!(g instanceof ge))throw g;c.push(g.message);continue}return(f.then||f)(b)}throw _.he(c.join("; and "))}};_.qe=function(a,b){return function(c){return b(a(c))}};_.re=function(a){return function(b){return null==b?b:a(b)}};se=function(a){return function(b){if(b&&null!=b[a])return b;throw _.he("no "+a+" property")}};te=function(a){try{return a()}catch(b){throw _.he("View: `element` invalid",b)}};_.I=function(a,b,c){c=void 0===c?!1:c;if(!a||void 0===a.lat&&void 0===a.lng){var d=a;var e=b}else try{ue(a),c=c||!!b,e=a.lng,d=a.lat}catch(f){_.ie(f)}d-=0;e-=0;c||(d=_.Vd(d,-90,90),180!=e&&(e=_.Wd(e,-180,180)));this.lat=function(){return d};this.lng=function(){return e}};_.ve=function(a){return _.Ec(a.lat())};_.xe=function(a){return _.Ec(a.lng())};ye=function(a,b){b=Math.pow(10,b);return Math.round(a*b)/b};_.Ce=function(a){var b=a;_.ze(a)&&(b={lat:a.lat(),lng:a.lng()});try{var c=Ae(b);return _.ze(a)?a:_.Be(c)}catch(d){throw _.he("not a LatLng or LatLngLiteral with finite coordinates",d)}};_.ze=function(a){return a instanceof _.I};_.Be=function(a){try{if(_.ze(a))return a;a=ue(a);return new _.I(a.lat,a.lng)}catch(b){throw _.he("not a LatLng or LatLngLiteral",b)}};_.De=function(a){this.g=_.Be(a)};Ee=function(a){if(a instanceof Qd)return a;try{return new _.De(_.Be(a))}catch(b){}throw _.he("not a Geometry or LatLng or LatLngLiteral object")};_.Ge=function(a){(0,_.Fe)();return _.fc(a,null)};_.He=function(a){(0,_.Fe)();var b=wb();a=b?b.createScriptURL(a):a;return new _.Ib(a,Fb)};Je=function(a,b){this.g=_.t.document;this.j=a.includes("%s")?a:Ie([a,"%s"],_.Bb("js"));this.i=!b||b.includes("%s")?b:Ie([b,"%s"],_.Bb("css.js"))};Le=function(a,b,c,d){if(a.i){var e=_.He(a.i.replace("%s",b));Ke(a.g,e)}b=_.He(a.j.replace("%s",b));Ke(a.g,b,c,d)};Ke=function(a,b,c,d){var e=a.head;a=_.Mc(new _.Lc(a),"SCRIPT");a.type="text/javascript";a.charset="UTF-8";a.async=!1;a.defer=!1;c&&(a.onerror=c);d&&(a.onload=d);a.src=_.Jb(b);_.ic(a);e.appendChild(a)};Ie=function(a,b){var c="";a=_.p(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.length&&"/"==d[0]?c=d:(c&&"/"!=c[c.length-1]&&(c+="/"),c+=d);return c+"."+_.Ab(b)};Ne=function(){this.ha={};this.i={};this.O={};this.g={};this.T=new Set;this.H=void 0;this.j=new Me;this.W=!1;this.o={}};Pe=function(a,b,c,d){var e=void 0===e?null:e;var f=void 0===f?function(){}:f;var g=void 0===g?new Je(b,e):g;a.H=f;a.W=!!e;Oe(a.j,c,d,g)};Qe=function(a,b){a.o[b]=a.o[b]||{Nl:!a.W};return a.o[b]};Ue=function(a,b){var c=Qe(a,b),d=c.jn;if(d&&c.Nl&&(delete a.o[b],!a.g[b])){var e=a.O;Re(a.j,function(f){var g=f.g[b]||[],h=e[b]=Se(g.length,function(){delete e[b];d(f.i);Te(a,b)});g=_.p(g);for(var k=g.next();!k.done;k=g.next())a.g[k.value]&&h()})}};Te=function(a,b){a.T.delete(b);Re(a.j,function(c){c=c.o[b]||[];for(var d=a.i[b],e=d?d.length:0,f=0;f<e;++f)d[f].wc(a.g[b]);delete a.i[b];c=_.p(c);for(d=c.next();!d.done;d=c.next())d=d.value,a.O[d]&&a.O[d]()})};Ve=function(a,b){a.ha[b]||(a.ha[b]=!0,Re(a.j,function(c){for(var d=c.g[b],e=d?d.length:0,f=0;f<e;++f){var g=d[f];a.g[g]||Ve(a,g)}Le(c.j,b,function(h){for(var k=_.p(a.i[b]||[]),l=k.next();!l.done;l=k.next())(l=l.value.md)&&l(h&&h.error||Error('Could not load "'+b+'".'));delete a.i[b];a.H&&a.H(b,h)},function(){a.T.has(b)||Te(a,b)})}))};We=function(a,b,c){this.j=a;this.g=b;a={};for(var d in b)for(var e=b[d],f=e.length,g=0;g<f;++g){var h=e[g];a[h]||(a[h]=[]);a[h].push(d)}this.o=a;this.i=c};Me=function(){this.i=void 0;this.g=[]};Oe=function(a,b,c,d){b=a.i=new We(d,b,c);c=a.g.length;for(d=0;d<c;++d)a.g[d](b);a.g.length=0};Re=function(a,b){a.i?b(a.i):a.g.push(b)};Se=function(a,b){if(a)return function(){--a||b()};b();return function(){}};_.J=function(a){return new Promise(function(b,c){var d=Ne.g(),e=""+a;d.g[e]?b(d.g[e]):((d.i[e]=d.i[e]||[]).push({wc:b,md:c}),Ve(d,e))})};_.Xe=function(a,b){Ne.g().g[""+a]=b};_.$e=function(a){a=a||window.event;_.Ye(a);_.Ze(a)};_.Ye=function(a){a.stopPropagation()};_.Ze=function(a){a.preventDefault()};_.af=function(a){a.handled=!0};bf=function(a,b){a.__e3_||(a.__e3_={});a=a.__e3_;a[b]||(a[b]={});return a[b]};cf=function(a,b){a=a.__e3_||{};if(b)b=a[b]||{};else{b={};a=_.p(Object.values(a));for(var c=a.next();!c.done;c=a.next())_.Ud(b,c.value)}return b};df=function(a,b){return function(c){return b.call(a,c,this)}};ef=function(a,b,c){return function(d){var e=[b,a];_.$d(e,arguments);_.K.trigger.apply(this,e);c&&_.af.apply(null,arguments)}};gf=function(a,b,c,d,e){this.i=a;this.g=b;this.j=c;this.H=d;this.Rh=void 0===e?!0:e;this.o=++ff;bf(a,b)[this.o]=this;this.Rh&&_.K.trigger(this.i,""+this.g+"_added")};hf=function(a){return function(b){b||(b=window.event);if(b&&!b.target)try{b.target=b.srcElement}catch(d){}var c=a.sj([b]);return b&&"click"===b.type&&(b=b.srcElement)&&"A"===b.tagName&&"javascript:void(0)"===b.href?!1:c}};_.jf=function(a){a=a||{};this.j=a.id;this.g=null;try{this.g=a.geometry?Ee(a.geometry):null}catch(b){_.ie(b)}this.i=a.properties||{}};_.kf=function(a){return""+(_.Ma(a)?_.Pa(a):a)};_.M=function(){};mf=function(a,b){var c=b+"_changed";if(a[c])a[c]();else a.changed(b);c=lf(a,b);for(var d in c){var e=c[d];mf(e.De,e.Ec)}_.K.trigger(a,b.toLowerCase()+"_changed")};_.of=function(a){return nf[a]||(nf[a]=a.substr(0,1).toUpperCase()+a.substr(1))};pf=function(a){a.gm_accessors_||(a.gm_accessors_={});return a.gm_accessors_};lf=function(a,b){a.gm_bindings_||(a.gm_bindings_={});a.gm_bindings_.hasOwnProperty(b)||(a.gm_bindings_[b]={});return a.gm_bindings_[b]};_.qf=function(a){this.__gm=a};rf=function(){this.g={};this.j={};this.i={}};sf=function(){this.g={}};tf=function(a){var b=this;this.g=new sf;_.K.addListenerOnce(a,"addfeature",function(){_.J("data").then(function(c){c.Fl(b,a,b.g)})})};_.vf=function(a){this.g=[];try{this.g=uf(a)}catch(b){_.ie(b)}};_.xf=function(a){this.g=(0,_.wf)(a)};_.yf=function(a){this.g=(0,_.wf)(a)};_.Af=function(a){this.g=zf(a)};_.Bf=function(a){this.g=(0,_.wf)(a)};_.Df=function(a){this.g=Cf(a)};_.Ff=function(a){this.g=Ef(a)};_.Jf=function(a,b,c){function d(x){if(!x)throw _.he("not a Feature");if("Feature"!=x.type)throw _.he('type != "Feature"');var w=x.geometry;try{w=null==w?null:e(w)}catch(L){throw _.he('in property "geometry"',L)}var F=x.properties||{};if(!_.be(F))throw _.he("properties is not an Object");var C=c.idPropertyName;x=C?F[C]:x.id;if(null!=x&&!_.ae(x)&&!_.ce(x))throw _.he((C||"id")+" is not a string or number");return{id:x,geometry:w,properties:F}}function e(x){if(null==x)throw _.he("is null");var w=(x.type+"").toLowerCase(),F=x.coordinates;try{switch(w){case "point":return new _.De(h(F));case "multipoint":return new _.Bf(l(F));case "linestring":return g(F);case "multilinestring":return new _.Af(m(F));case "polygon":return f(F);case "multipolygon":return new _.Ff(r(F))}}catch(C){throw _.he('in property "coordinates"',C)}if("geometrycollection"==w)try{return new _.vf(u(x.geometries))}catch(C){throw _.he('in property "geometries"',C)}throw _.he("invalid type")}function f(x){return new _.Df(q(x))}function g(x){return new _.xf(l(x))}
function h(x){x=k(x);return _.Be({lat:x[1],lng:x[0]})}if(!b)return[];c=c||{};var k=_.ne(_.Gf),l=_.ne(h),m=_.ne(g),q=_.ne(function(x){x=l(x);if(!x.length)throw _.he("contains no elements");if(!x[0].equals(x[x.length-1]))throw _.he("first and last positions are not equal");return new _.yf(x.slice(0,-1))}),r=_.ne(f),u=_.ne(e),v=_.ne(d);if("FeatureCollection"==b.type){b=b.features;try{return _.Yd(v(b),function(x){return a.add(x)})}catch(x){throw _.he('in property "features"',x)}}if("Feature"==b.type)return[a.add(d(b))];throw _.he("not a Feature or FeatureCollection")};Kf=function(a,b){-180==a&&180!=b&&(a=180);-180==b&&180!=a&&(b=180);this.g=a;this.i=b};_.Lf=function(a){return a.g>a.i};_.Mf=function(a){return 360==a.i-a.g};_.Nf=function(a,b){var c=a.g,d=a.i;return _.Lf(a)?_.Lf(b)?b.g>=c&&b.i<=d:(b.g>=c||b.i<=d)&&!a.isEmpty():_.Lf(b)?_.Mf(a)||b.isEmpty():b.g>=c&&b.i<=d};_.Of=function(a,b){var c=b-a;return 0<=c?c:b+180-(a-180)};_.Pf=function(a){return a.isEmpty()?0:_.Lf(a)?360-(a.g-a.i):a.i-a.g};Qf=function(a,b){this.g=a;this.i=b};_.Rf=function(a,b){a=a&&_.Be(a);b=b&&_.Be(b);if(a){b=b||a;var c=_.Vd(a.lat(),-90,90),d=_.Vd(b.lat(),-90,90);this.Ra=new Qf(c,d);a=a.lng();b=b.lng();360<=b-a?this.La=new Kf(-180,180):(a=_.Wd(a,-180,180),b=_.Wd(b,-180,180),this.La=new Kf(a,b))}else this.Ra=new Qf(1,-1),this.La=new Kf(180,-180)};_.Sf=function(a,b,c,d){return new _.Rf(new _.I(a,b,!0),new _.I(c,d,!0))};_.Uf=function(a){if(a instanceof _.Rf)return a;try{return a=Tf(a),_.Sf(a.south,a.west,a.north,a.east)}catch(b){throw _.he("not a LatLngBounds or LatLngBoundsLiteral",b)}};_.Vf=function(a){return function(){return this.get(a)}};_.Wf=function(a,b){return b?function(c){try{this.set(a,b(c))}catch(d){_.ie(_.he("set"+_.of(a),d))}}:function(c){this.set(a,c)}};_.Xf=function(a,b){_.Td(b,function(c,d){var e=_.Vf(c);a["get"+_.of(c)]=e;d&&(d=_.Wf(c,d),a["set"+_.of(c)]=d)})};Zf=function(a){var b=this;a=a||{};this.setValues(a);this.g=new rf;_.K.forward(this.g,"addfeature",this);_.K.forward(this.g,"removefeature",this);_.K.forward(this.g,"setgeometry",this);_.K.forward(this.g,"setproperty",this);_.K.forward(this.g,"removeproperty",this);this.i=new tf(this.g);this.i.bindTo("map",this);this.i.bindTo("style",this);_.A(_.Yf,function(c){_.K.forward(b.i,c,b)});this.j=!1};$f=function(a){a.j||(a.j=!0,_.J("drawing_impl").then(function(b){b.Jm(a)}))};ag=function(){};_.cg=function(a){_.bg&&a&&_.bg.push(a)};dg=function(a){this.setValues(a)};eg=function(){};fg=function(){};gg=function(){_.J("geocoder")};_.N=function(a,b){this.x=a;this.y=b};hg=function(a){if(a instanceof _.N)return a;try{_.je({x:_.Gf,y:_.Gf},!0)(a)}catch(b){throw _.he("not a Point",b)}return new _.N(a.x,a.y)};_.O=function(a,b,c,d){this.width=a;this.height=b;this.i=c;this.g=d};ig=function(a){if(a instanceof _.O)return a;try{_.je({height:_.Gf,width:_.Gf},!0)(a)}catch(b){throw _.he("not a Size",b)}return new _.O(a.width,a.height)};jg=function(){_.K.Oj(this)};lg=function(a,b){if(a.constructor===kg)for(var c in b)if(!(c in a))throw _.he("Unknown property '"+c+"' of View");};kg=function(a){a=void 0===a?{}:a;_.K.Oj(this);this.element=te(function(){return _.re(_.le(Element,"Element"))(a.element)||document.createElement("div")});lg(this,a)};_.ng=function(a,b,c){c=void 0===c?"":c;_.mg&&_.J("stats").then(function(d){d.Fa(a).j(b+c)})};_.og=function(){kg.apply(this,arguments)};pg=function(a){a=a||{};a.clickable=_.Zd(a.clickable,!0);a.visible=_.Zd(a.visible,!0);this.setValues(a);_.J("marker")};qg=function(){var a=_.t.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!_.Xb("Presto")&&(a=function(){var e=_.Hc("IFRAME");e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),h="file:"==f.location.protocol?"*":f.location.protocol+"//"+f.location.host;e=(0,_.y)(function(k){if(("*"==h||k.origin==h)&&k.data==g)this.port1.onmessage()},this);f.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,h)}}});if("undefined"!==typeof a&&!_.Yb()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.cb;c.cb=null;e()}};return function(e){d.next={cb:e};d=d.next;b.port2.postMessage(0)}}return function(e){_.t.setTimeout(e,0)}};rg=function(a){_.t.setTimeout(function(){throw a},0)};sg=function(a,b){this.o=a;this.j=b;this.i=0;this.g=null};tg=function(a,b){a.j(b);100>a.i&&(a.i++,b.next=a.g,a.g=b)};ug=function(){this.i=this.g=null};vg=function(){this.next=this.scope=this.ye=null};_.Ag=function(a,b){wg||xg();yg||(wg(),yg=!0);zg.add(a,b)};xg=function(){if(_.t.Promise&&_.t.Promise.resolve){var a=_.t.Promise.resolve(void 0);wg=function(){a.then(Bg)}}else wg=function(){var b=Bg;"function"!==typeof _.t.setImmediate||_.t.Window&&_.t.Window.prototype&&!_.Xb("Edge")&&_.t.Window.prototype.setImmediate==_.t.setImmediate?(Cg||(Cg=qg()),Cg(b)):_.t.setImmediate(b)}};Bg=function(){for(var a;a=zg.remove();){try{a.ye.call(a.scope)}catch(b){rg(b)}tg(Dg,a)}yg=!1};_.Eg=function(a){this.Ea=[];this.g=a&&a.Ge?a.Ge:function(){};this.i=a&&a.Ie?a.Ie:function(){}};Gg=function(a,b,c,d){d=d?{Ii:!1}:null;var e=!a.Ea.length,f=a.Ea.find(Fg(b,c));f?f.once=f.once&&d:a.Ea.push({ye:b,context:c||null,once:d});e&&a.i()};_.Ig=function(a,b,c,d){function e(){for(var g={},h=_.p(f),k=h.next();!k.done;g={vd:g.vd},k=h.next())g.vd=k.value,b.call(c||null,function(l){return function(m){if(l.vd.once){if(l.vd.once.Ii)return;l.vd.once.Ii=!0;a.Ea.splice(a.Ea.indexOf(l.vd),1);a.Ea.length||a.g()}l.vd.ye.call(l.vd.context,m)}}(g))}var f=a.Ea.slice(0);d&&d.sync?e():(Hg||_.Ag)(e)};Fg=function(a,b){return function(c){return c.ye==a&&c.context==(b||null)}};_.Lg=function(){var a=this;this.Ea=new _.Eg({Ge:function(){a.Ge()},Ie:function(){a.Ie()}})};_.Mg=function(a){_.Lg.call(this);this.H=!!a};_.Og=function(a,b){return new Ng(a,b)};_.Pg=function(){return new Ng(null,void 0)};Ng=function(a,b){_.Mg.call(this,b);this.g=a};_.Qg=function(){this.__gm=new _.M;this.H=null};_.Rg=function(a){this.__gm={set:null,Rf:null,Kd:{map:null,streetView:null},xe:null,Lf:null,Cm:!1};pg.call(this,a)};Sg=function(a,b){this.g=a;this.i=b;a.addListener("map_changed",(0,_.y)(this.In,this));this.bindTo("map",a);this.bindTo("disableAutoPan",a);this.bindTo("maxWidth",a);this.bindTo("minWidth",a);this.bindTo("position",a);this.bindTo("zIndex",a);this.bindTo("internalAnchor",a,"anchor");this.bindTo("internalContent",a,"content");this.bindTo("internalPixelOffset",a,"pixelOffset")};Tg=function(a,b,c,d,e){c?a.bindTo(b,c,d,e):(a.unbind(b),a.set(b,void 0))};_.Ug=function(a){function b(){e||(e=!0,_.J("infowindow").then(function(f){f.rl(d)}))}window.setTimeout(function(){_.J("infowindow")},100);a=a||{};var c=!!a.g;delete a.g;var d=new Sg(this,c),e=!1;_.K.addListenerOnce(this,"anchor_changed",b);_.K.addListenerOnce(this,"map_changed",b);this.setValues(a)};_.Vg=function(a,b,c){this.set("url",a);this.set("bounds",_.re(_.Uf)(b));this.setValues(c)};Wg=function(a,b){_.ce(a)?(this.set("url",a),this.setValues(b)):this.setValues(a)};_.Xg=function(){this.o=new _.N(128,128);this.g=256/360;this.j=256/(2*Math.PI);this.i=!0};_.Yg=function(a,b){this.g=a;this.i=b};_.Zg=function(a){this.min=0;this.max=a;this.g=a-0};_.$g=function(a){this.ae=a.ae||null;this.be=a.be||null};ah=function(a,b,c,d){this.i=a;this.tilt=b;this.heading=c;this.g=d;a=Math.cos(b*Math.PI/180);b=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);this.m11=this.i*b;this.m12=this.i*c;this.m21=-this.i*a*c;this.m22=this.i*a*b;this.j=this.m11*this.m22-this.m12*this.m21};_.bh=function(a,b,c,d){var e=Math.pow(2,Math.round(a))/256;return new ah(Math.round(Math.pow(2,a)/e)*e,b,c,d)};_.ch=function(a,b){return new _.Yg((a.m22*b.na-a.m12*b.ta)/a.j,(-a.m21*b.na+a.m11*b.ta)/a.j)};_.dh=function(){var a=this;_.J("layers").then(function(b){b.g(a)})};eh=function(a){var b=this;this.setValues(a);_.J("layers").then(function(c){c.i(b)})};fh=function(){var a=this;_.J("layers").then(function(b){b.j(a)})};gh=function(){};_.ih=function(a){this.Fb=a||[];hh(this)};hh=function(a){a.set("length",a.Fb.length)};_.jh=function(){this.i={};this.j=0};_.kh=function(a,b){var c=a.i,d=_.kf(b);c[d]||(c[d]=b,++a.j,_.K.trigger(a,"insert",b),a.g&&a.g(b))};_.lh=function(a){this.g=a};_.mh=function(a,b){var c=b.Ac();return _.$a(a.g,function(d){d=d.Ac();return c!=d})};_.nh=function(a,b,c){this.heading=a;this.pitch=_.Vd(b,-90,90);this.zoom=Math.max(0,c)};rh=function(a,b){var c=this;_.Qg.call(this);_.cg(a);this.__gm=new _.M;this.g=_.Og(!1,!0);this.g.addListener(function(f){c.get("visible")!=f&&c.set("visible",f)});this.j=this.o=null;b&&b.client&&(this.j=_.oh[b.client]||null);var d=this.controls=[];_.Td(_.ph,function(f,g){d[g]=new _.ih});this.O=!1;this.Xb=b&&b.Xb||_.Og(!1);this.i=a;this.__gm.Ce=b&&b.Ce||new _.jh;this.set("standAlone",!0);this.setPov(new _.nh(0,0,1));b&&b.pov&&(a=b.pov,_.ae(a.zoom)||(a.zoom="number"===typeof b.zoom?b.zoom:1));this.setValues(b);void 0==this.getVisible()&&this.setVisible(!0);var e=this.__gm.Ce;_.K.addListenerOnce(this,"pano_changed",function(){_.J("marker").then(function(f){f.g(e,c,!1)})});_.qh[35]&&b&&b.dE&&_.J("util").then(function(f){f.g.o(new _.Nd(b.dE))})};sh=function(){this.o=[];this.j=this.g=this.i=null};_.uh=function(a,b){b=void 0===b?document:b;return th(a,b)};th=function(a,b){return(b=b&&(b.fullscreenElement||b.webkitFullscreenElement||b.mozFullScreenElement||b.msFullscreenElement))?b===a?!0:th(a,b.shadowRoot):!1};vh=function(a,b,c,d){var e=this;this.Ha=b;this.i=d;this.g=_.Og(new _.lh([]));this.ha=new _.jh;this.copyrights=new _.ih;this.H=new _.jh;this.T=new _.jh;this.O=new _.jh;this.Xb=_.Og(_.uh(c,"undefined"===typeof document?null:document));this.Ce=new _.jh;this.qd=_.Pg();var f=this.Ce;f.g=function(){delete f.g;Promise.all([_.J("marker"),e.j]).then(function(g){var h=_.p(g);g=h.next().value;h=h.next().value;g.g(f,a,h)})};this.W=new rh(c,{visible:!1,enableCloseButton:!0,Ce:f,Xb:this.Xb});this.W.bindTo("controlSize",a);this.W.bindTo("reportErrorControl",a);this.W.O=!0;this.o=new sh;this.overlayLayer=null;this.j=new Promise(function(g){e.Na=g})};wh=function(){};_.xh=function(a){this.Ba=this.Ca=Infinity;this.Ia=this.Ja=-Infinity;_.A(a||[],this.extend,this)};_.yh=function(a,b,c,d){var e=new _.xh;e.Ca=a;e.Ba=b;e.Ja=c;e.Ia=d;return e};_.zh=function(a,b,c){if(a=a.fromLatLngToPoint(b))c=Math.pow(2,c),a.x*=c,a.y*=c;return a};_.Ah=function(a,b){var c=a.lat()+_.Fc(b);90<c&&(c=90);var d=a.lat()-_.Fc(b);-90>d&&(d=-90);b=Math.sin(b);var e=Math.cos(_.Ec(a.lat()));if(90==c||-90==d||1E-6>e)return new _.Rf(new _.I(d,-180),new _.I(c,180));b=_.Fc(Math.asin(b/e));return new _.Rf(new _.I(d,a.lng()-b),new _.I(c,a.lng()+b))};_.Bh=function(a,b){a=a.style;a.width=b.width+(b.i||"px");a.height=b.height+(b.g||"px")};_.Ch=function(a){return new _.O(a.offsetWidth,a.offsetHeight)};_.Dh=function(){var a=[],b=_.t.google&&_.t.google.maps&&_.t.google.maps.fisfetsz;b&&Array.isArray(b)&&_.qh[15]&&b.forEach(function(c){_.ae(c)&&a.push(c)});return a};Eh=function(a){_.D(this,a,10)};Fh=function(a){_.D(this,a,100)};Gh=function(a){var b=_.Dd(_.Ed(_.H));a.N[4]=b};Hh=function(a){var b=_.E(_.Ed(_.H),1).toLowerCase();a.N[5]=b};_.Ih=function(a){_.D(this,a,2)};Jh=function(a){_.D(this,a,3)};Kh=function(a){_.D(this,a,7)};Sh=function(a){var b=_.Lh;if(!Oh){var c=Oh={V:"meummms"};if(!Ph){var d=Ph={V:"ebb5ss8MmbbbEI100b"};Qh||(Qh={V:"eedmbddemd",$:["uuuu","uuuu"]});d.$=[Qh,"Eb"]}d=Ph;Rh||(Rh={V:"10m",$:["bb"]});c.$=["ii","uue",d,Rh]}return b.g(a.N,Oh)};Th=function(){};Vh=function(a,b,c){(new _.kb(b)).forEach(function(d){var e=d.number,f=_.Xa(a,e);if(null!=f)if(d.xf)for(var g=0;g<f.length;++g)Uh(f[g],e,d,c);else Uh(f,e,d,c)})};Uh=function(a,b,c,d){if("m"==c.type){var e=d.length;Vh(a,c.zf,d);d.splice(e,0,[b,"m",d.length-e].join(""))}else"b"==c.type&&(a=a?"1":"0"),a=[b,c.type,encodeURIComponent(a)].join(""),d.push(a)};_.Xh=function(a){this.g=0;this.T=void 0;this.o=this.i=this.j=null;this.H=this.O=!1;if(a!=_.Ka)try{var b=this;a.call(void 0,function(c){Wh(b,2,c)},function(c){Wh(b,3,c)})}catch(c){Wh(this,3,c)}};Yh=function(){this.next=this.context=this.i=this.j=this.g=null;this.o=!1};$h=function(a,b,c){var d=Zh.get();d.j=a;d.i=b;d.context=c;return d};ai=function(a,b){if(0==a.g)if(a.j){var c=a.j;if(c.i){for(var d=0,e=null,f=null,g=c.i;g&&(g.o||(d++,g.g==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.g&&1==d?ai(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):bi(c),ci(c,e,3,b)))}a.j=null}else Wh(a,3,b)};ei=function(a,b){a.i||2!=a.g&&3!=a.g||di(a);a.o?a.o.next=b:a.i=b;a.o=b};gi=function(a,b,c,d){var e=$h(null,null,null);e.g=new _.Xh(function(f,g){e.j=b?function(h){try{var k=b.call(d,h);f(k)}catch(l){g(l)}}:f;e.i=c?function(h){try{var k=c.call(d,h);void 0===k&&h instanceof fi?g(h):f(k)}catch(l){g(l)}}:g});e.g.j=a;ei(a,e);return e.g};Wh=function(a,b,c){if(0==a.g){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.g=1;a:{var d=c,e=a.ha,f=a.ka;if(d instanceof _.Xh){ei(d,$h(e||_.Ka,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(l){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{if(_.Ma(d))try{var k=d.then;if("function"===typeof k){hi(d,k,e,f,a);g=!0;break a}}catch(l){f.call(a,l);g=!0;break a}g=!1}}}g||(a.T=c,a.g=b,a.j=null,di(a),3!=b||c instanceof fi||ii(a,c))}};hi=function(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}var h=!1;try{b.call(a,g,f)}catch(k){f(k)}};di=function(a){a.O||(a.O=!0,_.Ag(a.W,a))};bi=function(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b};ci=function(a,b,c,d){if(3==c&&b.i&&!b.o)for(;a&&a.H;a=a.j)a.H=!1;if(b.g)b.g.j=null,ji(b,c,d);else try{b.o?b.j.call(b.context):ji(b,c,d)}catch(e){ki.call(null,e)}tg(Zh,b)};ji=function(a,b,c){2==b?a.j.call(a.context,c):a.i&&a.i.call(a.context,c)};ii=function(a,b){a.H=!0;_.Ag(function(){a.H&&ki.call(null,b)})};fi=function(a){_.Va.call(this,a)};_.li=function(a,b){if("function"!==typeof a)if(a&&"function"==typeof a.handleEvent)a=(0,_.y)(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:_.t.setTimeout(a,b||0)};_.mi=function(a,b,c){_.Nc.call(this);this.g=a;this.o=b||0;this.i=c;this.j=(0,_.y)(this.ii,this)};_.ni=function(a){0!=a.xd||a.start(void 0)};ti=function(a,b,c,d,e){var f=this;this.Ga=new _.mi(function(){var g=oi(f);if(f.j&&f.O)f.o!=g&&_.pi(f.i);else{var h="",k=f.ij(),l=f.ji(),m=f.Cg();if(m){if(k&&isFinite(k.lat())&&isFinite(k.lng())&&1<l&&null!=g&&m&&m.width&&m.height&&f.g){_.Bh(f.g,m);if(k=_.zh(f.ka,k,l)){var q=new _.xh;q.Ca=Math.round(k.x-m.width/2);q.Ja=q.Ca+m.width;q.Ba=Math.round(k.y-m.height/2);q.Ia=q.Ba+m.height;k=q}else k=null;q=qi[g];k&&(f.O=!0,f.o=g,f.j&&f.i&&(h=_.bh(l,0,0),f.j.set({image:f.i,bounds:{min:_.ch(h,{na:k.Ca,ta:k.Ba}),max:_.ch(h,{na:k.Ja,ta:k.Ia})},size:{width:m.width,height:m.height}})),h=ri(f,k,l,g,q))}f.i&&(_.Bh(f.i,m),si(f,h))}}},0);this.ma=b;this.ka=new _.Xg;this.oa=c+"/maps/api/js/StaticMapService.GetMapImage";this.T=d;this.W=e||null;this.i=this.g=null;this.j=_.Pg();this.o=null;this.H=this.O=!1;this.set("div",a);this.set("loading",!0)};oi=function(a){var b=a.get("tilt")||_.Sd(a.get("styles"));a=a.get("mapTypeId");return b?null:ui[a]};_.pi=function(a){a.parentNode&&a.parentNode.removeChild(a)};vi=function(a,b){var c=a.i;c.onload=null;c.onerror=null;var d=a.Cg();d&&(b&&(c.parentNode||a.g.appendChild(c),a.j||_.Bh(c,d),a.W&&a.W.done("smb","smc")),a.set("loading",!1))};ri=function(a,b,c,d,e){var f=new Kh,g=new _.Ih(_.G(f,0));g.Re(b.Ca);g.Se(b.Ba);f.N[1]=e;f.setZoom(c);c=new Jh(_.G(f,3));c.N[0]=b.Ja-b.Ca;c.N[1]=b.Ia-b.Ba;var h=new Fh(_.G(f,4));h.N[0]=d;Gh(h);Hh(h);h.N[9]=!0;_.Dh().forEach(function(k){for(var l=!1,m=0,q=_.Cc(h,13);m<q;m++)if(_.zc(h,13,m)===k){l=!0;break}l||_.yc(h,13,k)});h.N[11]=!0;_.qh[13]&&(b=new Eh(_.Ac(h,7)),b.N[0]=33,b.N[1]=3,b.i(1));a.T&&(f.N[6]=a.T);f=a.oa+unescape("%3F")+Sh(f);return a.ma(f)};si=function(a,b){var c=a.i;b!=c.src?(a.j||_.pi(c),c.onload=function(){vi(a,!0)},c.onerror=function(){vi(a,!1)},c.src=b):!c.parentNode&&b&&a.g.appendChild(c)};_.wi=function(a,b,c){this.j=a;this.o=b;this.i=c;this.g={};for(a=0;a<_.Cc(_.H,41);++a)b=new _.Hd(_.Bc(_.H,41,a)),this.g[_.E(b,0)]=b};yi=function(a){var b=_.xi();return a?(a=b.g[a])?_.uc(a,3)||!1:!1:!1};_.xi=function(){return new _.wi(new _.Jd(_.H.N[1]),_.Pd(),_.Ed(_.H))};zi=function(){};Ai=function(a,b,c,d,e){this.g=!!b;this.node=null;this.i=0;this.j=!1;this.o=!c;a&&this.setPosition(a,d);this.depth=void 0!=e?e:this.i||0;this.g&&(this.depth*=-1)};Bi=function(a,b,c,d){Ai.call(this,a,b,c,null,d)};_.Di=function(a,b){void 0===b||b||_.Ci(a);for(b=a.firstChild;b;)_.Ci(b),a.removeChild(b),b=a.firstChild};_.Ci=function(a){a=new Bi(a);try{while(!0){var b=a.next();b&&_.K.clearInstanceListeners(b)}}catch(c){if(c!==Ei)throw c}};Fi=function(a){this.g=a};Gi=function(a,b,c){for(var d=Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);d.unshift(c);return a.hash(d)};Ji=function(a,b,c,d){var e=new Fi(131071),f=unescape("%26%74%6F%6B%65%6E%3D"),g=unescape("%26%6B%65%79%3D"),h=unescape("%26%63%6C%69%65%6E%74%3D"),k=unescape("%26%63%68%61%6E%6E%65%6C%3D"),l="";b&&(l+=g+encodeURIComponent(b));c&&(l+=h+encodeURIComponent(c));d&&(l+=k+encodeURIComponent(d));return function(m){m=m.replace(Hi,"%27")+l;var q=m+f;Ii||(Ii=/(?:https?:\/\/[^/]+)?(.*)/);m=Ii.exec(m);return q+Gi(e,m&&m[1],a)}};Ki=function(){var a=new Fi(2147483647);return function(b){return Gi(a,b,0)}};Oi=function(a,b){var c=this,d=_.Sa();if(!a)throw _.he("Map: Expected mapDiv of type Element but was passed "+a+".");if("string"===typeof a)throw _.he("Map: Expected mapDiv of type Element but was passed string '"+a+"'.");var e=b||{};e.noClear||_.Di(a,!1);var f="undefined"==typeof document?null:document.createElement("div");f&&a.appendChild&&(a.appendChild(f),f.style.width=f.style.height="100%");if(!(_.t.devicePixelRatio&&_.t.requestAnimationFrame||_.qh[43]))throw _.J("controls").then(function(r){r.Sh(a)}),Error("The Google Maps JavaScript API does not support this browser.");_.J("util").then(function(r){_.qh[35]&&b&&b.dE&&r.g.o(new _.Nd(b.dE));r.g.g(function(u){_.J("controls").then(function(v){v.Qj(a,_.E(u,1)||"http://g.co/dev/maps-no-account")})})});var g,h=new Promise(function(r){g=r});_.qf.call(this,new vh(this,a,f,h));void 0===e.mapTypeId&&(e.mapTypeId="roadmap");this.setValues(e);this.g=_.qh[15]&&e.noControlsOrLogging;this.mapTypes=new wh;this.features=new _.M;_.cg(f);this.notify("streetView");h=_.Ch(f);var k=null,l=e.mapId||null,m=null;_.mg&&yi(l)&&(m=new _.wd("ltf",null,null,d));Li(e.useStaticMap,l,h)&&(m&&yd(m,"smb","smr"),k=new ti(f,_.Mi,_.Gd(),l,m),k.set("size",h),k.bindTo("center",this),k.bindTo("zoom",this),k.bindTo("mapTypeId",this),l||k.bindTo("styles",this));this.overlayMapTypes=new _.ih;var q=this.controls=[];_.Td(_.ph,function(r,u){q[u]=new _.ih});_.J("map").then(function(r){Ni=r;c.getDiv()&&f&&r.i(c,e,f,k,g,m)});this.data=new Zf({map:this})};Li=function(a,b,c){if(!_.H||2==(new _.Nd(_.H.N[39])).getStatus())return!1;if(void 0!==a)return!!a;if(b)return!1;a=c.width;c=c.height;return 384E3>=a*c&&800>=a&&800>=c};Pi=function(a,b,c,d,e){this.url=a;this.size=b||e;this.origin=c;this.anchor=d;this.scaledSize=e;this.labelOrigin=null};Qi=function(){_.J("maxzoom")};Ri=function(a,b){_.fe("The Fusion Tables service will be turned down in December 2019 (see https://support.google.com/fusiontables/answer/9185417). Maps API version 3.37 is the last version that will support FusionTablesLayer.");!a||_.ce(a)||_.ae(a)?(this.set("tableId",a),this.setValues(b)):this.setValues(a)};_.Si=function(){};Ti=function(a){a=a||{};a.visible=_.Zd(a.visible,!0);return a};_.Ui=function(a){return a&&a.radius||6378137};Xi=function(a){return a instanceof _.ih?Vi(a):new _.ih(Wi(a))};Yi=function(a){return function(b){if(!(b instanceof _.ih))throw _.he("not an MVCArray");b.forEach(function(c,d){try{a(c)}catch(e){throw _.he("at index "+d,e)}});return b}};_.Zi=function(a){this.setValues(Ti(a));_.J("poly")};$i=function(a){this.set("latLngs",new _.ih([new _.ih]));this.setValues(Ti(a));_.J("poly")};_.aj=function(a){$i.call(this,a)};_.bj=function(a){$i.call(this,a)};_.cj=function(a){this.setValues(Ti(a));_.J("poly")};dj=function(){this.g=null};_.ej=function(){this.g=null};gj=function(a){var b=this;this.tileSize=a.tileSize||new _.O(256,256);this.name=a.name;this.alt=a.alt;this.minZoom=a.minZoom;this.maxZoom=a.maxZoom;this.j=(0,_.y)(a.getTileUrl,a);this.g=new _.jh;this.i=null;this.set("opacity",a.opacity);_.J("map").then(function(c){var d=b.i=c.g,e=b.tileSize||new _.O(256,256);b.g.forEach(function(f){var g=f.__gmimt,h=g.Qa,k=g.zoom,l=b.j(h,k);(g.Ve=d({va:h.x,wa:h.y,Da:k},e,f,l,function(){return _.K.trigger(f,"load")})).setOpacity(fj(b))})})};fj=function(a){a=a.get("opacity");return"number"==typeof a?a:1};_.hj=function(){};_.ij=function(a,b){this.set("styles",a);a=b||{};this.g=a.baseMapTypeId||"roadmap";this.minZoom=a.minZoom;this.maxZoom=a.maxZoom||20;this.name=a.name;this.alt=a.alt;this.projection=null;this.tileSize=new _.O(256,256)};jj=function(a,b){this.g=a;this.i=b||0};mj=function(){var a=navigator.userAgent;this.o=a;this.g=this.type=0;this.version=new jj(0);this.H=new jj(0);a=a.toLowerCase();for(var b=1;8>b;++b){var c=kj[b];if(-1!=a.indexOf(c)){this.type=b;var d=(new RegExp(c+"[ /]?([0-9]+).?([0-9]+)?")).exec(a);d&&(this.version=new jj(parseInt(d[1],10),parseInt(d[2]||"0",10)));break}}7==this.type&&(b=/^Mozilla\/.*Gecko\/.*[Minefield|Shiretoko][ /]?([0-9]+).?([0-9]+)?/,d=b.exec(this.o))&&(this.type=5,this.version=new jj(parseInt(d[1],10),parseInt(d[2]||"0",10)));6==this.type&&(b=/rv:([0-9]{2,}.?[0-9]+)/,b=b.exec(this.o))&&(this.type=1,this.version=new jj(parseInt(b[1],10)));for(b=1;7>b;++b)if(c=lj[b],-1!=a.indexOf(c)){this.g=b;break}if(5==this.g||6==this.g||2==this.g)if(b=/OS (?:X )?(\d+)[_.]?(\d+)/.exec(this.o))this.H=new jj(parseInt(b[1],10),parseInt(b[2]||"0",10));4==this.g&&(b=/Android (\d+)\.?(\d+)?/.exec(this.o))&&(this.H=new jj(parseInt(b[1],10),parseInt(b[2]||"0",10)));this.i=5==this.type||7==this.type;this.j=4==this.type||3==this.type;this.O=0;this.i&&(d=/\brv:\s*(\d+\.\d+)/.exec(a))&&(this.O=parseFloat(d[1]));this.T=document.compatMode||""};pj=function(){var a=document;this.g=_.nj;this.i=oj(a,["transform","WebkitTransform","MozTransform","msTransform"]);this.j=oj(a,["WebkitUserSelect","MozUserSelect","msUserSelect"])};oj=function(a,b){for(var c=0,d;d=b[c];++c)if("string"==typeof a.documentElement.style[d])return d;return null};qj=function(){this.g=_.nj};rj=function(){};sj=function(a,b){this.setValues(b)};Tj=function(){var a={Animation:tj,BicyclingLayer:_.dh,Circle:_.Zi,ControlPosition:_.ph,Data:Zf,DirectionsRenderer:dg,DirectionsService:ag,DirectionsStatus:uj,DirectionsTravelMode:_.vj,DirectionsUnitSystem:_.wj,DistanceMatrixService:eg,DistanceMatrixStatus:xj,DistanceMatrixElementStatus:yj,ElevationService:fg,ElevationStatus:zj,FusionTablesLayer:Ri,Geocoder:gg,GeocoderLocationType:Aj,GeocoderStatus:Bj,GroundOverlay:_.Vg,ImageMapType:gj,InfoWindow:_.Ug,KmlLayer:Wg,KmlLayerStatus:_.Cj,LatLng:_.I,LatLngBounds:_.Rf,MVCArray:_.ih,MVCObject:_.M,Map:Oi,MapTypeControlStyle:Dj,MapTypeId:_.Ej,MapTypeRegistry:wh,Marker:_.Rg,MarkerImage:Pi,MaxZoomService:Qi,MaxZoomStatus:Fj,NavigationControlStyle:Gj,OverlayView:_.Si,Point:_.N,Polygon:_.aj,Polyline:_.bj,Rectangle:_.cj,SaveWidget:sj,ScaleControlStyle:Hj,Size:_.O,StreetViewCoverageLayer:dj,StreetViewPanorama:rh,StreetViewPreference:_.Kj,StreetViewService:_.ej,StreetViewStatus:Lj,StreetViewSource:_.Mj,StrokePosition:Nj,StyledMapType:_.ij,SymbolPath:Oj,TrafficLayer:eh,TrafficModel:_.Pj,TransitLayer:fh,TransitMode:_.Qj,TransitRoutePreference:_.Rj,TravelMode:_.vj,UnitSystem:_.wj,ZoomControlStyle:Sj,event:_.K};_.Ud(Zf,{Feature:_.jf,Geometry:Qd,GeometryCollection:_.vf,LineString:_.xf,LinearRing:_.yf,MultiLineString:_.Af,MultiPoint:_.Bf,MultiPolygon:_.Ff,Point:_.De,Polygon:_.Df});return a};Wj=function(a){var b=Uj,c=Vj;Pe(Ne.g(),a,b,c)};_.Yj=function(){for(var a=Array(36),b=0,c,d=0;36>d;d++)8==d||13==d||18==d||23==d?a[d]="-":14==d?a[d]="4":(2>=b&&(b=33554432+16777216*Math.random()|0),c=b&15,b>>=4,a[d]=Xj[19==d?c&3|8:c]);return a.join("")};_.Zj=function(){this.Dg=_.Yj()+_.kc()};ak=function(a,b){a=_.t[a];return a&&a.prototype?(b=Object.getOwnPropertyDescriptor(a.prototype,b))&&b.get||null:null};bk=function(a,b){return(a=_.t[a])&&a.prototype&&a.prototype[b]||null};ik=function(a,b){var c=window.google.maps;ck();var d=dk(c),e=_.H=new Od(a);_.mg=Math.random()<_.wc(e,0,1);_.Mi=Ji(_.wc(new Md(e.N[4]),0),_.E(e,16),_.E(e,6),_.E(e,13));_.ek=Ki();_.fk=new _.ih;_.gk=b;for(a=0;a<_.Cc(e,8);++a)_.qh[_.zc(e,8,a)]=!0;a=new _.Kd(e.N[3]);Wj(_.E(a,0));b=Tj();_.Td(b,function(h,k){c[h]=k});c.version=_.E(a,1);setTimeout(function(){_.J("util").then(function(h){_.uc(e,42)||h.i.g();h.j();d&&_.J("stats").then(function(k){k.g.g({ev:"api_alreadyloaded",client:_.E(e,6),key:_.E(e,16)})})})},5E3);var f=_.E(e,11);if(f){a=[];b=_.Cc(e,12);for(var g=0;g<b;g++)a.push(_.J(_.zc(e,12,g)));Promise.all(a).then(function(){hk(f)()})}};hk=function(a){for(var b=a.split("."),c=window,d=window,e=0;e<b.length;e++)if(d=c,c=c[b[e]],!c)throw _.he(a+" is not a function");return function(){c.apply(d)}};ck=function(){function a(c,d){setTimeout(_.ng,0,window,c,void 0===d?"":d)}for(var b in Object.prototype)window.console&&window.console.error("This site adds property `"+b+"` to Object.prototype. Extending Object.prototype breaks JavaScript for..in loops, which are used heavily in Google Maps JavaScript API v3."),a("Ceo");42!==Array.from(new Set([42]))[0]&&(window.console&&window.console.error("This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly."),a("Cea"));(b=window.Prototype)&&a("Cep",b.Version);(b=window.MooTools)&&a("Cem",b.version);[1,2].values()[Symbol.iterator]||a("Cei");"number"!==typeof Date.now()&&(window.console&&window.console.error("This site overrides Date.now() with an implementation that doesn't return the number of milliseconds since January 1, 1970 00:00:00 UTC, which could cause Google Maps JavaScript API v3 to not work correctly."),a("Ced"))};dk=function(a){(a="version"in a)&&window.console&&window.console.error("You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.");return a};_.kk=function(a,b){b=void 0===b?"LocationBias":b;if("string"===typeof a){if("IP_BIAS"!==a)throw _.he(b+" of type string was invalid: "+a);return a}if(!a||!_.be(a))throw _.he("Invalid "+b+": "+a);if(!(a instanceof _.I||a instanceof _.Rf||a instanceof _.Zi))try{a=_.Uf(a)}catch(c){try{a=_.Be(a)}catch(d){try{a=new _.Zi(jk(a))}catch(e){throw _.he("Invalid "+b+": "+JSON.stringify(a))}}}if(a instanceof _.Zi){if(!a||!_.be(a))throw _.he("Passed Circle is not an Object.");a instanceof _.Zi||(a=new _.Zi(a));if(!a.getCenter())throw _.he("Circle is missing center.");if(void 0==a.getRadius())throw _.he("Circle is missing radius.")}return a};_.oa=[];ua="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};sa=ra(this);va("Symbol",function(a){function b(e){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(e||"")+"_"+d++,e)}function c(e,f){this.g=e;ua(this,"description",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.g};var d=0;return b});va("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=sa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ua(d.prototype,a,{configurable:!0,writable:!0,value:function(){return wa(qa(this))}})}return a});var za="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},lk=function(){function a(){function c(){}new c;Reflect.construct(c,[],function(){});return new c instanceof c}if("undefined"!=typeof Reflect&&Reflect.construct){if(a())return Reflect.construct;var b=Reflect.construct;return function(c,d,e){c=b(c,d);e&&Reflect.setPrototypeOf(c,e.prototype);return c}}return function(c,d,e){void 0===e&&(e=c);e=za(e.prototype||Object.prototype);return Function.prototype.apply.call(c,e,d)||e}}(),mk;if("function"==typeof Object.setPrototypeOf)mk=Object.setPrototypeOf;else{var nk;a:{var ok={a:!0},pk={};try{pk.__proto__=ok;nk=pk.a;break a}catch(a){}nk=!1}mk=nk?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}_.Aa=mk;va("Reflect",function(a){return a?a:{}});va("Reflect.construct",function(){return lk});va("Reflect.setPrototypeOf",function(a){return a?a:_.Aa?function(b,c){try{return(0,_.Aa)(b,c),!0}catch(d){return!1}}:null});va("Promise",function(a){function b(g){this.g=0;this.j=void 0;this.i=[];this.T=!1;var h=this.o();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.i=function(g){if(null==this.g){this.g=[];var h=this;this.j(function(){h.H()})}this.g.push(g)};var e=sa.setTimeout;c.prototype.j=function(g){e(g,0)};c.prototype.H=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=g[h];g[h]=null;try{k()}catch(l){this.o(l)}}}this.g=null};c.prototype.o=function(g){this.j(function(){throw g})};b.prototype.o=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.oa),reject:g(this.H)}};b.prototype.oa=function(g){if(g===this)this.H(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.Na(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.ma(g):this.O(g)}};b.prototype.ma=function(g){var h=void 0;try{h=g.then}catch(k){this.H(k);return}"function"==typeof h?this.Oa(h,g):this.O(g)};b.prototype.H=function(g){this.W(2,g)};b.prototype.O=function(g){this.W(1,g)};b.prototype.W=function(g,h){if(0!=this.g)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.g);this.g=g;this.j=h;2===this.g&&this.Fa();this.ha()};b.prototype.Fa=function(){var g=this;e(function(){if(g.ka()){var h=sa.console;"undefined"!==typeof h&&h.error(g.j)}},1)};b.prototype.ka=function(){if(this.T)return!1;var g=sa.CustomEvent,h=sa.Event,k=sa.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=sa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.j;return k(g)};b.prototype.ha=function(){if(null!=this.i){for(var g=0;g<this.i.length;++g)f.i(this.i[g]);this.i=null}};var f=new c;b.prototype.Na=function(g){var h=this.o();g.Hf(h.resolve,h.reject)};b.prototype.Oa=function(g,h){var k=this.o();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(r,u){return"function"==typeof r?function(v){try{l(r(v))}catch(x){m(x)}}:u}var l,m,q=new b(function(r,u){l=r;m=u});this.Hf(k(g,l),k(h,m));return q};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Hf=function(g,h){function k(){switch(l.g){case 1:g(l.j);break;case 2:h(l.j);break;default:throw Error("Unexpected state: "+l.g)}}var l=this;null==this.i?f.i(k):this.i.push(k);this.T=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=_.p(g),m=l.next();!m.done;m=l.next())d(m.value).Hf(h,k)})};b.all=function(g){var h=_.p(g),k=h.next();return k.done?d([]):new b(function(l,m){function q(v){return function(x){r[v]=x;u--;0==u&&l(r)}}var r=[],u=0;do r.push(void 0),u++,d(k.value).Hf(q(r.length-1),m),k=h.next();while(!k.done)})};return b});var qk="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ca(d,e)&&(a[e]=d[e])}return a};va("Object.assign",function(a){return a||qk});va("Math.log10",function(a){return a?a:function(b){return Math.log(b)/Math.LN10}});va("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Da(this,b,"endsWith");b+="";void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});va("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,f=0;f<e;f++){var g=d[f];if(b.call(c,g,f,d)){b=g;break a}}b=void 0}return b}});va("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Da(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});va("String.prototype.repeat",function(a){return a?a:function(b){var c=Da(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});va("Array.prototype.values",function(a){return a?a:function(){return Ea(this,function(b,c){return c})}});va("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});va("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=_.p(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ca(k,g)){var l=new c;ua(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(q){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ca(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ca(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ca(k,g)&&Ca(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ca(k,g)&&Ca(k[g],this.g)?delete k[g][this.g]:!1};return b});va("Map",function(a){function b(){var h={};return h.rd=h.next=h.head=h}function c(h,k){var l=h.g;return wa(function(){if(l){for(;l.head!=h.g;)l=l.rd;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.i[l];if(m&&Ca(h.i,l))for(h=0;h<m.length;h++){var q=m[h];if(k!==k&&q.key!==q.key||k===q.key)return{id:l,list:m,index:h,Vb:q}}return{id:l,list:m,index:-1,Vb:void 0}}function e(h){this.i={};this.g=b();this.size=0;if(h){h=_.p(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(_.p([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(q){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.i[l.id]=[]);l.Vb?l.Vb.value=k:(l.Vb={next:this.g,rd:this.g.rd,head:this.g,key:h,value:k},l.list.push(l.Vb),this.g.rd.next=l.Vb,this.g.rd=l.Vb,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.Vb&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.i[h.id],h.Vb.rd.next=h.Vb.next,h.Vb.next.rd=h.Vb.rd,h.Vb.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.i={};this.g=this.g.rd=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Vb};e.prototype.get=function(h){return(h=d(this,h).Vb)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});va("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});va("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});va("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Da(this,b,"includes").indexOf(b,c||0)}});va("Set",function(a){function b(c){this.g=new Map;if(c){c=_.p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(_.p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});va("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ca(b,d)&&c.push(b[d]);return c}});va("Array.prototype.keys",function(a){return a?a:function(){return Ea(this,function(b){return b})}});va("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=_.p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});va("Array.prototype.entries",function(a){return a?a:function(){return Ea(this,function(b,c){return[b,c]})}});va("Math.hypot",function(a){return a?a:function(b){if(2>arguments.length)return arguments.length?Math.abs(arguments[0]):0;var c,d,e;for(c=e=0;c<arguments.length;c++)e=Math.max(e,Math.abs(arguments[c]));if(1E100<e||1E-100>e){if(!e)return e;for(c=d=0;c<arguments.length;c++){var f=Number(arguments[c])/e;d+=f*f}return Math.sqrt(d)*e}for(c=d=0;c<arguments.length;c++)f=Number(arguments[c]),d+=f*f;return Math.sqrt(d)}});va("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ca(b,d)&&c.push([d,b[d]]);return c}});va("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});va("Math.sign",function(a){return a?a:function(b){b=Number(b);return 0===b||isNaN(b)?b:0<b?1:-1}});va("Math.log1p",function(a){return a?a:function(b){b=Number(b);if(.25>b&&-.25<b){for(var c=b,d=1,e=b,f=0,g=1;f!=e;)c*=b,g*=-1,e=(f=e)+g*c/++d;return e}return Math.log(1+b)}});va("Math.expm1",function(a){return a?a:function(b){b=Number(b);if(.25>b&&-.25<b){for(var c=b,d=1,e=b,f=0;f!=e;)c*=b/++d,e=(f=e)+c;return e}return Math.exp(b)-1}});va("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;0>c&&(c=Math.max(0,e+c));if(null==d||d>e)d=e;d=Number(d);0>d&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});va("Int8Array.prototype.fill",Fa);va("Uint8Array.prototype.fill",Fa);va("Uint8ClampedArray.prototype.fill",Fa);va("Int16Array.prototype.fill",Fa);va("Uint16Array.prototype.fill",Fa);va("Int32Array.prototype.fill",Fa);va("Uint32Array.prototype.fill",Fa);va("Float32Array.prototype.fill",Fa);va("Float64Array.prototype.fill",Fa);va("Array.prototype.flat",function(a){return a?a:function(b){b=void 0===b?1:b;for(var c=[],d=0;d<this.length;d++){var e=this[d];Array.isArray(e)&&0<b?(e=Array.prototype.flat.call(e,b-1),c.push.apply(c,e)):c.push(e)}return c}});va("Object.setPrototypeOf",function(a){return a||_.Aa});_.t=this||self;Ja=/^[\w+/_-]+[=]{0,2}$/;Ha=null;Na="closure_uid_"+(1E9*Math.random()>>>0);Oa=0;_.z(_.Va,Error);_.Va.prototype.name="CustomError";var lb=[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"B","b",,"d","e","f","g","h","i","j","j",,"m","n","o","o","y","h","s",,"u","v","v","x","y","z"];_.rk=null;_.kb.prototype.forEach=function(a,b){for(var c={type:"s",number:0,zf:this.i?this.i[0]:"",xf:!1,rj:!1,value:null,Pg:!1,hn:!1},d=1,e=this.j[0],f=1,g=0,h=this.g.length;g<h;){c.number++;g==e&&(c.number=this.j[f++],e=this.j[f++],g+=Math.ceil(Math.log10(c.number+1)));var k=this.g.charCodeAt(g++);if(43==k||38==k){var l=this.g.substring(g);g=h;if(l=_.rk&&_.rk[l]||null)for(l=l[Symbol.iterator](),c.Pg=!0,c.hn=38==k,k=l.next();!k.done;k=l.next()){var m=k.value;c.number=m.Mc;k=null;if(m=m.Ae||m.Vf)m.g||(m.g=m.i()),k=m.g;"string"===typeof k?mb(c,k.charCodeAt(0),a,b):k&&(c.zf=k.$[0],mb(c,109,a,b))}}else mb(c,k,a,b),"m"==c.type&&d<this.i.length&&(c.zf=this.i[d++])}};var ib={},jb=/(\d+)/g;nb.prototype.getExtension=function(a){var b=this.g&&this.g[a.Mc];return null==b?null:a.Ae.j(b)};var tb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var vb;_.zb.prototype.Rc=!0;_.zb.prototype.ub=_.pa(6);var yb={},xb={};var Cb={};_.Db.prototype.ub=_.pa(5);_.Db.prototype.toString=function(){return this.g.toString()};_.Eb("");_.n=_.Ib.prototype;_.n.Rc=!0;_.n.ub=_.pa(4);_.n.ih=!0;_.n.oe=_.pa(9);_.n.toString=function(){return this.g+""};var Fb={};_.n=_.Qb.prototype;_.n.Rc=!0;_.n.ub=_.pa(3);_.n.ih=!0;_.n.oe=_.pa(8);_.n.toString=function(){return this.g.toString()};_.Pb={};_.sk=new _.Qb("about:invalid#zClosurez",_.Pb);_.Sb.prototype.Rc=!0;_.Sb.prototype.ub=_.pa(2);_.Sb.prototype.toString=function(){return this.g.toString()};_.Rb={};_.tk=new _.Sb("",_.Rb);_.Tb={};_.Ub.prototype.ub=_.pa(1);_.Ub.prototype.toString=function(){return this.g.toString()};_.Vb=new _.Ub("",_.Tb);a:{var uk=_.t.navigator;if(uk){var vk=uk.userAgent;if(vk){_.Lb=vk;break a}}_.Lb=""};_.n=_.dc.prototype;_.n.ih=!0;_.n.oe=_.pa(7);_.n.Rc=!0;_.n.ub=_.pa(0);_.n.toString=function(){return this.g.toString()};var cc={},wk=new _.dc(_.t.trustedTypes&&_.t.trustedTypes.emptyHTML||"",0,cc);var gc=qb(function(){var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);b=a.firstChild.firstChild;a.innerHTML=_.ec(wk);return!b.parentElement});mc[" "]=_.Ka;var Hk,nc,Lk;_.xk=_.Xb("Opera");_.yk=_.Yb();_.zk=_.Xb("Edge");_.Pc=_.Xb("Gecko")&&!(_.Mb()&&!_.Xb("Edge"))&&!(_.Xb("Trident")||_.Xb("MSIE"))&&!_.Xb("Edge");_.Qc=_.Mb()&&!_.Xb("Edge");_.Ak=_.Xb("Macintosh");_.Bk=_.Xb("Windows");_.Ck=_.Xb("Linux")||_.Xb("CrOS");_.Dk=_.Xb("Android");_.Ek=_.lc();_.Fk=_.Xb("iPad");_.Gk=_.Xb("iPod");a:{var Ik="",Jk=function(){var a=_.Lb;if(_.Pc)return/rv:([^\);]+)(\)|;)/.exec(a);if(_.zk)return/Edge\/([\d\.]+)/.exec(a);if(_.yk)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(_.Qc)return/WebKit\/(\S+)/.exec(a);if(_.xk)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Jk&&(Ik=Jk?Jk[1]:"");if(_.yk){var Kk=pc();if(null!=Kk&&Kk>parseFloat(Ik)){Hk=String(Kk);break a}}Hk=Ik}_.qc=Hk;nc={};if(_.t.document&&_.yk){var Mk=pc();Lk=Mk?Mk:parseInt(_.qc,10)||void 0}else Lk=void 0;var Nk=Lk;_.Ok=_.Zb();_.Pk=_.lc()||_.Xb("iPod");_.Qk=_.Xb("iPad");_.Rk=_.bc();_.Sk=$b();_.Tk=_.ac()&&!(_.lc()||_.Xb("iPad")||_.Xb("iPod"));var Uk;Uk=_.Pc||_.Qc&&!_.Tk||_.xk;_.Vk=Uk||"function"==typeof _.t.btoa;_.Wk=Uk||!_.Tk&&!_.yk&&"function"==typeof _.t.atob;_.B.prototype.getExtension=function(a){return this.g.getExtension(a)};_.B.prototype.clear=function(){this.N.length=0};_.B.prototype.equals=function(a){a=a&&a;return!!a&&hb(this.N,a.N)};_.B.prototype.Wj=_.pa(10);new Uint8Array(0);_.Xk="undefined"!=typeof navigator&&/Macintosh/.test(navigator.userAgent);_.Yk="undefined"!=typeof navigator&&!/Opera|WebKit/.test(navigator.userAgent)&&/Gecko/.test(navigator.product);try{(new self.OffscreenCanvas(0,0)).getContext("2d")}catch(a){}_.Zk=!_.yk||9<=Number(Nk);!_.Pc&&!_.yk||_.yk&&9<=Number(Nk)||_.Pc&&_.rc("1.9.1");_.yk&&_.rc("9");_.Lc.prototype.kb=_.pa(11);_.Lc.prototype.appendChild=function(a,b){a.appendChild(b)};_.Lc.prototype.contains=_.Kc;_.Nc.prototype.O=!1;_.Nc.prototype.dispose=function(){this.O||(this.O=!0,this.qc())};_.Nc.prototype.qc=function(){if(this.T)for(;this.T.length;)this.T.shift()()};_.Oc.prototype.stopPropagation=function(){this.i=!0};_.Oc.prototype.preventDefault=function(){this.defaultPrevented=!0};_.Pc&&_.rc("1.9b")||_.yk&&_.rc("8")||_.xk&&_.rc("9.5")||_.Qc&&_.rc("528");var gd=function(){if(!_.t.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{_.t.addEventListener("test",_.Ka,b),_.t.removeEventListener("test",_.Ka,b)}catch(c){}return a}();_.z(_.Sc,_.Oc);var Rc={2:"touch",3:"pen",4:"mouse"};_.Sc.prototype.stopPropagation=function(){_.Sc.Uc.stopPropagation.call(this);this.g.stopPropagation?this.g.stopPropagation():this.g.cancelBubble=!0};_.Sc.prototype.preventDefault=function(){_.Sc.Uc.preventDefault.call(this);var a=this.g;a.preventDefault?a.preventDefault():a.returnValue=!1};var bd="closure_listenable_"+(1E6*Math.random()|0);var Tc=0;Wc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.listeners[f];a||(a=this.listeners[f]=[],this.g++);var g=Yc(a,b,d,e);-1<g?(b=a[g],c||(b.Gf=!1)):(b=new Uc(b,this.src,f,!!d,e),b.Gf=c,a.push(b));return b};Wc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=Yc(e,b,c,d);return-1<b?(Vc(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.listeners[a],this.g--),!0):!1};var ed="closure_lm_"+(1E6*Math.random()|0),md={},id=0,nd="__closure_events_fn_"+(1E9*Math.random()>>>0);_.z(_.od,_.Nc);_.od.prototype[bd]=!0;_.od.prototype.addEventListener=function(a,b,c,d){_.$c(this,a,b,c,d)};_.od.prototype.removeEventListener=function(a,b,c,d){kd(this,a,b,c,d)};_.od.prototype.qc=function(){_.od.Uc.qc.call(this);if(this.o){var a=this.o,b=0,c;for(c in a.listeners){for(var d=a.listeners[c],e=0;e<d.length;e++)++b,Vc(d[e]);delete a.listeners[c];a.g--}}this.oa=null};_.od.prototype.listen=function(a,b,c,d){return this.o.add(String(a),b,!1,c,d)};_.Ba(_.wd,_.od);_.n=_.wd.prototype;_.n.id=function(){return this.Bb};_.n.getType=function(){return this.Ya};_.n.tick=function(a,b){this.i&&xd(this,"tick",void 0,a);b=b||{};a in this.Oa&&(this.ka[a]=!0);var c=b.time||_.Sa();!b.Vl&&!b.fq&&c>this.lb&&(this.lb=c);for(var d=c-this.Na,e=this.H.length;0<e&&this.H[e-1][1]>d;)e--;fb(this.H,e,0,[a,d,b.Vl]);this.Oa[a]=c};_.n.done=function(a,b,c){if(this.i||!this.g[a])xd(this,"done",a,b);else{b&&this.tick(b,c);this.g[a]--;0==this.g[a]&&delete this.g[a];if(a=_.sb(this.g))if(vd){b=a="";for(var d in this.ka)this.ka.hasOwnProperty(d)&&(b=b+a+d,a="|");b&&(this.ma.dup=b);d=new ud("beforedone",this);_.qd(this,d)&&_.qd(vd,d)?((a=zd(this.ma))&&(this.j.cad=a),d.type="done",a=_.qd(vd,d)):a=!1}else a=!0;a&&(this.i=!0,_.cb(sd,this),this.Fa=this.W=null,this.dispose())}};_.n.timers=function(){return this.H};_.n.action=function(a){this.i&&xd(this,"action");var b=[],c=null,d=null,e=null,f=null;Bd(a,function(g){var h;!g.__oi&&g.getAttribute&&(g.__oi=g.getAttribute("oi"));if(h=g.__oi)b.unshift(h),c||(c=g.getAttribute("jsinstance"));e||d&&"1"!=d||(e=g.getAttribute("ved"));f||(f=g.getAttribute("vet"));d||(d=g.getAttribute("jstrack"))});f&&(this.j.vet=f);d&&(this.j.ct=this.Ya,0<b.length&&Ad(this,b.join(".")),c&&(c="*"==c.charAt(0)?parseInt(c.substr(1),10):parseInt(c,10),this.j.cd=c),"1"!=d&&(this.j.ei=d),e&&(this.j.ved=e))};_.n.wc=function(a,b,c,d){yd(this,b,c);var e=this;return function(f){try{var g=a.apply(this,arguments)}finally{e.done(b,d)}return g}};_.n.node=function(){return this.W};_.n.event=function(){return this.Fa};_.n.we=_.pa(12);_.n.target=function(){return this.ha};_.n.value=function(a){var b=this.W;return b?a in b?b[a]:b.getAttribute?b.getAttribute(a):void 0:void 0};var sd=[],vd=new _.od,rd=/[~.,?&-]/g,td=0;_.Ba(ud,_.Oc);_.z(Cd,_.B);_.z(_.Hd,_.B);_.z(_.Id,_.B);_.Id.prototype.getUrl=function(a){return _.zc(this,0,a)};_.Id.prototype.setUrl=function(a,b){_.Ya(this.N,0)[a]=b};_.z(_.Jd,_.B);_.Jd.prototype.getStreetView=function(){return new _.Id(this.N[6])};_.Jd.prototype.setStreetView=function(a){this.N[6]=a.N};_.z(_.Kd,_.B);_.z(Ld,_.B);_.z(Md,_.B);_.z(_.Nd,_.B);_.Nd.prototype.getStatus=function(){return _.vc(this,0)};var Rh;_.z(Od,_.B);_.Ej={ROADMAP:"roadmap",SATELLITE:"satellite",HYBRID:"hybrid",TERRAIN:"terrain"};_.ph={TOP_LEFT:1,TOP_CENTER:2,TOP:2,TOP_RIGHT:3,LEFT_CENTER:4,LEFT_TOP:5,LEFT:5,LEFT_BOTTOM:6,RIGHT_TOP:7,RIGHT:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM:11,BOTTOM_RIGHT:12,CENTER:13};var Dj={DEFAULT:0,HORIZONTAL_BAR:1,DROPDOWN_MENU:2,INSET:3,INSET_LARGE:4};var Gj={DEFAULT:0,SMALL:1,ANDROID:2,ZOOM_PAN:3,Rp:4,al:5};var Hj={DEFAULT:0};var Sj={DEFAULT:0,SMALL:1,LARGE:2,al:3};_.z(ge,Error);var $k,al,cl;_.Gf=_.oe(_.ae,"not a number");$k=_.qe(_.Gf,function(a){if(isNaN(a))throw _.he("NaN is not an accepted value");return a});al=_.qe(_.Gf,function(a){if(isFinite(a))return a;throw _.he(a+" is not an accepted value")});_.bl=_.oe(_.ce,"not a string");cl=_.oe(_.de,"not a boolean");_.dl=_.re(_.Gf);_.el=_.re(_.bl);_.fl=_.re(cl);_.gl=_.qe(_.bl,function(a){if(0<a.length)return a;throw _.he("empty string is not an accepted value")});var ue=_.je({lat:_.Gf,lng:_.Gf},!0),Ae=_.je({lat:al,lng:al},!0);_.I.prototype.toString=function(){return"("+this.lat()+", "+this.lng()+")"};_.I.prototype.toString=_.I.prototype.toString;_.I.prototype.toJSON=function(){return{lat:this.lat(),lng:this.lng()}};_.I.prototype.toJSON=_.I.prototype.toJSON;_.I.prototype.equals=function(a){return a?_.Xd(this.lat(),a.lat())&&_.Xd(this.lng(),a.lng()):!1};_.I.prototype.equals=_.I.prototype.equals;_.I.prototype.equals=_.I.prototype.equals;_.I.prototype.toUrlValue=function(a){a=void 0!==a?a:6;return ye(this.lat(),a)+","+ye(this.lng(),a)};_.I.prototype.toUrlValue=_.I.prototype.toUrlValue;var Wi;_.wf=_.ne(_.Be);Wi=_.ne(_.Ce);_.z(_.De,Qd);_.De.prototype.getType=function(){return"Point"};_.De.prototype.getType=_.De.prototype.getType;_.De.prototype.forEachLatLng=function(a){a(this.g)};_.De.prototype.forEachLatLng=_.De.prototype.forEachLatLng;_.De.prototype.get=function(){return this.g};_.De.prototype.get=_.De.prototype.get;var uf=_.ne(Ee);_.Fe=_.Ka;Ne.prototype.Hd=function(a,b){Qe(this,a).jn=b;this.T.add(a);Ue(this,a)};Ne.i=void 0;Ne.g=function(){return Ne.i?Ne.i:Ne.i=new Ne};_.K={addListener:function(a,b,c){return new gf(a,b,c,0)}};_.Ta("module$contents$MapsEvent_MapsEvent.addListener",_.K.addListener);_.K.xi=function(a,b,c){return _.K.Jg(a,""+b+"_added",c)};_.K.yi=function(a,b,c){return _.K.Jg(a,""+b+"_removed",c)};_.K.Jg=function(a,b,c){return new gf(a,b,c,0,!1)};_.K.hasListeners=function(a,b){if(!a)return!1;b=(a=a.__e3_)&&a[b];return!!b&&!_.sb(b)};_.K.hh=function(a,b){b=(a=a.__e3_)&&a[b];return!!b&&Object.values(b).some(function(c){return c.Rh})};_.K.removeListener=function(a){a&&a.remove()};_.Ta("module$contents$MapsEvent_MapsEvent.removeListener",_.K.removeListener);_.K.clearListeners=function(a,b){_.Td(cf(a,b),function(c,d){d&&d.remove()})};_.Ta("module$contents$MapsEvent_MapsEvent.clearListeners",_.K.clearListeners);_.K.clearInstanceListeners=function(a){_.Td(cf(a),function(b,c){c&&c.remove()})};_.Ta("module$contents$MapsEvent_MapsEvent.clearInstanceListeners",_.K.clearInstanceListeners);_.K.Oj=function(a){if("__e3_"in a)throw Error("MapsEvent.setUpNonEnumerableEventListening() was invoked after an event was registered.");Object.defineProperty(a,"__e3_",{value:{}})};_.K.trigger=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];if(_.K.hasListeners(a,b)){e=cf(a,b);for(var f=_.p(Object.keys(e)),g=f.next();!g.done;g=f.next())(g=e[g.value])&&g.sj(d)}};_.Ta("module$contents$MapsEvent_MapsEvent.trigger",_.K.trigger);_.K.addDomListener=function(a,b,c,d){var e=d?4:1;if(!a.addEventListener&&a.attachEvent)return c=new gf(a,b,c,2),a.attachEvent("on"+b,hf(c)),c;a.addEventListener&&a.addEventListener(b,c,d);return new gf(a,b,c,e)};_.Ta("module$contents$MapsEvent_MapsEvent.addDomListener",_.K.addDomListener);_.K.addDomListenerOnce=function(a,b,c,d){var e=_.K.addDomListener(a,b,function(){e.remove();return c.apply(this,arguments)},d);return e};_.Ta("module$contents$MapsEvent_MapsEvent.addDomListenerOnce",_.K.addDomListenerOnce);_.K.Xa=function(a,b,c,d){return _.K.addDomListener(a,b,df(c,d))};_.K.bind=function(a,b,c,d){return _.K.addListener(a,b,(0,_.y)(d,c))};_.K.addListenerOnce=function(a,b,c){var d=_.K.addListener(a,b,function(){d.remove();return c.apply(this,arguments)});return d};_.Ta("module$contents$MapsEvent_MapsEvent.addListenerOnce",_.K.addListenerOnce);_.K.Wa=function(a,b,c){b=_.K.addListener(a,b,c);c.call(a);return b};_.K.forward=function(a,b,c){return _.K.addListener(a,b,ef(b,c))};_.K.Ad=function(a,b,c,d){_.K.addDomListener(a,b,ef(b,c,!d))};var ff=0;gf.prototype.remove=function(){if(this.i){if(this.i.removeEventListener)switch(this.H){case 1:this.i.removeEventListener(this.g,this.j,!1);break;case 4:this.i.removeEventListener(this.g,this.j,!0)}delete bf(this.i,this.g)[this.o];this.Rh&&_.K.trigger(this.i,""+this.g+"_removed");this.j=this.i=null}};gf.prototype.sj=function(a){return this.j.apply(this.i,a)};_.jf.prototype.getId=function(){return this.j};_.jf.prototype.getId=_.jf.prototype.getId;_.jf.prototype.getGeometry=function(){return this.g};_.jf.prototype.getGeometry=_.jf.prototype.getGeometry;_.jf.prototype.setGeometry=function(a){var b=this.g;try{this.g=a?Ee(a):null}catch(c){_.ie(c);return}_.K.trigger(this,"setgeometry",{feature:this,newGeometry:this.g,oldGeometry:b})};_.jf.prototype.setGeometry=_.jf.prototype.setGeometry;_.jf.prototype.getProperty=function(a){return ee(this.i,a)};_.jf.prototype.getProperty=_.jf.prototype.getProperty;_.jf.prototype.setProperty=function(a,b){if(void 0===b)this.removeProperty(a);else{var c=this.getProperty(a);this.i[a]=b;_.K.trigger(this,"setproperty",{feature:this,name:a,newValue:b,oldValue:c})}};_.jf.prototype.setProperty=_.jf.prototype.setProperty;_.jf.prototype.removeProperty=function(a){var b=this.getProperty(a);delete this.i[a];_.K.trigger(this,"removeproperty",{feature:this,name:a,oldValue:b})};_.jf.prototype.removeProperty=_.jf.prototype.removeProperty;_.jf.prototype.forEachProperty=function(a){for(var b in this.i)a(this.getProperty(b),b)};_.jf.prototype.forEachProperty=_.jf.prototype.forEachProperty;_.jf.prototype.toGeoJson=function(a){var b=this;_.J("data").then(function(c){c.em(b,a)})};_.jf.prototype.toGeoJson=_.jf.prototype.toGeoJson;var Oj={CIRCLE:0,FORWARD_CLOSED_ARROW:1,FORWARD_OPEN_ARROW:2,BACKWARD_CLOSED_ARROW:3,BACKWARD_OPEN_ARROW:4};_.M.prototype.get=function(a){var b=pf(this);a+="";b=ee(b,a);if(void 0!==b){if(b){a=b.Ec;b=b.De;var c="get"+_.of(a);return b[c]?b[c]():b.get(a)}return this[a]}};_.M.prototype.get=_.M.prototype.get;_.M.prototype.set=function(a,b){var c=pf(this);a+="";var d=ee(c,a);if(d)if(a=d.Ec,d=d.De,c="set"+_.of(a),d[c])d[c](b);else d.set(a,b);else this[a]=b,c[a]=null,mf(this,a)};_.M.prototype.set=_.M.prototype.set;_.M.prototype.notify=function(a){var b=pf(this);a+="";(b=ee(b,a))?b.De.notify(b.Ec):mf(this,a)};_.M.prototype.notify=_.M.prototype.notify;_.M.prototype.setValues=function(a){for(var b in a){var c=a[b],d="set"+_.of(b);if(this[d])this[d](c);else this.set(b,c)}};_.M.prototype.setValues=_.M.prototype.setValues;_.M.prototype.setOptions=_.M.prototype.setValues;_.M.prototype.changed=function(){};var nf={};_.M.prototype.bindTo=function(a,b,c,d){a+="";c=(c||a)+"";this.unbind(a);var e={De:this,Ec:a},f={De:b,Ec:c,Gi:e};pf(this)[a]=f;lf(b,c)[_.kf(e)]=e;d||mf(this,a)};_.M.prototype.bindTo=_.M.prototype.bindTo;_.M.prototype.unbind=function(a){var b=pf(this),c=b[a];c&&(c.Gi&&delete lf(c.De,c.Ec)[_.kf(c.Gi)],this[a]=this.get(a),b[a]=null)};_.M.prototype.unbind=_.M.prototype.unbind;_.M.prototype.unbindAll=function(){var a=(0,_.y)(this.unbind,this),b=pf(this),c;for(c in b)a(c)};_.M.prototype.unbindAll=_.M.prototype.unbindAll;_.M.prototype.addListener=function(a,b){return _.K.addListener(this,a,b)};_.M.prototype.addListener=_.M.prototype.addListener;_.z(_.qf,_.M);var hl={Pp:"Point",Np:"LineString",POLYGON:"Polygon"};_.n=rf.prototype;_.n.contains=function(a){return this.g.hasOwnProperty(_.kf(a))};_.n.getFeatureById=function(a){return ee(this.i,a)};_.n.add=function(a){a=a||{};a=a instanceof _.jf?a:new _.jf(a);if(!this.contains(a)){var b=a.getId();if(b){var c=this.getFeatureById(b);c&&this.remove(c)}c=_.kf(a);this.g[c]=a;b&&(this.i[b]=a);var d=_.K.forward(a,"setgeometry",this),e=_.K.forward(a,"setproperty",this),f=_.K.forward(a,"removeproperty",this);this.j[c]=function(){_.K.removeListener(d);_.K.removeListener(e);_.K.removeListener(f)};_.K.trigger(this,"addfeature",{feature:a})}return a};_.n.remove=function(a){var b=_.kf(a),c=a.getId();if(this.g[b]){delete this.g[b];c&&delete this.i[c];if(c=this.j[b])delete this.j[b],c();_.K.trigger(this,"removefeature",{feature:a})}};_.n.forEach=function(a){for(var b in this.g)a(this.g[b])};_.Yf="click dblclick mousedown mousemove mouseout mouseover mouseup rightclick contextmenu".split(" ");sf.prototype.get=function(a){return this.g[a]};sf.prototype.set=function(a,b){var c=this.g;c[a]||(c[a]={});_.Ud(c[a],b);_.K.trigger(this,"changed",a)};sf.prototype.reset=function(a){delete this.g[a];_.K.trigger(this,"changed",a)};sf.prototype.forEach=function(a){_.Td(this.g,a)};_.z(tf,_.M);tf.prototype.overrideStyle=function(a,b){this.g.set(_.kf(a),b)};tf.prototype.revertStyle=function(a){a?this.g.reset(_.kf(a)):this.g.forEach((0,_.y)(this.g.reset,this.g))};_.z(_.vf,Qd);_.vf.prototype.getType=function(){return"GeometryCollection"};_.vf.prototype.getType=_.vf.prototype.getType;_.vf.prototype.getLength=function(){return this.g.length};_.vf.prototype.getLength=_.vf.prototype.getLength;_.vf.prototype.getAt=function(a){return this.g[a]};_.vf.prototype.getAt=_.vf.prototype.getAt;_.vf.prototype.getArray=function(){return this.g.slice()};_.vf.prototype.getArray=_.vf.prototype.getArray;_.vf.prototype.forEachLatLng=function(a){this.g.forEach(function(b){b.forEachLatLng(a)})};_.vf.prototype.forEachLatLng=_.vf.prototype.forEachLatLng;_.z(_.xf,Qd);_.xf.prototype.getType=function(){return"LineString"};_.xf.prototype.getType=_.xf.prototype.getType;_.xf.prototype.getLength=function(){return this.g.length};_.xf.prototype.getLength=_.xf.prototype.getLength;_.xf.prototype.getAt=function(a){return this.g[a]};_.xf.prototype.getAt=_.xf.prototype.getAt;_.xf.prototype.getArray=function(){return this.g.slice()};_.xf.prototype.getArray=_.xf.prototype.getArray;_.xf.prototype.forEachLatLng=function(a){this.g.forEach(a)};_.xf.prototype.forEachLatLng=_.xf.prototype.forEachLatLng;var zf=_.ne(_.le(_.xf,"google.maps.Data.LineString",!0));_.z(_.yf,Qd);_.yf.prototype.getType=function(){return"LinearRing"};_.yf.prototype.getType=_.yf.prototype.getType;_.yf.prototype.getLength=function(){return this.g.length};_.yf.prototype.getLength=_.yf.prototype.getLength;_.yf.prototype.getAt=function(a){return this.g[a]};_.yf.prototype.getAt=_.yf.prototype.getAt;_.yf.prototype.getArray=function(){return this.g.slice()};_.yf.prototype.getArray=_.yf.prototype.getArray;_.yf.prototype.forEachLatLng=function(a){this.g.forEach(a)};_.yf.prototype.forEachLatLng=_.yf.prototype.forEachLatLng;var Cf=_.ne(_.le(_.yf,"google.maps.Data.LinearRing",!0));_.z(_.Af,Qd);_.Af.prototype.getType=function(){return"MultiLineString"};_.Af.prototype.getType=_.Af.prototype.getType;_.Af.prototype.getLength=function(){return this.g.length};_.Af.prototype.getLength=_.Af.prototype.getLength;_.Af.prototype.getAt=function(a){return this.g[a]};_.Af.prototype.getAt=_.Af.prototype.getAt;_.Af.prototype.getArray=function(){return this.g.slice()};_.Af.prototype.getArray=_.Af.prototype.getArray;_.Af.prototype.forEachLatLng=function(a){this.g.forEach(function(b){b.forEachLatLng(a)})};_.Af.prototype.forEachLatLng=_.Af.prototype.forEachLatLng;_.z(_.Bf,Qd);_.Bf.prototype.getType=function(){return"MultiPoint"};_.Bf.prototype.getType=_.Bf.prototype.getType;_.Bf.prototype.getLength=function(){return this.g.length};_.Bf.prototype.getLength=_.Bf.prototype.getLength;_.Bf.prototype.getAt=function(a){return this.g[a]};_.Bf.prototype.getAt=_.Bf.prototype.getAt;_.Bf.prototype.getArray=function(){return this.g.slice()};_.Bf.prototype.getArray=_.Bf.prototype.getArray;_.Bf.prototype.forEachLatLng=function(a){this.g.forEach(a)};_.Bf.prototype.forEachLatLng=_.Bf.prototype.forEachLatLng;_.z(_.Df,Qd);_.Df.prototype.getType=function(){return"Polygon"};_.Df.prototype.getType=_.Df.prototype.getType;_.Df.prototype.getLength=function(){return this.g.length};_.Df.prototype.getLength=_.Df.prototype.getLength;_.Df.prototype.getAt=function(a){return this.g[a]};_.Df.prototype.getAt=_.Df.prototype.getAt;_.Df.prototype.getArray=function(){return this.g.slice()};_.Df.prototype.getArray=_.Df.prototype.getArray;_.Df.prototype.forEachLatLng=function(a){this.g.forEach(function(b){b.forEachLatLng(a)})};_.Df.prototype.forEachLatLng=_.Df.prototype.forEachLatLng;var Ef=_.ne(_.le(_.Df,"google.maps.Data.Polygon",!0));_.z(_.Ff,Qd);_.Ff.prototype.getType=function(){return"MultiPolygon"};_.Ff.prototype.getType=_.Ff.prototype.getType;_.Ff.prototype.getLength=function(){return this.g.length};_.Ff.prototype.getLength=_.Ff.prototype.getLength;_.Ff.prototype.getAt=function(a){return this.g[a]};_.Ff.prototype.getAt=_.Ff.prototype.getAt;_.Ff.prototype.getArray=function(){return this.g.slice()};_.Ff.prototype.getArray=_.Ff.prototype.getArray;_.Ff.prototype.forEachLatLng=function(a){this.g.forEach(function(b){b.forEachLatLng(a)})};_.Ff.prototype.forEachLatLng=_.Ff.prototype.forEachLatLng;_.n=Kf.prototype;_.n.isEmpty=function(){return 360==this.g-this.i};_.n.intersects=function(a){var b=this.g,c=this.i;return this.isEmpty()||a.isEmpty()?!1:_.Lf(this)?_.Lf(a)||a.g<=this.i||a.i>=b:_.Lf(a)?a.g<=c||a.i>=b:a.g<=c&&a.i>=b};_.n.contains=function(a){-180==a&&(a=180);var b=this.g,c=this.i;return _.Lf(this)?(a>=b||a<=c)&&!this.isEmpty():a>=b&&a<=c};_.n.extend=function(a){this.contains(a)||(this.isEmpty()?this.g=this.i=a:_.Of(a,this.g)<_.Of(this.i,a)?this.g=a:this.i=a)};_.n.equals=function(a){return 1E-9>=Math.abs(a.g-this.g)%360+Math.abs(_.Pf(a)-_.Pf(this))};_.n.center=function(){var a=(this.g+this.i)/2;_.Lf(this)&&(a=_.Wd(a+180,-180,180));return a};_.n=Qf.prototype;_.n.isEmpty=function(){return this.g>this.i};_.n.intersects=function(a){var b=this.g,c=this.i;return b<=a.g?a.g<=c&&a.g<=a.i:b<=a.i&&b<=c};_.n.contains=function(a){return a>=this.g&&a<=this.i};_.n.extend=function(a){this.isEmpty()?this.i=this.g=a:a<this.g?this.g=a:a>this.i&&(this.i=a)};_.n.equals=function(a){return this.isEmpty()?a.isEmpty():1E-9>=Math.abs(a.g-this.g)+Math.abs(this.i-a.i)};_.n.center=function(){return(this.i+this.g)/2};_.Rf.prototype.getCenter=function(){return new _.I(this.Ra.center(),this.La.center())};_.Rf.prototype.getCenter=_.Rf.prototype.getCenter;_.Rf.prototype.toString=function(){return"("+this.getSouthWest()+", "+this.getNorthEast()+")"};_.Rf.prototype.toString=_.Rf.prototype.toString;_.Rf.prototype.toJSON=function(){return{south:this.Ra.g,west:this.La.g,north:this.Ra.i,east:this.La.i}};_.Rf.prototype.toJSON=_.Rf.prototype.toJSON;_.Rf.prototype.toUrlValue=function(a){var b=this.getSouthWest(),c=this.getNorthEast();return[b.toUrlValue(a),c.toUrlValue(a)].join()};_.Rf.prototype.toUrlValue=_.Rf.prototype.toUrlValue;_.Rf.prototype.equals=function(a){if(!a)return!1;a=_.Uf(a);return this.Ra.equals(a.Ra)&&this.La.equals(a.La)};_.Rf.prototype.equals=_.Rf.prototype.equals;_.Rf.prototype.equals=_.Rf.prototype.equals;_.Rf.prototype.contains=function(a){a=_.Be(a);return this.Ra.contains(a.lat())&&this.La.contains(a.lng())};_.Rf.prototype.contains=_.Rf.prototype.contains;_.Rf.prototype.intersects=function(a){a=_.Uf(a);return this.Ra.intersects(a.Ra)&&this.La.intersects(a.La)};_.Rf.prototype.intersects=_.Rf.prototype.intersects;_.Rf.prototype.extend=function(a){a=_.Be(a);this.Ra.extend(a.lat());this.La.extend(a.lng());return this};_.Rf.prototype.extend=_.Rf.prototype.extend;_.Rf.prototype.union=function(a){a=_.Uf(a);if(!a||a.isEmpty())return this;this.Ra.extend(a.getSouthWest().lat());this.Ra.extend(a.getNorthEast().lat());a=a.La;var b=_.Of(this.La.g,a.i),c=_.Of(a.g,this.La.i);if(_.Nf(this.La,a))return this;if(_.Nf(a,this.La))return this.La=new Kf(a.g,a.i),this;this.La.intersects(a)?this.La=b>=c?new Kf(this.La.g,a.i):new Kf(a.g,this.La.i):this.La=b<=c?new Kf(this.La.g,a.i):new Kf(a.g,this.La.i);return this};_.Rf.prototype.union=_.Rf.prototype.union;_.Rf.prototype.getSouthWest=function(){return new _.I(this.Ra.g,this.La.g,!0)};_.Rf.prototype.getSouthWest=_.Rf.prototype.getSouthWest;_.Rf.prototype.getNorthEast=function(){return new _.I(this.Ra.i,this.La.i,!0)};_.Rf.prototype.getNorthEast=_.Rf.prototype.getNorthEast;_.Rf.prototype.toSpan=function(){var a=this.Ra;a=a.isEmpty()?0:a.i-a.g;return new _.I(a,_.Pf(this.La),!0)};_.Rf.prototype.toSpan=_.Rf.prototype.toSpan;_.Rf.prototype.isEmpty=function(){return this.Ra.isEmpty()||this.La.isEmpty()};_.Rf.prototype.isEmpty=_.Rf.prototype.isEmpty;var Tf=_.je({south:_.Gf,west:_.Gf,north:_.Gf,east:_.Gf},!1);_.il=_.re(_.le(_.qf,"Map"));_.z(Zf,_.M);Zf.prototype.contains=function(a){return this.g.contains(a)};Zf.prototype.contains=Zf.prototype.contains;Zf.prototype.getFeatureById=function(a){return this.g.getFeatureById(a)};Zf.prototype.getFeatureById=Zf.prototype.getFeatureById;Zf.prototype.add=function(a){return this.g.add(a)};Zf.prototype.add=Zf.prototype.add;Zf.prototype.remove=function(a){this.g.remove(a)};Zf.prototype.remove=Zf.prototype.remove;Zf.prototype.forEach=function(a){this.g.forEach(a)};Zf.prototype.forEach=Zf.prototype.forEach;Zf.prototype.addGeoJson=function(a,b){return _.Jf(this.g,a,b)};Zf.prototype.addGeoJson=Zf.prototype.addGeoJson;Zf.prototype.loadGeoJson=function(a,b,c){var d=this.g;_.J("data").then(function(e){e.fm(d,a,b,c)})};Zf.prototype.loadGeoJson=Zf.prototype.loadGeoJson;Zf.prototype.toGeoJson=function(a){var b=this.g;_.J("data").then(function(c){c.dm(b,a)})};Zf.prototype.toGeoJson=Zf.prototype.toGeoJson;Zf.prototype.overrideStyle=function(a,b){this.i.overrideStyle(a,b)};Zf.prototype.overrideStyle=Zf.prototype.overrideStyle;Zf.prototype.revertStyle=function(a){this.i.revertStyle(a)};Zf.prototype.revertStyle=Zf.prototype.revertStyle;Zf.prototype.controls_changed=function(){this.get("controls")&&$f(this)};Zf.prototype.drawingMode_changed=function(){this.get("drawingMode")&&$f(this)};_.Xf(Zf.prototype,{map:_.il,style:_.pb,controls:_.re(_.ne(_.me(hl))),controlPosition:_.re(_.me(_.ph)),drawingMode:_.re(_.me(hl))});_.wj={METRIC:0,IMPERIAL:1};_.vj={DRIVING:"DRIVING",WALKING:"WALKING",BICYCLING:"BICYCLING",TRANSIT:"TRANSIT",TWO_WHEELER:"TWO_WHEELER"};ag.prototype.route=function(a,b){return _.J("directions").then(function(c){return c.route(a,b,!0)})};ag.prototype.route=ag.prototype.route;var uj={OK:_.ia,UNKNOWN_ERROR:_.ma,OVER_QUERY_LIMIT:_.ja,REQUEST_DENIED:_.ka,INVALID_REQUEST:_.ba,ZERO_RESULTS:_.na,MAX_WAYPOINTS_EXCEEDED:_.fa,NOT_FOUND:_.ha};_.Pj={BEST_GUESS:"bestguess",OPTIMISTIC:"optimistic",PESSIMISTIC:"pessimistic"};_.Qj={BUS:"BUS",RAIL:"RAIL",SUBWAY:"SUBWAY",TRAIN:"TRAIN",TRAM:"TRAM"};_.Rj={LESS_WALKING:"LESS_WALKING",FEWER_TRANSFERS:"FEWER_TRANSFERS"};var jl=_.je({routes:_.ne(_.oe(_.be))},!0);_.bg=[];_.z(dg,_.M);dg.prototype.changed=function(a){var b=this;"map"!=a&&"panel"!=a||_.J("directions").then(function(c){c.Km(b,a)});"panel"==a&&_.cg(this.getPanel())};_.Xf(dg.prototype,{directions:jl,map:_.il,panel:_.re(_.oe(ke)),routeIndex:_.dl});var yj={OK:_.ia,NOT_FOUND:_.ha,ZERO_RESULTS:_.na};var xj={OK:_.ia,INVALID_REQUEST:_.ba,OVER_QUERY_LIMIT:_.ja,REQUEST_DENIED:_.ka,UNKNOWN_ERROR:_.ma,MAX_ELEMENTS_EXCEEDED:_.ea,MAX_DIMENSIONS_EXCEEDED:_.da};eg.prototype.getDistanceMatrix=function(a,b){return _.J("distance_matrix").then(function(c){return c.getDistanceMatrix(a,b)})};eg.prototype.getDistanceMatrix=eg.prototype.getDistanceMatrix;fg.prototype.getElevationAlongPath=function(a,b){return _.J("elevation").then(function(c){return c.getElevationAlongPath(a,b)})};fg.prototype.getElevationAlongPath=fg.prototype.getElevationAlongPath;fg.prototype.getElevationForLocations=function(a,b){return _.J("elevation").then(function(c){return c.getElevationForLocations(a,b)})};fg.prototype.getElevationForLocations=fg.prototype.getElevationForLocations;var zj={OK:_.ia,UNKNOWN_ERROR:_.ma,OVER_QUERY_LIMIT:_.ja,REQUEST_DENIED:_.ka,INVALID_REQUEST:_.ba,Kp:"DATA_NOT_AVAILABLE"};var Aj={ROOFTOP:"ROOFTOP",RANGE_INTERPOLATED:"RANGE_INTERPOLATED",GEOMETRIC_CENTER:"GEOMETRIC_CENTER",APPROXIMATE:"APPROXIMATE"};var Bj={OK:_.ia,UNKNOWN_ERROR:_.ma,OVER_QUERY_LIMIT:_.ja,REQUEST_DENIED:_.ka,INVALID_REQUEST:_.ba,ZERO_RESULTS:_.na,ERROR:_.aa};gg.prototype.geocode=function(a,b){return _.J("geocoder").then(function(c){return c.geocode(a,b)})};gg.prototype.geocode=gg.prototype.geocode;_.kl=new _.N(0,0);_.N.prototype.toString=function(){return"("+this.x+", "+this.y+")"};_.N.prototype.toString=_.N.prototype.toString;_.N.prototype.equals=function(a){return a?a.x==this.x&&a.y==this.y:!1};_.N.prototype.equals=_.N.prototype.equals;_.N.prototype.equals=_.N.prototype.equals;_.N.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y)};_.N.prototype.Yf=_.pa(13);_.ll=new _.O(0,0);_.O.prototype.toString=function(){return"("+this.width+", "+this.height+")"};_.O.prototype.toString=_.O.prototype.toString;_.O.prototype.equals=function(a){return a?a.width==this.width&&a.height==this.height:!1};_.O.prototype.equals=_.O.prototype.equals;_.O.prototype.equals=_.O.prototype.equals;jg.prototype.addListener=function(a,b){return _.K.addListener(this,a,b)};jg.prototype.trigger=function(a,b){_.K.trigger(this,a,b)};jg.prototype.addListener=jg.prototype.addListener;_.Ba(kg,jg);_.ml=new Set;_.ml.add("gm-style-iw-a");_.Ba(_.og,kg);_.og.prototype.getAnchor=function(){return new _.N(0,0)};_.og.prototype.Ua=_.pa(16);var nl=_.je({source:_.bl,webUrl:_.el,iosDeepLinkId:_.el});var ol=_.qe(_.je({placeId:_.el,query:_.el,location:_.Be}),function(a){if(a.placeId&&a.query)throw _.he("cannot set both placeId and query");if(!a.placeId&&!a.query)throw _.he("must set one of placeId or query");return a});_.z(pg,_.M);_.Xf(pg.prototype,{position:_.re(_.Be),title:_.el,icon:_.re(_.pe([_.bl,_.le(_.og,"PinView"),{Yh:se("url"),then:_.je({url:_.bl,scaledSize:_.re(ig),size:_.re(ig),origin:_.re(hg),anchor:_.re(hg),labelOrigin:_.re(hg),path:_.oe(function(a){return null==a})},!0)},{Yh:se("path"),then:_.je({path:_.pe([_.bl,_.me(Oj)]),anchor:_.re(hg),labelOrigin:_.re(hg),fillColor:_.el,fillOpacity:_.dl,rotation:_.dl,scale:_.dl,strokeColor:_.el,strokeOpacity:_.dl,strokeWeight:_.dl,url:_.oe(function(a){return null==a})},!0)}])),label:_.re(_.pe([_.bl,{Yh:se("text"),then:_.je({text:_.bl,fontSize:_.el,fontWeight:_.el,fontFamily:_.el,className:_.el},!0)}])),shadow:_.pb,shape:_.pb,cursor:_.el,clickable:_.fl,animation:_.pb,draggable:_.fl,visible:_.fl,flat:_.pb,zIndex:_.dl,opacity:_.dl,place:_.re(ol),attribution:_.re(nl)});var Cg;sg.prototype.get=function(){if(0<this.i){this.i--;var a=this.g;this.g=a.next;a.next=null}else a=this.o();return a};ug.prototype.add=function(a,b){var c=Dg.get();c.set(a,b);this.i?this.i.next=c:this.g=c;this.i=c};ug.prototype.remove=function(){var a=null;this.g&&(a=this.g,this.g=this.g.next,this.g||(this.i=null),a.next=null);return a};var Dg=new sg(function(){return new vg},function(a){return a.reset()});vg.prototype.set=function(a,b){this.ye=a;this.scope=b;this.next=null};vg.prototype.reset=function(){this.next=this.scope=this.ye=null};var wg,yg=!1,zg=new ug;_.Eg.prototype.addListener=function(a,b){Gg(this,a,b,!1)};_.Eg.prototype.addListenerOnce=function(a,b){Gg(this,a,b,!0)};_.Eg.prototype.removeListener=function(a,b){this.Ea.length&&((a=this.Ea.find(Fg(a,b)))&&this.Ea.splice(this.Ea.indexOf(a),1),this.Ea.length||this.g())};var Hg=null;_.n=_.Lg.prototype;_.n.Ie=function(){};_.n.Ge=function(){};_.n.addListener=function(a,b){return this.Ea.addListener(a,b)};_.n.addListenerOnce=function(a,b){return this.Ea.addListenerOnce(a,b)};_.n.removeListener=function(a,b){return this.Ea.removeListener(a,b)};_.n.get=function(){};_.n.Wa=function(a,b){this.Ea.addListener(a,b);a.call(b,this.get())};_.n.notify=function(a){var b=this;_.Ig(this.Ea,function(c){c(b.get())},this,a)};_.Ba(_.Mg,_.Lg);_.Mg.prototype.set=function(a){this.H&&this.get()===a||(this.hi(a),this.notify())};_.Ba(Ng,_.Mg);Ng.prototype.get=function(){return this.g};Ng.prototype.hi=function(a){this.g=a};_.z(_.Qg,_.M);var pl=_.re(_.le(_.Qg,"StreetViewPanorama"));_.z(_.Rg,pg);_.Rg.prototype.map_changed=function(){var a=this.get("map");a=a&&a.__gm.Ce;this.__gm.set!==a&&(this.__gm.set&&this.__gm.set.remove(this),(this.__gm.set=a)&&_.kh(a,this))};_.Rg.MAX_ZINDEX=1E6;_.Xf(_.Rg.prototype,{map:_.pe([_.il,pl])});_.z(Sg,_.M);_.n=Sg.prototype;_.n.internalAnchor_changed=function(){var a=this.get("internalAnchor");Tg(this,"attribution",a);Tg(this,"place",a);Tg(this,"internalAnchorMap",a,"map",!0);this.internalAnchorMap_changed(!0);Tg(this,"internalAnchorPoint",a,"anchorPoint");a instanceof _.Rg?Tg(this,"internalAnchorPosition",a,"internalPosition"):Tg(this,"internalAnchorPosition",a,"position")};_.n.internalAnchorPoint_changed=Sg.prototype.internalPixelOffset_changed=function(){var a=this.get("internalAnchorPoint")||_.kl,b=this.get("internalPixelOffset")||_.ll;this.set("pixelOffset",new _.O(b.width+Math.round(a.x),b.height+Math.round(a.y)))};_.n.internalAnchorPosition_changed=function(){var a=this.get("internalAnchorPosition");a&&this.set("position",a)};_.n.internalAnchorMap_changed=function(a){a=void 0===a?!1:a;this.get("internalAnchor")&&(a||this.get("internalAnchorMap")!==this.g.get("map"))&&this.g.set("map",this.get("internalAnchorMap"))};_.n.In=function(){var a=this.get("internalAnchor");!this.g.get("map")&&a&&a.get("map")&&this.set("internalAnchor",null)};_.n.internalContent_changed=function(){var a=this.set;var b=this.get("internalContent");if(b)if("string"===typeof b){var c=document.createElement("div");b=_.Ge(b);_.hc(c,b)}else b.nodeType==Node.TEXT_NODE?(c=document.createElement("div"),c.appendChild(b)):c=b;else c=null;a.call(this,"content",c)};_.n.trigger=function(a){_.K.trigger(this.g,a)};_.n.close=function(){this.g.set("map",null)};_.z(_.Ug,_.M);_.Xf(_.Ug.prototype,{content:_.pe([_.el,_.oe(ke)]),position:_.re(_.Be),size:_.re(ig),map:_.pe([_.il,pl]),anchor:_.re(_.le(_.M,"MVCObject")),zIndex:_.dl});_.Ug.prototype.open=function(a,b){this.set("anchor",b);b?!this.get("map")&&a&&this.set("map",a):this.set("map",a)};_.Ug.prototype.open=_.Ug.prototype.open;_.Ug.prototype.close=function(){this.set("map",null)};_.Ug.prototype.close=_.Ug.prototype.close;_.z(_.Vg,_.M);_.Vg.prototype.map_changed=function(){var a=this;_.J("kml").then(function(b){b.g(a)})};_.Xf(_.Vg.prototype,{map:_.il,url:null,bounds:null,opacity:_.dl});_.z(Wg,_.M);Wg.prototype.O=function(){var a=this;_.J("kml").then(function(b){b.i(a)})};Wg.prototype.url_changed=Wg.prototype.O;Wg.prototype.map_changed=Wg.prototype.O;Wg.prototype.zIndex_changed=Wg.prototype.O;_.Xf(Wg.prototype,{map:_.il,defaultViewport:null,metadata:null,status:null,url:_.el,screenOverlays:_.fl,zIndex:_.dl});_.Cj={UNKNOWN:"UNKNOWN",OK:_.ia,INVALID_REQUEST:_.ba,DOCUMENT_NOT_FOUND:"DOCUMENT_NOT_FOUND",FETCH_ERROR:"FETCH_ERROR",INVALID_DOCUMENT:"INVALID_DOCUMENT",DOCUMENT_TOO_LARGE:"DOCUMENT_TOO_LARGE",LIMITS_EXCEEDED:"LIMITS_EXECEEDED",TIMED_OUT:"TIMED_OUT"};_.Xg.prototype.fromLatLngToPoint=function(a,b){b=void 0===b?new _.N(0,0):b;var c=this.o;b.x=c.x+a.lng()*this.g;a=_.Vd(Math.sin(_.Ec(a.lat())),-(1-1E-15),1-1E-15);b.y=c.y+.5*Math.log((1+a)/(1-a))*-this.j;return b};_.Xg.prototype.fromPointToLatLng=function(a,b){var c=this.o;return new _.I(_.Fc(2*Math.atan(Math.exp((a.y-c.y)/-this.j))-Math.PI/2),(a.x-c.x)/this.g,void 0===b?!1:b)};_.ql=Math.sqrt(2);_.Yg.prototype.equals=function(a){return a?this.g==a.g&&this.i==a.i:!1};_.rl=new _.$g({ae:new _.Zg(256),be:void 0});_.sl=new _.Xg;ah.prototype.equals=function(a){return a?this.m11==a.m11&&this.m12==a.m12&&this.m21==a.m21&&this.m22==a.m22&&this.g===a.g:!1};_.z(_.dh,_.M);_.Xf(_.dh.prototype,{map:_.il});_.z(eh,_.M);_.Xf(eh.prototype,{map:_.il});_.z(fh,_.M);_.Xf(fh.prototype,{map:_.il});_.qh={};_.z(gh,_.M);_.z(_.ih,_.M);_.ih.prototype.getAt=function(a){return this.Fb[a]};_.ih.prototype.getAt=_.ih.prototype.getAt;_.ih.prototype.indexOf=function(a){for(var b=0,c=this.Fb.length;b<c;++b)if(a===this.Fb[b])return b;return-1};_.ih.prototype.forEach=function(a){for(var b=0,c=this.Fb.length;b<c;++b)a(this.Fb[b],b)};_.ih.prototype.forEach=_.ih.prototype.forEach;_.ih.prototype.setAt=function(a,b){var c=this.Fb[a],d=this.Fb.length;if(a<d)this.Fb[a]=b,_.K.trigger(this,"set_at",a,c),this.j&&this.j(a,c);else{for(c=d;c<a;++c)this.insertAt(c,void 0);this.insertAt(a,b)}};_.ih.prototype.setAt=_.ih.prototype.setAt;_.ih.prototype.insertAt=function(a,b){this.Fb.splice(a,0,b);hh(this);_.K.trigger(this,"insert_at",a);this.g&&this.g(a)};_.ih.prototype.insertAt=_.ih.prototype.insertAt;_.ih.prototype.removeAt=function(a){var b=this.Fb[a];this.Fb.splice(a,1);hh(this);_.K.trigger(this,"remove_at",a,b);this.i&&this.i(a,b);return b};_.ih.prototype.removeAt=_.ih.prototype.removeAt;_.ih.prototype.push=function(a){this.insertAt(this.Fb.length,a);return this.Fb.length};_.ih.prototype.push=_.ih.prototype.push;_.ih.prototype.pop=function(){return this.removeAt(this.Fb.length-1)};_.ih.prototype.pop=_.ih.prototype.pop;_.ih.prototype.getArray=function(){return this.Fb};_.ih.prototype.getArray=_.ih.prototype.getArray;_.ih.prototype.clear=function(){for(;this.get("length");)this.pop()};_.ih.prototype.clear=_.ih.prototype.clear;_.Xf(_.ih.prototype,{length:null});_.jh.prototype.remove=function(a){var b=this.i,c=_.kf(a);b[c]&&(delete b[c],--this.j,_.K.trigger(this,"remove",a),this.onRemove&&this.onRemove(a))};_.jh.prototype.contains=function(a){return!!this.i[_.kf(a)]};_.jh.prototype.forEach=function(a){var b=this.i,c;for(c in b)a.call(this,b[c])};_.jh.prototype.Ua=_.pa(15);_.lh.prototype.yc=function(a){a=_.mh(this,a);return a.length<this.g.length?new _.lh(a):this};_.lh.prototype.forEach=function(a,b){_.A(this.g,function(c,d){a.call(b,c,d)})};_.lh.prototype.some=function(a,b){return _.ab(this.g,function(c,d){return a.call(b,c,d)})};_.lh.prototype.size=function(){return this.g.length};_.oh={japan_prequake:20,japan_postquake2010:24};var tl=_.je({zoom:_.re($k),heading:$k,pitch:$k});_.z(rh,_.Qg);rh.prototype.visible_changed=function(){var a=this,b=!!this.get("visible"),c=!1;this.g.get()!=b&&(this.g.set(b),c=b);b&&(this.o=this.o||new Promise(function(d){_.J("streetview").then(function(e){if(a.j)var f=a.j;d(e.$n(a,a.g,a.O,f))})}),c&&this.o.then(function(d){return d.Co()}))};_.Xf(rh.prototype,{visible:_.fl,pano:_.el,position:_.re(_.Be),pov:_.re(tl),motionTracking:cl,photographerPov:null,location:null,links:_.ne(_.oe(_.be)),status:null,zoom:_.dl,enableCloseButton:_.fl});rh.prototype.registerPanoProvider=function(a,b){this.set("panoProvider",{provider:a,options:b||{}})};rh.prototype.registerPanoProvider=rh.prototype.registerPanoProvider;sh.prototype.register=function(a){var b=this.o;var c=b.length;if(!c||a.zIndex>=b[0].zIndex)var d=0;else if(a.zIndex>=b[c-1].zIndex){for(d=0;1<c-d;){var e=d+c>>1;a.zIndex>=b[e].zIndex?c=e:d=e}d=c}else d=c;b.splice(d,0,a)};_.ul=Object.freeze(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"]);_.vl=Object.freeze(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"]);_.wl=Object.freeze(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"]);_.xl=Object.freeze(["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"]);_.z(vh,gh);_.z(wh,_.M);wh.prototype.set=function(a,b){if(null!=b&&!(b&&_.ae(b.maxZoom)&&b.tileSize&&b.tileSize.width&&b.tileSize.height&&b.getTile&&b.getTile.apply))throw Error("Expected value implementing google.maps.MapType");return _.M.prototype.set.apply(this,arguments)};wh.prototype.set=wh.prototype.set;_.n=_.xh.prototype;_.n.isEmpty=function(){return!(this.Ca<this.Ja&&this.Ba<this.Ia)};_.n.extend=function(a){a&&(this.Ca=Math.min(this.Ca,a.x),this.Ja=Math.max(this.Ja,a.x),this.Ba=Math.min(this.Ba,a.y),this.Ia=Math.max(this.Ia,a.y))};_.n.Ua=_.pa(14);_.n.getCenter=function(){return new _.N((this.Ca+this.Ja)/2,(this.Ba+this.Ia)/2)};_.n.equals=function(a){return a?this.Ca==a.Ca&&this.Ba==a.Ba&&this.Ja==a.Ja&&this.Ia==a.Ia:!1};_.yl=_.yh(-Infinity,-Infinity,Infinity,Infinity);_.yh(0,0,0,0);var Qh;_.z(Eh,_.B);Eh.prototype.i=function(a){this.N[7]=a};Eh.prototype.clearColor=function(){_.xc(this,8)};var Ph;_.z(Fh,_.B);_.z(_.Ih,_.B);_.Ih.prototype.Pc=_.pa(17);_.Ih.prototype.Re=function(a){this.N[0]=a};_.Ih.prototype.Qc=_.pa(18);_.Ih.prototype.Se=function(a){this.N[1]=a};_.z(Jh,_.B);var Oh;_.z(Kh,_.B);Kh.prototype.getZoom=function(){return _.wc(this,2)};Kh.prototype.setZoom=function(a){this.N[2]=a};var zl;Th.prototype.g=function(a,b){var c=[];Vh(a,b,c);return c.join("&").replace(zl,"%27")};_.Lh=new Th;zl=/'/g;Yh.prototype.reset=function(){this.context=this.i=this.j=this.g=null;this.o=!1};var Zh=new sg(function(){return new Yh},function(a){a.reset()});_.Xh.prototype.then=function(a,b,c){return gi(this,"function"===typeof a?a:null,"function"===typeof b?b:null,c)};_.Xh.prototype.$goog_Thenable=!0;_.Xh.prototype.cancel=function(a){if(0==this.g){var b=new fi(a);_.Ag(function(){ai(this,b)},this)}};_.Xh.prototype.ha=function(a){this.g=0;Wh(this,2,a)};_.Xh.prototype.ka=function(a){this.g=0;Wh(this,3,a)};_.Xh.prototype.W=function(){for(var a;a=bi(this);)ci(this,a,this.g,this.T);this.O=!1};var ki=rg;_.z(fi,_.Va);fi.prototype.name="cancel";_.z(_.mi,_.Nc);_.n=_.mi.prototype;_.n.xd=0;_.n.qc=function(){_.mi.Uc.qc.call(this);this.stop();delete this.g;delete this.i};_.n.start=function(a){this.stop();this.xd=_.li(this.j,void 0!==a?a:this.o)};_.n.stop=function(){0!=this.xd&&_.t.clearTimeout(this.xd);this.xd=0};_.n.Gb=function(){this.stop();this.ii()};_.n.ii=function(){this.xd=0;this.g&&this.g.call(this.i)};_.z(ti,_.M);var ui={roadmap:0,satellite:2,hybrid:3,terrain:4},qi={0:1,2:2,3:2,4:2};_.n=ti.prototype;_.n.ij=_.Vf("center");_.n.ji=_.Vf("zoom");_.n.Cg=_.Vf("size");_.n.changed=function(){var a=this.ij(),b=this.ji(),c=oi(this),d=!!this.Cg();if(a&&!a.equals(this.ha)||this.Fa!=b||this.Na!=c||this.H!=d)this.j||_.pi(this.i),_.ni(this.Ga),this.Fa=b,this.Na=c,this.H=d;this.ha=a};_.n.div_changed=function(){var a=this.get("div"),b=this.g;if(a)if(b)a.appendChild(b);else{b=this.g=document.createElement("div");b.style.overflow="hidden";var c=this.i=_.Hc("IMG");_.K.addDomListener(b,"contextmenu",function(d){_.Ze(d);_.af(d)});c.ontouchstart=c.ontouchmove=c.ontouchend=c.ontouchcancel=function(d){_.$e(d);_.af(d)};_.Bh(c,_.ll);a.appendChild(b);this.Ga.Gb()}else b&&(_.pi(b),this.g=null)};var Ei="StopIteration"in _.t?_.t.StopIteration:{message:"StopIteration",stack:""};zi.prototype.next=function(){throw Ei};_.z(Ai,zi);Ai.prototype.setPosition=function(a,b,c){if(this.node=a)this.i="number"===typeof b?b:1!=this.node.nodeType?0:this.g?-1:1;"number"===typeof c&&(this.depth=c)};Ai.prototype.next=function(){if(this.j){if(!this.node||this.o&&0==this.depth)throw Ei;var a=this.node;var b=this.g?-1:1;if(this.i==b){var c=this.g?a.lastChild:a.firstChild;c?this.setPosition(c):this.setPosition(a,-1*b)}else(c=this.g?a.previousSibling:a.nextSibling)?this.setPosition(c):this.setPosition(a.parentNode,-1*b);this.depth+=this.i*(this.g?-1:1)}else this.j=!0;a=this.node;if(!this.node)throw Ei;return a};Ai.prototype.equals=function(a){return a.node==this.node&&(!this.node||a.i==this.i)};Ai.prototype.splice=function(a){var b=this.node,c=this.g?1:-1;this.i==c&&(this.i=-1*c,this.depth+=this.i*(this.g?-1:1));this.g=!this.g;Ai.prototype.next.call(this);this.g=!this.g;c=_.La(arguments[0])?arguments[0]:arguments;for(var d=c.length-1;0<=d;d--)_.Ic(c[d],b);_.Jc(b)};_.z(Bi,Ai);Bi.prototype.next=function(){do Bi.Uc.next.call(this);while(-1==this.i);return this.node};Fi.prototype.hash=function(a){for(var b=this.g,c=0,d=0,e=a.length;d<e;++d)c*=1729,c+=a[d],c%=b;return c};var Hi=/'/g,Ii;var Ni=null;_.z(Oi,_.qf);Object.freeze({latLngBounds:new _.Rf(new _.I(-85,-180),new _.I(85,180)),strictBounds:!0});Oi.prototype.streetView_changed=function(){var a=this.get("streetView");a?a.set("standAlone",!1):this.set("streetView",this.__gm.W)};Oi.prototype.getDiv=function(){return this.__gm.Ha};Oi.prototype.getDiv=Oi.prototype.getDiv;Oi.prototype.panBy=function(a,b){var c=this.__gm;Ni?_.K.trigger(c,"panby",a,b):_.J("map").then(function(){_.K.trigger(c,"panby",a,b)})};Oi.prototype.panBy=Oi.prototype.panBy;Oi.prototype.panTo=function(a){var b=this.__gm;a=_.Ce(a);Ni?_.K.trigger(b,"panto",a):_.J("map").then(function(){_.K.trigger(b,"panto",a)})};Oi.prototype.panTo=Oi.prototype.panTo;Oi.prototype.panToBounds=function(a,b){var c=this.__gm,d=_.Uf(a);Ni?_.K.trigger(c,"pantolatlngbounds",d,b):_.J("map").then(function(){_.K.trigger(c,"pantolatlngbounds",d,b)})};Oi.prototype.panToBounds=Oi.prototype.panToBounds;Oi.prototype.fitBounds=function(a,b){var c=this,d=_.Uf(a);Ni?Ni.fitBounds(this,d,b):_.J("map").then(function(e){e.fitBounds(c,d,b)})};Oi.prototype.fitBounds=Oi.prototype.fitBounds;_.Xf(Oi.prototype,{bounds:null,center:_.re(_.Ce),clickableIcons:cl,heading:_.dl,mapTypeId:_.el,projection:null,restriction:function(a){if(null==a)return null;a=_.je({strictBounds:_.fl,latLngBounds:_.Uf})(a);var b=a.latLngBounds;if(!(b.Ra.i>b.Ra.g))throw _.he("south latitude must be smaller than north latitude");if((-180==b.La.i?180:b.La.i)==b.La.g)throw _.he("eastern longitude cannot equal western longitude");return a},streetView:pl,tilt:_.dl,zoom:_.dl});var tj={BOUNCE:1,DROP:2,Qp:3,Op:4};var Fj={OK:_.ia,ERROR:_.aa};Qi.prototype.getMaxZoomAtLatLng=function(a,b){return _.J("maxzoom").then(function(c){return c.getMaxZoomAtLatLng(a,b)})};Qi.prototype.getMaxZoomAtLatLng=Qi.prototype.getMaxZoomAtLatLng;_.z(Ri,_.M);_.Xf(Ri.prototype,{map:_.il,tableId:_.dl,query:_.re(_.pe([_.bl,_.oe(_.be,"not an Object")]))});var Al=null;_.z(_.Si,_.M);_.Si.prototype.map_changed=function(){var a=this;Al?Al.zi(this):_.J("overlay").then(function(b){Al=b;b.zi(a)})};_.Si.preventMapHitsFrom=function(a){_.J("overlay").then(function(b){Al=b;b.preventMapHitsFrom(a)})};_.Ta("module$contents$mapsapi$overlay$OverlayView_OverlayView.preventMapHitsFrom",_.Si.preventMapHitsFrom);_.Si.preventMapHitsAndGesturesFrom=function(a){_.J("overlay").then(function(b){Al=b;b.preventMapHitsAndGesturesFrom(a)})};_.Ta("module$contents$mapsapi$overlay$OverlayView_OverlayView.preventMapHitsAndGesturesFrom",_.Si.preventMapHitsAndGesturesFrom);_.Xf(_.Si.prototype,{panes:null,projection:null,map:_.pe([_.il,pl])});var Vi=Yi(_.le(_.I,"LatLng"));_.z(_.Zi,_.M);_.Zi.prototype.map_changed=_.Zi.prototype.visible_changed=function(){var a=this;_.J("poly").then(function(b){b.g(a)})};_.Zi.prototype.center_changed=function(){_.K.trigger(this,"bounds_changed")};_.Zi.prototype.radius_changed=_.Zi.prototype.center_changed;_.Zi.prototype.getBounds=function(){var a=this.get("radius"),b=this.get("center");if(b&&_.ae(a)){var c=this.get("map");c=c&&c.__gm.get("baseMapType");return _.Ah(b,a/_.Ui(c))}return null};_.Zi.prototype.getBounds=_.Zi.prototype.getBounds;_.Xf(_.Zi.prototype,{center:_.re(_.Be),draggable:_.fl,editable:_.fl,map:_.il,radius:_.dl,visible:_.fl});_.z($i,_.M);$i.prototype.map_changed=$i.prototype.visible_changed=function(){var a=this;_.J("poly").then(function(b){b.i(a)})};$i.prototype.getPath=function(){return this.get("latLngs").getAt(0)};$i.prototype.getPath=$i.prototype.getPath;$i.prototype.setPath=function(a){try{this.get("latLngs").setAt(0,Xi(a))}catch(b){_.ie(b)}};$i.prototype.setPath=$i.prototype.setPath;_.Xf($i.prototype,{draggable:_.fl,editable:_.fl,map:_.il,visible:_.fl});_.z(_.aj,$i);_.aj.prototype.Ob=!0;_.aj.prototype.getPaths=function(){return this.get("latLngs")};_.aj.prototype.getPaths=_.aj.prototype.getPaths;_.aj.prototype.setPaths=function(a){try{var b=this.set;if(Array.isArray(a)||a instanceof _.ih)if(0==_.Sd(a))var c=!0;else{var d=a instanceof _.ih?a.getAt(0):a[0];c=Array.isArray(d)||d instanceof _.ih}else c=!1;var e=c?a instanceof _.ih?Yi(Vi)(a):new _.ih(_.ne(Xi)(a)):new _.ih([Xi(a)]);b.call(this,"latLngs",e)}catch(f){_.ie(f)}};_.aj.prototype.setPaths=_.aj.prototype.setPaths;_.z(_.bj,$i);_.bj.prototype.Ob=!1;_.z(_.cj,_.M);_.cj.prototype.map_changed=_.cj.prototype.visible_changed=function(){var a=this;_.J("poly").then(function(b){b.j(a)})};_.Xf(_.cj.prototype,{draggable:_.fl,editable:_.fl,bounds:_.re(_.Uf),map:_.il,visible:_.fl});var Nj={CENTER:0,INSIDE:1,OUTSIDE:2};_.z(dj,_.M);dj.prototype.map_changed=function(){var a=this;_.J("streetview").then(function(b){b.tl(a)})};_.Xf(dj.prototype,{map:_.il});_.Kj={NEAREST:"nearest",BEST:"best"};_.ej.prototype.getPanorama=function(a,b){var c=this.g||void 0;return _.J("streetview").then(function(d){return _.J("geometry").then(function(e){return d.sm(a,b||null,e.computeHeading,e.computeOffset,c)})})};_.ej.prototype.getPanorama=_.ej.prototype.getPanorama;_.ej.prototype.getPanoramaByLocation=function(a,b,c){return this.getPanorama({location:a,radius:b,preference:50>(b||0)?"best":"nearest"},c)};_.ej.prototype.getPanoramaById=function(a,b){return this.getPanorama({pano:a},b)};_.Mj={DEFAULT:"default",OUTDOOR:"outdoor"};var Lj={OK:_.ia,UNKNOWN_ERROR:_.ma,ZERO_RESULTS:_.na};_.z(gj,_.M);gj.prototype.getTile=function(a,b,c){if(!a||!c)return null;var d=_.Hc("DIV");c={Qa:a,zoom:b,Ve:null};d.__gmimt=c;_.kh(this.g,d);if(this.i){var e=this.tileSize||new _.O(256,256),f=this.j(a,b);(c.Ve=this.i({va:a.x,wa:a.y,Da:b},e,d,f,function(){_.K.trigger(d,"load")})).setOpacity(fj(this))}return d};gj.prototype.getTile=gj.prototype.getTile;gj.prototype.releaseTile=function(a){a&&this.g.contains(a)&&(this.g.remove(a),(a=a.__gmimt.Ve)&&a.release())};gj.prototype.releaseTile=gj.prototype.releaseTile;gj.prototype.opacity_changed=function(){var a=fj(this);this.g.forEach(function(b){b.__gmimt.Ve.setOpacity(a)})};gj.prototype.triggersTileLoadEvent=!0;_.Xf(gj.prototype,{opacity:_.dl});_.z(_.hj,_.M);_.hj.prototype.getTile=_.ob;_.hj.prototype.tileSize=new _.O(256,256);_.hj.prototype.triggersTileLoadEvent=!0;_.z(_.ij,_.hj);_.Wb(_.Bb(".SDYZEU-keyboard-shortcuts-dialog-view{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center}.SDYZEU-keyboard-shortcuts-dialog-view .VdVLGb-keyboard-shortcuts-dialog-view--content{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}\n"));_.Wb(_.Bb(".LGLeeN-keyboard-shortcuts-view{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}\n"));_.Bl=new WeakMap;_.Wb(_.Bb(".IqSHYN-modal-overlay-view{background-color:#202124;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;height:100%;left:0;position:absolute;top:0;width:100%}@supports ((-webkit-backdrop-filter:blur(3px)) or (backdrop-filter:blur(3px))){.IqSHYN-modal-overlay-view{background-color:rgba(32,33,36,.7);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}\n"));_.Cl=!1;try{var Dl=function(){};sa.Object.defineProperties(Dl.prototype,{passive:{configurable:!0,enumerable:!0,get:function(){_.Cl=!0}}});_.t.addEventListener("test",null,new Dl)}catch(a){};var kj={0:"",1:"msie",3:"chrome",4:"applewebkit",5:"firefox",6:"trident",7:"mozilla",2:"edge"},lj={0:"",1:"x11",2:"macintosh",3:"windows",4:"android",5:"iphone",6:"ipad"},El=null;"undefined"!=typeof navigator&&(El=new mj);_.nj=El;_.Fl=_.nj?new pj:null;qj.prototype.i=qb(function(){return void 0!==(new Image).crossOrigin});qj.prototype.j=qb(function(){return void 0!==document.createElement("span").draggable});_.Gl=_.nj?new qj:null;var Hl=null;_.z(rj,_.M);rj.prototype.map_changed=function(){var a=this,b=this.getMap();Hl?b?Hl.Lc(this,b):Hl.Tc(this):_.J("webgl").then(function(c){Hl=c;(b=a.getMap())?c.Lc(a,b):c.Tc(a)})};rj.prototype.ig=function(){if(Hl){var a=this.getMap();a&&Hl.ig(a)}};rj.prototype.requestRedraw=rj.prototype.ig;_.Xf(rj.prototype,{map:_.il});_.z(sj,_.M);_.Xf(sj.prototype,{attribution:function(){return!0},place:function(){return!0}});_.Xe("main",{});var jk=_.je({center:function(a){return _.Be(a)},radius:_.Gf},!0);var Il=_.t.google.maps,Jl=Ne.g(),Kl=(0,_.y)(Jl.Hd,Jl);Il.__gjsload__=Kl;_.Td(Il.modules,Kl);delete Il.modules;var Uj={main:[],common:["main"],util:["common"],adsense:["main"],controls:["util"],data:["util"],directions:["util","geometry"],distance_matrix:["util"],drawing:["main"],drawing_impl:["controls"],elevation:["util","geometry"],geocoder:["util"],imagery_viewer:["main"],geometry:["main"],journeySharing:["main"],localContext:["main"],infowindow:["util"],kml:["onion","util","map"],layers:["map"],map:["common"],marker:["util"],maxzoom:["util"],onion:["util","map"],overlay:["common"],panoramio:["main"],places:["main"],places_impl:["controls"],poly:["util","map","geometry"],search:["main"],search_impl:["onion"],stats:["util"],streetview:["util","geometry"],styleEditor:["common"],usage:["util"],visualization:["main"],visualization_impl:["onion"],webgl:["util","map"],weather:["main"],zombie:["main"]};var Xj="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");_.Zj.prototype.constructor=_.Zj.prototype.constructor;_.Ll=ak("Element","attributes")||ak("Node","attributes");_.Ml=bk("Element","hasAttribute");_.Nl=bk("Element","getAttribute");_.Ol=bk("Element","setAttribute");_.Pl=bk("Element","removeAttribute");_.Ql=bk("Element","getElementsByTagName");_.Rl=bk("Element","matches")||bk("Element","msMatchesSelector");_.Sl=ak("Node","nodeName");_.Tl=ak("Node","nodeType");_.Ul=ak("Node","parentNode");_.Vl=ak("HTMLElement","style")||ak("Element","style");_.Wl=ak("HTMLStyleElement","sheet");_.Xl=bk("CSSStyleDeclaration","getPropertyValue");_.Yl=bk("CSSStyleDeclaration","setProperty");_.Zl=_.yk&&10>document.documentMode?null:/\s*([^\s'",]+[^'",]*(('([^'\r\n\f\\]|\\[^])*')|("([^"\r\n\f\\]|\\[^])*")|[^'",])*)/g;_.$l="undefined"!=typeof WeakMap&&-1!=WeakMap.toString().indexOf("[native code]");_.am=!_.yk||10<=Number(Nk);_.bm=!_.yk||null==document.documentMode;var Vj=arguments[0];window.google.maps.Load&&window.google.maps.Load(ik)}).call(this,{});(function($,window,document,undefined){"use strict";var pluginName="ShopLocator",defaults={pluginStyle:"lollipop",paginationStyle:1,preloader:!1,json:null,map:{center:[52.2296760,21.0122290],MapType:google.maps.MapTypeId.ROADMAP,disableDefaultUI:!1,zoomControl:!0,mapStyle:[],draggable:!0,disableDoubleClickZoom:!1,maxZoom:"",minZoom:"",scrollwheel:!0,zoom:10,allMarkersInViewport:!0},infoBubble:{visible:!1,padding:0,borderRadius:4,borderWidth:0,borderColor:"#fff",backgroundColor:"#fff",shadowStyle:0,minHeight:null,maxHeight:100,minWidth:200,maxWidth:null,arrowStyle:0,arrowSize:10,arrowPosition:50,hideCloseButton:!1,closeSrc:"src/style/closeButton.svg",offsetTop:2,offsetRight:2,disableAutoPan:!1,getDirectionsButton:!0,getDirectionsButtonName:"Get Directions",directionsUseGeolocation:!0},markersIcon:"",marker:{latlng:[52.2296760,21.0122290],animation:!1,title:"CreateIT",street:"",zip:"",city:""},cluster:{enable:!1,clusterClass:"cluster",gridSize:50,maxZoom:11,style:{anchorIcon:[0,0],anchorText:[0,0],backgroundPosition:"0 0",fontFamily:'Arial,sans-serif',fontStyle:'normal',textColor:'white',fontWeight:'bold',textSize:18,heightSM:60,widthSM:54,heightMD:60,widthMD:54,heightBIG:60,widthBIG:54,iconSmall:"",iconMedium:"",iconBig:""}},sidebar:{visible:!1,units:"km",selectSection:{visible:!1,pathToJSONDirectory:"src/json/",difFiles:[["First Region","markers"],["Second Region","diffmarkers"]],fileTypes:"json"},searchBox:{visible:!1,findPlaceBy:["(regions)"],searchByCountry:[!0,"us"],search:!1,searchRadius:20,placeholder:"Code or city"},results:{visibleInFirstPage:!0,pageSize:10,currentPage:1,paginationItems:5,sort:'ascending',searchInfo:'',noAddressFound:''}}};var openInfoWindow;var map;function Plugin(element,options){this.element=element;this.settings=$.extend(!0,{},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}
$.extend(Plugin.prototype,{init:function(){var src="/typo3conf/ext/uzin/Resources/Public/JavaScript/Frontend/RetailerSearch/markerclusterer.js";var src2="/typo3conf/ext/uzin/Resources/Public/JavaScript/Frontend/RetailerSearch/infobubble.js";var self=this;$.getScript(src).done(function(){$.getScript(src2).done(function(){self.setUpScriptBody(self.element,self.settings);self.setUpMap(self.element,self.settings)})})},setUpScriptBody:function(element,settings){var sidebarBody;$(element).addClass(settings.pluginStyle);if(settings.sidebar.visible==!0){element.innerHTML="<div class='row'>"+"<div class='ct-googleMap--SidebarCol'>"+"<div class='ct-googleMap--sidebar'></div>"+"</div>"+"<div class='ct-googleMap--MapCol'>"+"<div class='ct-googleMap ct-js-googleMap' id='map_canvas'></div>"+"</div>"+"</div>";sidebarBody=$(element).find('.ct-googleMap--sidebar');if(settings.sidebar.selectSection.visible==!0){sidebarBody.append("<div class='ct-googleMap--selectContainer'>"+"<select class='ct-googleMap--select'></select>"+"</div>");this.createSelectSection(element,settings)}
if(settings.sidebar.searchBox.visible==!0||settings.sidebar.searchBox.search==!0){if(settings.sidebar.searchBox.search==!0){sidebarBody.append("<div class='ct-googleMap--resultsCounter'></div>"+"<div class='ct-googleMap--results'></div>")}else if(settings.sidebar.results.visibleInFirstPage==!0){sidebarBody.append("<div class='ct-googleMap--results'></div>")}}
if(settings.preloader==!0){$(element).append("<div class='ct-preloader'><div class='ct-preloaderCenter'><div class='ct-preloader-content'><span></span><span></span><span></span><span></span><span></span></div></div> </div>")}}else{element.innerHTML="<div class='ct-googleMap ct-js-googleMap' id='map_canvas'></div>"}},setUpMap:function(element,settings){map=$(element).find('.ct-js-googleMap');var infoWindow,mapCanvas,bounds,draggable;if(window.screen.width<998){draggable=!1}else{draggable=settings.map.draggable}
mapCanvas=new google.maps.Map(map[0],{center:new google.maps.LatLng(settings.map.center[0],settings.map.center[1]),mapTypeId:settings.map.MapType,styles:settings.map.mapStyle,disableDefaultUI:settings.map.disableDefaultUI,zoomControl:settings.map.zoomControl,draggable:draggable,disableDoubleClickZoom:settings.map.disableDoubleClickZoom,maxZoom:settings.map.maxZoom,minZoom:settings.map.minZoom,scrollwheel:settings.map.scrollwheel,zoom:settings.map.zoom});if(settings.infoBubble.visible==!0){infoWindow=new google.maps.InfoWindow()}
bounds=new google.maps.LatLngBounds();mapCanvas.addListener('zoom_changed',function(){if(openInfoWindow){openInfoWindow.close()}});mapCanvas.addListener('click',function(){if(openInfoWindow){openInfoWindow.close()}});this.displayMarkers(this,element,mapCanvas,bounds,settings)},JSonMainFunction:function(constructor,searchBox,data,arrayMarker,element,map,bounds,settings){var clearClusterer;var dataMarkers,marker,cluster,clusterOptions;var clusterStyles=[];if(settings.cluster.style.iconSmall.length!==0&&settings.cluster.style.iconMedium!==0&&settings.cluster.style.iconBig!==0){clusterStyles=[{anchorIcon:settings.cluster.style.anchorIcon,anchorText:settings.cluster.style.anchorText,backgroundPosition:settings.cluster.style.backgroundPosition,fontFamily:settings.cluster.style.fontFamily,fontStyle:settings.cluster.style.fontStyle,textColor:settings.cluster.style.textColor,fontWeight:settings.cluster.style.fontWeight,textSize:settings.cluster.style.textSize,url:settings.cluster.style.iconSmall,height:settings.cluster.style.heightSM,width:settings.cluster.style.widthSM},{anchorIcon:settings.cluster.style.anchorIcon,anchorText:settings.cluster.style.anchorText,backgroundPosition:settings.cluster.style.backgroundPosition,fontFamily:settings.cluster.style.fontFamily,fontStyle:settings.cluster.style.fontStyle,textColor:settings.cluster.style.textColor,fontWeight:settings.cluster.style.fontWeight,textSize:settings.cluster.style.textSize,url:settings.cluster.style.iconMedium,height:settings.cluster.style.heightMD,width:settings.cluster.style.widthMD},{anchorIcon:settings.cluster.style.anchorIcon,anchorText:settings.cluster.style.anchorText,backgroundPosition:settings.cluster.style.backgroundPosition,fontFamily:settings.cluster.style.fontFamily,fontStyle:settings.cluster.style.fontStyle,textColor:settings.cluster.style.textColor,fontWeight:settings.cluster.style.fontWeight,textSize:settings.cluster.style.textSize,url:settings.cluster.style.iconBig,height:settings.cluster.style.heightBIG,width:settings.cluster.style.widthBIG}]}
clusterOptions={clusterClass:settings.cluster.clusterClass,gridSize:settings.cluster.gridSize,maxZoom:settings.cluster.maxZoom,styles:clusterStyles};$(element).find('.ct-googleMap--search').val('');arrayMarker=[];dataMarkers=data;if(settings.sidebar.results.sort==='ascending'){dataMarkers.sort(function(a,b){var a1=a.title,b1=b.title;if(a1==b1)return 0;return a1>b1?1:-1})}if(settings.sidebar.results.sort==='descending'){dataMarkers.sort(function(a,b){var a1=a.title,b1=b.title;if(a1==b1)return 0;return a1<b1?1:-1})}
bounds=new google.maps.LatLngBounds(null);for(var i=0;dataMarkers.length>i;i++){marker=constructor.createMarkers(map,searchBox,dataMarkers[i],settings,constructor);bounds.extend(marker.position);arrayMarker.push(marker);if(settings.sidebar.visible==!0&&settings.sidebar.results.visibleInFirstPage==!0){constructor.createSidebarButtons(map,marker,element,settings,constructor)}}
if(settings.sidebar.results.visibleInFirstPage==!1&&settings.sidebar.results.searchInfo!=''){var ul=$(element).find('.ct-googleMap--results');var div=document.createElement("div");div.className="ct-googleMap--sidebarItem";div.innerHTML=settings.sidebar.results.searchInfo;ul.append(div)}
constructor.resultsInPage(constructor,element,settings);if(settings.cluster.enable==!0){clearClusterer=!0;cluster=new MarkerClusterer(map,arrayMarker,clusterOptions)}
if(settings.map.allMarkersInViewport==!0){map.fitBounds(bounds)}
if(settings.sidebar.searchBox.visible==!0||settings.sidebar.searchBox.search==!0){constructor.searchPlace(constructor,searchBox,map,arrayMarker,element,settings)}
return cluster},displayMarkers:function(constructor,element,map,bounds,settings){var gmarkers=[];var selectDOM,sidebarItem,selectValue,marker,cluster,clearClusterer,searchBox,optionsSearchBox;selectDOM=$(element).find('.ct-googleMap--select');if(settings.preloader==!0){var $preloader=$(element).find('.ct-preloader')}
if(settings.sidebar.searchBox.visible==!0||settings.sidebar.searchBox.search==!0){if(settings.sidebar.searchBox.searchByCountry[0]==!0){optionsSearchBox={types:settings.sidebar.searchBox.findPlaceBy,componentRestrictions:{country:settings.sidebar.searchBox.searchByCountry[1]}}}else{optionsSearchBox={types:settings.sidebar.searchBox.findPlaceBy}}
var input=$(document).find('.ct-googleMap--search');var _addEventListener=(input[0].addEventListener)?input[0].addEventListener:input[0].attachEvent;function addEventListenerWrapper(type,listener){if(type=="keydown"){var orig_listener=listener;listener=function(event){var suggestion_selected=$(".pac-item-selected").length>0;if(event.which==13&&!suggestion_selected){var simulated_downarrow=$.Event("keydown",{keyCode:40,which:40});orig_listener.apply(input[0],[simulated_downarrow])}
orig_listener.apply(input[0],[event])}}
_addEventListener.apply(input[0],[type,listener])}
input[0].addEventListener=addEventListenerWrapper;input[0].attachEvent=addEventListenerWrapper;searchBox=new google.maps.places.Autocomplete((input[0]),optionsSearchBox)}
if(settings.sidebar.selectSection.visible==!0&&settings.sidebar.visible==!0){$(selectDOM).change(function(){$(this).find('option:selected').each(function(){sidebarItem=$(element).find('.ct-googleMap--sidebarItem');sidebarItem.remove();selectValue=selectDOM.val();$(element).find('.ct-googleMap--resultsCounter').html('');if(settings.preloader==!0){$preloader.removeClass('make-hidden')}
$.ajax({url:settings.sidebar.selectSection.pathToJSONDirectory+selectValue+"."+settings.sidebar.selectSection.fileTypes,dataType:'json',success:function(data){if(clearClusterer==!0){cluster.clearMarkers();clearClusterer=!1}
cluster=constructor.JSonMainFunction(constructor,searchBox,data,gmarkers,element,map,bounds,settings);clearClusterer=!0;if(settings.preloader==!0){$preloader.addClass('make-hidden')}},error:function(jqXHR,textStatus,errorThrown){console.log('ERROR',textStatus,errorThrown)}})})}).trigger("change")}else{if(settings.json==null){var singleMarker=[{"lat":settings.marker.latlng[0],"lng":settings.marker.latlng[1],"title":settings.marker.title,"street":settings.marker.street,"city":settings.marker.city,"zip":settings.marker.zip},];marker=constructor.createMarkers(map,searchBox,singleMarker[0],settings,constructor);gmarkers.push(marker);if(settings.map.allMarkersInViewport==!0){bounds.extend(marker.position);map.fitBounds(bounds)}
if(settings.sidebar.visible==!0&&settings.sidebar.searchBox.visible==!0||settings.sidebar.searchBox.search==!0){constructor.searchPlace(constructor,searchBox,map,gmarkers,element,settings)}}else{$.ajax({url:settings.json,dataType:'json',success:function(data){if(clearClusterer==!0){cluster.clearMarkers();clearClusterer=!1}
cluster=constructor.JSonMainFunction(constructor,searchBox,data,gmarkers,element,map,bounds,settings);clearClusterer=!0;if(settings.preloader==!0){$preloader.addClass('make-hidden');$(document).find('.retailer-search-filter').show()}},error:function(jqXHR,textStatus,errorThrown){console.log('ERROR',textStatus,errorThrown)}})}}},createMarkers:function(map,searchBox,markerTable,settings,constructor){var getDirectinButton="";var marker=new google.maps.Marker({position:new google.maps.LatLng(markerTable.lat,markerTable.lng),animation:settings.marker.animation,map:map,title:markerTable.title,icon:markerTable.icon,companySidebar:markerTable.companySidebar,titleSidebar:markerTable.titleSidebar,});if(settings.markersIcon.length!=0){marker.setIcon(settings.markersIcon)}
var markerPosition=marker.getPosition();if(settings.infoBubble.getDirectionsButton==!0){getDirectinButton="<a class='ct-button--direction make-hidden' href='' target='_blank'>"+settings.infoBubble.getDirectionsButtonName+"</a>"}
if(settings.infoBubble.visible==!0){var phone=(markerTable.phone)?"<span class='phone'>"+markerTable.phone+"</span>":'';var website=(markerTable.website)?"<span class='link'>"+markerTable.website+"</span>":'';var infoBubble=new InfoBubble({visible:settings.infoBubble.visible,content:"<div class = 'ct-googleMap--InfoWindowBody' style='text-align: center;'>"+"<span>"+markerTable.title+"</span>"+"<span>"+markerTable.street+"</span>"+"<span>"+markerTable.zip+" "+markerTable.city+"</span>"+phone+website+getDirectinButton+"</div>",backgroundClassName:'ct-googleMap--customInfoWindow',padding:settings.infoBubble.padding,borderRadius:settings.infoBubble.borderRadius,borderWidth:settings.infoBubble.borderWidth,borderColor:settings.infoBubble.borderColor,backgroundColor:settings.infoBubble.backgroundColor,shadowStyle:settings.infoBubble.shadowStyle,minHeight:settings.infoBubble.minHeight,maxHeight:settings.infoBubble.maxHeight,minWidth:settings.infoBubble.minWidth,maxWidth:settings.infoBubble.maxWidth,arrowStyle:settings.infoBubble.arrowStyle,arrowSize:settings.infoBubble.arrowSize,arrowPosition:settings.infoBubble.arrowPosition,hideCloseButton:settings.infoBubble.hideCloseButton,closeSrc:settings.infoBubble.closeSrc,offsetTop:settings.infoBubble.offsetTop,offsetRight:settings.infoBubble.offsetRight,disableAutoPan:settings.infoBubble.disableAutoPan});google.maps.event.addListener(marker,"click",function(){if(openInfoWindow){openInfoWindow.close()}
infoBubble.open(map,marker);openInfoWindow=infoBubble;var bounds=new google.maps.LatLngBounds();bounds.extend(marker.getPosition());map.setCenter(bounds.getCenter());map.fitBounds(bounds);map.panToBounds(bounds);map.setZoom(constructor.getZoomByBounds(map,bounds)-5)});if(settings.infoBubble.getDirectionsButton==!0){if(settings.infoBubble.directionsUseGeolocation==!1&&settings.sidebar.searchBox.visible==!0&&settings.sidebar.visible==!0){var _,directionsLat,directionsLng;var makeVis=!1;searchBox.addListener('place_changed',function(){var place=searchBox.getPlace();if(place.address_components){directionsLat=place.geometry.location.lat();directionsLng=place.geometry.location.lng();makeVis=!0}})}
google.maps.event.addListener(infoBubble,"domready",function(){var directionButton=$('a.ct-button--direction');if(settings.infoBubble.directionsUseGeolocation==!0||settings.sidebar.visible==!1){directionButton.removeClass('make-hidden');if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(position){directionButton.each(function(){$(this).attr("href","");$(this).attr("href",'http://maps.google.com/maps?daddr='+markerPosition.lat()+","+markerPosition.lng())})},function(){console.log("Error: The Geolocation service failed.")})}else{console.log("Error: Your browser doesn't support geolocation.")}}else{directionButton.each(function(){$(this).attr("href","");$(this).attr("href",'http://maps.google.com/maps?daddr='+markerPosition.lat()+","+markerPosition.lng())});if(makeVis==!0){directionButton.removeClass('make-hidden')}}})}}
google.maps.event.addDomListener(marker,"click",function(){map.setCenter(markerPosition)});return marker},createSidebarButtons:function(map,marker,element,settings,constructor){var ul=$(element).find('.ct-googleMap--results');var li=document.createElement("div");li.className="ct-googleMap--sidebarItem";google.maps.event.clearListeners(li,'click');li.innerHTML="<span class='ct-googleMap--sidebarItemTitle'><strong>"+marker.companySidebar+"</strong><br />"+marker.titleSidebar+"</span>";ul.append(li);google.maps.event.addDomListener(li,"click",function(){google.maps.event.trigger(marker,"click");var bounds=new google.maps.LatLngBounds();bounds.extend(marker.getPosition());map.setCenter(bounds.getCenter());map.fitBounds(bounds);map.panToBounds(bounds);map.setZoom(constructor.getZoomByBounds(map,bounds)-5);if($(window).width()<992){$(window).stop(!0).scrollTo($('.ct-googleMap--MapCol').offset().top-$('.breadcrumbBar').height(),{duration:1000})}})},searchPlace:function(constructor,searchBox,map,markerTable,element,settings){var locations=[];var select=$('.ct-googleMap--search-radius');select.on('select2:select',function(){if(typeof searchBox.getPlace()!=="undefined"){google.maps.event.trigger(searchBox,'place_changed')}});google.maps.event.addListener(searchBox,'place_changed',function(){if(settings.sidebar.searchBox.search==!0){settings.sidebar.searchBox.searchRadius=(select.val()?select.val():20)}
var place=searchBox.getPlace();var searchLocationPosition;if(!place.geometry){var geocoder=new google.maps.Geocoder();var address=place.name;geocoder.geocode({'address':address+","+settings.sidebar.searchBox.searchByCountry[1]},function(results,status){if(status===google.maps.GeocoderStatus.OK){searchLocationPosition=new google.maps.LatLng(results[0].geometry.location[0],results[0].geometry.location[1]);if(settings.sidebar.searchBox.search==!0){constructor.displaySearchResults(constructor,map,markerTable,searchLocationPosition,element,settings)}}else if(settings.sidebar.results.noAddressFound!=''){console.log('Geocode was not successful for the following reason: '+status);$(element).find('.ct-googleMap--sidebarItem').remove();var ul=$(element).find('.ct-googleMap--results');var div=document.createElement("div");div.className="ct-googleMap--sidebarItem";div.innerHTML=settings.sidebar.results.noAddressFound;ul.append(div)}})}else{searchLocationPosition=new google.maps.LatLng(place.geometry.location.lat(),place.geometry.location.lng());if(settings.sidebar.searchBox.search==!0){constructor.displaySearchResults(constructor,map,markerTable,searchLocationPosition,element,settings)}}
if(place.length==0||typeof searchLocationPosition=="undefined"){map.setCenter(new google.maps.LatLng(settings.map.center[0],settings.map.center[1]));map.setZoom(settings.map.zoom);return}})},displaySearchResults:function(constructor,map,markerTable,position,element,settings){var sidebarItem,units,unitsLabel;var searchDistance=[];var resultsCounter=$(element).find('.ct-googleMap--resultsCounter');if(settings.sidebar.units=="km"){units=1000;unitsLabel="km"}else{units=1609;unitsLabel="mile"}
sidebarItem=$(element).find('.ct-googleMap--sidebarItem');sidebarItem.remove();for(var i=0;markerTable.length>i;i++){var lat=markerTable[i].getPosition().lat();var lng=markerTable[i].getPosition().lng();var latlng=new google.maps.LatLng(lat,lng);var itemDistance=google.maps.geometry.spherical.computeDistanceBetween(position,latlng)/units;if(itemDistance<settings.sidebar.searchBox.searchRadius){markerTable[i].distance=itemDistance.toFixed(2);searchDistance.push(markerTable[i])}}
searchDistance.sort(function(a,b){var a1=parseFloat(a.distance,10),b1=parseFloat(b.distance,10);{return a1-b1}});if(searchDistance.length>0){var bounds=new google.maps.LatLngBounds();for(var j=0;searchDistance.length>j;j++){constructor.createSidebarButtons(map,searchDistance[j],element,settings,constructor);bounds.extend(searchDistance[j].getPosition());$(element).find(".ct-googleMap--sidebarItem:nth-child("+(j+1)+")").append("<span class='ct-googleMap--sidebarItemDistance'>"+searchDistance[j].distance+" "+unitsLabel+"</span>")}
map.setCenter(bounds.getCenter());map.fitBounds(bounds);map.panToBounds(bounds);map.setZoom((searchDistance.length>1)?constructor.getZoomByBounds(map,bounds):15)}else if(settings.sidebar.results.noAddressFound!=''){var ul=$(element).find('.ct-googleMap--results');var div=document.createElement("div");div.className="ct-googleMap--sidebarItem";div.innerHTML=settings.sidebar.results.noAddressFound;ul.append(div);map.setZoom(settings.map.zoom)}
resultsCounter.html('');resultsCounter.append("Items"+"<span class='ct-googleMap--itemCounter'>"+searchDistance.length+"</span>");constructor.resultsInPage(constructor,element,settings)},resultsInPage:function(constructor,element,settings){var pageSize=settings.sidebar.results.pageSize;var currentPage=settings.sidebar.results.currentPage;var pageCounter=1;var sidebarResults=$(element).find('.ct-googleMap--results');var pageNav="<ul class='Navigation'>";var pageNavPages="<li class='paginationCounter'>";constructor.sidebarClear(pageCounter,element);if(settings.paginationStyle!=1){pageNavPages+="</li>"}else{pageNavPages+="<a rel='1' class='NavPage'>"+1+"</a>"}
sidebarResults.children().each(function(i){if(i<pageCounter*pageSize&&i>=(pageCounter-1)*pageSize){$(this).addClass("page"+pageCounter)}else{$(this).addClass("page"+(pageCounter+1));if(settings.paginationStyle==1){pageNavPages+="<a rel='"+(pageCounter+1)+"' class='NavPage'>"+(pageCounter+1)+"</a>"}
pageCounter ++}});if(settings.paginationStyle==1){pageNavPages+="</li>"}
sidebarResults.children().hide();sidebarResults.children(".page"+currentPage).show();if(pageCounter<=1){return}
var i=1;pageNav+="<li class='NavigationPrev NavigationDisable Navigation"+i+"'><a rel='"+i+"'>"+"</a></li>";pageNav+=pageNavPages;pageNav+="<li class='NavigationNext Navigation"+(i+1)+"'><a rel='"+(i+1)+"' >"+"</a></li>";pageNav+="</ul>";$(element).find('.ct-googleMap--sidebar').append(pageNav);constructor.pagination(constructor,sidebarResults,pageCounter,pageSize,currentPage,element,settings)},pagination:function(constructor,sidebarResults,pageCounter,pageSize,currentPage,element,settings){var i=1;var k=1;var goToPage;var paginationCounter=1;var paginationCounterElement=$(element).find('.paginationCounter');var NavigationPrev=$(element).find('.NavigationPrev');var NavigationNext=$(element).find('.NavigationNext');if(settings.paginationStyle==2){constructor.counterElements(sidebarResults,paginationCounterElement,pageCounter,pageSize,currentPage,element)}
if(settings.paginationStyle==1){paginationCounterElement.children().each(function(i){if(i<paginationCounter*settings.sidebar.results.paginationItems&&i>=(paginationCounter-1)*settings.sidebar.results.paginationItems){$(this).addClass("paginationPage"+paginationCounter)}else{$(this).addClass("paginationPage"+(paginationCounter+1));paginationCounter=paginationCounter+1}});paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+currentPage).show();$(element).find(".NavPage[rel='"+currentPage+"']").addClass('active');$(element).find('.NavPage').on("click",function(){var whatPage=$(this).attr('rel');$(this).addClass('active').siblings().removeClass('active');goToPage=!0;if(whatPage<i){i=whatPage;NavigationPrev.trigger("click")}else{i=whatPage;NavigationNext.trigger("click")}})}
$(element).find('.NavigationPrev').on("click",function(){if(goToPage==!0){sidebarResults.children().hide();sidebarResults.find(".page"+i).show();if(i==1){$(this).addClass('NavigationDisable')}
NavigationNext.removeClass('NavigationDisable');goToPage=!1}else{if(i==1){i=1;sidebarResults.children().hide();sidebarResults.find(".page"+i).show()}else{if(i==2){$(this).addClass('NavigationDisable')}
NavigationNext.removeClass('NavigationDisable');i=i-1;sidebarResults.children().hide();sidebarResults.find(".page"+i).show()}
if(settings.paginationStyle!=1){paginationCounterElement.children().hide();paginationCounterElement.children(".paginationCount"+i).show()}else{if(i<k*settings.sidebar.results.paginationItems&&i==(k-1)*settings.sidebar.results.paginationItems){k=k-1;paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+k).show()}else{if(i<k*settings.sidebar.results.paginationItems&&i>=(k-1)*settings.sidebar.results.paginationItems){paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+k).show()}else{k=k-1;paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+k).show()}}
$(element).find(".NavPage[rel='"+i+"']").addClass('active').siblings().removeClass('active')}}});$(element).find('.NavigationNext').on("click",function(){if(goToPage==!0){sidebarResults.children().hide();sidebarResults.find(".page"+i).show();if(i==pageCounter){$(this).addClass('NavigationDisable')}
NavigationPrev.removeClass('NavigationDisable');goToPage=!1}else{if(i==pageCounter){i=pageCounter;sidebarResults.children().hide();sidebarResults.find(".page"+i).show()}else{if(i==pageCounter-1){$(this).addClass('NavigationDisable')}
NavigationPrev.removeClass('NavigationDisable');i=parseInt((i),10)+1;sidebarResults.children().hide();sidebarResults.find(".page"+i).show()}
if(settings.paginationStyle!=1){paginationCounterElement.children().hide();paginationCounterElement.children(".paginationCount"+i).show()}else{if(i<k*settings.sidebar.results.paginationItems&&i>=(k-1)*settings.sidebar.results.paginationItems||i==k*settings.sidebar.results.paginationItems){paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+k).show()}else{k ++;paginationCounterElement.children().hide();paginationCounterElement.children(".paginationPage"+k).show()}
$(element).find(".NavPage[rel='"+i+"']").addClass('active').siblings().removeClass('active')}}})},counterElements:function(sidebarResults,paginationCounterElement,pageCounter,pageSize,currentPage,element){var tableResults=[];for(var j=0;pageCounter>j;j++){tableResults.push($(element).find('.page'+(1+j)).length);if(tableResults[j]>1){paginationCounterElement.append("<span class='paginationCount"+(j+1)+"'>"+(1+j*pageSize)+" - "+(tableResults[j]+j*pageSize)+" of "+sidebarResults.children().length+"</span>")}else{paginationCounterElement.append("<span class='paginationCount"+(j+1)+"'>"+(tableResults[j]+j*pageSize)+" of "+sidebarResults.children().length+"</span>")}}
paginationCounterElement.children().hide();$(element).find(".paginationCount"+currentPage).show()},createSelectSection:function(element,settings){var difFiles=settings.sidebar.selectSection.difFiles;var sidebarSelect=$(element).find('.ct-googleMap--select');for(var k=0;difFiles.length>k;k++){sidebarSelect.append("<option value='"+difFiles[k][1]+"'>"+difFiles[k][0]+"</option>")}},sidebarClear:function(pageCounter,element){$(element).find('.Navigation').remove();pageCounter=1},getZoomByBounds:function(map,bounds){var MAX_ZOOM=map.mapTypes.get(map.getMapTypeId()).maxZoom||21;var MIN_ZOOM=map.mapTypes.get(map.getMapTypeId()).minZoom||0;var ne=map.getProjection().fromLatLngToPoint(bounds.getNorthEast());var sw=map.getProjection().fromLatLngToPoint(bounds.getSouthWest());var worldCoordWidth=Math.abs(ne.x-sw.x);var worldCoordHeight=Math.abs(ne.y-sw.y);var FIT_PAD=40;for(var zoom=MAX_ZOOM;zoom>=MIN_ZOOM;--zoom){if(worldCoordWidth*(1<<zoom)+2*FIT_PAD<$(map.getDiv()).width()&&worldCoordHeight*(1<<zoom)+2*FIT_PAD<$(map.getDiv()).height())
return zoom}
return 0}});$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}})(jQuery,window,document);(function(factory){if((typeof jQuery==='undefined'||!jQuery)&&typeof define==="function"&&define.amd){define(["jquery"],function(jQuery){return factory(jQuery,document,window,navigator)})}else if((typeof jQuery==='undefined'||!jQuery)&&typeof exports==="object"){factory(require("jquery"),document,window,navigator)}else{factory(jQuery,document,window,navigator)}}(function($,document,window,navigator,undefined){"use strict";var plugin_count=0;var is_old_ie=(function(){var n=navigator.userAgent,r=/msie\s\d+/i,v;if(n.search(r)>0){v=r.exec(n).toString();v=v.split(" ")[1];if(v<9){$("html").addClass("lt-ie9");return!0}}
return!1}());if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;var slice=[].slice;if(typeof target!="function"){throw new TypeError()}
var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F();var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result}
return self}else{return target.apply(that,args.concat(slice.call(arguments)))}};return bound}}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null){throw new TypeError('"this" is null or not defined')}
var O=Object(this);var len=O.length>>>0;if(len===0){return-1}
var n=+fromIndex||0;if(Math.abs(n)===Infinity){n=0}
if(n>=len){return-1}
k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(k in O&&O[k]===searchElement){return k}
k++}
return-1}}
var base_html='<span class="irs">'+'<span class="irs-line" tabindex="0"></span>'+'<span class="irs-min">0</span><span class="irs-max">1</span>'+'<span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span>'+'</span>'+'<span class="irs-grid"></span>';var single_html='<span class="irs-bar irs-bar--single"></span>'+'<span class="irs-shadow shadow-single"></span>'+'<span class="irs-handle single"><i></i><i></i><i></i></span>';var double_html='<span class="irs-bar"></span>'+'<span class="irs-shadow shadow-from"></span>'+'<span class="irs-shadow shadow-to"></span>'+'<span class="irs-handle from"><i></i><i></i><i></i></span>'+'<span class="irs-handle to"><i></i><i></i><i></i></span>';var disable_html='<span class="irs-disable-mask"></span>';var IonRangeSlider=function(input,options,plugin_count){this.VERSION="2.3.1";this.input=input;this.plugin_count=plugin_count;this.current_plugin=0;this.calc_count=0;this.update_tm=0;this.old_from=0;this.old_to=0;this.old_min_interval=null;this.raf_id=null;this.dragging=!1;this.force_redraw=!1;this.no_diapason=!1;this.has_tab_index=!0;this.is_key=!1;this.is_update=!1;this.is_start=!0;this.is_finish=!1;this.is_active=!1;this.is_resize=!1;this.is_click=!1;options=options||{};this.$cache={win:$(window),body:$(document.body),input:$(input),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var $inp=this.$cache.input,val=$inp.prop("value"),config,config_from_data,prop;config={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null};if($inp[0].nodeName!=="INPUT"){console&&console.warn&&console.warn("Base element should be <input>!",$inp[0])}
config_from_data={skin:$inp.data("skin"),type:$inp.data("type"),min:$inp.data("min"),max:$inp.data("max"),from:$inp.data("from"),to:$inp.data("to"),step:$inp.data("step"),min_interval:$inp.data("minInterval"),max_interval:$inp.data("maxInterval"),drag_interval:$inp.data("dragInterval"),values:$inp.data("values"),from_fixed:$inp.data("fromFixed"),from_min:$inp.data("fromMin"),from_max:$inp.data("fromMax"),from_shadow:$inp.data("fromShadow"),to_fixed:$inp.data("toFixed"),to_min:$inp.data("toMin"),to_max:$inp.data("toMax"),to_shadow:$inp.data("toShadow"),prettify_enabled:$inp.data("prettifyEnabled"),prettify_separator:$inp.data("prettifySeparator"),force_edges:$inp.data("forceEdges"),keyboard:$inp.data("keyboard"),grid:$inp.data("grid"),grid_margin:$inp.data("gridMargin"),grid_num:$inp.data("gridNum"),grid_snap:$inp.data("gridSnap"),hide_min_max:$inp.data("hideMinMax"),hide_from_to:$inp.data("hideFromTo"),prefix:$inp.data("prefix"),postfix:$inp.data("postfix"),max_postfix:$inp.data("maxPostfix"),decorate_both:$inp.data("decorateBoth"),values_separator:$inp.data("valuesSeparator"),input_values_separator:$inp.data("inputValuesSeparator"),disable:$inp.data("disable"),block:$inp.data("block"),extra_classes:$inp.data("extraClasses"),};config_from_data.values=config_from_data.values&&config_from_data.values.split(",");for(prop in config_from_data){if(config_from_data.hasOwnProperty(prop)){if(config_from_data[prop]===undefined||config_from_data[prop]===""){delete config_from_data[prop]}}}
if(val!==undefined&&val!==""){val=val.split(config_from_data.input_values_separator||options.input_values_separator||";");if(val[0]&&val[0]==+val[0]){val[0]=+val[0]}
if(val[1]&&val[1]==+val[1]){val[1]=+val[1]}
if(options&&options.values&&options.values.length){config.from=val[0]&&options.values.indexOf(val[0]);config.to=val[1]&&options.values.indexOf(val[1])}else{config.from=val[0]&&+val[0];config.to=val[1]&&+val[1]}}
$.extend(config,options);$.extend(config,config_from_data);this.options=config;this.update_check={};this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};IonRangeSlider.prototype={init:function(is_update){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();if(is_update){this.force_redraw=!0;this.calc(!0);this.callOnUpdate()}else{this.force_redraw=!0;this.calc(!0);this.callOnStart()}
this.updateScene()},append:function(){var container_html='<span class="irs irs--'+this.options.skin+' js-irs-'+this.plugin_count+' '+this.options.extra_classes+'"></span>';this.$cache.input.before(container_html);this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html(base_html);this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");if(this.options.type==="single"){this.$cache.cont.append(single_html);this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.edge=this.$cache.cont.find(".irs-bar-edge");this.$cache.s_single=this.$cache.cont.find(".single");this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.shad_single=this.$cache.cont.find(".shadow-single")}else{this.$cache.cont.append(double_html);this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.s_from=this.$cache.cont.find(".from");this.$cache.s_to=this.$cache.cont.find(".to");this.$cache.shad_from=this.$cache.cont.find(".shadow-from");this.$cache.shad_to=this.$cache.cont.find(".shadow-to");this.setTopHandler()}
if(this.options.hide_from_to){this.$cache.from[0].style.display="none";this.$cache.to[0].style.display="none";this.$cache.single[0].style.display="none"}
this.appendGrid();if(this.options.disable){this.appendDisableMask();this.$cache.input[0].disabled=!0}else{this.$cache.input[0].disabled=!1;this.removeDisableMask();this.bindEvents()}
if(!this.options.disable){if(this.options.block){this.appendDisableMask()}else{this.removeDisableMask()}}
if(this.options.drag_interval){this.$cache.bar[0].style.cursor="ew-resize"}},setTopHandler:function(){var min=this.options.min,max=this.options.max,from=this.options.from,to=this.options.to;if(from>min&&to===max){this.$cache.s_from.addClass("type_last")}else if(to<max){this.$cache.s_to.addClass("type_last")}},changeLevel:function(target){switch(target){case "single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake);this.$cache.s_single.addClass("state_hover");break;case "from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);this.$cache.s_from.addClass("state_hover");this.$cache.s_from.addClass("type_last");this.$cache.s_to.removeClass("type_last");break;case "to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake);this.$cache.s_to.addClass("state_hover");this.$cache.s_to.addClass("type_last");this.$cache.s_from.removeClass("type_last");break;case "both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer);this.$cache.s_to.removeClass("type_last");this.$cache.s_from.removeClass("type_last");break}},appendDisableMask:function(){this.$cache.cont.append(disable_html);this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask");this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);if(is_old_ie){this.$cache.body.off("mouseup.irs_"+this.plugin_count);this.$cache.body.off("mouseleave.irs_"+this.plugin_count)}
this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(this.no_diapason){return}
this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this));if(this.options.drag_interval&&this.options.type==="double"){this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"));this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))}else{this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}
if(this.options.type==="single"){this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}else{this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null));this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null));this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}
if(this.options.keyboard){this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"))}
if(is_old_ie){this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))}},pointerFocus:function(e){if(!this.target){var x;var $handle;if(this.options.type==="single"){$handle=this.$cache.single}else{$handle=this.$cache.from}
x=$handle.offset().left;x+=($handle.width()/2)-1;this.pointerClick("single",{preventDefault:function(){},pageX:x})}},pointerMove:function(e){if(!this.dragging){return}
var x=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;this.coords.x_pointer=x-this.coords.x_gap;this.calc()},pointerUp:function(e){if(this.current_plugin!==this.plugin_count){return}
if(this.is_active){this.is_active=!1}else{return}
this.$cache.cont.find(".state_hover").removeClass("state_hover");this.force_redraw=!0;if(is_old_ie){$("*").prop("unselectable",!1)}
this.updateScene();this.restoreOriginalMinInterval();if($.contains(this.$cache.cont[0],e.target)||this.dragging){this.callOnFinish()}
this.dragging=!1},pointerDown:function(target,e){e.preventDefault();var x=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;if(e.button===2){return}
if(target==="both"){this.setTempMinInterval()}
if(!target){target=this.target||"from"}
this.current_plugin=this.plugin_count;this.target=target;this.is_active=!0;this.dragging=!0;this.coords.x_gap=this.$cache.rs.offset().left;this.coords.x_pointer=x-this.coords.x_gap;this.calcPointerPercent();this.changeLevel(target);if(is_old_ie){$("*").prop("unselectable",!0)}
this.$cache.line.trigger("focus");this.updateScene()},pointerClick:function(target,e){e.preventDefault();var x=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;if(e.button===2){return}
this.current_plugin=this.plugin_count;this.target=target;this.is_click=!0;this.coords.x_gap=this.$cache.rs.offset().left;this.coords.x_pointer=+(x-this.coords.x_gap).toFixed();this.force_redraw=!0;this.calc();this.$cache.line.trigger("focus")},key:function(target,e){if(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}
switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault();this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault();this.moveByKey(!0);break}
return!0},moveByKey:function(right){var p=this.coords.p_pointer;var p_step=(this.options.max-this.options.min)/100;p_step=this.options.step/p_step;if(right){p+=p_step}else{p-=p_step}
this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*p);this.is_key=!0;this.calc()},setMinMax:function(){if(!this.options){return}
if(this.options.hide_min_max){this.$cache.min[0].style.display="none";this.$cache.max[0].style.display="none";return}
if(this.options.values.length){this.$cache.min.html(this.decorate(this.options.p_values[this.options.min]));this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))}else{var min_pretty=this._prettify(this.options.min);var max_pretty=this._prettify(this.options.max);this.result.min_pretty=min_pretty;this.result.max_pretty=max_pretty;this.$cache.min.html(this.decorate(min_pretty,this.options.min));this.$cache.max.html(this.decorate(max_pretty,this.options.max))}
this.labels.w_min=this.$cache.min.outerWidth(!1);this.labels.w_max=this.$cache.max.outerWidth(!1)},setTempMinInterval:function(){var interval=this.result.to-this.result.from;if(this.old_min_interval===null){this.old_min_interval=this.options.min_interval}
this.options.min_interval=interval},restoreOriginalMinInterval:function(){if(this.old_min_interval!==null){this.options.min_interval=this.old_min_interval;this.old_min_interval=null}},calc:function(update){if(!this.options){return}
this.calc_count++;if(this.calc_count===10||update){this.calc_count=0;this.coords.w_rs=this.$cache.rs.outerWidth(!1);this.calcHandlePercent()}
if(!this.coords.w_rs){return}
this.calcPointerPercent();var handle_x=this.getHandleX();if(this.target==="both"){this.coords.p_gap=0;handle_x=this.getHandleX()}
if(this.target==="click"){this.coords.p_gap=this.coords.p_handle/2;handle_x=this.getHandleX();if(this.options.drag_interval){this.target="both_one"}else{this.target=this.chooseHandle(handle_x)}}
switch(this.target){case "base":var w=(this.options.max-this.options.min)/100,f=(this.result.from-this.options.min)/w,t=(this.result.to-this.options.min)/w;this.coords.p_single_real=this.toFixed(f);this.coords.p_from_real=this.toFixed(f);this.coords.p_to_real=this.toFixed(t);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case "single":if(this.options.from_fixed){break}
this.coords.p_single_real=this.convertToRealPercent(handle_x);this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case "from":if(this.options.from_fixed){break}
this.coords.p_from_real=this.convertToRealPercent(handle_x);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);if(this.coords.p_from_real>this.coords.p_to_real){this.coords.p_from_real=this.coords.p_to_real}
this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed){break}
this.coords.p_to_real=this.convertToRealPercent(handle_x);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);if(this.coords.p_to_real<this.coords.p_from_real){this.coords.p_to_real=this.coords.p_from_real}
this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case "both":if(this.options.from_fixed||this.options.to_fixed){break}
handle_x=this.toFixed(handle_x+(this.coords.p_handle*0.001));this.coords.p_from_real=this.convertToRealPercent(handle_x)-this.coords.p_gap_left;this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.convertToRealPercent(handle_x)+this.coords.p_gap_right;this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case "both_one":if(this.options.from_fixed||this.options.to_fixed){break}
var real_x=this.convertToRealPercent(handle_x),from=this.result.from_percent,to=this.result.to_percent,full=to-from,half=full/2,new_from=real_x-half,new_to=real_x+half;if(new_from<0){new_from=0;new_to=new_from+full}
if(new_to>100){new_to=100;new_from=new_to-full}
this.coords.p_from_real=this.calcWithStep(new_from);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(new_to);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break}
if(this.options.type==="single"){this.coords.p_bar_x=(this.coords.p_handle/2);this.coords.p_bar_w=this.coords.p_single_fake;this.result.from_percent=this.coords.p_single_real;this.result.from=this.convertToValue(this.coords.p_single_real);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from]}}else{this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+(this.coords.p_handle/2));this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake);this.result.from_percent=this.coords.p_from_real;this.result.from=this.convertToValue(this.coords.p_from_real);this.result.from_pretty=this._prettify(this.result.from);this.result.to_percent=this.coords.p_to_real;this.result.to=this.convertToValue(this.coords.p_to_real);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from];this.result.to_value=this.options.values[this.result.to]}}
this.calcMinMax();this.calcLabels()},calcPointerPercent:function(){if(!this.coords.w_rs){this.coords.p_pointer=0;return}
if(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)){this.coords.x_pointer=0}else if(this.coords.x_pointer>this.coords.w_rs){this.coords.x_pointer=this.coords.w_rs}
this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)},convertToRealPercent:function(fake){var full=100-this.coords.p_handle;return fake/full*100},convertToFakePercent:function(real){var full=100-this.coords.p_handle;return real/100*full},getHandleX:function(){var max=100-this.coords.p_handle,x=this.toFixed(this.coords.p_pointer-this.coords.p_gap);if(x<0){x=0}else if(x>max){x=max}
return x},calcHandlePercent:function(){if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)}
this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(real_x){if(this.options.type==="single"){return"single"}else{var m_point=this.coords.p_from_real+((this.coords.p_to_real-this.coords.p_from_real)/2);if(real_x>=m_point){return this.options.to_fixed?"from":"to"}else{return this.options.from_fixed?"to":"from"}}},calcMinMax:function(){if(!this.coords.w_rs){return}
this.labels.p_min=this.labels.w_min/this.coords.w_rs*100;this.labels.p_max=this.labels.w_max/this.coords.w_rs*100},calcLabels:function(){if(!this.coords.w_rs||this.options.hide_from_to){return}
if(this.options.type==="single"){this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=this.coords.p_single_fake+(this.coords.p_handle/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}else{this.labels.w_from=this.$cache.from.outerWidth(!1);this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100;this.labels.p_from_left=this.coords.p_from_fake+(this.coords.p_handle/2)-(this.labels.p_from_fake/2);this.labels.p_from_left=this.toFixed(this.labels.p_from_left);this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake);this.labels.w_to=this.$cache.to.outerWidth(!1);this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100;this.labels.p_to_left=this.coords.p_to_fake+(this.coords.p_handle/2)-(this.labels.p_to_fake/2);this.labels.p_to_left=this.toFixed(this.labels.p_to_left);this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake);this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=((this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.toFixed(this.labels.p_single_left);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}},updateScene:function(){if(this.raf_id){cancelAnimationFrame(this.raf_id);this.raf_id=null}
clearTimeout(this.update_tm);this.update_tm=null;if(!this.options){return}
this.drawHandles();if(this.is_active){this.raf_id=requestAnimationFrame(this.updateScene.bind(this))}else{this.update_tm=setTimeout(this.updateScene.bind(this),300)}},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return}
if(this.coords.w_rs!==this.coords.w_rs_old){this.target="base";this.is_resize=!0}
if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw){this.setMinMax();this.calc(!0);this.drawLabels();if(this.options.grid){this.calcGridMargin();this.calcGridLabels()}
this.force_redraw=!0;this.coords.w_rs_old=this.coords.w_rs;this.drawShadow()}
if(!this.coords.w_rs){return}
if(!this.dragging&&!this.force_redraw&&!this.is_key){return}
if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if(this.options.type==="single"){this.$cache.bar[0].style.left=0;this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%";this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%"}else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw){this.$cache.from[0].style.left=this.labels.p_from_left+"%"}
if(this.old_to!==this.result.to||this.force_redraw){this.$cache.to[0].style.left=this.labels.p_to_left+"%"}
this.$cache.single[0].style.left=this.labels.p_single_left+"%"}
this.writeToInput();if((this.old_from!==this.result.from||this.old_to!==this.result.to)&&!this.is_start){this.$cache.input.trigger("change");this.$cache.input.trigger("input")}
this.old_from=this.result.from;this.old_to=this.result.to;if(!this.is_resize&&!this.is_update&&!this.is_start&&!this.is_finish){this.callOnChange()}
if(this.is_key||this.is_click){this.is_key=!1;this.is_click=!1;this.callOnFinish()}
this.is_update=!1;this.is_resize=!1;this.is_finish=!1}
this.is_start=!1;this.is_key=!1;this.is_click=!1;this.force_redraw=!1},drawLabels:function(){if(!this.options){return}
var values_num=this.options.values.length;var p_values=this.options.p_values;var text_single;var text_from;var text_to;var from_pretty;var to_pretty;if(this.options.hide_from_to){return}
if(this.options.type==="single"){if(values_num){text_single=this.decorate(p_values[this.result.from]);this.$cache.single.html(text_single)}else{from_pretty=this._prettify(this.result.from);text_single=this.decorate(from_pretty,this.result.from);this.$cache.single.html(text_single)}
this.calcLabels();if(this.labels.p_single_left<this.labels.p_min+1){this.$cache.min[0].style.visibility="hidden"}else{this.$cache.min[0].style.visibility="visible"}
if(this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}else{if(values_num){if(this.options.decorate_both){text_single=this.decorate(p_values[this.result.from]);text_single+=this.options.values_separator;text_single+=this.decorate(p_values[this.result.to])}else{text_single=this.decorate(p_values[this.result.from]+this.options.values_separator+p_values[this.result.to])}
text_from=this.decorate(p_values[this.result.from]);text_to=this.decorate(p_values[this.result.to]);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)}else{from_pretty=this._prettify(this.result.from);to_pretty=this._prettify(this.result.to);if(this.options.decorate_both){text_single=this.decorate(from_pretty,this.result.from);text_single+=this.options.values_separator;text_single+=this.decorate(to_pretty,this.result.to)}else{text_single=this.decorate(from_pretty+this.options.values_separator+to_pretty,this.result.to)}
text_from=this.decorate(from_pretty,this.result.from);text_to=this.decorate(to_pretty,this.result.to);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)}
this.calcLabels();var min=Math.min(this.labels.p_single_left,this.labels.p_from_left),single_left=this.labels.p_single_left+this.labels.p_single_fake,to_left=this.labels.p_to_left+this.labels.p_to_fake,max=Math.max(single_left,to_left);if(this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left){this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";if(this.result.from===this.result.to){if(this.target==="from"){this.$cache.from[0].style.visibility="visible"}else if(this.target==="to"){this.$cache.to[0].style.visibility="visible"}else if(!this.target){this.$cache.from[0].style.visibility="visible"}
this.$cache.single[0].style.visibility="hidden";max=to_left}else{this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";max=Math.max(single_left,to_left)}}else{this.$cache.from[0].style.visibility="visible";this.$cache.to[0].style.visibility="visible";this.$cache.single[0].style.visibility="hidden"}
if(min<this.labels.p_min+1){this.$cache.min[0].style.visibility="hidden"}else{this.$cache.min[0].style.visibility="visible"}
if(max>100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var o=this.options,c=this.$cache,is_from_min=typeof o.from_min==="number"&&!isNaN(o.from_min),is_from_max=typeof o.from_max==="number"&&!isNaN(o.from_max),is_to_min=typeof o.to_min==="number"&&!isNaN(o.to_min),is_to_max=typeof o.to_max==="number"&&!isNaN(o.to_max),from_min,from_max,to_min,to_max;if(o.type==="single"){if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_single[0].style.display="block";c.shad_single[0].style.left=from_min+"%";c.shad_single[0].style.width=from_max+"%"}else{c.shad_single[0].style.display="none"}}else{if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_from[0].style.display="block";c.shad_from[0].style.left=from_min+"%";c.shad_from[0].style.width=from_max+"%"}else{c.shad_from[0].style.display="none"}
if(o.to_shadow&&(is_to_min||is_to_max)){to_min=this.convertToPercent(is_to_min?o.to_min:o.min);to_max=this.convertToPercent(is_to_max?o.to_max:o.max)-to_min;to_min=this.toFixed(to_min-(this.coords.p_handle/100*to_min));to_max=this.toFixed(to_max-(this.coords.p_handle/100*to_max));to_min=to_min+(this.coords.p_handle/2);c.shad_to[0].style.display="block";c.shad_to[0].style.left=to_min+"%";c.shad_to[0].style.width=to_max+"%"}else{c.shad_to[0].style.display="none"}}},writeToInput:function(){if(this.options.type==="single"){if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value)}else{this.$cache.input.prop("value",this.result.from)}
this.$cache.input.data("from",this.result.from)}else{if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value)}else{this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to)}
this.$cache.input.data("from",this.result.from);this.$cache.input.data("to",this.result.to)}},callOnStart:function(){this.writeToInput();if(this.options.onStart&&typeof this.options.onStart==="function"){if(this.options.scope){this.options.onStart.call(this.options.scope,this.result)}else{this.options.onStart(this.result)}}},callOnChange:function(){this.writeToInput();if(this.options.onChange&&typeof this.options.onChange==="function"){if(this.options.scope){this.options.onChange.call(this.options.scope,this.result)}else{this.options.onChange(this.result)}}},callOnFinish:function(){this.writeToInput();if(this.options.onFinish&&typeof this.options.onFinish==="function"){if(this.options.scope){this.options.onFinish.call(this.options.scope,this.result)}else{this.options.onFinish(this.result)}}},callOnUpdate:function(){this.writeToInput();if(this.options.onUpdate&&typeof this.options.onUpdate==="function"){if(this.options.scope){this.options.onUpdate.call(this.options.scope,this.result)}else{this.options.onUpdate(this.result)}}},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input");if(this.has_tab_index){this.$cache.input.prop("tabindex",-1)}else{this.$cache.input.removeProp("tabindex")}
this.has_tab_index=!this.has_tab_index},convertToPercent:function(value,no_min){var diapason=this.options.max-this.options.min,one_percent=diapason/100,val,percent;if(!diapason){this.no_diapason=!0;return 0}
if(no_min){val=value}else{val=value-this.options.min}
percent=val/one_percent;return this.toFixed(percent)},convertToValue:function(percent){var min=this.options.min,max=this.options.max,min_decimals=min.toString().split(".")[1],max_decimals=max.toString().split(".")[1],min_length,max_length,avg_decimals=0,abs=0;if(percent===0){return this.options.min}
if(percent===100){return this.options.max}
if(min_decimals){min_length=min_decimals.length;avg_decimals=min_length}
if(max_decimals){max_length=max_decimals.length;avg_decimals=max_length}
if(min_length&&max_length){avg_decimals=(min_length>=max_length)?min_length:max_length}
if(min<0){abs=Math.abs(min);min=+(min+abs).toFixed(avg_decimals);max=+(max+abs).toFixed(avg_decimals)}
var number=((max-min)/100*percent)+min,string=this.options.step.toString().split(".")[1],result;if(string){number=+number.toFixed(string.length)}else{number=number/this.options.step;number=number*this.options.step;number=+number.toFixed(0)}
if(abs){number-=abs}
if(string){result=+number.toFixed(string.length)}else{result=this.toFixed(number)}
if(result<this.options.min){result=this.options.min}else if(result>this.options.max){result=this.options.max}
return result},calcWithStep:function(percent){var rounded=Math.round(percent/this.coords.p_step)*this.coords.p_step;if(rounded>100){rounded=100}
if(percent===100){rounded=100}
return this.toFixed(rounded)},checkMinInterval:function(p_current,p_next,type){var o=this.options,current,next;if(!o.min_interval){return p_current}
current=this.convertToValue(p_current);next=this.convertToValue(p_next);if(type==="from"){if(next-current<o.min_interval){current=next-o.min_interval}}else{if(current-next<o.min_interval){current=next+o.min_interval}}
return this.convertToPercent(current)},checkMaxInterval:function(p_current,p_next,type){var o=this.options,current,next;if(!o.max_interval){return p_current}
current=this.convertToValue(p_current);next=this.convertToValue(p_next);if(type==="from"){if(next-current>o.max_interval){current=next-o.max_interval}}else{if(current-next>o.max_interval){current=next+o.max_interval}}
return this.convertToPercent(current)},checkDiapason:function(p_num,min,max){var num=this.convertToValue(p_num),o=this.options;if(typeof min!=="number"){min=o.min}
if(typeof max!=="number"){max=o.max}
if(num<min){num=min}
if(num>max){num=max}
return this.convertToPercent(num)},toFixed:function(num){num=num.toFixed(20);return+num},_prettify:function(num){if(!this.options.prettify_enabled){return num}
if(this.options.prettify&&typeof this.options.prettify==="function"){return this.options.prettify(num)}else{return this.prettify(num)}},prettify:function(num){var n=num.toString();return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(left,width){if(!this.options.force_edges){return this.toFixed(left)}
if(left<0){left=0}else if(left>100-width){left=100-width}
return this.toFixed(left)},validate:function(){var o=this.options,r=this.result,v=o.values,vl=v.length,value,i;if(typeof o.min==="string")o.min=+o.min;if(typeof o.max==="string")o.max=+o.max;if(typeof o.from==="string")o.from=+o.from;if(typeof o.to==="string")o.to=+o.to;if(typeof o.step==="string")o.step=+o.step;if(typeof o.from_min==="string")o.from_min=+o.from_min;if(typeof o.from_max==="string")o.from_max=+o.from_max;if(typeof o.to_min==="string")o.to_min=+o.to_min;if(typeof o.to_max==="string")o.to_max=+o.to_max;if(typeof o.grid_num==="string")o.grid_num=+o.grid_num;if(o.max<o.min){o.max=o.min}
if(vl){o.p_values=[];o.min=0;o.max=vl-1;o.step=1;o.grid_num=o.max;o.grid_snap=!0;for(i=0;i<vl;i++){value=+v[i];if(!isNaN(value)){v[i]=value;value=this._prettify(value)}else{value=v[i]}
o.p_values.push(value)}}
if(typeof o.from!=="number"||isNaN(o.from)){o.from=o.min}
if(typeof o.to!=="number"||isNaN(o.to)){o.to=o.max}
if(o.type==="single"){if(o.from<o.min)o.from=o.min;if(o.from>o.max)o.from=o.max}else{if(o.from<o.min)o.from=o.min;if(o.from>o.max)o.from=o.max;if(o.to<o.min)o.to=o.min;if(o.to>o.max)o.to=o.max;if(this.update_check.from){if(this.update_check.from!==o.from){if(o.from>o.to)o.from=o.to}
if(this.update_check.to!==o.to){if(o.to<o.from)o.to=o.from}}
if(o.from>o.to)o.from=o.to;if(o.to<o.from)o.to=o.from}
if(typeof o.step!=="number"||isNaN(o.step)||!o.step||o.step<0){o.step=1}
if(typeof o.from_min==="number"&&o.from<o.from_min){o.from=o.from_min}
if(typeof o.from_max==="number"&&o.from>o.from_max){o.from=o.from_max}
if(typeof o.to_min==="number"&&o.to<o.to_min){o.to=o.to_min}
if(typeof o.to_max==="number"&&o.from>o.to_max){o.to=o.to_max}
if(r){if(r.min!==o.min){r.min=o.min}
if(r.max!==o.max){r.max=o.max}
if(r.from<r.min||r.from>r.max){r.from=o.from}
if(r.to<r.min||r.to>r.max){r.to=o.to}}
if(typeof o.min_interval!=="number"||isNaN(o.min_interval)||!o.min_interval||o.min_interval<0){o.min_interval=0}
if(typeof o.max_interval!=="number"||isNaN(o.max_interval)||!o.max_interval||o.max_interval<0){o.max_interval=0}
if(o.min_interval&&o.min_interval>o.max-o.min){o.min_interval=o.max-o.min}
if(o.max_interval&&o.max_interval>o.max-o.min){o.max_interval=o.max-o.min}},decorate:function(num,original){var decorated="",o=this.options;if(o.prefix){decorated+=o.prefix}
decorated+=num;if(o.max_postfix){if(o.values.length&&num===o.p_values[o.max]){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}else if(original===o.max){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}}
if(o.postfix){decorated+=o.postfix}
return decorated},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values){this.result.from_value=this.options.values[this.result.from]}},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values){this.result.to_value=this.options.values[this.result.to]}},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(!this.options.grid){return}
var o=this.options,i,z,total=o.max-o.min,big_num=o.grid_num,big_p=0,big_w=0,small_max=4,local_small_max,small_p,small_w=0,result,html='';this.calcGridMargin();if(o.grid_snap){big_num=total/o.step}
if(big_num>50)big_num=50;big_p=this.toFixed(100/big_num);if(big_num>4){small_max=3}
if(big_num>7){small_max=2}
if(big_num>14){small_max=1}
if(big_num>28){small_max=0}
for(i=0;i<big_num+1;i++){local_small_max=small_max;big_w=this.toFixed(big_p*i);if(big_w>100){big_w=100}
this.coords.big[i]=big_w;small_p=(big_w-(big_p*(i-1)))/(local_small_max+1);for(z=1;z<=local_small_max;z++){if(big_w===0){break}
small_w=this.toFixed(big_w-(small_p*z));html+='<span class="irs-grid-pol small" style="left: '+small_w+'%"></span>'}
html+='<span class="irs-grid-pol" style="left: '+big_w+'%"></span>';result=this.convertToValue(big_w);if(o.values.length){result=o.p_values[result]}else{result=this._prettify(result)}
html+='<span class="irs-grid-text js-grid-text-'+i+'" style="left: '+big_w+'%">'+result+'</span>'}
this.coords.big_num=Math.ceil(big_num+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(html);this.cacheGridLabels()},cacheGridLabels:function(){var $label,i,num=this.coords.big_num;for(i=0;i<num;i++){$label=this.$cache.grid.find(".js-grid-text-"+i);this.$cache.grid_labels.push($label)}
this.calcGridLabels()},calcGridLabels:function(){var i,label,start=[],finish=[],num=this.coords.big_num;for(i=0;i<num;i++){this.coords.big_w[i]=this.$cache.grid_labels[i].outerWidth(!1);this.coords.big_p[i]=this.toFixed(this.coords.big_w[i]/this.coords.w_rs*100);this.coords.big_x[i]=this.toFixed(this.coords.big_p[i]/2);start[i]=this.toFixed(this.coords.big[i]-this.coords.big_x[i]);finish[i]=this.toFixed(start[i]+this.coords.big_p[i])}
if(this.options.force_edges){if(start[0]<-this.coords.grid_gap){start[0]=-this.coords.grid_gap;finish[0]=this.toFixed(start[0]+this.coords.big_p[0]);this.coords.big_x[0]=this.coords.grid_gap}
if(finish[num-1]>100+this.coords.grid_gap){finish[num-1]=100+this.coords.grid_gap;start[num-1]=this.toFixed(finish[num-1]-this.coords.big_p[num-1]);this.coords.big_x[num-1]=this.toFixed(this.coords.big_p[num-1]-this.coords.grid_gap)}}
this.calcGridCollision(2,start,finish);this.calcGridCollision(4,start,finish);for(i=0;i<num;i++){label=this.$cache.grid_labels[i][0];if(this.coords.big_x[i]!==Number.POSITIVE_INFINITY){label.style.marginLeft=-this.coords.big_x[i]+"%"}}},calcGridCollision:function(step,start,finish){var i,next_i,label,num=this.coords.big_num;for(i=0;i<num;i+=step){next_i=i+(step/2);if(next_i>=num){break}
label=this.$cache.grid_labels[next_i][0];if(finish[i]<=start[next_i]){label.style.visibility="visible"}else{label.style.visibility="hidden"}}},calcGridMargin:function(){if(!this.options.grid_margin){return}
this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return}
if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)}
this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100);this.coords.grid_gap=this.toFixed((this.coords.p_handle/2)-0.1);this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%";this.$cache.grid[0].style.left=this.coords.grid_gap+"%"},update:function(options){if(!this.input){return}
this.is_update=!0;this.options.from=this.result.from;this.options.to=this.result.to;this.update_check.from=this.result.from;this.update_check.to=this.result.to;this.options=$.extend(this.options,options);this.validate();this.updateResult(options);this.toggleInput();this.remove();this.init(!0)},reset:function(){if(!this.input){return}
this.updateResult();this.update()},destroy:function(){if(!this.input){return}
this.toggleInput();this.$cache.input.prop("readonly",!1);$.data(this.input,"ionRangeSlider",null);this.remove();this.input=null;this.options=null}};$.fn.ionRangeSlider=function(options){return this.each(function(){if(!$.data(this,"ionRangeSlider")){$.data(this,"ionRangeSlider",new IonRangeSlider(this,options,plugin_count++))}})};(function(){var lastTime=0;var vendors=['ms','moz','webkit','o'];for(var x=0;x<vendors.length&&!window.requestAnimationFrame;++x){window.requestAnimationFrame=window[vendors[x]+'RequestAnimationFrame'];window.cancelAnimationFrame=window[vendors[x]+'CancelAnimationFrame']||window[vendors[x]+'CancelRequestAnimationFrame']}
if(!window.requestAnimationFrame)
window.requestAnimationFrame=function(callback,element){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){callback(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id};if(!window.cancelAnimationFrame)
window.cancelAnimationFrame=function(id){clearTimeout(id)}}())}));$(function(){'use strict';var $body=$('body'),$contentWrapper=$('.contentBackground'),$forms=$('form.form-scw',$contentWrapper),$langToggle=$('a[href="#upperToggle"]',$('header')),$langToggleTop=$('.countryFooter .l10nWrap > a'),$upperToggle=$('.upperToggle'),$overlay=$('.overlay'),$powermailMorestep=$('.tx-powermail .powermail_morestep.form-scw',$contentWrapper),$desktopMenu=$('.desktopMenuWrap nav ul',$contentWrapper),$menu=$('#mobile-navigation',$contentWrapper),$menuSlideSide=$menu.hasClass("open-from-left")?"left":"right",menuOptions={offCanvas:{position:$menuSlideSide,zposition:"front"},className:{},navbar:{title:'<div class="header"><div class="closer"></div></div>'},},affixPoint=0,galleryConfig={galleryId:$(this).children().find('a.lightgallery').first().attr('rel'),subHtmlSelectorRelative:!0,selector:'a.lightgallery',download:!1,share:!1,autoplay:!1,hash:!1},$parallaxWrapper=$('.parallax-container'),$langSelect=$('select.mobileLangMenu'),initLangselect=function(){if($langSelect.length){$langSelect.select2({templateResult:langSelectFormat,templateSelection:langSelectFormat})}},langToogle=function(obj){var $body=$('body');obj.click(function(e){e.preventDefault();$langToggle.toggleClass('open');$upperToggle.toggleClass('open');toggleOverlay();$('.mapWrap .btn-close',$upperToggle).on('click',function(){$('.countryFooter .l10nWrap > a').click()});$(window).resize(function(){$('.countryFooter .l10nWrap > a').click()})})},initMenus=function(){var
$m=$desktopMenu.clone(),$wraps=$('.subMenuWrap',$m);if($langToggle.length){langToogle($langToggle)}
if($langToggleTop.length){langToogle($langToggleTop)}
$wraps.each(function(){$(this).replaceWith($('ul.subMenu',$(this)))});$m.removeClass('desktopMainMenu').find('ul.desktopMainMenu').removeClass('desktopMainMenu');$menu.append($m).mmenu(menuOptions);var $panels=$menu.find('.mm-panel').not(':first');$panels.each(function(){var
$p=$(this),$l=$('> ul.mm-listview',$p);$l.prepend(function(){var $link=$('<a />');$link.addClass('closeLink').html(translations.back).prepend('<i class="icon icon-pfeil_links" />').click(function(event){var $pna=$(this).closest('.mm-panel');$pna.prevAll('.mm-hidden').removeClass('mm-hidden');$pna.removeClass('mm-highest mm-current mm-opened')});return $('<li />').append($link)})});$menu.find('.mm-panel:first > ul.mm-listview').prepend(function(){var $link=$('<a />');$link.html($('span.textHomepage').html()).attr('href','/');return $('<li />').append($link)});var $mmenuApi=$menu.data('mmenu');$mmenuApi.bind("opened",function(){});$mmenuApi.openPanel($menu);$menu.find('.mm-title .header .closer').click(function(){$mmenuApi.close()})},$footerClaim=$('.footerClaim',$body),$footerLayer=$('.footerLayer',$body),breadCumbhackNecessaryClass='scw-rootline-hack-replacement',breadCumbhackNecessary=$('li.'+breadCumbhackNecessaryClass).length,$breadcrumbBar=$('.breadcrumbBar'),$breadcrumb=$('ul',$breadcrumbBar),init=function(){if($footerLayer.length){var
h=$footerLayer.outerHeight()+80,hmax=$(window).height();$('> footer',$body).css({'margin-bottom':(h>hmax?hmax:h)});$('.f3-widget-paginator li:contains("...")').addClass('f3-widget-paginator-points')}
if($desktopMenu.length){initMenus()}
initLangselect();$('svg #'+$('li.active > a',$('.continentList')).data('mapHover')).show();if(breadCumbhackNecessary){var
$lis=$('li',$breadcrumb),$subPage=$lis.filter('.'+breadCumbhackNecessaryClass),$catPage=$lis.filter('.catoverview').length?$lis.filter('.catoverview'):$lis.eq($subPage.data('breadcrumb-eq')),$actPge=$lis.last();$subPage.removeClass(breadCumbhackNecessaryClass).find('a').attr('href',function(){var
url_parts=document.URL.replace(/http(s)?:\/\//,'').replace(/\/\s*$/,'').split('/'),loc_parts=$('a',$catPage).attr('href').replace(/\/\s*$/,'').split('/');url_parts.shift();url_parts.pop();url_parts[0]=loc_parts[0];console.log(url_parts.join('/')+'/');if($lis.filter('.catoverview').length>0){return"#"}else{return url_parts.join('/')+'/'}})}
setTimeout(function(){$body.removeClass('loading')},300)};init();$('a[href*="?type=1480513617"]').on('click',function(event){event.preventDefault();$.ajax({url:$(this).attr('href'),method:"GET",dataType:"html"}).done(function(data){bootbox.alert({message:data,backdrop:!0,size:'large'})})});$("ul.desktopMainMenu > li").hover(function(){if(!$("body").hasClass("codex")){toggleOverlay()}},function(){if(!$("body").hasClass("codex")){toggleOverlay()}});$("ul.desktopMainMenu > li").hover(function(){if(!$("body").hasClass("codex")){$(this).addClass("hover")}},function(){if(!$("body").hasClass("codex")){$(this).removeClass("hover")}});$('.breadcrumbMenu01 > li > a').on('click',function(event){if($(window).width()<992){event.preventDefault();$(this).parent().toggleClass('hover');return!1}
return!0});var windowHeight=$("body").height()-120;$(".menuLayer").css("height",windowHeight);var $flyoutWidth=$('.flyoutMenuButtons').width()+$('.flyoutMenuContent').width();var $flyoutButtonWidth=$('.flyoutMenuButtons').width()+$('.flyoutMenuIcons').width();var $transformTopValue='-50%';var $defaultTransform='translate(0, '+$transformTopValue+')';$('.flyoutMenuIcons i, .flyoutMenuButtons button').on('click',function(){var $indexOfClicked=$(this).index()+1;if($('.flyoutMenu').hasClass('open')&&$(this).hasClass('open')){toggleOverlay('flyout-open');$('.flyoutMenu').removeClass('open');$('.flyoutMenuButtons *:nth-child('+$indexOfClicked+')').removeClass('open');$('.flyoutMenuIcons *:nth-child('+$indexOfClicked+')').removeClass('open');$('.flyoutMenu',$('#flyout')).css('transform','translate(-'+$flyoutWidth+'px, '+$transformTopValue+')')}else if(!$('.flyoutMenu').hasClass('open')){$('.flyoutMenuButtons *').removeClass('open');$('.flyoutMenuIcons *').removeClass('open');$('.flyoutMenuContent *').removeClass('open');setTimeout(function(){$('.flyoutMenu').addClass('open');$('.flyoutMenuContent *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenuButtons *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenuIcons *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenu',$('#flyout')).css('transform',$defaultTransform)},100);setTimeout(function(){toggleOverlay('flyout-open')},300)}else{$('.flyoutMenuButtons *').removeClass('open');$('.flyoutMenuIcons *').removeClass('open');$('.flyoutMenuContent *').removeClass('open');setTimeout(function(){$('.flyoutMenuContent *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenuButtons *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenuIcons *:nth-child('+$indexOfClicked+')').addClass('open');$('.flyoutMenu',$('#flyout')).css('transform',$defaultTransform);if(!$body.hasClass('flyout-open')){toggleOverlay('flyout-open')}},100)}});$('.flyoutMenuIcons i, .flyoutMenuButtons button').on('mouseover mouseleave',function(){var $index=$(this).index()+1;$('.flyoutMenuButtons *:nth-child('+$index+')').toggleClass('hover');$('.flyoutMenuIcons *:nth-child('+$index+')').toggleClass('hover')});var $flyoutMobile=$(".flyoutMobile");var $flyoutToggle=$('header a[href="#flyout"]');$flyoutToggle.click(function(e){e.preventDefault();toggleOverlay('flyout-open');$flyoutMobile.toggleClass('open')});$('.overlay').on('click',function(){var $body=$('body');if($body.hasClass('flyout-open')){toggleOverlay('flyout-open');$flyoutMobile.removeClass('open');$('.flyoutMenu',$('#flyout')).removeClass('open');$('.flyoutMenu',$('#flyout')).css('transform','translate(-'+$flyoutWidth+'px, -50%)');$('.flyoutMenuButtons *').removeClass('open');$('.flyoutMenuIcons *').removeClass('open');$('.flyoutMenuContent *').removeClass('open')}});$(window).resize(function(){if($(window).width()>991&&!$('#flyout').hasClass('show')){$('#flyout').addClass('show')}
if($(window).width()<=991){$('#flyout').removeClass('show')}
$flyoutMobile.removeClass('open');if($('#flyout').hasClass('show')){var $flyoutWidth=$('.flyoutMenuButtons').width()+$('.flyoutMenuContent').width();$('.flyoutMenu',$('#flyout')).css('transform','translate(-'+$flyoutWidth+'px,  -50%)')}else{$('.flyoutMenu',$('#flyout')).css('transform','translate(-999px, -50%)')}
$('.flyoutMenuButtons *').removeClass('open');$('.flyoutMenuIcons *').removeClass('open');$('.flyoutMenuContent *').removeClass('open');if($body.hasClass('flyout-open')){toggleOverlay('flyout-open')}});if($('section.linkBar .row').children().length==0){$('section.linkBar').hide()}
if($forms.length){var
$inputs=$('input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea',$forms);$inputs.change(function(e){formFillAction($(this))});$inputs.focusin(function(e){var $tooltip=$('#tooltip_'+$(this).attr('id'));if($tooltip.length>0){$tooltip.addClass('open')}});$inputs.focusout(function(e){var $tooltip=$('#tooltip_'+$(this).attr('id'));if($tooltip.length>0){$tooltip.removeClass('open')}});$inputs.each(function(){formFillAction($(this))})}
function formFillAction($inputObject){if($inputObject.val().length){$inputObject.addClass('filled')}else{$inputObject.removeClass('filled')}}
var $readonlyFields=$('.readonly',$forms);if($readonlyFields.length){$('input',$readonlyFields).attr('readonly','readonly')}
$('a.btn',$powermailMorestep).each(function(){var $elem=$(this);$elem.removeClass('btn');$elem.html('');if($elem.hasClass('btn-warning')){$elem.removeClass('btn-warning');$elem.addClass('link-button-rte reverse-icon');$elem.html($lang.prev)}else{$elem.removeClass('btn-primary');$elem.addClass('link-button-rte');$elem.html($lang.next)}});$powermailMorestep.each(function(){var $powermailLastFieldset=$('fieldset:last-of-type',$(this));var $powermailMorestepSubmit=$('button[type="submit"]',$powermailLastFieldset);if($powermailMorestepSubmit.length>0){$powermailMorestepSubmit.appendTo($('a.link-button-rte',$powermailLastFieldset).parent().first()).addClass('pull-right')}});$('.countdown .clock').each(function(){var obj=$(this);var countDownDate=new Date($(this).data('target')).getTime();var x=setInterval(function(){var now=new Date().getTime();var distance=countDownDate-now;var days=Math.floor(distance/(1000*60*60*24));var hours=("0"+Math.floor((distance%(1000*60*60*24))/(1000*60*60))).slice(-2);var minutes=("0"+Math.floor((distance%(1000*60*60))/(1000*60))).slice(-2);var seconds=("0"+Math.floor((distance%(1000*60))/1000)).slice(-2);obj.html("<span>"+days+" "+lang.days+",</span> "+hours+":"+minutes+":"+seconds+" "+lang.hours);if(distance<0){clearInterval(x);obj.html($('.countdown .textFinish').html())}},1000)});var $referenceSlider=$(".referenceSliderWrap");$referenceSlider.slick({lazyLoad:'ondemand',autoplay:!0,infinite:!1,autoplaySpeed:8000,mobileFirst:!0,arrows:!1,dots:!0,slidesToShow:1,slidesToScroll:1,responsive:[{breakpoint:770,settings:{slidesToShow:2,slidesToScroll:2}}]});$(".productsSliderWrap").slick({dots:!0,autoplay:!0,autoplaySpeed:8000});$('video.videoPlayer',$slickStage).on('ended',function(){$('.imageAfterVideo',$slickStage).show()});$("a.link-calculate").click(function(e){e.preventDefault();$(".productsCalculate").slideToggle()});var crossSellingCounter=1;$(".productsXsellingMore > a").click(function(e){e.preventDefault();if(crossSellingCounter==1){$(".productsXsellingRow2").addClass("opened");crossSellingCounter=2;if($(".productsXsellingRow3").length==0){$('.productsXsellingMoreRow').hide()}
return!1}
if(crossSellingCounter==2){$(".productsXsellingRow3").addClass("opened");$(".productsXsellingMore").fadeOut(250)}});if(($('.productsDetail').length||$('.maskStageWrap').length==0)&&$breadcrumbBar.length){affixPoint=$('.contentBackground > header').first().outerHeight(!0)+$('.productsDetail').first().height();$breadcrumbBar.affix({offset:{top:affixPoint}})}
var time=2;var $bar,$galleryBig,isPause,tick,percentTime;$(".galleryCountImg").html(" / "+$(".galleryWrap > div").length);$galleryBig=$(".galleryWrap");$galleryBig.slick({lazyLoad:'ondemand',mobileFirst:!0,arrows:!1,dots:!1,responsive:[{breakpoint:992,settings:{arrows:!0,prevArrow:'<button type="button" class="slick-button slick-prev"><span class="icon icon-pfeil_links"></span></button>',nextArrow:'<button type="button" class="slick-button slick-next"><span class="icon icon-pfeil-link-gross"></span></button>'}}]});$('.galleryWrap').on('beforeChange',function(event,slick,currentSlide,nextSlide){imgCaption(nextSlide)});$('.galleryWrap .slick-button').on('click',function(){});imgCaption(0);function imgCaption(imgIndex){var $img=$(".slick-slide[data-slick-index='"+imgIndex+"'] img");isPause=!0;var $imgCaption=$img.attr("alt");var $imgDescription=$img.data('description');if(typeof($imgDescription)!=='undefined'&&$imgDescription.length>0){$imgCaption=$imgDescription}
$(".galleryCaptionText").html($imgCaption);$(".galleryActImg").html(imgIndex+1)}
$bar=$('.galleryProgress .galleryProgressBar');$('.slick-track').on({mouseenter:function(){isPause=!0},mouseleave:function(){isPause=!1}});function startProgressbar(){if(!$galleryBig.hasClass('without-autoplay')){resetProgressbar();percentTime=0;isPause=!1;tick=setInterval(interval,35)}}
function interval(){if(isPause===!1){percentTime+=1/(time+0.1);$bar.css({width:percentTime+"%"});if(percentTime>=100){$galleryBig.slick('slickNext');startProgressbar()}}}
function resetProgressbar(){$bar.css({width:0+'%'});clearTimeout(tick)}
if($(window).width()>=768){startProgressbar()}
var $mobileGalleryActive=!1;if($(window).width()<768){if($galleryBig.length>0){$(window).on('scroll',function(){var $slickTrack=$('.slick-track');var $windowPos=$(window).scrollTop()+$('.breadcrumbBar').outerHeight();var $slickTrackTop=$slickTrack.offset().top-20;var $galleryTrackHeight=$slickTrack.outerHeight();var $slickTrackBottom=$slickTrackTop+$galleryTrackHeight+20;if($windowPos>=$slickTrackTop&&$windowPos<=$slickTrackBottom){if(!$mobileGalleryActive){startProgressbar();$mobileGalleryActive=!0}}else if($windowPos<$slickTrackTop||$windowPos>$slickTrackBottom){$mobileGalleryActive=!1;resetProgressbar()}})}}
var $slickStage=$(".stageWrap");$slickStage.on('afterChange',function(){if($('video',$('.slick-current',$slickStage)).length>0){$('video',$('.slick-current',$slickStage)).get(0).load()}});$slickStage.on('init',function(){$slickStage.waitForImages(function(){setTimeout(function(){$slickStage.parent('.maskStageWrap').addClass('images-loaded');if($('video',$('.slick-current',$slickStage)).length>0&&$(window).width()>=768){var $video=$('video',$('.slick-current',$slickStage)).get(0);var $promise=$video.play();if($promise!==undefined&&typeof $promise.then!=="undefined"){$promise.then(function(_){}).catch(function(error){var $playButton=$('.videoPlayButton',$slickStage);$playButton.removeClass('hide');$('.stageItem',$slickStage).on('click',function(){var $object=$(this);if(!$playButton.hasClass('hide')){$playButton.addClass('hide');if($('video',$object).length>0&&$(window).width()>=768){$('video',$object).get(0).play()}}})})}}
if($breadcrumbBar.length&&!$("body").hasClass("codex")){affixPoint=$('.contentBackground > header').first().outerHeight(!0)+$('.maskStageWrap').first().height()+$('.productsDetail').first().height();$breadcrumbBar.affix({offset:{top:affixPoint}})}},500)})});$slickStage.slick({arrows:!1,dots:!0,autoplay:($slickStage.data('autoplay'))=='2'?!0:!1,autoplaySpeed:$slickStage.data('autoplaySpeed'),pauseOnHover:($slickStage.data('stopOnHover'))=='2'?!0:!1,fade:!0,speed:500,lazyLoad:'progressive',slidesToShow:1});var dataItem="";$.each($('[data-item]'),function(i,v){dataItem=$(this).attr('data-item');dataItem=dataItem.replace(/[^A-Z0-9]/ig,"");$(this).attr('data-item',dataItem)});var dataCat="";$.each($('[data-cat]'),function(i,v){dataCat=$(this).attr('data-cat');dataCat=dataCat.replace(/[^A-Z0-9]/ig,"");$(this).attr('data-cat',dataCat)});var activeDataCat=$('.switchtec-categories .switchtec-category:first-child').attr("data-cat");var activeDataItem=$('.switchtec-items[data-cat='+activeDataCat+'] .switchtec-item:first-child').attr("data-item");var selectedDataCat;var selectedDataItem;var selectionArrow="<span class=\"icon icon-pfeil_unten\"></span>";$('.switchtec-categories').select2({minimumResultsForSearch:Infinity});$('.switchtec-items[data-cat='+activeDataCat+']').select2({minimumResultsForSearch:Infinity});$('.switchtec-categories .switchtec-category:first-child').show();$('.switchtec-values[data-cat='+activeDataCat+'][data-item='+activeDataItem+']').show();$('select.switchtec-items+.select2-container--default .select2-selection--single').addClass('blue');$('.switchtec-categories').on('change',function(){selectedDataCat=$('.switchtec-categories option:selected').attr('data-cat');$('.switchtec-items[data-cat='+activeDataCat+'], .container-items[data-cat='+activeDataCat+'], .switchtec-values[data-cat='+activeDataCat+'][data-item='+activeDataItem+']').fadeOut(600,function(){$('.switchtec-items[data-cat='+selectedDataCat+']').select2({minimumResultsForSearch:Infinity}).fadeIn(600);$('.container-items[data-cat='+selectedDataCat+']').fadeIn(600);activeDataCat=selectedDataCat;activeDataItem=$('.switchtec-items[data-cat='+selectedDataCat+'] .switchtec-item:first-child').attr("data-item");$('.switchtec-values[data-cat='+selectedDataCat+'][data-item='+activeDataItem+']').fadeIn(600);$('.select2-selection__arrow').empty().append(selectionArrow);$('.select2-selection__arrow b[role=presentation]').hide();if($('.container-categories .select2-selection__rendered').text().trim()==$('.container-categories select option:first-child.switchtec-category').text().trim()){$('.switchtec-dialplate').removeClass('second-cat').addClass('first-cat');$('select.switchtec-items+.select2-container--default .select2-selection--single').removeClass('red').addClass('blue');$('.switchtec-values .switchtec-value-label').removeClass('bg-blue').addClass('bg-red')}else if($('.container-categories .select2-selection__rendered').text().trim()==$('.container-categories select option:nth-child(2).switchtec-category').text().trim()){$('.switchtec-dialplate').removeClass('first-cat').addClass('second-cat');$('select.switchtec-items+.select2-container--default .select2-selection--single').removeClass('blue').addClass('red');$('.switchtec-values .switchtec-value-label').removeClass('bg-red').addClass('bg-blue')}})});$('.switchtec-items').on('change',function(){selectedDataItem=$('.switchtec-items[data-cat='+activeDataCat+'] option:selected').attr('data-item');$('.switchtec-values[data-cat='+activeDataCat+'][data-item='+activeDataItem+']').fadeOut(600,function(){$('.switchtec-values[data-cat='+activeDataCat+'][data-item='+selectedDataItem+']').fadeIn(600);activeDataItem=selectedDataItem})});$('section','.contentBackground').lightGallery(galleryConfig);$('.galleryWrap').each(function(){$(this).lightGallery(galleryConfig)});$('.contactZip').on('keyup',function(){var errorMsg=$('.contactZipError');var inputValue=$(this).val();if(inputValue===''){errorMsg.fadeOut();return!0}
var $country=$(this).data('country').toUpperCase();console.log($country);if($country===''){$country='DE'}
if(zipValidate(inputValue,$country)){errorMsg.fadeOut()}else{errorMsg.fadeIn()}});$('button',$('.contactSearchWrapper')).on('click',function(e){var errorMsg=$('.contactZipError');var input=$('.contactZip');var inputValue=input.val();var $country=input.data('country').toUpperCase();if($country===''){$country='DE'}else{$country=$country.split('_')[0]}
if(zipValidate(inputValue,$country)){return!0}
errorMsg.fadeIn();return!1});$(".productsHomeLabel > a",$("div[id^='contentTiles']")).on('click',function(e){e.preventDefault();var object=$(this);var bgcolor=object.data('bgcolor');var linkColor=object.data('link-color');var linkHoverColor=object.data('link-hover-color');var appendix=$('.productsAppendix',object.parent()).html();if(object.attr('data-toggle-enable')=="false"){var href=object.attr('href');if($body.hasClass('ie11')){href='/'+href}
window.location.href=href;return}
if(object.hasClass('active')){closeContentTile(object)}else{var $activeObject=$(".productsHomeLabel > a.active",$("div[id^='contentTiles']"));var $timeout=0;if($activeObject.length>0){$timeout=600;closeContentTile($activeObject)}
setTimeout(function(){object.addClass('active');object.parent().after(function(){var $wrap=$('<div class="productsToggleArrow" style="display: none;" />');var $fill='';if(bgcolor){$fill=' style="fill:'+bgcolor+'";'}
var $arrow="<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" width=\"40px\" height=\"20px\" viewBox=\"0 0 80.0001 40\"><path"+$fill+" d=\"M0.0001,40l40-40l40,40C80.0001,40-0.1249,39.875,0.0001,40z\"/></svg>";$wrap.append($arrow);return $wrap});if($(window).width()<768){object.closest('.col-xs-12').after(function(){var $col=$('<div class="col-xs-12" style="display:none;" />');var $content=$('<div />').addClass('productsToggle').html(appendix);$col.append($content);return $col})}else{object.closest('.row').after(function(){var $row=$('<div class="row" style="display: none;" />');var $col=$('<div class="col-xs-12" />');var $content=$('<div />').addClass('productsToggle').html(appendix);$col.append($content);$row.append($col);return $row})}
setTimeout(function(){var $toggle=$('.productsToggle');var $arrow=object.parent().next();if($(window).width()<768){var $toggleWrap=$toggle.closest('.col-xs-12')}else{var $toggleWrap=$toggle.closest('.row')}
$toggle.css('background-color',bgcolor);$toggle.find('a').css('color',linkColor);$toggleWrap.slideDown(400,function(){$arrow.fadeIn(200)})},10)},$timeout)}});function closeContentTile(object){var $arrow=object.parent().next();if($(window).width()<768){var $toggleWrap=$('.productsToggle').closest('.col-xs-12')}else{var $toggleWrap=$('.productsToggle').closest('.row')}
$arrow.fadeOut(200,function(){$arrow.remove();$toggleWrap.slideUp(400,function(){$toggleWrap.remove();object.removeClass('active')})})}
$(document).on('mouseenter','.productsToggle a',function(){$(this).css('color',$(this).parents('.productsHome').find('a.active').data('linkhover-color'))}).on('mouseleave','.productsToggle a',function(){$(this).css('color',$(this).parents('.productsHome').find('a.active').data('link-color'))});$(document).on('focus','.productsToggle a',function(){$(this).css('color',$(this).parents('.productsHome').find('a.active').data('linkhover-color'))});$('.collapse[role="tabpanel"]').on('shown.bs.collapse',function(){if($(this).data('hashy')!==0){hashy($(this))}});var searchToggleClass='overlay-searchField',w=$(window).width(),$searchWrap=($('body').hasClass('pallmann'))?($(window).width()<992)?$('.searchWrap','.headerContainer'):$('.searchWrap','.navigationContainer'):$('.searchWrap'),$searchMobileWrap=$('.searchWrapMobile'),$searchField=(w<992)?$searchMobileWrap:$('.searchField',$searchWrap),$searchButton=$(".searchButton a",$searchWrap);$searchButton.click(function(e){e.preventDefault();if($searchField.hasClass('open')){setTimeout(function(){$body.removeClass('overlay-open').removeClass(searchToggleClass)},300)}else if(w<992){$body.addClass('overlay-open').addClass(searchToggleClass);$overlay.unbind().click(function(){$searchField.removeClass('open');setTimeout(function(){$body.removeClass('overlay-open').removeClass(searchToggleClass)},300)})}
$searchField.find('input').first().focus();if(w<992){$searchField.toggleClass('open')}else{$searchWrap.toggleClass('open')}
$('.desktopMenuWrap').toggleClass('open')});$(".searchField .cancel").on("click",function(event){event.preventDefault();$searchWrap.toggleClass('open');$('.desktopMenuWrap').removeClass('open');setTimeout(function(){$body.removeClass('overlay-open').removeClass(searchToggleClass)},300)});var $logoWrap=$(".logoWrap",$contentWrapper),$claimWrap=$(".claimWrap",$contentWrapper);$logoWrap.hover(function(){if($claimWrap.length&&!$body.hasClass('ag')&&!$body.hasClass('sifloor')&&!$body.hasClass('parkettprofi')&&!$body.hasClass('rz')){if(!$body.hasClass('pallmann')&&!$body.hasClass('arturo')){$('.desktopMenuWrap').toggleClass('open')}
$claimWrap.toggleClass('open')}});$(".newsletterWrap input[name='email']").on("focus",function(){$(".newsletterWrap").addClass('background-white')});$(".newsletterWrap .form-cancel").on("click",function(){$(".newsletterWrap").removeClass('background-white')});$('.mapWrap .continentList a[data-toggle="tab"]').on('shown.bs.tab',function(e){$('svg #'+$(e.relatedTarget).data('mapHover')).hide();$('svg #'+$(e.target).data('mapHover')).show()});$langSelect.on('change',function(){$('.buttonWrap',$('#mobileLangContainer')).show()});$('.btn-lang-change').on('click',function(){var $url=$langSelect.find('option:selected').data('url');window.location=$url});var hashy=function(target){if(target){var
navOffset=$breadcrumbBar.height()+20+parseInt($(target).css('padding-top').replace("px","")),targetOffset=$(target).offset().top;if(affixPoint>0&&targetOffset>affixPoint){navOffset+=$breadcrumbBar.height()}
return $('html, body').animate({scrollTop:targetOffset-navOffset},300,function(){})}
return 0};$("a[href^='#']:not([data-toggle]):not([data-hashy='0'])").on('click',function(event){event.preventDefault();return hashy(this.hash)});if($(".contactSearchWrapper .result").length>0){return hashy('.contactSearchWrapper .result')}
$(window).bind('hashchange',function(event){event.preventDefault();return hashy(location.hash)});if(/MSIE 10/i.test(navigator.userAgent)){$("body").addClass("ie ie10")}else if(/MSIE 9/i.test(navigator.userAgent)){$("body").addClass("ie ie9")}else if(/rv:11.0/i.test(navigator.userAgent)){$("body").addClass("ie ie11")}else if(/Edge\/\d./i.test(navigator.userAgent)){$("body").addClass("ie edge")}
if($('.tabs-scw.toggleElement ul.nav-tabs.responsive').length){fakewaffle.responsiveTabs(['xs'])}
$('select.select2',$contentWrapper).each(function(){$(this).select2({})});$('#registerContainer select',$contentWrapper).each(function(){$(this).select2({})});$('select.select2').on("change",function(){$('.select2-selection__clear').attr("title","Filter löschen")});$('.supersizedImage[data-link]').on('click',function(){window.location=$(this).data('link')});$('.productsUndergroundInner',$('.productsUnderground')).on('click',function(){var $linkWrap=$('.productsUndergroundMore',$(this));var link=$('a',$linkWrap);var href=$('a',$linkWrap).attr('href');var target=link.attr('target');if($body.hasClass('ie11')){href='/'+href}
if(target!=='_blank'){window.location.href=href}})});function langSelectFormat(state){if(!state.id)return state.text;var $state=$('<span>'+state.text+'<small>'+$(state.element).data("desc")+'</small></span>');return $state}
function toggleOverlay($additionalClass){var $body=$('body');var $$additionalClass=(typeof $additionalClass==='undefined')?'':$additionalClass;if($body.hasClass('overlay-open')){$body.removeClass('overlay-open');if($additionalClass){$body.removeClass($additionalClass)}}else{$body.addClass('overlay-open');if($additionalClass){$body.addClass($additionalClass)}}}
$(window).load(function(){if($('.flyoutMenu',$('#flyout')).length){var $flyoutWidth=$('.flyoutMenuButtons').width()+$('.flyoutMenuContent').width();if($(window).width()>991){$('.flyoutMenu',$('#flyout')).css('transform','translate(-'+$flyoutWidth+'px,  -50%)');setTimeout(function(){$('#flyout').addClass('show')},300)}else{$('.flyoutMenu',$('#flyout')).css('transform','translate(-999px, -50%)')}}});function zipValidate(value,country){var isValid=!1;switch(country){case 'AT':isValid=/^([1-9]{1})(\d{3})$/.test(value);break;case 'BG':isValid=/^([1-9]{1}[0-9]{3})$/.test($.trim(value));break;case 'BR':isValid=/^(\d{2})([\.]?)(\d{3})([\-]?)(\d{3})$/.test(value);break;case 'CA':isValid=/^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(value);break;case 'CH':isValid=/^([1-9]{1})(\d{3})$/.test(value);break;case 'CZ':isValid=/^(\d{3})([ ]?)(\d{2})$/.test(value);break;case 'DE':isValid=/^(?!01000|99999)(0[1-9]\d{3}|[1-9]\d{4})$/.test(value);break;case 'DK':isValid=/^(DK(-|\s)?)?\d{4}$/i.test(value);break;case 'ES':isValid=/^(?:0[1-9]|[1-4][0-9]|5[0-2])\d{3}$/.test(value);break;case 'FR':isValid=/^[0-9]{5}$/i.test(value);break;case 'UK':isValid=validateGb(value);break;case 'IN':isValid=/^\d{3}\s?\d{3}$/.test(value);break;case 'IE':isValid=/^(D6W|[ACDEFHKNPRTVWXY]\d{2})\s[0-9ACDEFHKNPRTVWXY]{4}$/.test(value);break;case 'IT':isValid=/^(I-|IT-)?\d{5}$/i.test(value);break;case 'MA':isValid=/^[1-9][0-9]{4}$/i.test(value);break;case 'NL':isValid=/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(value);break;case 'PL':isValid=/^[0-9]{2}\-[0-9]{3}$/.test(value);break;case 'PT':isValid=/^[1-9]\d{3}-\d{3}$/.test(value);break;case 'RO':isValid=/^(0[1-8]{1}|[1-9]{1}[0-5]{1})?[0-9]{4}$/i.test(value);break;case 'RU':isValid=/^[0-9]{6}$/i.test(value);break;case 'SE':isValid=/^(S-)?\d{3}\s?\d{2}$/i.test(value);break;case 'SG':isValid=/^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(value);break;case 'SK':isValid=/^(\d{3})([ ]?)(\d{2})$/.test(value);break;case 'US':default:isValid=/^\d{4,5}([\-]?\d{4})?$/.test(value);break}
return isValid}
function validateGb(value){var firstChar='[ABCDEFGHIJKLMNOPRSTUWYZ]',secondChar='[ABCDEFGHKLMNOPQRSTUVWXY]',thirdChar='[ABCDEFGHJKPMNRSTUVWXY]',fourthChar='[ABEHMNPRVWXY]',fifthChar='[ABDEFGHJLNPQRSTUWXYZ]',regexps=[new RegExp('^('+firstChar+'{1}'+secondChar+'?[0-9]{1,2})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^('+firstChar+'{1}[0-9]{1}'+thirdChar+'{1})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^('+firstChar+'{1}'+secondChar+'{1}?[0-9]{1}'+fourthChar+'{1})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^(BF1)(\\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$','i'),/^(GIR)(\s*)(0AA)$/i,/^(BFPO)(\s*)([0-9]{1,4})$/i,/^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i,/^([A-Z]{4})(\s*)(1ZZ)$/i,/^(AI-2640)$/i];for(var i=0;i<regexps.length;i++){if(regexps[i].test(value)){return!0}}
return!1}
var UZIN=UZIN||{};UZIN={selectors:{body:$('body'),tiles:{product:$('.productsUnderground:not(.referenceList):not(.productsXselling) .productsUndergroundInner'),reference:$('.productsUnderground.referenceList:not(.productsXselling) .productsUndergroundInner'),}},page:{brand:'',default:{background:''}},defaults:{backgrounds:{uzin:'background-gradient',codex:'background-gradient',arturo:'background-gray-light',collfox:'background-anthracite',pallmann:'background-orange',parkettprofi:'background-orange',rz:'background-gray',sifloor:'background-gray',wolff:'background-darkgreen-light',derendinger:'background-lightblue',neopur:'background-pantone',}},init:function(){UZIN.page.brand=UZIN.selectors.body.data('brand');UZIN.page.default.background=(typeof UZIN.defaults.backgrounds[UZIN.page.brand]!==undefined)?UZIN.defaults.backgrounds[UZIN.page.brand]:!1}};var UZIN=UZIN||{};UZIN.backgroundFallback={execute:function(){if(UZIN.page.default.background){UZIN.selectors.tiles.product.each(function(){UZIN.backgroundFallback.set($(this))});UZIN.selectors.tiles.reference.each(function(){UZIN.backgroundFallback.set($(this))})}},set:function(object){if(object.parents('section').hasClass('background-none')||object.parents('section').hasClass('background-white')){object.addClass(UZIN.page.default.background).removeClass('background-white')}}};document.addEventListener('DOMContentLoaded',function(){var calendarElement=document.getElementById('calendar');if(calendarElement){var calendar=new FullCalendar.Calendar(calendarElement,{locale:calendarElement.dataset.locale,plugins:['dayGrid','list'],events:'?type=100&tx_uzin_ajax[controller]=Matrix\\Calendar&tx_uzin_ajax[action]=feed',eventRender:function(info){$(info.el).tooltip({title:info.event.extendedProps.description,container:'body'})},eventClick:function(info){switch(info.event.extendedProps.type){case 'seminar':window.open(info.event.extendedProps.seminarDetail,'_blank');break;case 'event':$.ajax({url:'?type=100&tx_uzin_ajax[controller]=Event&tx_uzin_ajax[action]=modal&tx_uzin_ajax[event]='+info.event.extendedProps.event,method:"GET",dataType:"html"}).done(function(data){bootbox.alert({message:data,backdrop:!0,size:'large',buttons:{ok:{className:'btn-default'}}})});break}}});changeView(calendar);calendar.render();$(window).on('resize',function(){changeView(calendar)})}});function changeView(calendar){if($(window).width()>991){calendar.changeView('dayGridMonth')}else{calendar.changeView('listWeek')}}
var UZIN=UZIN||{};var unselecting=!0;var previousSelectValue='';$(document).ready(function(){UZIN.init();if(UZIN.selectors.tiles.product.length||UZIN.selectors.tiles.reference.length){UZIN.backgroundFallback.execute()}
var stainAndCareTable=$('section.stainAndCareTable');var ajaxContainer=$('.ajax-container',stainAndCareTable);var spinner=$('.spinner',stainAndCareTable);if(stainAndCareTable.length){$(document).on('change','.care-filter',function(){var object=$(this);var index=parseInt($(this).parent().data('filterIndex'));var parameters={};var doRequest=!1;parameters['tx_uzin_ajax[controller]']='Specific\\RZ\\StainAndCareTable';parameters['tx_uzin_ajax[action]']='filter';for(i=1;i<=index;i++){var value=$('select option:selected',$('div[data-filter-index='+i+']')).text();if(value){parameters['tx_uzin_ajax[string'+i+']']=value}}
ajaxContainer.fadeOut(function(){spinner.fadeIn(function(){$.ajax({url:'?type=100',method:'GET',data:parameters,dataType:"json"}).done(function(data){var nextIndex=parseInt(index+1);if(unselecting){unselecting=!1}else{if(data.filter.length>0){var container=$('div[data-filter-index='+nextIndex+']',stainAndCareTable);$('select',container).select2("destroy").select2({data:data.filter});container.fadeIn();if(index%2===0){object.parents('fieldset').next().slideDown()}}else{stainAndCareFilterSwitch(index,stainAndCareTable);unselecting=!1}}
ajaxContainer.html(data.html);spinner.fadeOut(function(){ajaxContainer.fadeIn()})})})})});$('#string_1').trigger('change');$(document).on("select2:selecting",'.care-filter',function(e){previousSelectValue=$(this).val()});$(document).on("select2:select",'.care-filter',function(e){if(previousSelectValue!=''&&previousSelectValue!=$(this).val()){var nextIndex=parseInt($(this).parent().data('filterIndex')+1);var container=$('div[data-filter-index='+nextIndex+']',stainAndCareTable);stainAndCareFilterSwitch(nextIndex,stainAndCareTable);$('select',container).find('option').not(':first').remove();unselecting=!1}});$(document).on("select2:unselecting",'.care-filter',function(e){stainAndCareFilterSwitch(parseInt($(this).parent().data('filterIndex')),stainAndCareTable)})}
$('.stageWrap .stageItem[data-link]').on('click',function(){var link=$(this).data('link');if(link.startsWith('http')){window.open(link,'_blank')}else{window.location=link}});var threesixty=$('.threesixty');if(typeof images!==undefined&&threesixty.length){var imageList=JSON.parse(images);threesixty.ThreeSixty({totalFrames:imageList.length,endFrame:imageList.length,currentFrame:1,imgList:'.threesixty_images',progress:'.spinner',height:'auto',width:'100%',navigation:!1,imgArray:imageList})}
if(!$('body').hasClass('codex')){$('.desktopMainMenu > li:nth-child(3) > .subMenuWrap').each(function(){var object=$(this);if(object.children().length===1){object.addClass('singleGrid')}});var menueEntries=$('.desktopMainMenu > li');menueEntries.on('mouseover',function(){var index=parseInt($(this).index())+1;var menuContainer=$('.subMenuWrap',$(this));var windowWidth=$(window).width();var menuContainerOffset=menuContainer.offset();if(menuContainerOffset){var offset=menuContainerOffset.left;if(index>=3){if(offset<0){offset=parseInt(menuContainer.css('right'))-(offset*-1);menuContainer.css('right',offset)}}else{offset=offset+menuContainer.width();if(offset>windowWidth){offset=offset-windowWidth;menuContainer.css('left',(offset*-1))}}}});menueEntries.on('mouseout',function(){$('.subMenuWrap',$(this)).removeAttr('style')})}
if($('.co2calculator').length){var range=$(".co2calculator__range-input");var input=$(".co2calculator__input");var result=$('.co2calculator__result');var instance;var min=1;var max=1000;range.ionRangeSlider({skin:'square',type:'single',hide_min_max:!0,hide_from_to:!0,min:min,max:max,from:20,onStart:function(data){var saving=parseFloat(data.from*3.3)/1000;input.prop("value",data.from);result.html(saving.toFixed(3))},onChange:function(data){var saving=parseFloat(data.from*3.3)/1000;input.prop("value",data.from);result.html(saving.toFixed(3))}});instance=range.data("ionRangeSlider");input.on("change keyup",function(){var val=$(this).prop("value");if(val<min){val=min}else if(val>max){val=max}
instance.update({from:val});var saving=parseFloat(val*3.3)/1000;result.html(saving.toFixed(3))})}
$(document).on('click','.tx_uzin_news article',function(){window.location.href=$('a',$(this)).attr('href')});$(document).on('submit','.js-news-form',function(e){e.preventDefault();var container=$(this).parents('.news');var object=$(this).parent();var count=container.data('count');var offsetField=$('.js-offset');offsetField.val($('article',container).length);$.ajax({type:"GET",url:$(this).attr('action'),data:$(this).serialize(),dataType:"html"}).done(function(data){object.before(data);$('html, body').animate({scrollTop:$('article:nth-child('+(parseInt(offsetField.val())+1)+')',container).offset().top-10},600);if($('article',container).length>=count){object.hide()}})});if($(window).width()>767){var newsStage=$('.js-news-stage');if(newsStage.length){newsStage.slick({arrows:!1,dots:!1,fade:!0,autoplay:!0,speed:1500,lazyLoad:'progressive',})}}
var fileinput=$('.uu-file');if(fileinput.length){$('.uu-file').each(function(){var object=$(this);var allowedFileExtensions=['jpeg','jpg','png'];var placeholder=object.data('placeholder');if(object.hasClass('powermail_file')){placeholder=undefined;$.each(object.attr('accept').split(','),function(index,value){allowedFileExtensions.push(value.replace('.',''))})}
fileinput.fileinput({'language':$('html').attr('lang'),'theme':'fas','showUpload':!1,'showPreview':!1,'cancelLabel':'','uploadLabel':'','allowedFileExtensions':allowedFileExtensions,'msgPlaceholder':placeholder})})}
if($('.retailer-search').length>0){$('.retailer-search-filter form').on('submit',function(){return!1});var object=$(".retailer-search-map");var iconPath='/typo3conf/ext/uzin/Brands/'+retailerSearch.settings.themeFolder+'/Resources/Public/Icons/RetailerSearch/';object.ShopLocator({pluginStyle:"",json:'?type=100&tx_uzin_ajax[controller]=Matrix\\Retailer&tx_uzin_ajax[action]=json&tx_uzin_ajax[interest]='+retailerSearch.settings.interest,paginationStyle:1,preloader:!0,markersIcon:iconPath+"marker.png",infoBubble:{visible:!0,backgroundColor:'transparent',arrowPosition:50,minHeight:100,maxHeight:250,minWidth:150,maxWidth:320,hideCloseButton:!0,directionsUseGeolocation:!1,getDirectionsButtonName:retailerSearch.translations.direction},map:{disableDefaultUI:!0,center:[retailerSearch.settings.center.lat,retailerSearch.settings.center.lng],zoom:5,allMarkersInViewport:!1,mapStyle:[{"featureType":"landscape","elementType":"geometry","stylers":[{"saturation":"-100"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.text","stylers":[{"color":"#545454"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"saturation":"-87"},{"lightness":"-40"},{"color":"#ffffff"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.fill","stylers":[{"color":"#f0f0f0"},{"saturation":"-22"},{"lightness":"-16"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway.controlled_access","elementType":"labels.icon","stylers":[{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"saturation":"-52"},{"hue":"#00e4ff"},{"lightness":"-16"}]}]},cluster:{enable:!0,gridSize:50,maxZoom:14,style:{textColor:'#4757a3',textSize:18,heightSM:42,widthSM:42,heightMD:56,widthMD:56,heightBIG:75,widthBIG:75,iconSmall:iconPath+"clusterSmall.png",iconMedium:iconPath+"clusterMedium.png",iconBig:iconPath+"clusterBig.png"}},sidebar:{visible:!0,searchBox:{visible:!0,search:!0,findPlaceBy:['(regions)'],searchByCountry:[!0,retailerSearch.settings.domainCode],placeholder:retailerSearch.translations.placeholder},results:{visibleInFirstPage:!1,pageSize:5,paginationItems:5,searchInfo:retailerSearch.translations.searchInfo,noAddressFound:retailerSearch.translations.noAddressFound}}})}
var uzinSelection=$('.uzin-selection');if(uzinSelection.length>0){$('select',uzinSelection).on('change',function(){var parameters={};parameters['tx_uzin_ajax[controller]']='Specific\\Uzin\\UzinSelection';parameters['tx_uzin_ajax[action]']='filter';$('select',uzinSelection).each(function(index,element){parameters['tx_uzin_ajax['+element.getAttribute('id')+']']=element.value});$.ajax({url:'?type=100',method:'GET',data:parameters,dataType:"json"}).done(function(data){let divList=$('div[data-product]');divList.addClass('tile__transparent');if(data.products.length>0){$.each(data.products,function(i,item){$('div[data-product='+item.product+']').removeClass('tile__transparent')})}else{if(data.hasFilter){divList.addClass('tile__transparent')}else{divList.removeClass('tile__transparent')}}})})}
var contactSearch=$('.contact-search');if(contactSearch.length>0){$('form',contactSearch).on('submit',function(){let resultContainer=$('.contact-result',contactSearch);let loadingContainer=$('.loading',contactSearch);let errorMessage=$('.contact-error-message');let zipcodeField=$('#zipcode');let zipcode=zipcodeField.val();let countryValue=$('#country option:selected');let isocode=countryValue.data('isocode');if(isocode===''){isocode='DE'}else{isocode=isocode.split('_')[1]}
let zipValid=(isocode==='GB')?validateGb(zipcode):zipValidate(zipcode,isocode);let alphanumericSearch=$('#alphanumeric_search').val();resultContainer.parent().removeClass('flex-row row-space-top-spaceS');if(zipValid){errorMessage.fadeOut();zipcodeField.removeClass('has-error')}else{errorMessage.fadeIn();zipcodeField.addClass('has-error');resultContainer.fadeOut();resultContainer.html('');return!1}
resultContainer.hide();loadingContainer.show().css('display','flex');var parameters={};parameters['tx_uzin_ajax[controller]']='Matrix\\Contact';parameters['tx_uzin_ajax[action]']='ajax';parameters['tx_uzin_ajax[zipcode]']=zipcode;parameters['tx_uzin_ajax[alphanumericSearch]']=alphanumericSearch;parameters['tx_uzin_ajax[brand]']=$('#brand').val();parameters['tx_uzin_ajax[country]']=$('#country').val();resultContainer.fadeOut(function(){loadingContainer.css('display','flex').hide().fadeIn(function(){$.ajax({url:'?type=100',method:'GET',data:parameters,dataType:"json"}).done(function(data){resultContainer.html(data.html);resultContainer.parent().addClass('flex-row row-space-top-spaceS');resultContainer.fadeIn();loadingContainer.fadeOut()})})});return!1})}});$(window).load(function(){});function stainAndCareFilterSwitch(index,stainAndCareTable){var count=$('div[data-filter-index]').length;for(i=count;count>index;count--){var container=$('div[data-filter-index='+count+']',stainAndCareTable);container.fadeOut();$('select',container).find('option').not(':first').remove();if(count%3===0||count===5){container.parents('fieldset').slideUp()}}
unselecting=!0}
$(document).ready(function(){var calculateContainer=$('.productsCalculate');calculateContainer.find('button').on('click',function(){var $inputVal=$('#inputval :selected').text();if($inputVal===''){$inputVal=$('#inputval').val()}
$.ajax({url:'?type=100',method:'GET',data:{'tx_uzin_ajax[controller]':'Matrix\\Product','tx_uzin_ajax[action]':'consumptionCalculation','tx_uzin_ajax[amount]':$('#amount').val(),'tx_uzin_ajax[costype]':$('#costype').val(),'tx_uzin_ajax[inputval]':$inputVal,'tx_uzin_ajax[product]':$('#product').val()},dataType:"html"}).done(function(data){var resultContainer=calculateContainer.find('.results');resultContainer.html(data);resultContainer.fadeIn('slow')})})});var $targetSelector='.autocomplete';var $fieldSelector='input[name="tx_uzin_productlist[filter][text]"]';var $form=$('form[name="filter"]');var $targetContainer=$($targetSelector);var $input=$($fieldSelector);$(document).ready(function(){$input.on('keyup',function(e){if(e.keyCode==8||e.keyCode==46||(e.keyCode>=48&&e.keyCode<=57)||(e.keyCode>=65&&e.keyCode<=90)||(e.keyCode>=96&&e.keyCode<=105)){var value=$(this).val();var noWhitespaceValue=value.replace(/\s+/g,'');var noWhitespaceCount=noWhitespaceValue.length;if(noWhitespaceCount>=2){$(this).addClass('loading');ajaxCall()}else{$(".autocomplete").html('')}}});$('body').on('click','.ajax-productsearch a.link-arrow',function(e){e.preventDefault();$form.submit()})});var result="";$(document).ajaxStop(function(){$input.removeClass('loading');$targetContainer.html('');$targetContainer.append(result);$('body').on('click',function(){$input.removeClass('loading');$targetContainer.html('')})});function ajaxCall(){$.ajax({url:'?type=100',data:{'tx_uzin_ajax[controller]':'Matrix\\Product','tx_uzin_ajax[action]':'autocomplete','tx_uzin_ajax[filter]':$input.val()},method:"GET",dataType:"html"}).done(function(data){result=data})}