"use strict";function checkDisplay(){$(".counter-value").each(function(){var t=$(this);if(t.isOnScreen()){var e=t.attr("data-count");$({countNum:t.text()}).animate({countNum:e},{duration:2e3,easing:"linear",step:function(){t.text(Math.floor(this.countNum))},complete:function(){t.text(this.countNum)}})}})}jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(t,e,n,o,s){return jQuery.easing[jQuery.easing.def](t,e,n,o,s)},easeInQuad:function(t,e,n,o,s){return o*(e/=s)*e+n},easeOutQuad:function(t,e,n,o,s){return-o*(e/=s)*(e-2)+n},easeInOutQuad:function(t,e,n,o,s){return(e/=s/2)<1?o/2*e*e+n:-o/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,o,s){return o*(e/=s)*e*e+n},easeOutCubic:function(t,e,n,o,s){return o*((e=e/s-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,o,s){return(e/=s/2)<1?o/2*e*e*e+n:o/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,o,s){return o*(e/=s)*e*e*e+n},easeOutQuart:function(t,e,n,o,s){return-o*((e=e/s-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,o,s){return(e/=s/2)<1?o/2*e*e*e*e+n:-o/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,o,s){return o*(e/=s)*e*e*e*e+n},easeOutQuint:function(t,e,n,o,s){return o*((e=e/s-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,o,s){return(e/=s/2)<1?o/2*e*e*e*e*e+n:o/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,o,s){return-o*Math.cos(e/s*(Math.PI/2))+o+n},easeOutSine:function(t,e,n,o,s){return o*Math.sin(e/s*(Math.PI/2))+n},easeInOutSine:function(t,e,n,o,s){return-o/2*(Math.cos(Math.PI*e/s)-1)+n},easeInExpo:function(t,e,n,o,s){return 0==e?n:o*Math.pow(2,10*(e/s-1))+n},easeOutExpo:function(t,e,n,o,s){return e==s?n+o:o*(-Math.pow(2,-10*e/s)+1)+n},easeInOutExpo:function(t,e,n,o,s){return 0==e?n:e==s?n+o:(e/=s/2)<1?o/2*Math.pow(2,10*(e-1))+n:o/2*(-Math.pow(2,-10*--e)+2)+n},easeInCirc:function(t,e,n,o,s){return-o*(Math.sqrt(1-(e/=s)*e)-1)+n},easeOutCirc:function(t,e,n,o,s){return o*Math.sqrt(1-(e=e/s-1)*e)+n},easeInOutCirc:function(t,e,n,o,s){return(e/=s/2)<1?-o/2*(Math.sqrt(1-e*e)-1)+n:o/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,o,s){var r=0,a=o;return 0==e?n:1==(e/=s)?n+o:(r||(r=.3*s),a=1.3?0:1,limit:!0},e.window=function(t){return $(window)._scrollable()},$.fn._scrollable=function(){return this.map(function(){if(!(!this.nodeName||-1!=$.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])))return this;var t=(this.contentWindow||this).document||this.ownerDocument||this;return/webkit/i.test(navigator.userAgent)||"BackCompat"==t.compatMode?t.body:t.documentElement})},$.fn.scrollTo=function(t,o,s){return"object"==typeof o&&(s=o,o=0),"function"==typeof s&&(s={onAfter:s}),"max"==t&&(t=9e9),s=$.extend({},e.defaults,s),o=o||s.duration,s.queue=s.queue&&s.axis.length>1,s.queue&&(o/=2),s.offset=n(s.offset),s.over=n(s.over),this._scrollable().each(function(){if(t){var r,a=this,h=$(a),l=t,u={},c=h.is("html,body");switch(typeof l){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(l)){l=n(l);break}if(!(l=$(l,this)).length)return;case"object":(l.is||l.style)&&(r=(l=$(l)).offset())}$.each(s.axis.split(""),function(t,n){var o="x"==n?"Left":"Top",p=o.toLowerCase(),f="scroll"+o,m=a[f],g=e.max(a,n);if(r)u[f]=r[p]+(c?0:m-h.offset()[p]),s.margin&&(u[f]-=parseInt(l.css("margin"+o))||0,u[f]-=parseInt(l.css("border"+o+"Width"))||0),u[f]+=s.offset[p]||0,s.over[p]&&(u[f]+=l["x"==n?"width":"height"]()*s.over[p]);else{var v=l[p];u[f]=v.slice&&"%"==v.slice(-1)?parseFloat(v)/100*g:v}s.limit&&/^\d+$/.test(u[f])&&(u[f]=u[f]<=0?0:Math.min(u[f],g)),!t&&s.queue&&(m!=u[f]&&d(s.onAfterFirst),delete u[f])}),d(s.onAfter)}function d(e){h.animate(u,o,s.easing,e&&function(){e.call(this,t,s)})}}).end()},e.max=function(t,e){var n="x"==e?"Width":"Height",o="scroll"+n;if(!$(t).is("html,body"))return t[o]-$(t)[n.toLowerCase()]();var s="client"+n,r=t.ownerDocument.documentElement,a=t.ownerDocument.body;return Math.max(r[o],a[o])-Math.min(r[s],a[s])}}(jQuery),function(t,e,n){var o,s=t.document,r=t.Modernizr,a=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},h="Moz Webkit O Ms".split(" "),l=function(t){var e,n=s.documentElement.style;if("string"==typeof n[t])return t;t=a(t);for(var o=0,r=h.length;r>o;o++)if("string"==typeof n[e=h[o]+t])return e},u=l("transform"),c=l("transitionProperty"),d={csstransforms:function(){return!!u},csstransforms3d:function(){var t=!!l("perspective");if(t){var n=e("").appendTo("head"),o=e('
').appendTo("html");t=3===o.height(),o.remove(),n.remove()}return t},csstransitions:function(){return!!c}};if(r)for(o in d)r.hasOwnProperty(o)||r.addTest(o,d[o]);else{r=t.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var p,f=" ";for(o in d)p=d[o](),r[o]=p,f+=" "+(p?"":"no-")+o;e("html").addClass(f)}if(r.csstransforms){var m=r.csstransforms3d?{translate:function(t){return"translate3d("+t[0]+"px, "+t[1]+"px, 0) "},scale:function(t){return"scale3d("+t+", "+t+", 1) "}}:{translate:function(t){return"translate("+t[0]+"px, "+t[1]+"px) "},scale:function(t){return"scale("+t+") "}},g=function(t,n,o){var s,r,a=e.data(t,"isoTransform")||{},h={},l={};for(s in h[n]=o,e.extend(a,h),a)r=a[s],l[s]=m[s](r);var c=l.translate||"",d=l.scale||"";e.data(t,"isoTransform",a),t.style[u]=c+d};e.cssNumber.scale=!0,e.cssHooks.scale={set:function(t,e){g(t,"scale",e)},get:function(t,n){var o=e.data(t,"isoTransform");return o&&o.scale?o.scale:1}},e.fx.step.scale=function(t){e.cssHooks.scale.set(t.elem,t.now+t.unit)},e.cssNumber.translate=!0,e.cssHooks.translate={set:function(t,e){g(t,"translate",e)},get:function(t,n){var o=e.data(t,"isoTransform");return o&&o.translate?o.translate:[0,0]}}}r.csstransitions&&(v=({WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"})[c],y=l("transitionDuration"));var v,y,x,b=e.event,w=e.event.handle?"handle":"dispatch";b.special.smartresize={setup:function(){e(this).bind("resize",b.special.smartresize.handler)},teardown:function(){e(this).unbind("resize",b.special.smartresize.handler)},handler:function(t,e){var n=this,o=arguments;t.type="smartresize",x&&clearTimeout(x),x=setTimeout(function(){b[w].apply(n,o)},"execAsap"===e?0:100)}},e.fn.smartresize=function(t){return t?this.bind("smartresize",t):this.trigger("smartresize",["execAsap"])},e.Isotope=function(t,n,o){this.element=e(n),this._create(t),this._init(o)};var _=["width","height"],P=e(t);e.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},e.Isotope.prototype={_create:function(t){this.options=e.extend({},e.Isotope.settings,t),this.styleQueue=[],this.elemCount=0;var n=this.element[0].style;this.originalStyle={};var o=_.slice(0);for(var s in this.options.containerStyle)o.push(s);for(var r=0,a=o.length;a>r;r++)s=o[r],this.originalStyle[s]=n[s]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms(),this.options.getSortData=e.extend(this.options.getSortData,{"original-order":function(t,e){return e.elemCount++,e.elemCount},random:function(){return Math.random()}}),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var h=this;setTimeout(function(){h.element.addClass(h.options.containerClass)},0),this.options.resizable&&P.bind("smartresize.isotope",function(){h.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(t){var e=this.options.itemSelector,n=e?t.filter(e).add(t.find(e)):t,o={position:"absolute"};return n=n.filter(function(t,e){return 1===e.nodeType}),this.usingTransforms&&(o.left=0,o.top=0),n.css(o).addClass(this.options.itemClass),this.updateSortData(n,!0),n},_init:function(t){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(t)},option:function(t){if(e.isPlainObject(t)){var n;for(var o in this.options=e.extend(!0,this.options,t),t)this[n="_update"+a(o)]&&this[n]()}},_updateAnimationEngine:function(){var t,e=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,"");switch(e){case"css":case"none":t=!1;break;case"jquery":t=!0;break;default:t=!r.csstransitions}this.isUsingJQueryAnimation=t,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var t=this.usingTransforms=this.options.transformsEnabled&&r.csstransforms&&r.csstransitions&&!this.isUsingJQueryAnimation;t||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=t?this._translate:this._positionAbs},_filter:function(t){var e=""===this.options.filter?"*":this.options.filter;if(!e)return t;var n=this.options.hiddenClass,o="."+n,s=t.filter(o),r=s;if("*"!==e){r=s.filter(e);var a=t.not(o).not(e).addClass(n);this.styleQueue.push({$el:a,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:r,style:this.options.visibleStyle}),r.removeClass(n),t.filter(e)},updateSortData:function(t,n){var o,s,r=this,a=this.options.getSortData;t.each(function(){for(var t in o=e(this),s={},a)n||"original-order"!==t?s[t]=a[t](o,r):s[t]=e.data(this,"isotope-sort-data")[t];e.data(this,"isotope-sort-data",s)})},_sort:function(){var t=this.options.sortBy,e=this._getSorter,n=this.options.sortAscending?1:-1,o=function(o,s){var r=e(o,t),a=e(s,t);return r===a&&"original-order"!==t&&(r=e(o,"original-order"),a=e(s,"original-order")),(r>a?1:a>r?-1:0)*n};this.$filteredAtoms.sort(o)},_getSorter:function(t,n){return e.data(t,"isotope-sort-data")[n]},_translate:function(t,e){return{translate:[t,e]}},_positionAbs:function(t,e){return{left:t,top:e}},_pushPosition:function(t,e,n){e=Math.round(e+this.offset.left),n=Math.round(n+this.offset.top);var o=this.getPositionStyles(e,n);this.styleQueue.push({$el:t,style:o}),this.options.itemPositionDataEnabled&&t.data("isotope-item-position",{x:e,y:n})},layout:function(t,e){var n=this.options.layoutMode;if(this["_"+n+"Layout"](t),this.options.resizesContainer){var o=this["_"+n+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:o})}this._processStyleQueue(t,e),this.isLaidOut=!0},_processStyleQueue:function(t,n){var o,s,a,h,l=this.isLaidOut&&this.isUsingJQueryAnimation?"animate":"css",u=this.options.animationOptions,c=this.options.onLayout;if(s=function(t,e){e.$el[l](e.style,u)},this._isInserting&&this.isUsingJQueryAnimation)s=function(t,e){o=e.$el.hasClass("no-transition")?"css":l,e.$el[o](e.style,u)};else if(n||c||u.complete){var d=!1,p=[n,c,u.complete],f=this;if(a=!0,h=function(){if(!d){for(var e,n=0,o=p.length;o>n;n++)"function"==typeof(e=p[n])&&e.call(f.element,t,f);d=!0}},this.isUsingJQueryAnimation&&"animate"===l)u.complete=h,a=!1;else if(r.csstransitions){for(var m,g=0,x=this.styleQueue[0],b=x&&x.$el;!b||!b.length;){if(!(m=this.styleQueue[g++]))return;b=m.$el}parseFloat(getComputedStyle(b[0])[y])>0&&(s=function(t,e){e.$el[l](e.style,u).one(v,h)},a=!1)}}e.each(this.styleQueue,s),a&&h(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(t){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,t)},addItems:function(t,e){var n=this._getAtoms(t);this.$allAtoms=this.$allAtoms.add(n),e&&e(n)},insert:function(t,e){this.element.append(t);var n=this;this.addItems(t,function(t){var o=n._filter(t);n._addHideAppended(o),n._sort(),n.reLayout(),n._revealAppended(o,e)})},appended:function(t,e){var n=this;this.addItems(t,function(t){n._addHideAppended(t),n.layout(t),n._revealAppended(t,e)})},_addHideAppended:function(t){this.$filteredAtoms=this.$filteredAtoms.add(t),t.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:t,style:this.options.hiddenStyle})},_revealAppended:function(t,e){var n=this;setTimeout(function(){t.removeClass("no-transition"),n.styleQueue.push({$el:t,style:n.options.visibleStyle}),n._isInserting=!1,n._processStyleQueue(t,e)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(t,e){this.$allAtoms=this.$allAtoms.not(t),this.$filteredAtoms=this.$filteredAtoms.not(t);var n=this,o=function(){t.remove(),e&&e.call(n.element)};t.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:t,style:this.options.hiddenStyle}),this._sort(),this.reLayout(o)):o()},shuffle:function(t){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(t)},destroy:function(){var t=this.usingTransforms,e=this.options;this.$allAtoms.removeClass(e.hiddenClass+" "+e.itemClass).each(function(){var e=this.style;e.position="",e.top="",e.left="",e.opacity="",t&&(e[u]="")});var n=this.element[0].style;for(var o in this.originalStyle)n[o]=this.originalStyle[o];this.element.unbind(".isotope").undelegate("."+e.hiddenClass,"click").removeClass(e.containerClass).removeData("isotope"),P.unbind(".isotope")},_getSegments:function(t){var e,n=this.options.layoutMode,o=t?"rowHeight":"columnWidth",s=t?"height":"width",r=t?"rows":"cols",h=this.element[s](),l=this.options[n]&&this.options[n][o]||this.$filteredAtoms["outer"+a(s)](!0)||h;e=Math.max(e=Math.floor(h/l),1),this[n][r]=e,this[n][o]=l},_checkIfSegmentsChanged:function(t){var e=this.options.layoutMode,n=t?"rows":"cols",o=this[e][n];return this._getSegments(t),this[e][n]!==o},_masonryReset:function(){this.masonry={},this._getSegments();var t=this.masonry.cols;for(this.masonry.colYs=[];t--;)this.masonry.colYs.push(0)},_masonryLayout:function(t){var n=this,o=n.masonry;t.each(function(){var t=e(this),s=Math.ceil(t.outerWidth(!0)/o.columnWidth);if(1===(s=Math.min(s,o.cols)))n._masonryPlaceBrick(t,o.colYs);else{var r,a,h=o.cols+1-s,l=[];for(a=0;h>a;a++)r=o.colYs.slice(a,a+s),l[a]=Math.max.apply(Math,r);n._masonryPlaceBrick(t,l)}})},_masonryPlaceBrick:function(t,e){for(var n=Math.min.apply(Math,e),o=0,s=0,r=e.length;r>s;s++)if(e[s]===n){o=s;break}var a=this.masonry.columnWidth*o;this._pushPosition(t,a,n);var h=n+t.outerHeight(!0),l=this.masonry.cols+1-r;for(s=0;l>s;s++)this.masonry.colYs[o+s]=h},_masonryGetContainerSize:function(){return{height:Math.max.apply(Math,this.masonry.colYs)}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(t){var n=this,o=this.element.width(),s=this.fitRows;t.each(function(){var t=e(this),r=t.outerWidth(!0),a=t.outerHeight(!0);0!==s.x&&r+s.x>o&&(s.x=0,s.y=s.height),n._pushPosition(t,s.x,s.y),s.height=Math.max(s.y+a,s.height),s.x+=r})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(t){var n=this,o=this.cellsByRow;t.each(function(){var t=e(this),s=o.index%o.cols,r=Math.floor(o.index/o.cols),a=(s+.5)*o.columnWidth-t.outerWidth(!0)/2,h=(r+.5)*o.rowHeight-t.outerHeight(!0)/2;n._pushPosition(t,a,h),o.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(t){var n=this;t.each(function(t){var o=e(this);n._pushPosition(o,0,n.straightDown.y),n.straightDown.y+=o.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var t=this.masonryHorizontal.rows;for(this.masonryHorizontal.rowXs=[];t--;)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(t){var n=this,o=n.masonryHorizontal;t.each(function(){var t=e(this),s=Math.ceil(t.outerHeight(!0)/o.rowHeight);if(1===(s=Math.min(s,o.rows)))n._masonryHorizontalPlaceBrick(t,o.rowXs);else{var r,a,h=o.rows+1-s,l=[];for(a=0;h>a;a++)r=o.rowXs.slice(a,a+s),l[a]=Math.max.apply(Math,r);n._masonryHorizontalPlaceBrick(t,l)}})},_masonryHorizontalPlaceBrick:function(t,e){for(var n=Math.min.apply(Math,e),o=0,s=0,r=e.length;r>s;s++)if(e[s]===n){o=s;break}var a=this.masonryHorizontal.rowHeight*o;this._pushPosition(t,n,a);var h=n+t.outerWidth(!0),l=this.masonryHorizontal.rows+1-r;for(s=0;l>s;s++)this.masonryHorizontal.rowXs[o+s]=h},_masonryHorizontalGetContainerSize:function(){return{width:Math.max.apply(Math,this.masonryHorizontal.rowXs)}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(t){var n=this,o=this.element.height(),s=this.fitColumns;t.each(function(){var t=e(this),r=t.outerWidth(!0),a=t.outerHeight(!0);0!==s.y&&a+s.y>o&&(s.x=s.width,s.y=0),n._pushPosition(t,s.x,s.y),s.width=Math.max(s.x+r,s.width),s.y+=a})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(t){var n=this,o=this.cellsByColumn;t.each(function(){var t=e(this),s=Math.floor(o.index/o.rows),r=o.index%o.rows,a=(s+.5)*o.columnWidth-t.outerWidth(!0)/2,h=(r+.5)*o.rowHeight-t.outerHeight(!0)/2;n._pushPosition(t,a,h),o.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(t){var n=this;t.each(function(t){var o=e(this);n._pushPosition(o,n.straightAcross.x,0),n.straightAcross.x+=o.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},e.fn.imagesLoaded=function(t){function n(){t.call(s,r)}function o(t){var s=t.target;s.src!==h&&-1===e.inArray(s,l)&&(l.push(s),--a<=0&&(setTimeout(n),r.unbind(".imagesLoaded",o)))}var s=this,r=s.find("img").add(s.filter("img")),a=r.length,h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",l=[];return a||n(),r.bind("load.imagesLoaded error.imagesLoaded",o).each(function(){var t=this.src;this.src=h,this.src=t}),s};var C=function(e){t.console&&t.console.error(e)};e.fn.isotope=function(t,n){if("string"==typeof t){var o=Array.prototype.slice.call(arguments,1);this.each(function(){var n=e.data(this,"isotope");return n?e.isFunction(n[t])&&"_"!==t.charAt(0)?void n[t].apply(n,o):void C("no such method '"+t+"' for isotope instance"):void C("cannot call methods on isotope prior to initialization; attempted to call method '"+t+"'")})}else this.each(function(){var o=e.data(this,"isotope");o?(o.option(t),o._init(n)):e.data(this,"isotope",new e.Isotope(t,this,n))});return this}}(window,jQuery),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AOS=e():t.AOS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var s=n[o]={exports:{},id:o,loaded:!1};return t[o].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var n={};return e.m=t,e.c=n,e.p="dist/",e(0)}([function(t,e,n){function o(t){return t&&t.__esModule?t:{default:t}}var s=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];if(t&&(_=!0),_)return w=(0,y.default)(w,C),(0,g.default)(w,C.once),w},z=function(){w=(0,b.default)(),T()},k=function(){w.forEach(function(t,e){t.node.removeAttribute("data-aos"),t.node.removeAttribute("data-aos-easing"),t.node.removeAttribute("data-aos-duration"),t.node.removeAttribute("data-aos-delay")})},S=function(t){var e;return C=s(C,t),w=(0,b.default)(),!0===(e=C.disable)||"mobile"===e&&f.default.mobile()||"phone"===e&&f.default.phone()||"tablet"===e&&f.default.tablet()||"function"==typeof e&&!0===e()||P?k():(document.querySelector("body").setAttribute("data-aos-easing",C.easing),document.querySelector("body").setAttribute("data-aos-duration",C.duration),document.querySelector("body").setAttribute("data-aos-delay",C.delay),"DOMContentLoaded"===C.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?T(!0):"load"===C.startEvent?window.addEventListener(C.startEvent,function(){T(!0)}):document.addEventListener(C.startEvent,function(){T(!0)}),window.addEventListener("resize",(0,u.default)(T,50,!0)),window.addEventListener("orientationchange",(0,u.default)(T,50,!0)),window.addEventListener("scroll",(0,h.default)(function(){(0,g.default)(w,C.once)},99)),document.addEventListener("DOMNodeRemoved",function(t){var e=t.target;e&&1===e.nodeType&&e.hasAttribute&&e.hasAttribute("data-aos")&&(0,u.default)(z,50,!0)}),(0,d.default)("[data-aos]",z),w)};t.exports={init:S,refresh:T,refreshHard:z}},function(t,e){},,,,,function(t,e){(function(e){function n(t){var e=void 0===t?"undefined":s(t);return!!t&&("object"==e||"function"==e)}function o(t){if("number"==typeof t)return t;if("symbol"==(void 0===(e=t)?"undefined":s(e))||(o=e)&&"object"==(void 0===o?"undefined":s(o))&&v.call(e)==h)return a;if(n(t)){var e,o,r="function"==typeof t.valueOf?t.valueOf():t;t=n(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var f=c.test(t);return f||d.test(t)?p(t.slice(2),f?2:8):u.test(t)?a:+t}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="Expected a function",a=NaN,h="[object Symbol]",l=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,p=parseInt,f="object"==(void 0===e?"undefined":s(e))&&e&&e.Object===Object&&e,m="object"==("undefined"==typeof self?"undefined":s(self))&&self&&self.Object===Object&&self,g=f||m||Function("return this")(),v=Object.prototype.toString,y=Math.max,x=Math.min,b=function(){return g.Date.now()};t.exports=function t(e,s,a){var h=!0,l=!0;if("function"!=typeof e)throw TypeError(r);return n(a)&&(h="leading"in a?!!a.leading:h,l="trailing"in a?!!a.trailing:l),function t(e,s,a){function h(t){var n=p,o=f;return p=f=void 0,_=t,g=e.apply(o,n)}function l(t){var e=t-w,n=t-_;return void 0===w||e>=s||e<0||C&&n>=m}function u(){var t,e,n,o,r=b();return l(r)?c(r):void(v=setTimeout(u,(e=(t=r)-w,n=t-_,o=s-e,C?x(o,m-n):o)))}function c(t){return v=void 0,T&&p?h(t):(p=f=void 0,g)}function d(){var t,e=b(),n=l(e);if(p=arguments,f=this,w=e,n){if(void 0===v)return _=t=w,v=setTimeout(u,s),P?h(t):g;if(C)return v=setTimeout(u,s),h(w)}return void 0===v&&(v=setTimeout(u,s)),g}var p,f,m,g,v,w,_=0,P=!1,C=!1,T=!0;if("function"!=typeof e)throw TypeError(r);return s=o(s)||0,n(a)&&(P=!!a.leading,m=(C="maxWait"in a)?y(o(a.maxWait)||0,s):m,T="trailing"in a?!!a.trailing:T),d.cancel=function t(){void 0!==v&&clearTimeout(v),_=0,p=w=f=v=void 0},d.flush=function t(){return void 0===v?g:c(b())},d}(e,s,{leading:h,maxWait:s,trailing:l})}}).call(e,function(){return this}())},function(t,e){(function(e){function n(t){var e=void 0===t?"undefined":s(t);return!!t&&("object"==e||"function"==e)}function o(t){if("number"==typeof t)return t;if("symbol"==(void 0===(e=t)?"undefined":s(e))||(o=e)&&"object"==(void 0===o?"undefined":s(o))&&g.call(e)==a)return r;if(n(t)){var e,o,p="function"==typeof t.valueOf?t.valueOf():t;t=n(p)?p+"":p}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(h,"");var f=u.test(t);return f||c.test(t)?d(t.slice(2),f?2:8):l.test(t)?r:+t}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=NaN,a="[object Symbol]",h=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,p="object"==(void 0===e?"undefined":s(e))&&e&&e.Object===Object&&e,f="object"==("undefined"==typeof self?"undefined":s(self))&&self&&self.Object===Object&&self,m=p||f||Function("return this")(),g=Object.prototype.toString,v=Math.max,y=Math.min,x=function(){return m.Date.now()};t.exports=function t(e,s,r){function a(t){var n=d,o=p;return d=p=void 0,w=t,m=e.apply(o,n)}function h(t){var e=t-b,n=t-w;return void 0===b||e>=s||e<0||P&&n>=f}function l(){var t,e,n,o,r=x();return h(r)?u(r):void(g=setTimeout(l,(e=(t=r)-b,n=t-w,o=s-e,P?y(o,f-n):o)))}function u(t){return g=void 0,C&&d?a(t):(d=p=void 0,m)}function c(){var t,e=x(),n=h(e);if(d=arguments,p=this,b=e,n){if(void 0===g)return w=t=b,g=setTimeout(l,s),_?a(t):m;if(P)return g=setTimeout(l,s),a(b)}return void 0===g&&(g=setTimeout(l,s)),m}var d,p,f,m,g,b,w=0,_=!1,P=!1,C=!0;if("function"!=typeof e)throw TypeError("Expected a function");return s=o(s)||0,n(r)&&(_=!!r.leading,f=(P="maxWait"in r)?v(o(r.maxWait)||0,s):f,C="trailing"in r?!!r.trailing:C),c.cancel=function t(){void 0!==g&&clearTimeout(g),w=0,d=b=p=g=void 0},c.flush=function t(){return void 0===g?m:u(x())},c}}).call(e,function(){return this}())},function(t,e){function n(){for(var t,e,n=0,s=r.length;nt.position?t.node.classList.add("aos-animate"):void 0===o||"false"!==o&&(n||"true"===o)||t.node.classList.remove("aos-animate")},o=function(t,e){var o=window.pageYOffset,s=window.innerHeight;t.forEach(function(t,r){n(t,s+o,e)})};e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var o,s=(o=n(12))&&o.__esModule?o:{default:o},r=function(t,e){return t.forEach(function(t,n){t.node.classList.add("aos-init"),t.position=(0,s.default)(t.node,e.offset)}),t};e.default=r},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var o,s=(o=n(13))&&o.__esModule?o:{default:o},r=function(t,e){var n=0,o=0,r=window.innerHeight,a={offset:t.getAttribute("data-aos-offset"),anchor:t.getAttribute("data-aos-anchor"),anchorPlacement:t.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(t=document.querySelectorAll(a.anchor)[0]),n=(0,s.default)(t).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=t.offsetHeight/2;break;case"bottom-bottom":n+=t.offsetHeight;break;case"top-center":n+=r/2;break;case"bottom-center":n+=r/2+t.offsetHeight;break;case"center-center":n+=r/2+t.offsetHeight/2;break;case"top-top":n+=r;break;case"bottom-top":n+=t.offsetHeight+r;break;case"center-top":n+=t.offsetHeight/2+r}return a.anchorPlacement||a.offset||isNaN(e)||(o=e),n+o};e.default=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){for(var e=0,n=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-("BODY"!=t.tagName?t.scrollLeft:0),n+=t.offsetTop-("BODY"!=t.tagName?t.scrollTop:0),t=t.offsetParent;return{top:n,left:e}};e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){t=t||document.querySelectorAll("[data-aos]");var e=[];return[].forEach.call(t,function(t,n){e.push({node:t})}),e};e.default=n}])}),function(t,e,n,o){function s(e,n){this.settings=null,this.options=t.extend({},s.Defaults,n),this.$element=t(e),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,n){this._handlers[n]=t.proxy(this[n],this)},this)),t.each(s.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(s.Workers,t.proxy(function(e,n){this._pipe.push({filter:n.filter,run:t.proxy(n.run,this)})},this)),this.setup(),this.initialize()}s.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},s.Width={Default:"default",Inner:"inner",Outer:"outer"},s.Type={Event:"event",State:"state"},s.Plugins={},s.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",n=!this.settings.autoWidth,o=this.settings.rtl,s={width:"auto","margin-left":o?e:"","margin-right":o?"":e};n||this.$stage.children().css(s),t.css=s}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,n=null,o=this._items.length,s=!this.settings.autoWidth,r=[];for(t.items={merge:!1,width:e};o--;)n=this._mergers[o],n=this.settings.mergeFit&&Math.min(n,this.settings.items)||n,t.items.merge=n>1||t.items.merge,r[o]=s?e*n:this._items[o].width();this._widths=r}},{filter:["items","settings"],run:function(){var e=[],n=this._items,o=this.settings,s=Math.max(2*o.items,4),r=2*Math.ceil(n.length/2),a=o.loop&&n.length?o.rewind?s:Math.max(s,r):0,h="",l="";for(a/=2;a--;)e.push(this.normalize(e.length/2,!0)),h+=n[e[e.length-1]][0].outerHTML,e.push(this.normalize(n.length-1-(e.length-1)/2,!0)),l=n[e[e.length-1]][0].outerHTML+l;this._clones=e,t(h).addClass("cloned").appendTo(this.$stage),t(l).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,n=-1,o=0,s=0,r=[];++n",h)||this.op(e,"<",a)&&this.op(e,">",h))&&l.push(n);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],s.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var e,n,s;e=this.$element.find("img"),n=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:o,s=this.$element.children(n).width(),e.length&&s<=0&&this.preloadAutoWidthImages(e)}this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('
'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},s.prototype.setup=function(){var e=this.viewport(),n=this.options.responsive,o=-1,s=null;n?(t.each(n,function(t){t<=e&&t>o&&(o=Number(t))}),"function"==typeof(s=t.extend({},this.options,n[o])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+o))):s=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=o,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},s.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},s.prototype.prepare=function(e){var n=this.trigger("prepare",{content:e});return n.data||(n.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:n.data}),n.data},s.prototype.update=function(){for(var e=0,n=this._pipe.length,o=t.proxy(function(t){return this[t]},this._invalidated),s={};e0)&&this._pipe[e].run(s),e++;this._invalidated={},this.is("valid")||this.enter("valid")},s.prototype.width=function(t){switch(t=t||s.Width.Default){case s.Width.Inner:case s.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},s.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},s.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},s.prototype.onResize=function(){return!!this._items.length&&this._width!==this.$element.width()&&!!this.$element.is(":visible")&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))},s.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},s.prototype.onDragStart=function(e){var o=null;3!==e.which&&(t.support.transform?o={x:(o=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===o.length?12:4],y:o[16===o.length?13:5]}:(o=this.$stage.position(),o={x:this.settings.rtl?o.left+this.$stage.width()-this.width()+this.settings.margin:o.left,y:o.top}),this.is("animating")&&(t.support.transform?this.animate(o.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=o,this._drag.stage.current=o,this._drag.pointer=this.pointer(e),t(n).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(n).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var o=this.difference(this._drag.pointer,this.pointer(e));t(n).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(o.x)0^this.settings.rtl?"left":"right";t(n).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==o.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(s.x,0!==o.x?r:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=r,(Math.abs(o.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},s.prototype.closest=function(e,n){var o=-1,s=this.width(),r=this.coordinates();return this.settings.freeDrag||t.each(r,t.proxy(function(t,a){return"left"===n&&e>a-30&&ea-s-30&&e",r[t+1]||a-s)&&(o="left"===n?t+1:t),-1===o},this)),this.settings.loop||(this.op(e,">",r[this.minimum()])?o=e=this.minimum():this.op(e,"<",r[this.maximum()])&&(o=e=this.maximum())),o},s.prototype.animate=function(e){var n=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),n&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"}):n?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},s.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},s.prototype.current=function(t){if(t===o)return this._current;if(0===this._items.length)return o;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==o&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},s.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},s.prototype.reset=function(t){(t=this.normalize(t))!==o&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},s.prototype.normalize=function(t,e){var n=this._items.length,s=e?0:this._clones.length;return!this.isNumeric(t)||n<1?t=o:(t<0||t>=n+s)&&(t=((t-s/2)%n+n)%n+s/2),t},s.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},s.prototype.maximum=function(t){var e,n,o,s=this.settings,r=this._coordinates.length;if(s.loop)r=this._clones.length/2+this._items.length-1;else if(s.autoWidth||s.merge){for(e=this._items.length,n=this._items[--e].width(),o=this.$element.width();e--&&!((n+=this._items[e].width()+this.settings.margin)>o););r=e+1}else r=s.center?this._items.length-1:this._items.length-s.items;return t&&(r-=this._clones.length/2),Math.max(r,0)},s.prototype.minimum=function(t){return t?0:this._clones.length/2},s.prototype.items=function(t){return t===o?this._items.slice():(t=this.normalize(t,!0),this._items[t])},s.prototype.mergers=function(t){return t===o?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},s.prototype.clones=function(e){var n=this._clones.length/2,s=n+this._items.length,r=function(t){return t%2==0?s+t/2:n-(t+1)/2};return e===o?t.map(this._clones,function(t,e){return r(e)}):t.map(this._clones,function(t,n){return t===e?r(n):null})},s.prototype.speed=function(t){return t!==o&&(this._speed=t),this._speed},s.prototype.coordinates=function(e){var n,s=1,r=e-1;return e===o?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(s=-1,r=e+1),n=this._coordinates[e],n+=(this.width()-n+(this._coordinates[r]||0))/2*s):n=this._coordinates[r]||0,n=Math.ceil(n))},s.prototype.duration=function(t,e,n){return 0===n?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(n||this.settings.smartSpeed)},s.prototype.to=function(t,e){var n=this.current(),o=null,s=t-this.relative(n),r=(s>0)-(s<0),a=this._items.length,h=this.minimum(),l=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(s)>a/2&&(s+=-1*r*a),(o=(((t=n+s)-h)%a+a)%a+h)!==t&&o-s<=l&&o-s>0&&(n=o-s,t=o,this.reset(n))):this.settings.rewind?(l+=1,t=(t%l+l)%l):t=Math.max(h,Math.min(l,t)),this.speed(this.duration(n,t,e)),this.current(t),this.$element.is(":visible")&&this.update()},s.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},s.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},s.prototype.onTransitionEnd=function(t){if(t!==o&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},s.prototype.viewport=function(){var o;return this.options.responsiveBaseElement!==e?o=t(this.options.responsiveBaseElement).width():e.innerWidth?o=e.innerWidth:n.documentElement&&n.documentElement.clientWidth?o=n.documentElement.clientWidth:console.warn("Can not detect viewport width."),o},s.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},s.prototype.add=function(e,n){var s=this.relative(this._current);n=n===o?this._items.length:this.normalize(n,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:n}),e=this.prepare(e),0===this._items.length||n===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[n-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[n].before(e),this._items.splice(n,0,e),this._mergers.splice(n,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[s]&&this.reset(this._items[s].index()),this.invalidate("items"),this.trigger("added",{content:e,position:n})},s.prototype.remove=function(t){(t=this.normalize(t,!0))!==o&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},s.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,n){this.enter("pre-loading"),n=t(n),t(new Image).one("load",t.proxy(function(t){n.attr("src",t.target.src),n.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",n.attr("src")||n.attr("data-src")||n.attr("data-src-retina"))},this))},s.prototype.destroy=function(){for(var o in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(n).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[o].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},s.prototype.op=function(t,e,n){var o=this.settings.rtl;switch(e){case"<":return o?t>n:t":return o?tn;case">=":return o?t<=n:t>=n;case"<=":return o?t>=n:t<=n}},s.prototype.on=function(t,e,n,o){t.addEventListener?t.addEventListener(e,n,o):t.attachEvent&&t.attachEvent("on"+e,n)},s.prototype.off=function(t,e,n,o){t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent&&t.detachEvent("on"+e,n)},s.prototype.trigger=function(e,n,o,r,a){var h={item:{count:this._items.length,index:this.current()}},l=t.camelCase(t.grep(["on",e,o],function(t){return t}).join("-").toLowerCase()),u=t.Event([e,"owl",o||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},h,n));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(u)}),this.register({type:s.Type.Event,name:e}),this.$element.trigger(u),this.settings&&"function"==typeof this.settings[l]&&this.settings[l].call(this,u)),u},s.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]===o&&(this._states.current[e]=0),this._states.current[e]++},this))},s.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},s.prototype.register=function(e){if(e.type===s.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var n=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return n&&n.apply&&(!t.namespace||-1===t.namespace.indexOf("owl"))?n.apply(this,arguments):t.namespace&&t.namespace.indexOf("owl")>-1},t.event.special[e.name].owl=!0}}else e.type===s.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(n,o){return t.inArray(n,this._states.tags[e.name])===o},this)))},s.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},s.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},s.prototype.pointer=function(t){var n={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(n.x=t.pageX,n.y=t.pageY):(n.x=t.clientX,n.y=t.clientY),n},s.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},s.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var o=t(this),r=o.data("owl.carousel");r||(r=new s(this,"object"==typeof e&&e),o.data("owl.carousel",r),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,n){r.register({type:s.Type.Event,name:n}),r.$element.on(n+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([n]),r[n].apply(this,[].slice.call(arguments,1)),this.release([n]))},r))})),"string"==typeof e&&"_"!==e.charAt(0)&&r[e].apply(r,n)})},t.fn.owlCarousel.Constructor=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,n;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type))for(var n=this._core.settings,o=n.center&&Math.ceil(n.items/2)||n.items,s=n.center&&-1*o||0,r=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+s,a=this._core.clones().length,h=t.proxy(function(t,e){this.load(e)},this);s++-1||(s.each(t.proxy(function(n,o){var s,r=t(o),a=e.devicePixelRatio>1&&r.attr("data-src-retina")||r.attr("data-src");this._core.trigger("load",{element:r,url:a},"lazy"),r.is("img")?r.one("load.owl.lazy",t.proxy(function(){r.css("opacity",1),this._core.trigger("loaded",{element:r,url:a},"lazy")},this)).attr("src",a):((s=new Image).onload=t.proxy(function(){r.css({"background-image":'url("'+a+'")',opacity:"1"}),this._core.trigger("loaded",{element:r,url:a},"lazy")},this),s.src=a)},this)),this._loaded.push(o.get(0)))},s.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"==t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var e=this._core._current,n=e+this._core.settings.items,o=this._core.$stage.children().toArray().slice(e,n),s=[],r=0;t.each(o,function(e,n){s.push(t(n).height())}),r=Math.max.apply(null,s),this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var n=t(e.content).find(".owl-video");n.length&&(n.css("display","none"),this.fetch(n,t(e.content)))}},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};s.Defaults={video:!1,videoHeight:!1,videoWidth:!1},s.prototype.fetch=function(t,e){var n=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",o=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),s=t.attr("data-width")||this._core.settings.videoWidth,r=t.attr("data-height")||this._core.settings.videoHeight,a=t.attr("href");if(!a)throw Error("Missing video URL.");if((o=a.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)n="youtube";else if(o[3].indexOf("vimeo")>-1)n="vimeo";else{if(!(o[3].indexOf("vzaar")>-1))throw Error("Video URL not supported.");n="vzaar"}o=o[6],this._videos[a]={type:n,id:o,width:s,height:r},e.attr("data-video",a),this.thumbnail(t,this._videos[a])},s.prototype.thumbnail=function(e,n){var o,s,r,a=n.width&&n.height?'style="width:'+n.width+"px;height:"+n.height+'px;"':"",h=e.find("img"),l="src",u="",c=this._core.settings,d=function(t){s='
',o=c.lazyLoad?'
':'
',e.after(o),e.after(s)};if(e.wrap('
"),this._core.settings.lazyLoad&&(l="data-src",u="owl-lazy"),h.length)return d(h.attr(l)),h.remove(),!1;"youtube"===n.type?d(r="//img.youtube.com/vi/"+n.id+"/hqdefault.jpg"):"vimeo"===n.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+n.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){d(r=t[0].thumbnail_large)}}):"vzaar"===n.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+n.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){d(r=t.framegrab_url)}})},s.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},s.prototype.play=function(e){var n,o=t(e.target).closest("."+this._core.settings.itemClass),s=this._videos[o.attr("data-video")],r=s.width||"100%",a=s.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),o=this._core.items(this._core.relative(o.index())),this._core.reset(o.index()),"youtube"===s.type?n='':"vimeo"===s.type?n='':"vzaar"===s.type&&(n=''),t('
'+n+"
").insertAfter(o.find(".owl-video")),this._playing=o.addClass("owl-video-playing"))},s.prototype.isInFullScreen=function(){var e=n.fullscreenElement||n.mozFullScreenElement||n.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},s.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this.core=e,this.core.options=t.extend({},s.Defaults,this.core.options),this.swapping=!0,this.previous=o,this.next=o,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};s.Defaults={animateOut:!1,animateIn:!1},s.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,n=t.proxy(this.clear,this),o=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),r=this.core.settings.animateIn,a=this.core.settings.animateOut;this.core.current()!==this.previous&&(a&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),o.one(t.support.animation.end,n).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(a)),r&&s.one(t.support.animation.end,n).addClass("animated owl-animated-in").addClass(r))}},s.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},s.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,n){t.namespace&&this.play(e,n)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},s.Defaults,this._core.options)};s.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},s.prototype.play=function(t,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},s.prototype._getNextTimeout=function(o,s){return this._timeout&&e.clearTimeout(this._timeout),e.setTimeout(t.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||n.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},this),o||this._core.settings.autoplayTimeout)},s.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},s.prototype.stop=function(){this._core.is("rotating")&&(e.clearTimeout(this._timeout),this._core.leave("rotating"))},s.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},s.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('
'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this.$element.on(this._handlers)};s.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},s.prototype.initialize=function(){var e,n=this._core.settings;for(e in this._controls.$relative=(n.navContainer?t(n.navContainer):t("
").addClass(n.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+n.navElement+">").addClass(n.navClass[0]).html(n.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(n.navSpeed)},this)),this._controls.$next=t("<"+n.navElement+">").addClass(n.navClass[1]).html(n.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(n.navSpeed)},this)),n.dotsData||(this._templates=[t("
").addClass(n.dotClass).append(t("")).prop("outerHTML")]),this._controls.$absolute=(n.dotsContainer?t(n.dotsContainer):t("
").addClass(n.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",t.proxy(function(e){var o=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(o,n.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},s.prototype.destroy=function(){var t,e,n,o;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)this._controls[e].remove();for(o in this.overides)this._core[o]=this._overrides[o];for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},s.prototype.update=function(){var t,e,n,o=this._core.clones().length/2,s=o+this._core.items().length,r=this._core.maximum(!0),a=this._core.settings,h=a.center||a.autoWidth||a.dotsData?1:a.dotsEach||a.items;if("page"!==a.slideBy&&(a.slideBy=Math.min(a.slideBy,a.items)),a.dots||"page"==a.slideBy)for(this._pages=[],t=o,e=0,n=0;t=h||0===e){if(this._pages.push({start:Math.min(r,t-o),end:t-o+h-1}),Math.min(r,t-o)===r)break;e=0,++n}e+=this._core.mergers(this._core.relative(t))}},s.prototype.draw=function(){var e,n=this._core.settings,o=this._core.items().length<=n.items,s=this._core.relative(this._core.current()),r=n.loop||n.rewind;this._controls.$relative.toggleClass("disabled",!n.nav||o),n.nav&&(this._controls.$previous.toggleClass("disabled",!r&&s<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!r&&s>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!n.dots||o),n.dots&&(e=this._pages.length-this._controls.$absolute.children().length,n.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},s.prototype.onTrigger=function(e){var n=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:n&&(n.center||n.autoWidth||n.dotsData?1:n.dotsEach||n.items)}},s.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,n){return t.start<=e&&t.end>=e},this)).pop()},s.prototype.getPosition=function(e){var n,o,s=this._core.settings;return"page"==s.slideBy?(n=t.inArray(this.current(),this._pages),o=this._pages.length,e?++n:--n,n=this._pages[(n%o+o)%o].start):(n=this._core.relative(this._core.current()),o=this._core.items().length,e?n+=s.slideBy:n-=s.slideBy),n},s.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},s.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},s.prototype.to=function(e,n,o){var s;!o&&this._pages.length?(s=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%s+s)%s].start,n)):t.proxy(this._overrides.to,this._core)(e,n)},t.fn.owlCarousel.Constructor.Plugins.Navigation=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){var s=function(n){this._core=n,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(n){n.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var n=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");n&&(this._hashes[n]=e.content)}},this),"changed.owl.carousel":t.proxy(function(n){if(n.namespace&&"position"===n.property.name){var o=this._core.items(this._core.relative(this._core.current())),s=t.map(this._hashes,function(t,e){return t===o?e:null}).join();s&&e.location.hash.slice(1)!==s&&(e.location.hash=s)}},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var n=e.location.hash.substring(1),o=this._core.$stage.children(),s=this._hashes[n]&&o.index(this._hashes[n]);void 0!==s&&s!==this._core.current()&&this._core.to(this._core.relative(s),!1,!0)},this))};s.Defaults={URLhashListener:!1},s.prototype.destroy=function(){var n,o;for(n in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(n,this._handlers[n]);for(o in Object.getOwnPropertyNames(this))"function"!=typeof this[o]&&(this[o]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=s}(window.Zepto||window.jQuery,window,document),function(t,e,n,o){function s(e,n){var o=!1,s=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+h.join(s+" ")+s).split(" "),function(t,e){if(void 0!==a[e])return o=!n||e,!1}),o}function r(t){return s(t,!0)}var a=t("").get(0).style,h="Webkit Moz O ms".split(" "),l={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},u={csstransforms:function(){return!!s("transform")},csstransforms3d:function(){return!!s("perspective")},csstransitions:function(){return!!s("transition")},cssanimations:function(){return!!s("animation")}};u.csstransitions()&&(t.support.transition=new String(r("transition")),t.support.transition.end=l.transition.end[t.support.transition]),u.cssanimations()&&(t.support.animation=new String(r("animation")),t.support.animation.end=l.animation.end[t.support.animation]),u.csstransforms()&&(t.support.transform=new String(r("transform")),t.support.transform3d=u.csstransforms3d())}(window.Zepto||window.jQuery,window,document),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(t){var e,n,o,s,r,a,h="Close",l="BeforeClose",u="MarkupParse",c="Open",d="Change",p=".mfp",f="mfp-ready",m="mfp-removing",g="mfp-prevent-close",v=function(){},y=!!window.jQuery,x=t(window),b=function(t,n){e.ev.on("mfp"+t+p,n)},w=function(e,n,o,s){var r=document.createElement("div");return r.className="mfp-"+e,o&&(r.innerHTML=o),s?n&&n.appendChild(r):(r=t(r),n&&r.appendTo(n)),r},_=function(n,o){e.ev.triggerHandler("mfp"+n,o),e.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),e.st.callbacks[n]&&e.st.callbacks[n].apply(e,t.isArray(o)?o:[o]))},P=function(n){return n===a&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),a=n),e.currTemplate.closeBtn},C=function(){t.magnificPopup.instance||((e=new v).init(),t.magnificPopup.instance=e)},T=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition" in t)return!0;return!1};v.prototype={constructor:v,init:function(){var n=navigator.appVersion;e.isLowIE=e.isIE8=document.all&&!document.addEventListener,e.isAndroid=/android/gi.test(n),e.isIOS=/iphone|ipad|ipod/gi.test(n),e.supportsTransition=T(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=t(document),e.popupsCache={}},open:function(n){if(!1===n.isObj){e.items=n.items.toArray(),e.index=0;var s,a,h=n.items;for(s=0;s(t||x.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(n){if(n.target!==e.wrap[0]&&!t.contains(e.wrap[0],n.target))return e._setFocus(),!1},_parseMarkup:function(e,n,o){var s;o.data&&(n=t.extend(o.data,n)),_(u,[e,n,o]),t.each(n,function(n,o){if(void 0===o||!1===o)return!0;if((s=n.split("_")).length>1){var r=e.find(p+"-"+s[0]);if(r.length>0){var a=s[1];"replaceWith"===a?r[0]!==o[0]&&r.replaceWith(o):"img"===a?r.is("img")?r.attr("src",o):r.replaceWith(t("").attr("src",o).attr("class",r.attr("class"))):r.attr(s[1],o)}}else e.find(p+"-"+n).html(o)})},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:v.prototype,modules:[],open:function(e,n){return C(),(e=e?t.extend(!0,{},e):{}).isObj=!0,e.index=n||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,n){n.options&&(t.magnificPopup.defaults[e]=n.options),t.extend(this.proto,n.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},t.fn.magnificPopup=function(n){C();var o=t(this);if("string"==typeof n){if("open"===n){var s,r=y?o.data("magnificPopup"):o[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?s=r.items[a]:(s=o,r.delegate&&(s=s.find(r.delegate)),s=s.eq(a)),e._openClick({mfpEl:s},o,r)}else e.isOpen&&e[n].apply(e,Array.prototype.slice.call(arguments,1))}else n=t.extend(!0,{},n),y?o.data("magnificPopup",n):o[0].magnificPopup=n,e.addGroup(o,n);return o};var z,k,S,E="inline",A=function(){S&&(k.after(S.addClass(z)).detach(),S=null)};t.magnificPopup.registerModule(E,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push(E),b(h+"."+E,function(){A()})},getInline:function(n,o){if(A(),n.src){var s=e.st.inline,r=t(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(k||(k=w(z=s.hiddenClass),z="mfp-"+z),S=r.after(k).detach().removeClass(z)),e.updateStatus("ready")}else e.updateStatus("error",s.tNotFound),r=t("
");return n.inlineElement=r,r}return e.updateStatus("ready"),e._parseMarkup(o,{},n),o}}});var I,O="ajax",B=function(){I&&t(document.body).removeClass(I)},Z=function(){B(),e.req&&e.req.abort()};t.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){e.types.push(O),I=e.st.ajax.cursor,b(h+"."+O,Z),b("BeforeChange."+O,Z)},getAjax:function(n){I&&t(document.body).addClass(I),e.updateStatus("loading");var o=t.extend({url:n.src,success:function(o,s,r){var a={data:o,xhr:r};_("ParseAjax",a),e.appendContent(t(a.data),O),n.finished=!0,B(),e._setFocus(),setTimeout(function(){e.wrap.addClass(f)},16),e.updateStatus("ready"),_("AjaxContentAdded")},error:function(){B(),n.finished=n.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",n.src))}},e.st.ajax.settings);return e.req=t.ajax(o),""}}});var D,M,F=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var o=e.st.image.titleSrc;if(o){if(t.isFunction(o))return o.call(e,n);if(n.el)return n.el.attr(o)||""}return""};t.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var n=e.st.image,o=".image";e.types.push("image"),b(c+o,function(){"image"===e.currItem.type&&n.cursor&&t(document.body).addClass(n.cursor)}),b(h+o,function(){n.cursor&&t(document.body).removeClass(n.cursor),x.off("resize"+p)}),b("Resize"+o,e.resizeImage),e.isLowIE&&b("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var n=0;e.isLowIE&&(n=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-n)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,D&&clearInterval(D),t.isCheckingImgSize=!1,_("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var n=0,o=t.img[0],s=function(r){D&&clearInterval(D),D=setInterval(function(){if(o.naturalWidth>0){e._onImageHasSize(t);return}n>200&&clearInterval(D),3==++n?s(10):40===n?s(50):100===n&&s(500)},r)};s(1)},getImage:function(n,o){var s=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,_("ImageLoadComplete")):++s<200?setTimeout(r,100):a())},a=function(){n&&(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("error",h.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},h=e.st.image,l=o.find(".mfp-img");if(l.length){var u=document.createElement("img");u.className="mfp-img",n.el&&n.el.find("img").length&&(u.alt=n.el.find("img").attr("alt")),n.img=t(u).on("load.mfploader",r).on("error.mfploader",a),u.src=n.src,l.is("img")&&(n.img=n.img.clone()),(u=n.img[0]).naturalWidth>0?n.hasSize=!0:u.width||(n.hasSize=!1)}return e._parseMarkup(o,{title:F(n),img_replaceWith:n.img},n),e.resizeImage(),n.hasSize?(D&&clearInterval(D),n.loadError?(o.addClass("mfp-loading"),e.updateStatus("error",h.tError.replace("%url%",n.src))):(o.removeClass("mfp-loading"),e.updateStatus("ready")),o):(e.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,o.addClass("mfp-loading"),e.findImageSize(n)),o)}}}),t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,n=e.st.zoom,o=".zoom";if(n.enabled&&e.supportsTransition){var s,r,a=n.duration,u=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),o="all "+n.duration/1e3+"s "+n.easing,s={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return s["-webkit-"+r]=s["-moz-"+r]=s["-o-"+r]=s[r]=o,e.css(s),e},c=function(){e.content.css("visibility","visible")};b("BuildControls"+o,function(){if(e._allowZoom()){if(clearTimeout(s),e.content.css("visibility","hidden"),!(t=e._getItemToZoom())){c();return}(r=u(t)).css(e._getOffset()),e.wrap.append(r),s=setTimeout(function(){r.css(e._getOffset(!0)),s=setTimeout(function(){c(),setTimeout(function(){r.remove(),t=r=null,_("ZoomAnimationEnded")},16)},a)},16)}}),b(l+o,function(){if(e._allowZoom()){if(clearTimeout(s),e.st.removalDelay=a,!t){if(!(t=e._getItemToZoom()))return;r=u(t)}r.css(e._getOffset(!0)),e.wrap.append(r),e.content.css("visibility","hidden"),setTimeout(function(){r.css(e._getOffset())},16)}}),b(h+o,function(){e._allowZoom()&&(c(),r&&r.remove(),t=null)})}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return!!e.currItem.hasSize&&e.currItem.img},_getOffset:function(n){var o,s=(o=n?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem)).offset(),r=parseInt(o.css("padding-top"),10),a=parseInt(o.css("padding-bottom"),10);s.top-=t(window).scrollTop()-r;var h={width:o.width(),height:(y?o.innerHeight():o[0].offsetHeight)-a-r};return(void 0===M&&(M=void 0!==document.createElement("p").style.MozTransform),M)?h["-moz-transform"]=h.transform="translate("+s.left+"px,"+s.top+"px)":(h.left=s.left,h.top=s.top),h}}});var j="iframe",R=function(t){if(e.currTemplate[j]){var n=e.currTemplate[j].find("iframe");n.length&&(t||(n[0].src="//about:blank"),e.isIE8&&n.css("display",t?"block":"none"))}};t.magnificPopup.registerModule(j,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){e.types.push(j),b("BeforeChange",function(t,e,n){e!==n&&(e===j?R():n===j&&R(!0))}),b(h+"."+j,function(){R()})},getIframe:function(n,o){var s=n.src,r=e.st.iframe;t.each(r.patterns,function(){if(s.indexOf(this.index)>-1)return this.id&&(s="string"==typeof this.id?s.substr(s.lastIndexOf(this.id)+this.id.length,s.length):this.id.call(this,s)),s=this.src.replace("%id%",s),!1});var a={};return r.srcAction&&(a[r.srcAction]=s),e._parseMarkup(o,a,n),e.updateStatus("ready"),o}}});var H=function(t){var n=e.items.length;return t>n-1?t-n:t<0?n+t:t},N=function(t,e,n){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,n)};t.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=e.st.gallery,s=".mfp-gallery";if(e.direction=!0,!n||!n.enabled)return!1;r+=" mfp-gallery",b(c+s,function(){n.navigateByImgClick&&e.wrap.on("click"+s,".mfp-img",function(){if(e.items.length>1)return e.next(),!1}),o.on("keydown"+s,function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()})}),b("UpdateStatus"+s,function(t,n){n.text&&(n.text=N(n.text,e.currItem.index,e.items.length))}),b(u+s,function(t,o,s,r){var a=e.items.length;s.counter=a>1?N(n.tCounter,r.index,a):""}),b("BuildControls"+s,function(){if(e.items.length>1&&n.arrows&&!e.arrowLeft){var o=n.arrowMarkup,s=e.arrowLeft=t(o.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(g),r=e.arrowRight=t(o.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(g);s.click(function(){e.prev()}),r.click(function(){e.next()}),e.container.append(s.add(r))}}),b(d+s,function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout(function(){e.preloadNearbyImages(),e._preloadTimeout=null},16)}),b(h+s,function(){o.off(s),e.wrap.off("click"+s),e.arrowRight=e.arrowLeft=null})},next:function(){e.direction=!0,e.index=H(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=H(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,n=e.st.gallery.preload,o=Math.min(n[0],e.items.length),s=Math.min(n[1],e.items.length);for(t=1;t<=(e.direction?s:o);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?o:s);t++)e._preloadItem(e.index-t)},_preloadItem:function(n){if(n=H(n),!e.items[n].preloaded){var o=e.items[n];o.parsed||(o=e.parseEl(n)),_("LazyLoad",o),"image"===o.type&&(o.img=t('').on("load.mfploader",function(){o.hasSize=!0}).on("error.mfploader",function(){o.hasSize=!0,o.loadError=!0,_("LazyLoadError",o)}).attr("src",o.src)),o.preloaded=!0}}}});var W="retina";t.magnificPopup.registerModule(W,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,function(t){return"@2x"+t})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,n=t.ratio;(n=isNaN(n)?n():n)>1&&(b("ImageHasSize."+W,function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/n,width:"100%"})}),b("ElementParse."+W,function(e,o){o.src=t.replaceSrc(o,n)}))}}}}),C()}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){function e(t){var e,n,o,s;for(n=1,o=arguments.length;n=0}function B(t){eZ[t.pointerId]=t,eM++}function Z(t){eZ[t.pointerId]&&(eZ[t.pointerId]=t)}function D(t){delete eZ[t.pointerId],eM--}function M(t,e){for(var n in t.touches=[],eZ)t.touches.push(eZ[n]);t.changedTouches=[t],e(t)}function F(t,e,n){function o(t){var e;if(eP){if(!er||"mouse"===t.pointerType)return;e=eM}else e=t.touches.length;if(!(e>1)){var n=Date.now(),o=n-(r||n);a=t.touches?t.touches[0]:t,h=o>0&&o<=l,r=n}}function s(t){if(h&&!a.cancelBubble){if(eP){if(!er||"mouse"===t.pointerType)return;var n,o,s={};for(o in a)n=a[o],s[o]=n&&n.bind?n.bind(a):n;a=s}a.type="dblclick",e(a),r=null}}var r,a,h=!1,l=250;return t[eR+eF+n]=o,t[eR+ej+n]=s,t[eR+"dblclick"+n]=e,t.addEventListener(eF,o,!1),t.addEventListener(ej,s,!1),t.addEventListener("dblclick",e,!1),this}function j(t,e){var n=t[eR+eF+e],o=t[eR+ej+e],s=t[eR+"dblclick"+e];return t.removeEventListener(eF,n,!1),t.removeEventListener(ej,o,!1),er||t.removeEventListener("dblclick",s,!1),this}function R(t,e,n,o){if("object"==typeof e)for(var s in e)N(t,s,e[s],n);else for(var r=0,a=(e=u(e)).length;reB.indexOf(t.target.tagName)))return;G(t)}M(t,h)}),a["_leaflet_touchstart"+l]=u,a.addEventListener(eA,u,!1),eD||(document.documentElement.addEventListener(eA,B,!0),document.documentElement.addEventListener(eI,Z,!0),document.documentElement.addEventListener(eO,D,!0),document.documentElement.addEventListener(e0,D,!0),eD=!0)):"touchmove"===o?(c=e,d=s,p=r,f=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&M(t,d)},c["_leaflet_touchmove"+p]=f,c.addEventListener(eI,f,!1)):"touchend"===o&&(m=e,g=s,v=r,y=function(t){M(t,g)},m["_leaflet_touchend"+v]=y,m.addEventListener(eO,y,!1),m.addEventListener(e0,y,!1)),this}(t,e,h,a):!eC||"dblclick"!==e||!F||eP&&ep?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",h,!1):"mouseenter"===e||"mouseleave"===e?(h=function(e){tt(t,e=e||window.event)&&l(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",h,!1)):("click"===e&&eh&&(h=function(t){var e,n,o,s;e=t,n=l,o=e.timeStamp||e.originalEvent&&e.originalEvent.timeStamp,s=tY&&o-tY,s&&s>100&&s<500||e.target._simulatedClick&&!e._simulated?X(e):(tY=o,n(e))}),t.addEventListener(e,h,!1)):"attachEvent"in t&&t.attachEvent("on"+e,h):F(t,h,a),t[eH]=t[eH]||{},t[eH][a]=h}function W(t,e,n,s){var r=e+o(n)+(s?"_"+o(s):""),a=t[eH]&&t[eH][r];if(!a)return this;eP&&0===e.indexOf("touch")?function t(e,n,o){var s=e["_leaflet_"+n+o];return"touchstart"===n?e.removeEventListener(eA,s,!1):"touchmove"===n?e.removeEventListener(eI,s,!1):"touchend"===n&&(e.removeEventListener(eO,s,!1),e.removeEventListener(e0,s,!1)),this}(t,e,r):!eC||"dblclick"!==e||!j||eP&&ep?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a):j(t,r),t[eH][r]=null}function q(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,J(t),this}function U(t){return N(t,"mousewheel",q),this}function V(t){return R(t,"mousedown touchstart dblclick",q),N(t,"click",Q),this}function G(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function X(t){return G(t),q(t),this}function K(t,e){if(!e)return new b(t.clientX,t.clientY);var n=e.getBoundingClientRect(),o=n.width/e.offsetWidth||1,s=n.height/e.offsetHeight||1;return new b(t.clientX/o-n.left-e.clientLeft,t.clientY/s-n.top-e.clientTop)}function Y(t){return er?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/eN:t.deltaY&&1===t.deltaMode?-(20*t.deltaY):t.deltaY&&2===t.deltaMode?-(60*t.deltaY):t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&32765>Math.abs(t.detail)?-(20*t.detail):t.detail?-(60*(t.detail/32765)):0}function Q(t){e9[t.type]=!0}function J(t){var e=e9[t.type];return e9[t.type]=!1,e}function tt(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(o){return!1}return n!==t}function te(t){return"string"==typeof t?document.getElementById(t):t}function ti(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var o=document.defaultView.getComputedStyle(t,null);n=o?o[e]:null}return"auto"===n?null:n}function tn(t,e,n){var o=document.createElement(t);return o.className=e||"",n&&n.appendChild(o),o}function to(t){var e=t.parentNode;e&&e.removeChild(t)}function ts(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function tr(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function ta(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function th(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=td(t);return n.length>0&&RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function tl(t,e){if(void 0!==t.classList)for(var n=u(e),o=0,s=n.length;ou&&(a=h,u=l);u>o&&(n[a]=1,t(e,n,o,s,a),t(e,n,o,a,r))}(e,s,n,0,o-1);var r,a=[];for(r=0;rn&&(o.push(e[s]),r=s);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function tL(t,e){var n=e.x-t.x,o=e.y-t.y;return n*n+o*o}function tT(t,e,n,o){var s,r=e.x,a=e.y,h=n.x-r,l=n.y-a,u=h*h+l*l;return u>0&&((s=((t.x-r)*h+(t.y-a)*l)/u)>1?(r=n.x,a=n.y):s>0&&(r+=h*s,a+=l*s)),h=t.x-r,l=t.y-a,o?h*h+l*l:new b(r,a)}function tz(t){return!tW(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function tk(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),tz(t)}function tS(t,e,n){var o,s,r,a,h,l,u,c,d,p=[1,4,2,8];for(s=0,u=t.length;s0?Math.floor(t):Math.ceil(t)};b.prototype={clone:function(){return new b(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new b(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new b(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=t4(this.x),this.y=t4(this.y),this},distanceTo:function(t){var e=(t=w(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=w(t)).x===this.x&&t.y===this.y},contains:function(t){return Math.abs((t=w(t)).x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}},_.prototype={extend:function(t){return t=w(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new b(this.min.x,this.max.y)},getTopRight:function(){return new b(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof b?w(t):P(t))instanceof _?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=P(t);var e=this.min,n=this.max,o=t.min,s=t.max,r=s.x>=e.x&&o.x<=n.x,a=s.y>=e.y&&o.y<=n.y;return r&&a},overlaps:function(t){t=P(t);var e=this.min,n=this.max,o=t.min,s=t.max,r=s.x>e.x&&o.xe.y&&o.y=o.lat&&n.lat<=s.lat&&e.lng>=o.lng&&n.lng<=s.lng},intersects:function(t){t=T(t);var e=this._southWest,n=this._northEast,o=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=e.lat&&o.lat<=n.lat,a=s.lng>=e.lng&&o.lng<=n.lng;return r&&a},overlaps:function(t){t=T(t);var e=this._southWest,n=this._northEast,o=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>e.lat&&o.late.lng&&o.lng1,ez=!!document.createElement("canvas").getContext,ek=!(!document.createElementNS||!A("svg").createSVGRect),eS=!ek&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(n){return!1}}(),eE=(Object.freeze||Object)({ie:eo,ielt9:es,edge:er,webkit:ea,android:eh,android23:el,androidStock:ec,opera:ed,chrome:ep,gecko:ef,safari:em,phantom:e8,opera12:eg,win:ev,ie3d:ey,webkit3d:e$,gecko3d:ex,any3d:eb,mobile:ew,mobileWebkit:ew&&ea,mobileWebkit3d:ew&&e$,msPointer:e_,pointer:eP,touch:eC,mobileOpera:eL,mobileGecko:ew&&ef,retina:eT,canvas:ez,svg:ek,vml:eS}),eA=e_?"MSPointerDown":"pointerdown",eI=e_?"MSPointerMove":"pointermove",eO=e_?"MSPointerUp":"pointerup",e0=e_?"MSPointerCancel":"pointercancel",eB=["INPUT","SELECT","OPTION"],eZ={},eD=!1,eM=0,eF=e_?"MSPointerDown":eP?"pointerdown":"touchstart",ej=e_?"MSPointerUp":eP?"pointerup":"touchend",eR="_leaflet_",eH="_leaflet_events",eN=ev&&ep?2*window.devicePixelRatio:ef?window.devicePixelRatio:1,e9={},eW=(Object.freeze||Object)({on:R,off:H,stopPropagation:q,disableScrollPropagation:U,disableClickPropagation:V,preventDefault:G,stop:X,getMousePosition:K,getWheelDelta:Y,fakeStop:Q,skipped:J,isExternalTarget:tt,addListener:R,removeListener:H}),e3=tf(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),e1=tf(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),eq="webkitTransition"===e1||"OTransition"===e1?e1+"End":"transitionend";if("onselectstart"in document)tQ=function(){R(window,"selectstart",G)},tJ=function(){H(window,"selectstart",G)};else{var e5=tf(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);tQ=function(){if(e5){var t=document.documentElement.style;et=t[e5],t[e5]="none"}},tJ=function(){e5&&(document.documentElement.style[e5]=et,et=void 0)}}var e6,eU,e7=(Object.freeze||Object)({TRANSFORM:e3,TRANSITION:e1,TRANSITION_END:eq,get:te,getStyle:ti,create:tn,remove:to,empty:ts,toFront:tr,toBack:ta,hasClass:th,addClass:tl,removeClass:tu,setClass:tc,getClass:td,setOpacity:tp,testProp:tf,setTransform:tm,setPosition:t8,getPosition:tg,disableTextSelection:tQ,enableTextSelection:tJ,disableImageDrag:tv,enableImageDrag:ty,preventOutline:t$,restoreOutline:tx}),eV=tV.extend({run:function(t,e,n,o){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=tg(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=v(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),o=this._limitCenter(n,this._zoom,T(t));return n.equals(o)||this.panTo(o,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var o=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),r=o.divideBy(2).round(),a=s.divideBy(2).round(),h=r.subtract(a);return h.x||h.y?(t.animate&&t.pan?this.panBy(h):(t.pan&&this._rawPanBy(h),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var o=n(this._handleGeolocationResponse,this),s=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,s,t):navigator.geolocation.getCurrentPosition(o,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new z(t.coords.latitude,t.coords.longitude),n=e.toBounds(t.coords.accuracy),o=this._locateOptions;if(o.setView){var s=this.getBoundsZoom(n);this.setView(e,o.maxZoom?Math.min(s,o.maxZoom):s)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(r[a]=t.coords[a]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){var t;if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),to(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)to(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=tn("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new C(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=T(t),n=w(n||[0,0]);var o=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(n),u=P(this.project(h,o),this.project(a,o)).getSize(),c=eb?this.options.zoomSnap:1,d=l.x/u.x,p=l.y/u.y;return o=this.getScaleZoom(e?Math.max(d,p):Math.min(d,p),o),c&&(o=Math.round(o/(c/100))*(c/100),o=e?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(s,Math.min(r,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new _(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(k(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(w(t),e)},layerPointToLatLng:function(t){var e=w(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(k(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(k(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(T(t))},distance:function(t,e){return this.options.crs.distance(k(t),k(e))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(k(t)))},mouseEventToContainerPoint:function(t){return K(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=te(t);if(!e)throw Error("Map container not found.");if(e._leaflet_id)throw Error("Map container is already initialized.");R(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&eb,tl(t,"leaflet-container"+(eC?" leaflet-touch":"")+(eT?" leaflet-retina":"")+(es?" leaflet-oldie":"")+(em?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ti(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),t8(this._mapPane,new b(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(tl(t.markerPane,"leaflet-zoom-hide"),tl(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){t8(this._mapPane,new b(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,!1)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){t8(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[o(this._container)]=this;var e=t?H:R;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),eb&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){y(this._resizeRequest),this._resizeRequest=v(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,s=[],r="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,h=!1;a;){if((n=this._targets[o(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){h=!0;break}if(n&&n.listens(e,!0)&&(r&&!tt(a,t)||(s.push(n),r))||a===this._container)break;a=a.parentNode}return s.length||h||r||!tt(a,t)||(s=[this]),s},_handleDOMEvent:function(t){if(this._loaded&&!J(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||t$(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,o){if("click"===t.type){var s=e({},t);s.type="preclick",this._fireDOMEvent(s,s.type,o)}if(!t._stopped&&(o=(o||[]).concat(this._findEventTargets(t,n))).length){var r=o[0];"contextmenu"===n&&r.listens(n,!0)&&G(t);var a={originalEvent:t};if("keypress"!==t.type){var h=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=h?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=h?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),o=eb?this.options.zoomSnap:1;return o&&(t=Math.round(t/o)*o),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){tu(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=tn("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=e3,n=this._proxy.style[e];tm(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();tm(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){to(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/o);return!(!0!==n.animate&&!this.getSize().contains(s))&&(v(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,o,s){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,tl(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&tu(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),v(function(){this._moveEnd(!0)},this))}}),e2=x.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),o=t._controlCorners[n];return tl(e,"leaflet-control"),-1!==n.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this},remove:function(){return this._map&&(to(this._container),this.onRemove&&this.onRemove(this._map),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),eG=function(t){return new e2(t)};e4.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){e[t+s]=tn("div",n+t+" "+n+s,o)}var e=this._controlCorners={},n="leaflet-",o=this._controlContainer=tn("div",n+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)to(this._controlCorners[t]);to(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var eX=e2.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,o){return n1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n=document.createElement("div");return n.innerHTML='",n.firstChild},_addItem:function(t){var e,n=document.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=s):e=this._createRadioElement("leaflet-base-layers",s),this._layerControlInputs.push(e),e.layerId=o(t.layer),R(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var a=document.createElement("div");return n.appendChild(a),a.appendChild(e),a.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,o=[],s=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?o.push(e):t.checked||s.push(e);for(r=0;r=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),eK=e2.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=tn("div",e+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,o,s){var r=tn("a",n,o);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),V(r),R(r,"click",X),R(r,"click",s,this),R(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";tu(this._zoomInButton,e),tu(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&tl(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&tl(this._zoomInButton,e)}});e4.mergeOptions({zoomControl:!0}),e4.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new eK,this.addControl(this.zoomControl))});var eY=e2.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=tn("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=tn("div",e,n)),t.imperial&&(this._iScale=tn("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n,o,s=3.2808399*t;s>5280?(e=s/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(o=this._getRoundNum(s),this._updateScale(this._iScale,o+" ft",o/s))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),eQ=e2.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=tn("div","leaflet-control-attribution"),V(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});e4.mergeOptions({attributionControl:!0}),e4.addInitHook(function(){this.options.attributionControl&&(new eQ).addTo(this)}),e2.Layers=eX,e2.Zoom=eK,e2.Scale=eY,e2.Attribution=eQ,eG.layers=function(t,e,n){return new eX(t,e,n)},eG.zoom=function(t){return new eK(t)},eG.scale=function(t){return new eY(t)},eG.attribution=function(t){return new eQ(t)};var eJ,it=x.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});it.addTo=function(t,e){return t.addHandler(e,this),this};var ie,ii=eC?"touchstart mousedown":"mousedown",io={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},is={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ir=tV.extend({options:{clickTolerance:3},initialize:function(t,e,n,o){c(this,o),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(R(this._dragStartTarget,ii,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ir._dragging===this&&this.finishDrag(),H(this._dragStartTarget,ii,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!th(this._element,"leaflet-zoom-anim")&&!(ir._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ir._dragging=this,this._preventOutline&&t$(this._element),tv(),tQ(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new b(e.clientX,e.clientY),R(document,is[t.type],this._onMove,this),R(document,io[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled){if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new b(e.clientX,e.clientY).subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)1e-7;l++)e=Math.pow((1-(e=r*Math.sin(h)))/(1+e),r/2),h+=u=Math.PI/2-2*Math.atan(a*e)-h;return new z(h*n,t.x*n/o)}},ic=(Object.freeze||Object)({LonLat:il,Mercator:iu,SphericalMercator:tK}),id=e({},tX,{code:"EPSG:3395",projection:iu,transformation:E(eJ=.5/(Math.PI*iu.R),.5,-eJ,.5)}),ip=e({},tX,{code:"EPSG:4326",projection:il,transformation:E(1/180,1,-1/180,.5)}),im=e({},tG,{projection:il,transformation:E(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,o=e.lat-t.lat;return Math.sqrt(n*n+o*o)},infinite:!0});tG.Earth=tX,tG.EPSG3395=id,tG.EPSG3857=ee,tG.EPSG900913=ei,tG.EPSG4326=ip,tG.Simple=im;var i8=tV.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});e4.include({addLayer:function(t){if(!t._layerAdd)throw Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=o(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&o(t) in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?tW(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return a=(o-e)/n,this._map.layerPointToLatLng([r.x-a*(r.x-s.x),r.y-a*(r.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=k(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new C,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return tz(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=tz(t),o=0,s=t.length;o=2&&e[0]instanceof z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){iC.prototype._setLatLngs.call(this,t),tz(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return tz(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new b(e,e);if(t=new _(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)this._parts=this._rings;else for(var o,s=0,r=this._rings.length;st.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(u=!u);return u||iC.prototype._containsPoint.call(this,t,!0)}}),iT=iv.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,o,s=tW(t)?t:t.features;if(s){for(e=0,n=s.length;e0?s:[e.src]}else{tW(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var h=0;hs?(e.height=s+"px",tl(t,"leaflet-popup-scrolled")):tu(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();t8(this._container,e.add(n))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(ti(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,o=this._containerWidth,s=new b(this._containerLeft,-n-this._containerBottom);s._add(tg(this._container));var r=t.layerPointToContainerPoint(s),a=w(this.options.autoPanPadding),h=w(this.options.autoPanPaddingTopLeft||a),l=w(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,d=0;r.x+o+l.x>u.x&&(c=r.x+o-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+n+l.y>u.y&&(d=r.y+n-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&t.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(t){this._close(),X(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});e4.mergeOptions({closePopupOnClick:!0}),e4.include({openPopup:function(t,e,n){return t instanceof iA||(t=new iA(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),i8.include({bindPopup:function(t,e){return t instanceof iA?(c(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new iA(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof i8||(e=t,t=this),t instanceof iv)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(X(t),e instanceof iw?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var iI=iE.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){iE.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){iE.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=iE.prototype.getEvents.call(this);return eC&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=tn("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,l=w(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(w(-a/2+l.x,-h+l.y+u.y,!0)):"bottom"===r?t=t.subtract(w(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(w(a/2+l.x,h/2-u.y+l.y,!0)):"right"===r||"auto"===r&&s.xthis.options.maxZoom||no&&this._retainParent(s,r,a,o))},_retainChildren:function(t,e,n,o){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var a=new b(s,r);a.z=n+1;var h=this._tileCoordsToKey(a),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&s1)this._setView(t,n);else{for(var d=s.min.y;d<=s.max.y;d++)for(var p=s.min.x;p<=s.max.x;p++){var f=new b(p,d);if(f.z=this._tileZoom,this._isValidTile(f)){var m=this._tiles[this._tileCoordsToKey(f)];m?m.current=!0:a.push(f)}}if(a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var g=document.createDocumentFragment();for(p=0;pn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(t);return T(this.options.bounds).overlaps(o)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),o=t.scaleBy(n),s=o.add(n);return[e.unproject(o,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new C(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new b(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ec||e.el.setAttribute("src",t3),to(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){tl(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,es&&this.options.opacity<1&&tp(t,this.options.opacity),eh&&!el&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var o=this._getTilePos(t),s=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&v(n(this._tileReady,this,t,null,r)),t8(r,o),this._tiles[s]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,o){if(this._map){e&&this.fire("tileerror",{error:e,tile:o,coords:t});var s=this._tileCoordsToKey(t);(o=this._tiles[s])&&(o.loaded=+new Date,this._map._fadeAnimated?(tp(o.el,0),y(this._fadeFrame),this._fadeFrame=v(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),e||(tl(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),es||!this._map._fadeAnimated?v(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new b(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new _(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),iB=i0.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&eT&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),eh||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var o=document.createElement("img");return R(o,"load",n(this._tileOnLoad,this,e,o)),R(o,"error",n(this._tileOnError,this,e,o)),this.options.crossOrigin&&(o.crossOrigin=""),o.alt="",o.setAttribute("role","presentation"),o.src=this.getTileUrl(t),o},getTileUrl:function(t){var n={r:eT?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=o),n["-y"]=o}return p(this._url,e(n,this.options))},_tileOnLoad:function(t,e){es?setTimeout(n(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var o=this.options.errorTileUrl;o&&e.getAttribute("src")!==o&&(e.src=o),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,n=this.options.zoomReverse,o=this.options.zoomOffset;return n&&(t=e-t),t+o},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=t3,to(e),delete this._tiles[t]))}}),iZ=iB.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var o=e({},this.defaultWmsParams);for(var s in n)s in this.options||(o[s]=n[s]);var r=(n=c(this,n)).detectRetina&&eT?2:1,a=this.getTileSize();o.width=a.x*r,o.height=a.y*r,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,iB.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,o=P(n.project(e[0]),n.project(e[1])),s=o.min,r=o.max,a=(this._wmsVersion>=1.3&&this._crs===ip?[s.y,s.x,r.y,r.x]:[s.x,s.y,r.x,r.y]).join(","),h=L.TileLayer.prototype.getTileUrl.call(this,t);return h+d(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});iB.WMS=iZ,tM.wms=function(t,e){return new iZ(t,e)};var iD=i8.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&tl(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),o=tg(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e).subtract(r),h=s.multiplyBy(-n).add(o).add(s).subtract(a);eb?tm(this._container,h,n):t8(this._container,h)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new _(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),iM=iD.extend({getEvents:function(){var t=iD.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){iD.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");R(t,"mousemove",s(this._onMouseMove,32,this),this),R(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),R(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,to(this._container),H(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},iD.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),o=eT?2:1;t8(e,t.min),e.width=o*n.x,e.height=o*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",eT&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){iD.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,o=e.prev;n?n.prev=o:this._drawLast=o,o?o.next=n:this._drawFirst=n,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,n=t.options.dashArray.split(","),o=[];for(e=0;e')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),ij=eS?iF:A,iR=iD.extend({getEvents:function(){var t=iD.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=ij("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ij("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){to(this._container),H(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){iD.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),t8(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=ij("path");t.options.className&&tl(e,t.options.className),t.options.interactive&&tl(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){to(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,I(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),o="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+o+2*n+",0 "+o+-(2*n)+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){tr(t._path)},_bringToBack:function(t){ta(t._path)}});eS&&iR.include({_initContainer:function(){this._container=tn("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(iD.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=iF("shape");tl(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=iF("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;to(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,o=t.options,s=t._container;s.stroked=!!o.stroke,s.filled=!!o.fill,o.stroke?(e||(e=t._stroke=iF("stroke")),s.appendChild(e),e.weight=o.weight+"px",e.color=o.color,e.opacity=o.opacity,o.dashArray?e.dashStyle=tW(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=o.lineCap.replace("butt","flat"),e.joinstyle=o.lineJoin):e&&(s.removeChild(e),t._stroke=null),o.fill?(n||(n=t._fill=iF("fill")),s.appendChild(n),n.color=o.fillColor||o.color,n.opacity=o.fillOpacity):n&&(s.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),o=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+o+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){tr(t._container)},_bringToBack:function(t){ta(t._container)}}),e4.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&tF()||tj()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=iR&&tj({pane:t})||iM&&tF({pane:t}),this._paneRenderers[t]=e),e}});var iH=iL.extend({initialize:function(t,e){iL.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=T(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});iR.create=ij,iR.pointsToPath=I,iT.geometryToLayer=tE,iT.coordsToLatLng=tA,iT.coordsToLatLngs=tI,iT.latLngToCoords=tO,iT.latLngsToCoords=t0,iT.getFeature=tB,iT.asFeature=tZ,e4.mergeOptions({boxZoom:!0});var iN=it.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){R(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){H(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){to(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),tQ(),tv(),this._startPoint=this._map.mouseEventToContainerPoint(t),R(document,{contextmenu:X,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=tn("div","leaflet-zoom-box",this._container),tl(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new _(this._point,this._startPoint),n=e.getSize();t8(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(to(this._box),tu(this._container,"leaflet-crosshair")),tJ(),ty(),H(document,{contextmenu:X,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var e=new C(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});e4.addInitHook("addHandler","boxZoom",iN),e4.mergeOptions({doubleClickZoom:!0});var i9=it.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),o=e.options.zoomDelta,s=t.originalEvent.shiftKey?n-o:n+o;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});e4.addInitHook("addHandler","doubleClickZoom",i9),e4.mergeOptions({dragging:!0,inertia:!el,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var iW=it.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ir(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}tl(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){tu(this._map._container,"leaflet-grab"),tu(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=T(this._map.options.maxBounds);this._offsetLimit=P(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,s=(o-e+n)%t+e-n,r=(o+e+n)%t-e-n;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Math.abs(s+n)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});e4.addInitHook("addHandler","scrollWheelZoom",i1),e4.mergeOptions({tap:!0,tapTolerance:15});var iq=it.extend({addHooks:function(){R(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){H(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(G(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],o=e.target;this._startPos=this._newPos=new b(e.clientX,e.clientY),o.tagName&&"a"===o.tagName.toLowerCase()&&tl(o,"leaflet-active"),this._holdTimeout=setTimeout(n(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),R(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),H(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&tu(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new b(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});eC&&!eP&&e4.addInitHook("addHandler","tap",iq),e4.mergeOptions({touchZoom:eC&&!el,bounceAtZoomLimits:!0});var i5=it.extend({addHooks:function(){tl(this._map._container,"leaflet-touch-zoom"),R(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){tu(this._map._container,"leaflet-touch-zoom"),H(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(o)._divideBy(2))),this._startDist=n.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),R(document,"touchmove",this._onTouchMove,this),R(document,"touchend",this._onTouchEnd,this),G(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),r=o.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=o._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),y(this._animRequest);var h=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=v(h,this,!0),G(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,y(this._animRequest),H(document,"touchmove",this._onTouchMove),H(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});e4.addInitHook("addHandler","touchZoom",i5),e4.BoxZoom=iN,e4.DoubleClickZoom=i9,e4.Drag=iW,e4.Keyboard=i3,e4.ScrollWheelZoom=i1,e4.Tap=iq,e4.TouchZoom=i5;var i6=window.L;window.L=t,Object.freeze=tR,t.version="1.3.1",t.noConflict=function(){return window.L=i6,this},t.Control=e2,t.control=eG,t.Browser=eE,t.Evented=tV,t.Mixin={Events:tU},t.Util=t6,t.Class=x,t.Handler=it,t.extend=e,t.bind=n,t.stamp=o,t.setOptions=c,t.DomEvent=eW,t.DomUtil=e7,t.PosAnimation=eV,t.Draggable=ir,t.LineUtil=ia,t.PolyUtil=ih,t.Point=b,t.point=w,t.Bounds=_,t.bounds=P,t.Transformation=S,t.transformation=E,t.Projection=ic,t.LatLng=z,t.latLng=k,t.LatLngBounds=C,t.latLngBounds=T,t.CRS=tG,t.GeoJSON=iT,t.geoJSON=tD,t.geoJson=tD,t.Layer=i8,t.LayerGroup=ig,t.layerGroup=function(t,e){return new ig(t,e)},t.FeatureGroup=iv,t.featureGroup=function(t){return new iv(t)},t.ImageOverlay=ik,t.imageOverlay=function(t,e,n){return new ik(t,e,n)},t.VideoOverlay=iS,t.videoOverlay=function(t,e,n){return new iS(t,e,n)},t.DivOverlay=iE,t.Popup=iA,t.popup=function(t,e){return new iA(t,e)},t.Tooltip=iI,t.tooltip=function(t,e){return new iI(t,e)},t.Icon=iy,t.icon=function(t){return new iy(t)},t.DivIcon=iO,t.divIcon=function(t){return new iO(t)},t.Marker=ib,t.marker=function(t,e){return new ib(t,e)},t.TileLayer=iB,t.tileLayer=tM,t.GridLayer=i0,t.gridLayer=function(t){return new i0(t)},t.SVG=iR,t.svg=tj,t.Renderer=iD,t.Canvas=iM,t.canvas=tF,t.Path=iw,t.CircleMarker=i_,t.circleMarker=function(t,e){return new i_(t,e)},t.Circle=iP,t.circle=function(t,e,n){return new iP(t,e,n)},t.Polyline=iC,t.polyline=function(t,e){return new iC(t,e)},t.Polygon=iL,t.polygon=function(t,e){return new iL(t,e)},t.Rectangle=iH,t.rectangle=function(t,e){return new iH(t,e)},t.Map=e4,t.map=function(t,e){return new e4(t,e)}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(t){function e(e){var n=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(n))}function n(e){var n=e.target,o=t(n);if(!o.is("[type=submit],[type=image]")){var s=o.closest("[type=submit]");if(0===s.length)return;n=s[0]}var r=this;if(r.clk=n,"image"==n.type){if(void 0!==e.offsetX)r.clk_x=e.offsetX,r.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var a=o.offset();r.clk_x=e.pageX-a.left,r.clk_y=e.pageY-a.top}else r.clk_x=e.pageX-n.offsetLeft,r.clk_y=e.pageY-n.offsetTop}setTimeout(function(){r.clk=r.clk_x=r.clk_y=null},100)}function o(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var s={};s.fileapi=void 0!==t("").get(0).files,s.formdata=void 0!==window.FormData;var r=!!t.fn.prop;t.fn.attr2=function(){if(!r)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function n(n){function s(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(n){o("cannot get iframe.contentWindow document: "+n)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(s){o("cannot get iframe.contentDocument: "+s),e=t.document}return e}function h(){function e(){try{var t=s(y).readyState;o("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(n){o("Server abort: ",n," (",n.name,")"),l(k),P&&clearTimeout(P),P=void 0}}var n=u.attr2("target"),r=u.attr2("action"),h=u.attr("enctype")||u.attr("encoding")||"multipart/form-data";C.setAttribute("target",g),(!a||/post/i.test(a))&&C.setAttribute("method","POST"),r!=p.url&&C.setAttribute("action",p.url),p.skipEncodingOverride||a&&!/post/i.test(a)||u.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),p.timeout&&(P=setTimeout(function(){_=!0,l(z)},p.timeout));var c=[];try{if(p.extraData)for(var d in p.extraData)p.extraData.hasOwnProperty(d)&&c.push(t.isPlainObject(p.extraData[d])&&p.extraData[d].hasOwnProperty("name")&&p.extraData[d].hasOwnProperty("value")?t('').val(p.extraData[d].value).appendTo(C)[0]:t('').val(p.extraData[d]).appendTo(C)[0]);p.iframeTarget||v.appendTo("body"),y.attachEvent?y.attachEvent("onload",l):y.addEventListener("load",l,!1),setTimeout(e,15);try{C.submit()}catch(f){document.createElement("form").submit.apply(C)}}finally{C.setAttribute("action",r),C.setAttribute("enctype",h),n?C.setAttribute("target",n):u.removeAttr("target"),t(c).remove()}}function l(e){if(!x.aborted&&!O){if((I=s(y))||(o("cannot access response document"),e=k),e===z&&x)return x.abort("timeout"),void T.reject(x,"timeout");if(e==k&&x)return x.abort("server abort"),void T.reject(x,"error","server abort");if(I&&I.location.href!=p.iframeSrc||_){y.detachEvent?y.detachEvent("onload",l):y.removeEventListener("load",l,!1);var n,r="success";try{if(_)throw"timeout";var a="xml"==p.dataType||I.XMLDocument||t.isXMLDoc(I);if(o("isXml="+a),!a&&window.opera&&(null===I.body||!I.body.innerHTML)&&--B)return o("requeing onLoad callback, DOM not available"),void setTimeout(l,250);var h=I.body?I.body:I.documentElement;x.responseText=h?h.innerHTML:null,x.responseXML=I.XMLDocument?I.XMLDocument:I,a&&(p.dataType="xml"),x.getResponseHeader=function(t){return({"content-type":p.dataType})[t.toLowerCase()]},h&&(x.status=Number(h.getAttribute("status"))||x.status,x.statusText=h.getAttribute("statusText")||x.statusText);var u=(p.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);if(c||p.textarea){var d=I.getElementsByTagName("textarea")[0];if(d)x.responseText=d.value,x.status=Number(d.getAttribute("status"))||x.status,x.statusText=d.getAttribute("statusText")||x.statusText;else if(c){var f=I.getElementsByTagName("pre")[0],g=I.getElementsByTagName("body")[0];f?x.responseText=f.textContent?f.textContent:f.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"==u&&!x.responseXML&&x.responseText&&(x.responseXML=Z(x.responseText));try{A=M(x,u,p)}catch(b){r="parsererror",x.error=n=b||r}}catch(w){o("error caught: ",w),r="error",x.error=n=w||r}x.aborted&&(o("upload aborted"),r=null),x.status&&(r=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===r?(p.success&&p.success.call(p.context,A,"success",x),T.resolve(x.responseText,"success",x),m&&t.event.trigger("ajaxSuccess",[x,p])):r&&(void 0===n&&(n=x.statusText),p.error&&p.error.call(p.context,x,r,n),T.reject(x,"error",n),m&&t.event.trigger("ajaxError",[x,p,n])),m&&t.event.trigger("ajaxComplete",[x,p]),!m||--t.active||t.event.trigger("ajaxStop"),p.complete&&p.complete.call(p.context,x,r),O=!0,p.timeout&&clearTimeout(P),setTimeout(function(){p.iframeTarget?v.attr("src",p.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,d,p,m,g,v,y,x,b,w,_,P,C=u[0],T=t.Deferred();if(T.abort=function(t){x.abort(t)},n)for(d=0;d')).css({position:"absolute",top:"-1000px",left:"-1000px"}),y=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var n="timeout"===e?"timeout":"aborted";o("aborting upload... "+n),this.aborted=1;try{y.contentWindow.document.execCommand&&y.contentWindow.document.execCommand("Stop")}catch(s){}v.attr("src",p.iframeSrc),x.error=n,p.error&&p.error.call(p.context,x,n,e),m&&t.event.trigger("ajaxError",[x,p,n]),p.complete&&p.complete.call(p.context,x,n)}},(m=p.global)&&0==t.active++&&t.event.trigger("ajaxStart"),m&&t.event.trigger("ajaxSend",[x,p]),p.beforeSend&&!1===p.beforeSend.call(p.context,x,p))return p.global&&t.active--,T.reject(),T;if(x.aborted)return T.reject(),T;(b=C.clk)&&(w=b.name)&&!b.disabled&&(p.extraData=p.extraData||{},p.extraData[w]=b.value,"image"==b.type&&(p.extraData[w+".x"]=C.clk_x,p.extraData[w+".y"]=C.clk_y));var z=1,k=2,S=t("meta[name=csrf-token]").attr("content"),E=t("meta[name=csrf-param]").attr("content");E&&S&&(p.extraData=p.extraData||{},p.extraData[E]=S),p.forceSync?h():setTimeout(h,10);var A,I,O,B=50,Z=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},D=t.parseJSON||function(t){return window.eval("("+t+")")},M=function(e,n,o){var s=e.getResponseHeader("content-type")||"",r="xml"===n||!n&&s.indexOf("xml")>=0,a=r?e.responseXML:e.responseText;return r&&"parsererror"===a.documentElement.nodeName&&t.error&&t.error("parsererror"),o&&o.dataFilter&&(a=o.dataFilter(a,n)),"string"==typeof a&&("json"===n||!n&&s.indexOf("json")>=0?a=D(a):("script"===n||!n&&s.indexOf("javascript")>=0)&&t.globalEval(a)),a};return T}if(!this.length)return o("ajaxSubmit: skipping submit process - no element selected"),this;var a,h,l,u=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),a=e.type||this.attr2("method"),(l=(l="string"==typeof(h=e.url||this.attr2("action"))?t.trim(h):"")||window.location.href||"")&&(l=(l.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:l,success:t.ajaxSettings.success,type:a||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var c={};if(this.trigger("form-pre-serialize",[this,e,c]),c.veto)return o("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return o("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=e.traditional;void 0===d&&(d=t.ajaxSettings.traditional);var p,f=[],m=this.formToArray(e.semantic,f);if(e.data&&(e.extraData=e.data,p=t.param(e.data,d)),e.beforeSubmit&&!1===e.beforeSubmit(m,this,e))return o("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[m,this,e,c]),c.veto)return o("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=t.param(m,d);p&&(g=g?g+"&"+p:p),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+g,e.data=null):e.data=g;var v=[];if(e.resetForm&&v.push(function(){u.resetForm()}),e.clearForm&&v.push(function(){u.clearForm(e.includeHidden)}),!e.dataType&&e.target){var y=e.success||function(){};v.push(function(n){var o=e.replaceTarget?"replaceWith":"html";t(e.target)[o](n).each(y,arguments)})}else e.success&&v.push(e.success);if(e.success=function(t,n,o){for(var s=e.context||this,r=0,a=v.length;a>r;r++)v[r].apply(s,[t,n,o||u,u])},e.error){var x=e.error;e.error=function(t,n,o){var s=e.context||this;x.apply(s,[t,n,o,u])}}if(e.complete){var b=e.complete;e.complete=function(t,n){var o=e.context||this;b.apply(o,[t,n,u])}}var w,_=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}).length>0,P="multipart/form-data",C=u.attr("enctype")==P||u.attr("encoding")==P,T=s.fileapi&&s.formdata;o("fileAPI :"+T),!1!==e.iframe&&(e.iframe||(_||C)&&!T)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){w=n(m)}):w=n(m):w=(_||C)&&T?function n(o){for(var s=new FormData,r=0;rs;s++)a[s]=a[s].replace(/\+/g," "),r=a[s].split("="),l.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return l}(e.extraData);for(r=0;ro;o++)if((a=(l=g[o]).name)&&!l.disabled){if(e&&f.clk&&"image"==l.type)f.clk==l&&(d.push({name:a,value:t(l).val(),type:l.type}),d.push({name:a+".x",value:f.clk_x},{name:a+".y",value:f.clk_y}));else if((h=t.fieldValue(l,!0))&&h.constructor==Array)for(n&&n.push(l),r=0,c=h.length;c>r;r++)d.push({name:a,value:h[r]});else if(s.fileapi&&"file"==l.type){n&&n.push(l);var v=l.files;if(v.length)for(r=0;rr;r++)n.push({name:o,value:s[r]});else null!=s&&n.push({name:this.name,value:s})}}),t.param(n)},t.fn.fieldValue=function(e){for(var n=[],o=0,s=this.length;s>o;o++){var r=this[o],a=t.fieldValue(r,e);null!=a&&(a.constructor!=Array||a.length)&&(a.constructor==Array?t.merge(n,a):n.push(a))}return n},t.fieldValue=function(e,n){var o=e.name,s=e.type,r=e.tagName.toLowerCase();if(void 0===n&&(n=!0),n&&(!o||e.disabled||"reset"==s||"button"==s||("checkbox"==s||"radio"==s)&&!e.checked||("submit"==s||"image"==s)&&e.form&&e.form.clk!=e||"select"==r&&-1==e.selectedIndex))return null;if("select"==r){var a=e.selectedIndex;if(0>a)return null;for(var h=[],l=e.options,u="select-one"==s,c=u?a+1:l.length,d=u?a:0;c>d;d++){var p=l[d];if(p.selected){var f=p.value;if(f||(f=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),u)return f;h.push(f)}}return h}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var o=this.type,s=this.tagName.toLowerCase();n.test(o)||"textarea"==s?this.value="":"checkbox"==o||"radio"==o?this.checked=!1:"select"==s?this.selectedIndex=-1:"file"==o?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(!0===e&&/hidden/.test(o)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var n=this.type;if("checkbox"==n||"radio"==n)this.checked=e;else if("option"==this.tagName.toLowerCase()){var o=t(this).parent("select");e&&o[0]&&"select-one"==o[0].type&&o.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return void(e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var n=t.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new t.validator(e,this[0]),t.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){n.settings.submitHandler&&(n.submitButton=e.target),t(e.target).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.submit(function(e){function o(){var o;return!n.settings.submitHandler||(n.submitButton&&(o=t("").attr("name",n.submitButton.name).val(t(n.submitButton).val()).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,e),n.submitButton&&o.remove(),!1)}return n.settings.debug&&e.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,o()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):o():(n.focusInvalid(),!1)}))),n},valid:function(){var e,n;return t(this[0]).is("form")?e=this.validate().form():(e=!0,n=t(this[0].form).validate(),this.each(function(){e=n.element(this)&&e})),e},removeAttrs:function(e){var n={},o=this;return t.each(e.split(/\s/),function(t,e){n[e]=o.attr(e),o.removeAttr(e)}),n},rules:function(e,n){var o,s,r,a,h,l,u=this[0];if(e)switch(s=(o=t.data(u.form,"validator").settings).rules,r=t.validator.staticRules(u),e){case"add":t.extend(r,t.validator.normalizeRule(n)),delete r.messages,s[u.name]=r,n.messages&&(o.messages[u.name]=t.extend(o.messages[u.name],n.messages));break;case"remove":return n?(l={},t.each(n.split(/\s/),function(e,n){l[n]=r[n],delete r[n],"required"===n&&t(u).removeAttr("aria-required")}),l):(delete s[u.name],r)}return(a=t.validator.normalizeRules(t.extend({},t.validator.classRules(u),t.validator.attributeRules(u),t.validator.dataRules(u),t.validator.staticRules(u)),u)).required&&(h=a.required,delete a.required,a=t.extend({required:h},a),t(u).attr("aria-required","true")),a.remote&&(h=a.remote,delete a.remote,a=t.extend(a,{remote:h})),a}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,n){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=n,this.init()},t.validator.format=function(e,n){return 1===arguments.length?function(){var n=t.makeArray(arguments);return n.unshift(e),t.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=t.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),t.each(n,function(t,n){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return n})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,n,o){"radio"===e.type?this.findByName(e.name).addClass(n).removeClass(o):t(e).addClass(n).removeClass(o)},unhighlight:function(e,n,o){"radio"===e.type?this.findByName(e.name).removeClass(n).addClass(o):t(e).removeClass(n).addClass(o)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var n=t.data(this[0].form,"validator"),o="on"+e.type.replace(/^validate/,""),s=n.settings;s[o]&&!this.is(s.ignore)&&s[o].call(n,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n,o=this.groups={};t.each(this.settings.groups,function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,function(t,n){o[n]=e})}),n=this.settings.rules,t.each(n,function(e,o){n[e]=t.validator.normalizeRule(o)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),t(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var n=this.clean(e),o=this.validationTargetFor(n),s=!0;return this.lastElement=o,void 0===o?delete this.invalid[n.name]:(this.prepareElement(o),this.currentElements=t(o),(s=!1!==this.check(o))?delete this.invalid[o.name]:this.invalid[o.name]=!0),t(e).attr("aria-invalid",!s),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),s},showErrors:function(e){if(e){for(var n in t.extend(this.errorMap,e),this.errorList=[],e)this.errorList.push({message:e[n],element:this.findByName(n)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,n=0;for(e in t)n++;return n},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,n={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),!(this.name in n)&&!!e.objectLength(t(this).rules())&&(n[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var n,o=t(e),s=o.attr("type");return"radio"===s||"checkbox"===s?t("input[name='"+o.attr("name")+"']:checked").val():"string"==typeof(n=o.val())?n.replace(/\r/g,""):n},check:function(e){e=this.validationTargetFor(this.clean(e));var n,o,s,r=t(e).rules(),a=t.map(r,function(t,e){return e}).length,h=!1,l=this.elementValue(e);for(o in r){s={method:o,parameters:r[o]};try{if(n=t.validator.methods[o].call(this,l,e,s.parameters),"dependency-mismatch"===n&&1===a){h=!0;continue}if(h=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!n)return this.formatAndAdd(e,s),!1}catch(u){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+s.method+"' method.",u),u}}if(!h)return this.objectLength(r)&&this.successList.push(e),!0},customDataMessage:function(e,n){return t(e).data("msg"+n[0].toUpperCase()+n.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var n=this.settings.messages[t];return n&&(n.constructor===String?n:n[e])},findDefined:function(){for(var t=0;tWarning: No message defined for "+e.name+"")},formatAndAdd:function(e,n){var o=this.defaultMessage(e,n.method),s=/\$?\{(\d+)\}/g;"function"==typeof o?o=o.call(this,n.parameters,e):s.test(o)&&(o=t.validator.format(o.replace(s,"{$1}"),n.parameters)),this.errorList.push({message:o,element:e,method:n.method}),this.errorMap[e.name]=o,this.submitted[e.name]=o},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,n;for(t=0;this.errorList[t];t++)n=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,n){var o=this.errorsFor(e);o.length?(o.removeClass(this.settings.validClass).addClass(this.settings.errorClass),o.html(n)):(o=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(o=o.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(o).length||(this.settings.errorPlacement?this.settings.errorPlacement(o,t(e)):o.insertAfter(e))),!n&&this.settings.success&&(o.text(""),"string"==typeof this.settings.success?o.addClass(this.settings.success):this.settings.success(o,e)),this.toShow=this.toShow.add(o)},errorsFor:function(e){var n=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===n})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,n){switch(n.nodeName.toLowerCase()){case"select":return t("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,n){return!!t(e,n.form).length},function:function(t,e){return t(e)}},optional:function(e){var n=this.elementValue(e);return!t.validator.methods.required.call(this,n,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,n){e.constructor===String?this.classRuleSettings[e]=n:t.extend(this.classRuleSettings,e)},classRules:function(e){var n={},o=t(e).attr("class");return o&&t.each(o.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(n,t.validator.classRuleSettings[this])}),n},attributeRules:function(e){var n,o,s={},r=t(e),a=e.getAttribute("type");for(n in t.validator.methods)"required"===n?(""===(o=e.getAttribute(n))&&(o=!0),o=!!o):o=r.attr(n),/min|max/.test(n)&&(null===a||/number|range|text/.test(a))&&(o=Number(o)),o||0===o?s[n]=o:a===n&&"range"!==a&&(s[n]=!0);return s.maxlength&&/-1|2147483647|524288/.test(s.maxlength)&&delete s.maxlength,s},dataRules:function(e){var n,o,s={},r=t(e);for(n in t.validator.methods)void 0!==(o=r.data("rule"+n[0].toUpperCase()+n.substring(1).toLowerCase()))&&(s[n]=o);return s},staticRules:function(e){var n={},o=t.data(e.form,"validator");return o.settings.rules&&(n=t.validator.normalizeRule(o.settings.rules[e.name])||{}),n},normalizeRules:function(e,n){return t.each(e,function(o,s){if(!1===s)return void delete e[o];if(s.param||s.depends){var r=!0;switch(typeof s.depends){case"string":r=!!t(s.depends,n.form).length;break;case"function":r=s.depends.call(n,n)}r?e[o]=void 0===s.param||s.param:delete e[o]}}),t.each(e,function(o,s){e[o]=t.isFunction(s)?s(n):s}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var n;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(n=e[this].split(/[\s,]+/),e[this]=[Number(n[0]),Number(n[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var n={};t.each(e.split(/\s/),function(){n[this]=!0}),e=n}return e},addMethod:function(e,n,o){t.validator.methods[e]=n,t.validator.messages[e]=void 0!==o?o:t.validator.messages[e],n.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,n,o){if(!this.depend(o,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var s=t(n).val();return s&&s.length>0}return this.checkable(n)?this.getLength(e,n)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([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])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var n,o,s=0,r=0,a=!1;if((t=t.replace(/\D/g,"")).length<13||t.length>19)return!1;for(n=t.length-1;n>=0;n--)r=parseInt(o=t.charAt(n),10),a&&(r*=2)>9&&(r-=9),s+=r,a=!a;return s%10==0},minlength:function(e,n,o){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),n);return this.optional(n)||s>=o},maxlength:function(e,n,o){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),n);return this.optional(n)||o>=s},rangelength:function(e,n,o){var s=t.isArray(e)?e.length:this.getLength(t.trim(e),n);return this.optional(n)||s>=o[0]&&s<=o[1]},min:function(t,e,n){return this.optional(e)||t>=n},max:function(t,e,n){return this.optional(e)||n>=t},range:function(t,e,n){return this.optional(e)||t>=n[0]&&t<=n[1]},equalTo:function(e,n,o){var s=t(o);return this.settings.onfocusout&&s.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(n).valid()}),e===s.val()},remote:function(e,n,o){if(this.optional(n))return"dependency-mismatch";var s,r,a=this.previousValue(n);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),a.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=a.message,o="string"==typeof o&&{url:o}||o,a.old===e?a.valid:(a.old=e,s=this,this.startRequest(n),(r={})[n.name]=e,t.ajax(t.extend(!0,{url:o,mode:"abort",port:"validate"+n.name,dataType:"json",data:r,context:s.currentForm,success:function(o){var r,h,l,u=!0===o||"true"===o;s.settings.messages[n.name].remote=a.originalMessage,u?(l=s.formSubmitted,s.prepareElement(n),s.formSubmitted=l,s.successList.push(n),delete s.invalid[n.name],s.showErrors()):(r={},h=o||s.defaultMessage(n,"remote"),r[n.name]=a.message=t.isFunction(h)?h(e):h,s.invalid[n.name]=!0,s.showErrors(r)),a.valid=u,s.stopRequest(n,u)}},o)),"pending")}}}),t.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."}}(jQuery),function(t){var e,n={};t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,o){var s=t.port;"abort"===t.mode&&(n[s]&&n[s].abort(),n[s]=o)}):(e=t.ajax,t.ajax=function(o){var s=("mode"in o?o:t.ajaxSettings).mode,r=("port"in o?o:t.ajaxSettings).port;return"abort"===s?(n[r]&&n[r].abort(),n[r]=e.apply(this,arguments),n[r]):e.apply(this,arguments)})}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,n,o){return this.bind(n,function(n){var s=t(n.target);return s.is(e)?o.apply(s,arguments):void 0})}})}(jQuery),function(t){var e="";try{e=mc_custom_error_style}catch(n){e="#mc_embed_signup input.mce_inline_error { border-color:#6B0505; } #mc_embed_signup div.mce_inline_error { margin: 0 0 1em 0; padding: 5px 10px; background-color:#6B0505; font-weight: bold; z-index: 1; color:#fff; }"}var o=document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),o.appendChild(s),window.mc={openPopup:function(){t("#mc_embed_signup a.mc_embed_close").show(),setTimeout(function(){t("#mc_embed_signup").fadeIn()},mc.delayPopup)},closePopup:function(){t("#mc_embed_signup").hide();var e=new Date,n=new Date(e.getTime()+31536e6);document.cookie="MCEvilPopupClosed=yes;expires="+n.toGMTString()+";path=/"},evalPopup:function(){for(t("#mc_embed_signup").hide(),cks=document.cookie.split(";"),i=0;i1){var s=o.first().attr("name"),r=t.map(o,function(t){return t.name});e[s.substring(0,s.indexOf("["))]=r.join(" ")}}),e},isMultiPartField:function(e){return t("input:not(:hidden)",t(e).closest(".mc-field-group")).length>1},isTooEarly:function(e){var n=t("input:not(:hidden)",t(e).closest(".mc-field-group"));return t(n).eq(-1).attr("id")!=t(e).attr("id")},mce_success_cb:function(e){if(t("#mce-success-response").hide(),t("#mce-error-response").hide(),"success"==e.result)t("#mce-"+e.result+"-response").show(),t("#mce-"+e.result+"-response").html(e.msg),t("#mc-embedded-subscribe-form").each(function(){this.reset()});else{var n,o=-1;try{var s=e.msg.split(" - ",2);void 0==s[1]?n=e.msg:(i=parseInt(s[0])).toString()==s[0]?(o=s[0],n=s[1]):(o=-1,n=e.msg)}catch(r){o=-1,n=e.msg}try{if(-1==o)t("#mce-"+e.result+"-response").show(),t("#mce-"+e.result+"-response").html(n);else{var a=t("input[name*='"+fnames[o]+"']").attr("name"),h={};h[a]=n,mc.mce_validator.showErrors(h)}}catch(l){t("#mce-"+e.result+"-response").show(),t("#mce-"+e.result+"-response").html(n)}}}},window.mc.mce_validator=t("#mc-embedded-subscribe-form").validate({errorClass:"mce_inline_error",errorElement:"div",onkeyup:!1,onfocusout:function(e){mc.isTooEarly(e)||t(e).valid()},onblur:function(e){mc.isTooEarly(e)||t(e).valid()},groups:mc.getGroups(),errorPlacement:function(t,e){e.closest(".mc-field-group").append(t)},submitHandler:function(e){t(e).ajaxSubmit(mc.ajaxOptions)}}),window.mc.ajaxOptions={url:mc.getAjaxSubmitUrl(),type:"GET",dataType:"json",contentType:"application/json; charset=utf-8",success:mc.mce_success_cb}}(jQuery),jQuery(document).ready(function(t){t("#submit_btn").on("click",function(){var e=!0;if(t("#contact_form input[required], #contact_form textarea[required]").each(function(){t(this).css("background-color",""),t.trim(t(this).val())||(t(this).css("background-color","#FFDEDE"),e=!1),"email"!==t(this).attr("type")||/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/.test(t.trim(t(this).val()))||(t(this).css("background-color","#FFDEDE"),e=!1)}),e){var n={user_name:t("input[name=name]").val(),user_email:t("input[name=email]").val(),subject:t("input[name=subject]").val(),msg:t("textarea[name=message]").val()};t.post("php/sendmail.php",n,function(e){if("error"===e.type)var n='

'+e.text+"
";else{var n='

'+e.text+"
";t("#contact_form input, #contact_form textarea").val("")}t("html, body").animate({scrollTop:t("#contact_form").offset().top-50},2e3),t("#contact_results").hide().html(n).slideDown()},"json")}}),t("#contact_form input[required=true], #contact_form textarea[required=true]").keyup(function(){t(this).css("background-color",""),t("#result").slideUp()})}),$(document).ready(function(){checkDisplay(),$(window).on("resize scroll",function(){checkDisplay()})}),function(t){t.fn.isOnScreen=function(e){var n=this.outerHeight(),o=this.outerWidth();if(!o||!n)return!1;var s=t(window),r={top:s.scrollTop(),left:s.scrollLeft()};r.right=r.left+s.width(),r.bottom=r.top+s.height();var a=this.offset();a.right=a.left+o,a.bottom=a.top+n;var h={top:r.bottom-a.top,left:r.right-a.left,bottom:a.bottom-r.top,right:a.right-r.left};return"function"==typeof e?e.call(this,h):h.top>0&&h.left>0&&h.right>0&&h.bottom>0}}(jQuery);