function iniTabHome(){$(".content-tabhome .tabitem").hide();$(".nav-tabhome div[id*='tab']").click(function(){$(this).hasClass("active")?$(this).removeClass("active"):($(".nav-tabhome .item").removeClass("active"),$(this).addClass("active"));var n=$(this).attr("id");$(".content-tabhome .tabitem").hide();$(".content-tabhome .tabitem").each(function(){var t=$(this).attr("rel");if(t==n){if($(this).hasClass("active")){$(this).removeClass("active");$(this).hide();return}$(".content-tabhome .tabitem").removeClass("active");$(this).show();$(this).addClass("active");return}})});$(".content-tab-atm .scroll-div").slimScroll({height:"300px",railVisible:!0,alwaysVisible:!0});$(".supportbox .scroll-div").slimScroll({height:"283px",railVisible:!0,alwaysVisible:!1});$(".toolbar-language .support any").click(function(){if($(this).hasClass("active"))return $(this).removeClass("active"),$(".supportbox,.bg-gray-menu,.bg-gray").hide(),$("#header,.wrapper-toolbar").removeAttr("style"),!1;$(this).addClass("active");$("#header").css("box-shadow","none");$(".supportbox,.bg-gray-menu,.bg-gray").show();var n=$("body").height();$("#toolbar,.wrapper-toolbar").css("position","relative");$(".bg-gray").css("height",n)})}function initTabProduct(){var n=$(".mysection.product"),t;$(".lstproduct .item").hide();$(".lstproduct .item").first().show();t=$(".lstproduct .item").first().data("image");n.css("background-image","url("+t+")");$(".nav-product li a").click(function(){var t=$(this).data("id");$(".lstproduct .item").hide();$(".nav-product li a").removeClass("active");$(this).addClass("active");$(".lstproduct .item").each(function(){var i=$(this).attr("rel");if(i==t){n.css("background-image","url("+$(this).data("image")+")");$(this).fadeIn();return}})})}function initSlideHome(){$(".listiem").cycle({fx:"fade",timeout:6e3,delay:-2e3,pager:"#navslide"});$("#navslide a").html("")}function initTabATM(){$(".content-tab-atm .item").hide();$(".content-tab-atm .item.active").show();$(".nav-tab-atm li").click(function(){var n=$(this).parent().data("tab"),t=$(this).data("id");$("#"+n+" .content-tab-atm .item").hide();$("#"+n+" .nav-tab-atm li").removeClass("active");$(this).addClass("active");$("#"+n+" .content-tab-atm .item").each(function(){var n=$(this).attr("rel");if(n==t){$(this).show();return}})})}function initToolTab(){$(".tool-tab .tool-tab-content div[id*='tab']").hide();$(".tool-tab .tool-tab-content div[id*='tab']").first().show();$(".tool-tab .tool-tab-navi ul li").click(function(){if(!$(this).hasClass("active")){var n=$(this).data("tab");$(".tool-tab .tool-tab-navi ul li").removeClass("active");$(this).addClass("active");$(".tool-tab .tool-tab-content div[id*='tab']").hide();$(".tool-tab .tool-tab-content div#"+n).show()}})}function initMapTab(){$(".map-tab .map-tab-content div[id*='tab']").hide();$(".map-tab .map-tab-content div[id*='tab']").first().show();$(".map-tab .map-tab-navi ul li").first().addClass("active");$(".map-tab .map-tab-navi ul li").click(function(){if(!$(this).hasClass("active")){var n=$(this).data("tab");$(".map-tab .map-tab-navi ul li").removeClass("active");$(this).addClass("active");$(".map-tab .map-tab-content div[id*='tab']").hide();$(".map-tab .map-tab-content div#"+n).show();initSlimScroll()}})}function handleDatetimePicker(){jQuery().datetimepicker&&$(".form_datetime").datetimepicker({autoclose:!0,format:"dd/mm/yyyy hh:ii",language:"vi",pickerPosition:Metronic.isRTL()?"bottom-right":"bottom-left",todayBtn:!0})}function initSlimScroll(){$(window).width()<1245&&$(".div-scroll").mCustomScrollbar({axis:"x"})}function loadMap(n,t){firstLoadMap&&(initialize(),firstLoadMap=!1,typeof t=="function"&&t(n))}function initialize(){infowindow=new google.maps.InfoWindow;map=new google.maps.Map(document.getElementById("map"),{zoom:16,center:new google.maps.LatLng(10.773145500000002,106.6939227),mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,"custom_style"]}});navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(n){var t={lat:n.coords.latitude,lng:n.coords.longitude};map.setCenter(t)},function(){});loadMarker(".list-address-1")}function loadMarker(n){var t=$(n+" .item");t.each(function(n,t){var i,r,u,f;$(t).hasClass("active")?(i="./img/marker-icon-select.png",r="map-label-active"):(i="./img/marker-icon.png",r="map-label");u=$(t).attr("lat-long").split(",");f=new MarkerWithLabel({position:new google.maps.LatLng(u[0],u[1]),icon:i,map:map,id:$(t).data("id"),labelInBackground:!1,labelContent:$(t).find(".number").html(),labelClass:r,labelAnchor:new google.maps.Point(19,46)});markers.push(f)})}function iWantToggle(n,t){t=="up"?n.slideUp(200,function(){$(this).closest(".wrap-select").removeClass("active")}):n.slideToggle(200,function(){$(this).is(":hidden")?$(this).closest(".wrap-select").removeClass("active"):$(this).closest(".wrap-select").addClass("active")})}function docOnClick(n){var t=n.target||n.srcElement,i;try{if(t.tagName=="A")return i=flaglanguage,sessionStorage.getItem("flaglanguage")!=null&&(i=sessionStorage.getItem("flaglanguage")),t.href=i!="VI"?addParams("lang",i,t.href):t.href,!0}catch(r){}}function docChangeLanguage(n){$.ajax({url:"/change-lang/"+n,type:"GET",beforeSend:function(n){n.setRequestHeader("MB-XSRF-Token-FormOnline",$("input[name='__RequestVerificationToken']").val())},success:function(){var t=window.location.href;t=t.replace("#!#c-1","");n!="VI"&&n!=null?(sessionStorage.setItem("flaglanguage",n),window.location.href=addParams("lang",n,t)):(sessionStorage.setItem("flaglanguage","VI"),t=t.replace("lang=EN",""),t.substr(-1)==="?"&&(t=t.replace("?","")),window.location.href=t)}})}var firstLoadMap,map,markers,infowindow;(function(n,t,i){"use strict";(function(){t.module("uiGmapgoogle-maps.providers",["nemLogging"]);t.module("uiGmapgoogle-maps.wrapped",[]);t.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]);t.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]);t.module("uiGmapgoogle-maps.directives.api.managers",[]);t.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]);t.module("uiGmapgoogle-maps.directives.api.options.builders",[]);t.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]);t.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]);t.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]);t.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){t.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(i,r){var s,u,f,e,o;return e=void 0,o=void 0,s=function(n){return n.china?"http://maps.google.cn/maps/api/js?":n.transport==="auto"?"//maps.googleapis.com/maps/api/js?":n.transport+"://maps.googleapis.com/maps/api/js?"},u=function(n){var u,i,t,f;return u=["transport","isGoogleMapsForWork","china","preventLoad"],n.isGoogleMapsForWork&&u.push("key"),i=_.map(_.omit(n,u),function(n,t){return t+"="+n}),e&&(f=document.getElementById(e),f.parentNode.removeChild(f)),i=i.join("&"),t=document.createElement("script"),t.id=e="ui_gmap_map_load_"+r.generate(),t.type="text/javascript",t.src=s(n)+i,document.body.appendChild(t)},f=function(){return t.isDefined(n.google)&&t.isDefined(n.google.maps)},{load:function(t){var r,e;return(r=i.defer(),f())?(r.resolve(n.google.maps),r.promise):(e=t.callback="onGoogleMapsReady"+Math.round(Math.random()*1e3),n[e]=function(){n[e]=null;r.resolve(n.google.maps)},n.navigator.connection&&n.Connection&&n.navigator.connection.type===n.Connection.NONE&&!t.preventLoad?document.addEventListener("online",function(){if(!f())return u(t)}):t.preventLoad||u(t),o=t,o.randomizedFunctionName=e,r.promise)},manualLoad:function(){var t;if(t=o,f()){if(n[t.randomizedFunctionName])return n[t.randomizedFunctionName]()}else return u(t)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(n){t.extend(this.options,n)},this.$get=["uiGmapMapScriptLoader",function(n){return function(t){return t.load(n.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(n){return{load:function(){n.manualLoad()}}}])}.call(this),function(){var i=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){var t;if((google||(typeof google!="undefined"&&google!==null?google.maps:void 0)||google.maps.InfoWindow!=null))return google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(n,t,i){i==null&&(this._isOpen=!0,this._open(n,t,!0))},google.maps.InfoWindow.prototype.close=function(n){n==null&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(n){return n==null&&(n=void 0),n==null?this._isOpen:this._isOpen=n},n.InfoBox&&(n.InfoBox.prototype._open=n.InfoBox.prototype.open,n.InfoBox.prototype._close=n.InfoBox.prototype.close,n.InfoBox.prototype._isOpen=!1,n.InfoBox.prototype.open=function(n,t){this._isOpen=!0;this._open(n,t)},n.InfoBox.prototype.close=function(){this._isOpen=!1;this._close()},n.InfoBox.prototype.isOpen=function(n){return n==null&&(n=void 0),n==null?this._isOpen:this._isOpen=n},t=function(t){function u(t){this.getOrigCloseBoxImg_=i(this.getOrigCloseBoxImg_,this);this.getCloseBoxDiv_=i(this.getCloseBoxDiv_,this);var r;r=new n.InfoBox(t);_.extend(this,r);t.closeBoxDiv!=null&&(this.closeBoxDiv_=t.closeBoxDiv)}return r(u,t),u.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},u.prototype.getCloseBoxImg_=function(){var n,t;return n=this.getCloseBoxDiv_(),t=this.getOrigCloseBoxImg_(),n||t},u.prototype.getOrigCloseBoxImg_=function(){var n;return n="",this.closeBoxURL_!==""&&(n="<img",n+=" src='"+this.closeBoxURL_+"'",n+=" align=right",n+=" style='",n+=" position: relative;",n+=" cursor: pointer;",n+=" margin: "+this.closeBoxMargin_+";",n+="'>"),n},u}(n.InfoBox),n.uiGmapInfoBox=t),n.MarkerLabel_?n.MarkerLabel_.prototype.setContent=function(){var n;(n=this.marker_.get("labelContent"),n&&!_.isEqual(this.oldContent,n))&&(typeof(n!=null?n.nodeType:void 0)=="undefined"?(this.labelDiv_.innerHTML=n,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML,this.oldContent=n):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(n),n=n.cloneNode(!0),this.labelDiv_.innerHTML="",this.eventDiv_.appendChild(n),this.oldContent=n))}:void 0})}})}.call(this),function(){t.module("uiGmapgoogle-maps.extensions").service("uiGmapLodash",function(){var n,t,i,r,u,f,e,o;return f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,u=/\\(\\)?/g,i=function(n){var r,t,i;return t=n.missingName,i=n.swapName,r=n.isProto,_[t]==null&&(_[t]=_[i],r)?_.prototype[t]=_[i]:void 0},[{missingName:"contains",swapName:"includes",isProto:!0},{missingName:"includes",swapName:"contains",isProto:!0},{missingName:"object",swapName:"zipObject"},{missingName:"zipObject",swapName:"object"},{missingName:"all",swapName:"every"},{missingName:"every",swapName:"all"},{missingName:"any",swapName:"some"},{missingName:"some",swapName:"any"},{missingName:"first",swapName:"head"},{missingName:"head",swapName:"first"}].forEach(function(n){return i(n)}),_.get==null&&(e=function(n){return _.isObject(n)?n:Object(n)},t=function(n){return n===null?"":n+""},o=function(n){var i;return _.isArray(n)?n:(i=[],t(n).replace(f,function(n,t,r,f){i.push(r?f.replace(u,"$1"):t||n)}),i)},n=function(n,t,i){var r,u;if(n!==null){for(i!==void 0&&(i in e(n))&&(t=[i]),r=0,u=t.length;!_.isUndefined(n)&&r<u;)n=n[t[r++]];if(r&&r===u)return n}},r=function(t,i,r){var u;return u=t===null?void 0:n(t,o(i),i+""),u===void 0?r:u},_.get=r),this.intersectionObjects=function(n,t,i){var r;return i==null&&(i=void 0),r=_.map(n,function(n){return _.find(t,function(t){return i!=null?i(n,t):_.isEqual(n,t)})}),_.filter(r,function(n){return n!=null})},this.containsObject=_.includeObject=function(n,t,i){return(i==null&&(i=void 0),n===null)?!1:_.some(n,function(n){return i!=null?i(n,t):_.isEqual(n,t)})},this.differenceObjects=function(n,t,i){return i==null&&(i=void 0),_.filter(n,function(n){return function(r){return!n.containsObject(t,r,i)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(n,t,i,r){var u,f;if(n==null)return-1;if(u=0,f=n.length,r)if(typeof r=="number")u=r<0?Math.max(0,f+r):r;else return u=_.sortedIndex(n,t),n[u]===t?u:-1;while(u<f){if(i!=null){if(i(n[u],t))return u}else if(_.isEqual(n[u],t))return u;u++}return-1},this.isNullOrUndefined=function(n){return _.isNull(n||_.isUndefined(n))},this})}.call(this),function(){t.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(n){return this.contains=function(t,i){return n.indexOf(t,i)!==-1},this}})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var n;return n=void 0,{then:function(t){return n=t},resolve:function(){return n.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(n,i,r,u,f,e){var b,k,d,g,nt,c,l,tt,a,s,h,v,y,p,w,it,rt,ut,o,ft;return o=i.promiseTypes,v=i.isInProgress,ut=i.promiseStatus,b=i.ExposedPromise,d=i.SniffedPromise,y=function(n,t){var i;return i=n.promise(),i.promiseType=n.promiseType,i.$$state&&r.debug("promiseType: "+i.promiseType+", state: "+ut(i.$$state.status)),i.cancelCb=t,i},tt=function(n,t){return n.promiseType===o.create&&t.promiseType!==o["delete"]&&t.promiseType!==o.init?(r.debug("lastPromise.promiseType "+t.promiseType+", newPromiseType: "+n.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},rt=function(n,t,i){var u;if(t.promiseType===o["delete"]&&i.promiseType!==o["delete"]&&i.cancelCb!=null&&_.isFunction(i.cancelCb)&&v(i)&&(r.debug("promiseType: "+t.promiseType+", CANCELING LAST PROMISE type: "+i.promiseType),i.cancelCb("cancel safe"),u=n.peek(),u!=null&&v(u)))return u.hasOwnProperty("cancelCb")&&_.isFunction(u.cancelCb)?(r.debug("promiseType: "+u.promiseType+", CANCELING FIRST PROMISE type: "+u.promiseType),u.cancelCb("cancel safe")):r.warn("first promise was not cancelable")},k=function(n,t,i){var r,u;return n.existingPieces?(r=_.last(n.existingPieces._content),tt(t,r))?void 0:(rt(n.existingPieces,t,r),u=b(r["finally"](function(){return y(t,i)})),u.cancelCb=i,u.promiseType=t.promiseType,n.existingPieces.enqueue(u),r["finally"](function(){return n.existingPieces.dequeue()})):(n.existingPieces=new f.Queue,n.existingPieces.enqueue(y(t,i)))},w=function(n,t,i,u,f){var e;return i==null&&(i=""),e=function(n){return r.debug(n+": "+n),u!=null&&_.isFunction(u)?u(n):void 0},k(n,d(f,t),e)},c=80,s={value:null},ft=function(n,t,i){var r,u;try{return n.apply(t,i)}catch(u){return r=u,s.value=r,s}},p=function(n,t,i,u){var f,e;return(e=ft(n,t,u),e===s&&(f="error within chunking iterator: "+s.value,r.error(f),i.reject(f)),e==="cancel safe")?!1:!0},g=function(n,t,i){var u,r;return(u=n===t,r=t[i],u)?r:n[r]},nt=["length","forEach","map"],h=function(n,i,r,u){var f,e,o;if(t.isArray(n))f=n;else if(i)f=i;else{f=[];for(e in n)o=n[e],n.hasOwnProperty(e)&&!_.includes(nt,e)&&f.push(e)}return(u==null&&(u=r),t.isArray(f)&&!(f!=null?f.length:void 0)&&u!==r)?r():u(f,i)},l=function(i,r,u,f,e,o,s,c){return h(i,c,function(h,c){var w,a,v,y;for(w=r&&r<h.length?r:h.length,a=s,v=!0;v&&w--&&a<(h?h.length:a+1);)y=g(i,h,a),v=t.isFunction(y)?!0:p(f,void 0,o,[y,a]),++a;if(h)if(v&&a<h.length){if(s=a,r)return e!=null&&_.isFunction(e)&&p(e,void 0,o,[]),n(function(){return l(i,r,u,f,e,o,s,c)},u,!1)}else return o.resolve()})},a=function(n,t,u,f,e,o,s){var y,a,v;return(u==null&&(u=c),e==null&&(e=0),o==null&&(o=1),v=void 0,a=i.defer(),v=a.promise,!o)?(y="pause (delay) must be set from _async!",r.error(y),a.reject(y),v):h(n,s,function(){return a.resolve(),v},function(i,r){return l(n,u,o,t,f,a,e,r),v})},it=function(n,t,r,u,f,e,o){var s;return s=[],h(n,o,function(){return i.resolve(s)},function(i,o){return a(n,function(n){return s.push(t(n))},r,u,f,e,o).then(function(){return s})})},{each:a,map:it,managePromiseQueue:w,promiseLock:w,defaultChunkSize:c,getArrayAndKeys:h,chunkSizeFrom:function(n,t){return t==null&&(t=void 0),_.isNumber(n)&&(t=n),(e.isFalse(n)||n===!1)&&(t=!1),t}}}])}.call(this),function(){var n=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var t;return t=["extended","included"],function(){function i(){}return i.extend=function(i){var r,u,f;for(r in i)f=i[r],n.call(t,r)<0&&(this[r]=f);return(u=i.extended)!=null&&u.apply(this),this},i.include=function(i){var r,u,f;for(r in i)f=i[r],n.call(t,r)<0&&(this.prototype[r]=f);return(u=i.included)!=null&&u.apply(this),this},i}()})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(){}}})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(n){var t;return t={handle:function(i){return i.$on("$destroy",function(){return t.handle(i)}),i.deferred=n.defer(),{getScope:function(){return i}}},mapPromise:function(n,t){var i;return i=t.getScope(),i.deferred.promise.then(function(t){return n.map=t}),i.deferred.promise}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(){var i,n;return n=function(n){return t.isDefined(n.events)&&n.events!=null&&t.isObject(n.events)},i=function(t,i){return n(t)?t:n(i)?i:void 0},{setEvents:function(n,r,u,f){var e;return e=i(r,u),e!=null?_.compact(_.map(e.events,function(i,o){var s;return f&&(s=_(f).includes(o)),e.events.hasOwnProperty(o)&&t.isFunction(e.events[o])&&!s?google.maps.event.addListener(n,o,function(){return r.$evalAsync||(r.$evalAsync=function(){}),r.$evalAsync(i.apply(r,[n,o,u,arguments]))}):void 0})):void 0},removeEvents:function(n){var t,i;if(n)for(t in n)i=n[t],i&&n.hasOwnProperty(t)&&google.maps.event.removeListener(i)}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger",function(){return{fit:function(n,t){var u,r,f,i,e;if(t&&(n!=null?n.length:void 0)){u=new google.maps.LatLngBounds;r=!1;for(f in n)i=n[f],i&&(r||(r=!0),e=_.isFunction(i.getPosition)?i.getPosition():i),u.extend(e);if(r)return t.fitBounds(u)}}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(n,i){var u,r,f,e,o,s;return r=function(n,t,i){return n===t||i.indexOf(n)!==-1},u=function(n){return r(n,!1,["false","FALSE",0,"n","N","no","NO"])},e=function(n){return Array.isArray(n)&&n.length===2?n[1]:t.isDefined(n.type)&&n.type==="Point"?n.coordinates[1]:n.latitude},o=function(n){return Array.isArray(n)&&n.length===2?n[0]:t.isDefined(n.type)&&n.type==="Point"?n.coordinates[0]:n.longitude},f=function(n){if(n)return Array.isArray(n)&&n.length===2?new google.maps.LatLng(n[1],n[0]):t.isDefined(n.type)&&n.type==="Point"?new google.maps.LatLng(n.coordinates[1],n.coordinates[0]):new google.maps.LatLng(n.latitude,n.longitude)},s=function(n){if(t.isUndefined(n))return!1;if(_.isArray(n)){if(n.length===2)return!0}else if(n!=null&&(n!=null?n.type:void 0)&&n.type==="Point"&&_.isArray(n.coordinates)&&n.coordinates.length===2)return!0;return n&&t.isDefined((n!=null?n.latitude:void 0)&&t.isDefined(n!=null?n.longitude:void 0))?!0:!1},{setCoordsFromEvent:function(n,i){if(n)return Array.isArray(n)&&n.length===2?(n[1]=i.lat(),n[0]=i.lng()):t.isDefined(n.type)&&n.type==="Point"?(n.coordinates[1]=i.lat(),n.coordinates[0]=i.lng()):(n.latitude=i.lat(),n.longitude=i.lng()),n},getLabelPositionPoint:function(n){var t,i;if(n!==void 0)return n=/^([-\d\.]+)\s([-\d\.]+)$/.exec(n),t=parseFloat(n[1]),i=parseFloat(n[2]),t!=null&&i!=null?new google.maps.Point(t,i):void 0},createWindowOptions:function(r,u,e,o){var s;return e!=null&&o!=null&&i!=null?(s=t.extend({},o,{content:this.buildContent(u,o,e),position:o.position!=null?o.position:t.isObject(r)?r.getPosition():f(u.coords)}),r!=null&&(s!=null?s.pixelOffset:void 0)==null&&(s.boxClass==null||(s.pixelOffset={height:0,width:-2})),s):o?o:(n.error("infoWindow defaults not defined"),!e)?n.error("infoWindow content not defined"):void 0},buildContent:function(n,t,r){var f,u;return t.content!=null?u=t.content:i!=null?(r=r.replace(/^\s+|\s+$/g,""),f=r===""?"":i(r)(n),f.length>0&&(u=f[0])):u=r,u},defaultDelay:50,isTrue:function(n){return r(n,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:u,isFalsy:function(n){return r(n,!1,[void 0,null])||u(n)},getCoords:f,validateCoords:s,equalCoords:function(n,t){return e(n)===e(t)&&o(n)===o(t)},validatePath:function(n){var r,i,f,u;if(i=0,t.isUndefined(n.type)){if(!Array.isArray(n)||n.length<2)return!1;while(i<n.length){if(!(t.isDefined(n[i].latitude)&&t.isDefined(n[i].longitude)||typeof n[i].lat=="function"&&typeof n[i].lng=="function"))return!1;i++}return!0}if(t.isUndefined(n.coordinates))return!1;if(n.type==="Polygon"){if(n.coordinates[0].length<4)return!1;r=n.coordinates[0]}else if(n.type==="MultiPolygon"){if(u={max:0,index:0},_.forEach(n.coordinates,function(n,t){if(n[0].length>this.max)return this.max=n[0].length,this.index=t},u),f=n.coordinates[u.index],r=f[0],r.length<4)return!1}else if(n.type==="LineString"){if(n.coordinates.length<2)return!1;r=n.coordinates}else return!1;while(i<r.length){if(r[i].length!==2)return!1;i++}return!0},convertPathPoints:function(n){var r,i,u,f,e;if(i=0,f=new google.maps.MVCArray,t.isUndefined(n.type))while(i<n.length)u,t.isDefined(n[i].latitude)&&t.isDefined(n[i].longitude)?u=new google.maps.LatLng(n[i].latitude,n[i].longitude):typeof n[i].lat=="function"&&typeof n[i].lng=="function"&&(u=n[i]),f.push(u),i++;else for(r,n.type==="Polygon"?r=n.coordinates[0]:n.type==="MultiPolygon"?(e={max:0,index:0},_.forEach(n.coordinates,function(n,t){if(n[0].length>this.max)return this.max=n[0].length,this.index=t},e),r=n.coordinates[e.index][0]):n.type==="LineString"&&(r=n.coordinates);i<r.length;)f.push(new google.maps.LatLng(r[i][1],r[i][0])),i++;return f},getPath:function(n,t){var i;return t==null||!_.isString(t)?t:(i=n,_.each(t.split("."),function(n){if(i)return i=i[n]}),i)},validateBoundPoints:function(n){return t.isUndefined(n.sw.latitude)||t.isUndefined(n.sw.longitude)||t.isUndefined(n.ne.latitude)||t.isUndefined(n.ne.longitude)?!1:!0},convertBoundPoints:function(n){return new google.maps.LatLngBounds(new google.maps.LatLng(n.sw.latitude,n.sw.longitude),new google.maps.LatLng(n.ne.latitude,n.ne.longitude))},fitMapBounds:function(n,t){return n.fitBounds(t)}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapIsReady",["$q","$timeout",function(n,t){var u,i,f,r;return i=0,r=[],f=function(){return n.all(r)},u=function(n,r,e){return t(function(){if(e<=0){n.reject("Your maps are not found we have checked the maximum amount of times. :)");return}i!==r?u(n,r,e-1):n.resolve(f())},100)},{spawn:function(){var t;return t=n.defer(),r.push(t.promise),i+=1,{instance:i,deferred:t}},promises:f,instances:function(){return i},promise:function(t,i){var r;return t==null&&(t=1),i==null&&(i=50),r=n.defer(),u(r,t,i),r.promise},reset:function(){i=0;r.length=0},decrement:function(){i>0&&(i-=1);r.length&&(r.length-=1)}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(t){return function(t){function i(n,t,i,r){this.scope=n;this.element=t;this.attrs=i;this.ctrls=r}return n(i,t),i}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(n){return n.spawn()}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil",function(r,u){return function(r){function f(t,i){this.scope=t;this["interface"]=i!=null?i:{scopeKeys:[]};this.modelsLength=n(this.modelsLength,this);this.updateChild=n(this.updateChild,this);this.destroy=n(this.destroy,this);this.setChildScope=n(this.setChildScope,this);this.getChanges=n(this.getChanges,this);this.getProp=n(this.getProp,this);this.setIdKey=n(this.setIdKey,this);this.modelKeyComparison=n(this.modelKeyComparison,this);f.__super__.constructor.call(this);this.defaultIdKey="id";this.idKey=void 0}return i(f,r),f.prototype.evalModelHandle=function(n,t){if(n!=null&&t!=null)return t==="self"?n:(_.isFunction(t)&&(t=t()),u.getPath(n,t))},f.prototype.modelKeyComparison=function(n,t){var e,o,r,f,i,s;if(r=this["interface"].scopeKeys.indexOf("coords")>=0,(r&&this.scope.coords!=null||!r)&&(i=this.scope),i==null)throw"No scope set!";return r&&(e=this.scopeOrModelVal("coords",i,n),o=this.scopeOrModelVal("coords",i,t),f=u.equalCoords(e,o),!f)?f:(s=_.without(this["interface"].scopeKeys,"coords"),_.every(s,function(r){return function(u){return r.scopeOrModelVal(i[u],i,n)===r.scopeOrModelVal(i[u],i,t)}}(this)))},f.prototype.setIdKey=function(n){return this.idKey=n.idKey!=null?n.idKey:this.defaultIdKey},f.prototype.setVal=function(n,t,i){return this.modelOrKey(n,t=i),n},f.prototype.modelOrKey=function(n,t){if(t!=null)return t!=="self"?u.getPath(n,t):n},f.prototype.getProp=function(n,t,i){return this.scopeOrModelVal(n,t,i)},f.prototype.getChanges=function(n,t,i){var f,u,r;i&&(t=_.pick(t,i),n=_.pick(n,i));u={};r={};f={};for(r in n)t&&t[r]===n[r]||(_.isArray(n[r])?u[r]=n[r]:_.isObject(n[r])?(f=this.getChanges(n[r],t?t[r]:null),_.isEmpty(f)||(u[r]=f)):u[r]=n[r]);return u},f.prototype.scopeOrModelVal=function(n,t,i,r){var f,e,o,u;return(r==null&&(r=!1),f=function(n,t,i){return(i==null&&(i=!1),i)?{isScope:n,value:t}:t},u=_.get(t,n),_.isFunction(u))?f(!0,u(i),r):_.isObject(u)?f(!0,u,r):_.isString(u)?(e=u,o=e?e==="self"?i:_.get(i,e):_.get(i,n),_.isFunction(o))?f(!1,o(),r):f(!1,o,r):f(!0,u,r)},f.prototype.setChildScope=function(n,t,i){var r,e,u,f;for(e in n)u=n[e],r=this.scopeOrModelVal(u,t,i,!0),(r!=null?r.value:void 0)!=null&&(f=r.value,f!==t[u]&&(t[u]=f));return t.model=i},f.prototype.onDestroy=function(){},f.prototype.destroy=function(n){var t;return n==null&&(n=!1),this.scope==null||((t=this.scope)!=null?t.$$destroyed:void 0)||!(this.needToManualDestroy||n)?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(n,t){if(t[this.idKey]==null){this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.");return}return n.updateModel(t)},f.prototype.modelsLength=function(n){var r,i;return(n==null&&(n=void 0),r=0,i=n?n:this.scope.models,i==null)?r:t.isArray(i)||i.length!=null?i.length:Object.keys(i).length},f}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(n,t,i,r){return{didQueueInitPromise:function(n,i){return i.models.length===0?(t.promiseLock(n,r.promiseTypes.init,null,null,function(){return r.resolve()}),!0):!1},figureOutState:function(t,i,r,u){var f,h,e,o,s;return f=[],e={},o=[],s=[],i.models.forEach(function(o){var h;if(o[t]!=null){if(e[o[t]]={},r.get(o[t])==null)return f.push(o);if(h=r.get(o[t]),!u(o,h.clonedModel,i))return s.push({model:o,child:h})}else return n.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion")}),h=r.values(),h.forEach(function(i){var r;if(i==null){n.error("child undefined in ModelsWatcher.");return}if(i.model==null){n.error("child.model undefined in ModelsWatcher.");return}return r=i.model[t],e[r]==null?o.push(i):void 0}),{adds:f,removals:o,updates:s}}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(n,t,i){var u,f,e,o,s,h,c,r,l,a,v;return l={create:"create",update:"update","delete":"delete",init:"init"},r={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},v=function(){var n;return n={},n[""+r.IN_PROGRESS]="in-progress",n[""+r.RESOLVED]="resolved",n[""+r.REJECTED]="rejected",n}(),o=function(n){return n.$$state?n.$$state.status===r.IN_PROGRESS:n.hasOwnProperty("$$v")?void 0:!0},s=function(n){return n.$$state?n.$$state.status===r.RESOLVED:n.hasOwnProperty("$$v")?!0:void 0},c=function(n){return v[n]||"done w error"},u=function(t){var r,u,i;return r=n.defer(),u=n.all([t,r.promise]),i=n.defer(),t.then(r.resolve,function(){},function(n){return r.notify(n),i.notify(n)}),u.then(function(n){return i.resolve(n[0]||n[1])},function(n){return i.reject(n)}),i.promise.cancel=function(n){return n==null&&(n="canceled"),r.reject(n)},i.promise.notify=function(n){return n==null&&(n="cancel safe"),i.notify(n),t.hasOwnProperty("notify")?t.notify(n):void 0},t.promiseType!=null&&(i.promise.promiseType=t.promiseType),i.promise},f=function(n,t){return{promise:n,promiseType:t}},e=function(){return n.defer()},a=function(){var t;return t=n.defer(),t.resolve.apply(void 0,arguments),t.promise},h=function(r){var u;if(!_.isFunction(r)){i.error("uiGmapPromise.promise() only accepts functions");return}return u=n.defer(),t(function(){var n;return n=r(),u.resolve(n)}),u.promise},{defer:e,promise:h,resolve:a,promiseTypes:l,isInProgress:o,isResolved:s,promiseStatus:c,ExposedPromise:u,SniffedPromise:f}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){return function(){function t(){this.removeAll=n(this.removeAll,this);this.slice=n(this.slice,this);this.push=n(this.push,this);this.keys=n(this.keys,this);this.values=n(this.values,this);this.remove=n(this.remove,this);this.put=n(this.put,this);this.stateChanged=n(this.stateChanged,this);this.get=n(this.get,this);this.length=0;this.dict={};this.didValsStateChange=!1;this.didKeysStateChange=!1;this.allVals=[];this.allKeys=[]}return t.prototype.get=function(n){return this.dict[n]},t.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},t.prototype.put=function(n,t){return this.get(n)==null&&this.length++,this.stateChanged(),this.dict[n]=t},t.prototype.remove=function(n,t){var i;if(t==null&&(t=!1),!t||this.get(n))return i=this.dict[n],delete this.dict[n],this.length--,this.stateChanged(),i},t.prototype.valuesOrKeys=function(n){var t,i;return(n==null&&(n="Keys"),!this["did"+n+"StateChange"])?this["all"+n]:(i=[],t=[],_.each(this.dict,function(n,r){return i.push(n),t.push(r)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=i,this.allKeys=t,this["all"+n])},t.prototype.values=function(){return this.valuesOrKeys("Vals")},t.prototype.keys=function(){return this.valuesOrKeys()},t.prototype.push=function(n,t){return t==null&&(t="key"),this.put(n[t],n)},t.prototype.slice=function(){return this.keys().map(function(n){return function(t){return n.remove(t)}}(this))},t.prototype.removeAll=function(){return this.slice()},t.prototype.each=function(n){return _.each(this.dict,function(t){return n(t)})},t.prototype.map=function(n){return _.map(this.dict,function(t){return n(t)})},t}()})}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(){return function(n){return this.setIfChange=function(t){return function(i,r){if(!_.isEqual(r,i))return n(t,i)}},this.sic=this.setIfChange,this}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(i,r,u,f){return function(){function e(t,r,f,o){r==null&&(r={});this.opt_options=f!=null?f:{};this.opt_events=o;this.checkSync=n(this.checkSync,this);this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.destroy=n(this.destroy,this);this.attachEvents=n(this.attachEvents,this);this.clear=n(this.clear,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=e.type;this.clusterer=new NgMapMarkerClusterer(t,r,this.opt_options);this.propMapGMarkers=new u;this.attachEvents(this.opt_events,"opt_events");this.clusterer.setIgnoreHidden(!0);this.noDrawOnSingleAddRemoves=!0;i.info(this)}return e.type="ClustererMarkerManager",e.prototype.checkKey=function(n){var t;if(n.key==null)return t="gMarker.key undefined and it is REQUIRED!!",i.error(t)},e.prototype.add=function(n){return this.checkKey(n),this.clusterer.addMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(n.key,n),this.checkSync()},e.prototype.update=function(n){return this.remove(n),this.add(n)},e.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},e.prototype.remove=function(n){var t;return this.checkKey(n),t=this.propMapGMarkers.get(n.key),t&&(this.clusterer.removeMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(n.key)),this.checkSync()},e.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},e.prototype.draw=function(){return this.clusterer.repaint()},e.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},e.prototype.attachEvents=function(n,r){var e,u,f;if(this.listeners=[],t.isDefined(n)&&n!=null&&t.isObject(n)){f=[];for(u in n)e=n[u],n.hasOwnProperty(u)&&t.isFunction(n[u])?(i.info(r+": Attaching event: "+u+" to clusterer"),f.push(this.listeners.push(google.maps.event.addListener(this.clusterer,u,n[u])))):f.push(void 0);return f}},e.prototype.clearEvents=function(){return f.removeEvents(this.listeners),this.listeners=[]},e.prototype.destroy=function(){return this.clearEvents(),this.clear()},e.prototype.fit=function(){return r.fit(this.getGMarkers(),this.clusterer.getMap())},e.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},e.prototype.checkSync=function(){},e}()}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var i,n;return i=[],n=[],{createMapInstance:function(r,u){var f;return f=null,i.length===0?(f=new google.maps.Map(r,u),n.push(f)):(f=i.pop(),t.element(r).append(f.getDiv()),f.setOptions(u),n.push(f)),f},recycleMapInstance:function(t){var r;if(r=n.indexOf(t),r<0)throw new Error("Expected map instance to be a previously used instance");return n.splice(r,1),i.push(t)}}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(t,i,r){return function(){function u(i){this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.handleOptDraw=n(this.handleOptDraw,this);this.clear=n(this.clear,this);this.destroy=n(this.destroy,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=u.type;this.gMap=i;this.gMarkers=new r;this.$log=t;this.$log.info(this)}return u.type="MarkerManager",u.prototype.add=function(n,i){var u,r;if(i==null&&(i=!0),n.key==null){r="gMarker.key undefined and it is REQUIRED!!";t.error(r);throw r;}return u=this.gMarkers.get(n.key),u?void 0:(this.handleOptDraw(n,i,!0),this.gMarkers.put(n.key,n))},u.prototype.update=function(n,t){return t==null&&(t=!0),this.remove(n,t),this.add(n,t)},u.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},u.prototype.remove=function(n,t){return t==null&&(t=!0),this.handleOptDraw(n,t,!1),this.gMarkers.get(n.key)?this.gMarkers.remove(n.key):void 0},u.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},u.prototype.draw=function(){var n;return n=[],this.gMarkers.each(function(t){return function(i){if(!i.isDrawn)return i.doAdd?(i.setMap(t.gMap),i.isDrawn=!0):n.push(i)}}(this)),n.forEach(function(n){return function(t){return t.isDrawn=!1,n.remove(t,!0)}}(this))},u.prototype.destroy=function(){return this.clear()},u.prototype.clear=function(){return this.gMarkers.each(function(n){return n.setMap(null)}),delete this.gMarkers,this.gMarkers=new r},u.prototype.handleOptDraw=function(n,t,i){return t===!0?(i?n.setMap(this.gMap):n.setMap(null),n.isDrawn=!0):(n.isDrawn=!1,n.doAdd=i)},u.prototype.fit=function(){return i.fit(this.getGMarkers(),this.gMap)},u.prototype.getGMarkers=function(){return this.gMarkers.values()},u}()}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(i,r,u,f){return function(){function e(t,r,o,s,h){r==null&&(r={});this.opt_options=o!=null?o:{};this.opt_events=s;this.scope=h;this.checkSync=n(this.checkSync,this);this.isSpiderfied=n(this.isSpiderfied,this);this.getGMarkers=n(this.getGMarkers,this);this.fit=n(this.fit,this);this.destroy=n(this.destroy,this);this.attachEvents=n(this.attachEvents,this);this.clear=n(this.clear,this);this.draw=n(this.draw,this);this.removeMany=n(this.removeMany,this);this.remove=n(this.remove,this);this.addMany=n(this.addMany,this);this.update=n(this.update,this);this.add=n(this.add,this);this.type=e.type;this.markerSpiderfier=new f(t,this.opt_options);this.propMapGMarkers=new u;this.attachEvents(this.opt_events,"opt_events");this.noDrawOnSingleAddRemoves=!0;i.info(this)}return e.type="SpiderfierMarkerManager",e.prototype.checkKey=function(n){var t;if(n.key==null)return t="gMarker.key undefined and it is REQUIRED!!",i.error(t)},e.prototype.add=function(n){return n.setMap(this.markerSpiderfier.map),this.checkKey(n),this.markerSpiderfier.addMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(n.key,n),this.checkSync()},e.prototype.update=function(n){return this.remove(n),this.add(n)},e.prototype.addMany=function(n){return n.forEach(function(n){return function(t){return n.add(t)}}(this))},e.prototype.remove=function(n){var t;return this.checkKey(n),t=this.propMapGMarkers.get(n.key),t&&(n.setMap(null),this.markerSpiderfier.removeMarker(n,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(n.key)),this.checkSync()},e.prototype.removeMany=function(n){return n.forEach(function(n){return function(t){return n.remove(t)}}(this))},e.prototype.draw=function(){},e.prototype.clear=function(){return this.removeMany(this.getGMarkers())},e.prototype.attachEvents=function(n,r){if(t.isDefined(n)&&n!=null&&t.isObject(n))return _.each(n,function(u){return function(f,e){if(n.hasOwnProperty(e)&&t.isFunction(n[e]))return i.info(r+": Attaching event: "+e+" to markerSpiderfier"),u.markerSpiderfier.addListener(e,function(){return e==="spiderfy"||e==="unspiderfy"?u.scope.$evalAsync(n[e].apply(n,arguments)):u.scope.$evalAsync(n[e].apply(n,[arguments[0],e,arguments[0].model,arguments]))})}}(this))},e.prototype.clearEvents=function(n,r){var f,u;if(t.isDefined(n)&&n!=null&&t.isObject(n))for(u in n)f=n[u],n.hasOwnProperty(u)&&t.isFunction(n[u])&&(i.info(r+": Clearing event: "+u+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(u))},e.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},e.prototype.fit=function(){return r.fit(this.getGMarkers(),this.markerSpiderfier.map)},e.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},e.prototype.isSpiderfied=function(){return _.find(this.getGMarkers(),function(n){return(n!=null?n._omsData:void 0)!=null})},e.prototype.checkSync=function(){},e}()}])}.call(this),function(){t.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(n){var i;return i=function(t,i,r){return google.maps.event.addListener(t,i,function(){return r.apply(this,arguments),n(function(){},!0)})},function(n,r,u){var f;return u?i(n,r,u):(f=[],t.forEach(r,function(t,r){return f.push(i(n,r,t))}),function(){return t.forEach(f,function(n){return google.maps.event.removeListener(n)}),f=null})}}])}.call(this),function(){t.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(n){return function(i,r,u,f){var s,l,a,o,v,y,c,e,h;return o=!1,e=r.$eval(u),r["static"]||(v={set_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:t.lng&&t.lat?(e[n].latitude=t.lat(),e[n].longitude=t.lng()):e[n]=t},insert_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:t.lng&&t.lat?e.splice(n,0,{latitude:t.lat(),longitude:t.lng()}):e.splice(n,0,t)},remove_at:function(n){if(!o)return e.splice(n,1)}},s,e.type==="Polygon"?s=e.coordinates[0]:e.type==="LineString"&&(s=e.coordinates),l={set_at:function(n){var t;if(!o)return(t=i.getAt(n),!(t&&t.lng&&t.lat))?void 0:(s[n][1]=t.lat(),s[n][0]=t.lng())},insert_at:function(n){var t;if(!o)return(t=i.getAt(n),!t)?void 0:!t.lng||!t.lat?void 0:s.splice(n,0,[t.lng(),t.lat()])},remove_at:function(n){if(!o)return s.splice(n,1)}},c=n(i,t.isUndefined(e.type)?v:l)),y=function(n){var e,r,l,h,t,u,c,s;if(o=!0,u=i,e=!1,n){for(r=0,c=u.getLength(),h=n.length,l=Math.min(c,h),t=void 0;r<l;)s=u.getAt(r),t=n[r],typeof t.equals=="function"?t.equals(s)||(u.setAt(r,t),e=!0):(s.lat()!==t.latitude||s.lng()!==t.longitude)&&(u.setAt(r,new google.maps.LatLng(t.latitude,t.longitude)),e=!0),r++;while(r<h)t=n[r],typeof t.lat=="function"&&typeof t.lng=="function"?u.push(t):u.push(new google.maps.LatLng(t.latitude,t.longitude)),e=!0,r++;while(r<c)u.pop(),e=!0,r++}return o=!1,e?f(u):void 0},a=function(n){var s,h,t,v,c,r,u,l,a;if(o=!0,u=i,h=!1,n){for(s,e.type==="Polygon"?s=n.coordinates[0]:e.type==="LineString"&&(s=n.coordinates),t=0,l=u.getLength(),c=s.length,v=Math.min(l,c),r=void 0;t<v;)a=u.getAt(t),r=s[t],(a.lat()!==r[1]||a.lng()!==r[0])&&(u.setAt(t,new google.maps.LatLng(r[1],r[0])),h=!0),t++;while(t<c)r=s[t],u.push(new google.maps.LatLng(r[1],r[0])),h=!0,t++;while(t<l)u.pop(),h=!0,t++}return o=!1,h?f(u):void 0},h,r["static"]||(h=t.isUndefined(e.type)?r.$watchCollection(u,y):r.$watch(u,a,!0)),function(){return c&&(c(),c=null),h?(h(),h=null):void 0}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(n){return{maybeRepaint:function(t){if(t)return t.style.opacity=.9,n(function(){return t.style.opacity=1})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var t,n,i,r;return t=["length","forEach","map"],n=[],i=function(n){return n.forEach=function(i){return _.each(_.omit(n,t),function(n){if(!_.isFunction(n))return i(n)})},n},n.push(i),r=function(n){return n.map=function(i){return _.map(_.omit(n,t),function(n){if(!_.isFunction(n))return i(n)})},n},n.push(r),{slapMap:r,slapForEach:i,slapAll:function(t){return n.forEach(function(n){return n(t)}),t}}})}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(r,u,f){return function(r){function f(){return this.watchProps=n(this.watchProps,this),this.buildOpts=n(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return i(f,r),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(n){return t.isDefined(n!=null?n.model:void 0)?n.model:n},f.prototype.buildOpts=function(n,i,r){var o,e,f;if(n==null&&(n={}),r==null&&(r={}),!this.scope){u.error("this.scope not defined in CommonOptionsBuilder can not buildOpts");return}if(!this.gMap){u.error("this.map not defined in CommonOptionsBuilder can not buildOpts");return}return o=this.getCorrectModel(this.scope),f=this.scopeOrModelVal("stroke",this.scope,o),e=t.extend(n,this.DEFAULTS,{map:this.gMap,strokeColor:f!=null?f.color:void 0,strokeOpacity:f!=null?f.opacity:void 0,strokeWeight:f!=null?f.weight:void 0}),t.forEach(t.extend(r,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(n){return function(r,u){var f;return f=i?i[u]:n.scopeOrModelVal(u,n.scope,o),e[u]=t.isUndefined(f)?r:o[u]}}(this)),e["static"]&&(e.editable=!1),e},f.prototype.watchProps=function(n){return n==null&&(n=this.props),n.forEach(function(n){return function(t){if(n.attrs[t]!=null||n.attrs[t!=null?t.prop:void 0]!=null)return(t!=null?t.isColl:void 0)?n.scope.$watchCollection(t.prop,n.setMyOptions):n.scope.$watch(t,n.setMyOptions)}}(this))},f}(f)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{path:n},t,{geodesic:!1})},i}(t)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(i){return function(i){function r(){return r.__super__.constructor.apply(this,arguments)}return n(r,i),r.prototype.buildOpts=function(n,i,u){var f,e;return e=this.getCorrectModel(this.scope),f=i?i.fill:this.scopeOrModelVal("fill",this.scope,e),n=t.extend(n,{fillColor:f!=null?f.color:void 0,fillOpacity:f!=null?f.opacity:void 0}),r.__super__.buildOpts.call(this,n,i,u)},r}(i)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{path:n},t,{geodesic:!1})},i}(t)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t){return i.__super__.buildOpts.call(this,{bounds:n},t)},i}(t)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(t){return function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.buildOpts=function(n,t,r){return i.__super__.buildOpts.call(this,{center:n,radius:t},r)},i}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(n,i){return _.extend(i,{createOptions:function(n,r,u,f){var e;return u==null&&(u={}),e=t.extend({},u,{position:u.position!=null?u.position:i.getCoords(n),visible:u.visible!=null?u.visible:i.validateCoords(n)}),(u.icon!=null||r!=null)&&(e=t.extend(e,{icon:u.icon!=null?u.icon:r})),f!=null&&(e.map=f),e},isLabel:function(n){return n==null?!1:n.labelContent!=null||n.labelAnchor!=null||n.labelClass!=null||n.labelStyle!=null||n.labelVisible!=null}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(r,u,f,e,o){return function(r,u){return function(r){function s(i){var r,e,s;this.scope=i.scope;this.attrs=i.attrs;this.gMap=i.gMap;this.defaults=i.defaults;this.model=i.model;e=i.gObjectChangeCb;this.isScopeModel=(s=i.isScopeModel)!=null?s:!1;this.clean=n(this.clean,this);this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0));this.isDragging=!1;this.internalEvents={dragend:function(n){return function(){return _.defer(function(){return n.isDragging=!1})}}(this),dragstart:function(n){return function(){return n.isDragging=!0}}(this)};r=function(n){return function(){var i;if(!n.isDragging)return n.pathPoints=n.convertPathPoints(n.scope.path),n.gObject!=null&&n.clean(),n.scope.model!=null&&(i=n.scope),n.pathPoints.length>0&&(n.gObject=u(n.buildOpts(n.pathPoints,i))),n.gObject?(f(n.gObject.getPath(),n.scope,"path",function(t){return n.pathPoints=t,e!=null?e():void 0}),t.isDefined(n.scope.events)&&t.isObject(n.scope.events)&&(n.listeners=n.model?o.setEvents(n.gObject,n.scope,n.model):o.setEvents(n.gObject,n.scope,n.scope)),n.internalListeners=n.model?o.setEvents(n.gObject,{events:n.internalEvents},n.model):o.setEvents(n.gObject,{events:n.internalEvents},n.scope)):void 0}}(this);r();this.scope.$watch("path",function(n){return function(t,i){if(!_.isEqual(t,i)||!n.gObject)return r()}}(this),!0);!this.scope["static"]&&t.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setEditable(t):void 0}}(this),!0);t.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setDraggable(t):void 0}}(this),!0);t.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(n){return function(t,i){var r;return t!==i&&(t=!n.isFalse(t)),(r=n.gObject)!=null?r.setVisible(t):void 0}}(this),!0);t.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(n){return function(t,i){var r;if(t!==i)return t=!n.isFalse(t),(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.stroke)&&t.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);t.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(n){return function(t,i){var r;if(t!==i)return(r=n.gObject)!=null?r.setOptions(n.buildOpts(n.gObject.getPath())):void 0}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.clean(),n.scope=null}}(this));t.isDefined(this.scope.fill)&&t.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this));t.isDefined(this.scope.fill)&&t.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this));t.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(n){return function(t,i){if(t!==i)return n.gObject.setOptions(n.buildOpts(n.gObject.getPath()))}}(this))}return i(s,r),s.include(e),s.prototype.clean=function(){var n;return o.removeEvents(this.listeners),o.removeEvents(this.internalListeners),(n=this.gObject)!=null&&n.setMap(null),this.gObject=null},s}(r)}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(n,t){var i;return i=function(n,t,i){var u,r;return r=new google.maps.Polyline({map:n,clickable:!1}),u=google.maps.event.addListener(n,"mousemove",function(n){return r.getPath().push(n.latLng)}),google.maps.event.addListenerOnce(n,"mouseup",function(){var f;return google.maps.event.removeListener(u),f=r.getPath(),r.setMap(null),t.push(new google.maps.Polygon({map:n,path:f})),r=null,google.maps.event.clearListeners(n.getDiv(),"mousedown"),i()}),void 0},function(r,u){var f,e;return this.map=r,f=function(t){return function(){var i;return i={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},n.info("disabling map move"),t.map.setOptions(i)}}(this),e=function(n){return function(){var t,i;return t={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},(i=n.deferred)!=null&&i.resolve(),_.defer(function(){return n.map.setOptions(_.extend(t,u.options))})}}(this),this.engage=function(r){return function(u){return r.polys=u,r.deferred=t.defer(),f(),n.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(r.map.getDiv(),"mousedown",function(){return i(r.map,r.polys,e)}),r.deferred.promise}}(this),this}}])}.call(this),function(){var i=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(u,f,e,o,s,h,c,l,a){return function(u){function v(n){this.internalEvents=i(this.internalEvents,this);this.setLabelOptions=i(this.setLabelOptions,this);this.setOptions=i(this.setOptions,this);this.setIcon=i(this.setIcon,this);this.setCoords=i(this.setCoords,this);this.isNotValid=i(this.isNotValid,this);this.maybeSetScopeValue=i(this.maybeSetScopeValue,this);this.createMarker=i(this.createMarker,this);this.setMyScope=i(this.setMyScope,this);this.updateModel=i(this.updateModel,this);this.handleModelChanges=i(this.handleModelChanges,this);this.destroy=i(this.destroy,this);var r,u,f,o,h,c,t;t=n.scope;this.model=n.model;this.keys=n.keys;this.gMap=n.gMap;this.defaults=(u=n.defaults)!=null?u:{};this.doClick=n.doClick;this.gManager=n.gManager;this.doDrawSelf=(f=n.doDrawSelf)!=null?f:!0;this.trackModel=(o=n.trackModel)!=null?o:!0;this.needRedraw=(h=n.needRedraw)!=null?h:!1;this.isScopeModel=(c=n.isScopeModel)!=null?c:!1;this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0));this.deferred=a.defer();_.each(this.keys,function(n){return function(t,i){var r;return r=n.keys[i],r!=null&&!_.isFunction(r)&&_.isString(r)?n[i+"Key"]=r:void 0}}(this));this.idKey=this.idKeyKey||"id";this.model[this.idKey]!=null&&(this.id=this.model[this.idKey]);v.__super__.constructor.call(this,t);this.scope.getGMarker=function(n){return function(){return n.gObject}}(this);this.firstTime=!0;this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(n){return function(t,i){if(t!==i)return n.handleModelChanges(t,i)}}(this),!0)):(r=new s(function(n){return function(i){return _.isFunction(i)&&(i="all"),n.firstTime?void 0:n.setMyScope(i,t)}}(this),!1),_.each(this.keys,function(n,i){return t.$watch(i,r.sic(i),!0)}));this.scope.$on("$destroy",function(n){return function(){return y(n)}}(this));this.createMarker(this.model);e.info(this)}var y;return r(v,u),v.include(f),v.include(o),v.include(h),y=function(n){if((n!=null?n.gObject:void 0)!=null&&(n.removeEvents(n.externalListeners),n.removeEvents(n.internalListeners),n!=null?n.gObject:void 0))return n.removeFromManager&&n.gManager.remove(n.gObject),n.gObject.setMap(null),n.gObject=null},v.prototype.destroy=function(n){return n==null&&(n=!0),this.removeFromManager=n,this.scope.$destroy()},v.prototype.handleModelChanges=function(n,t){var i,r,u;return i=this.getChanges(n,t,c.keys),this.firstTime?void 0:(r=0,u=_.keys(i).length,_.each(i,function(i){return function(f,e){var o;return r+=1,o=u===r,i.setMyScope(e,n,t,!1,!0,o),i.needRedraw=!0}}(this)))},v.prototype.updateModel=function(n){return this.isScopeModel&&(this.clonedModel=_.clone(n,!0)),this.setMyScope("all",n,this.model)},v.prototype.renderGMarker=function(t,i){var r,u,f;if(t==null&&(t=!0),r=this.getProp("coords",this.scope,this.model),((f=this.gManager)!=null?f.isSpiderfied:void 0)!=null&&(u=this.gManager.isSpiderfied()),r!=null){if(!this.validateCoords(r)){e.debug("MarkerChild does not have coords yet. They may be defined later.");return}if(i!=null&&i(),t&&this.gObject&&this.gManager.add(this.gObject),u)return this.gManager.markerSpiderfier.spiderListener(this.gObject,n.event)}else if(t&&this.gObject)return this.gManager.remove(this.gObject)},v.prototype.setMyScope=function(n,t,i,r,u){var f;i==null&&(i=void 0);r==null&&(r=!1);u==null&&(u=!0);t==null?t=this.model:this.model=t;this.gObject||(this.setOptions(this.scope,u),f=!0);switch(n){case"all":return _.each(this.keys,function(n){return function(f,e){return n.setMyScope(e,t,i,r,u)}}(this));case"icon":return this.maybeSetScopeValue({gSetter:this.setIcon,doDraw:u});case"coords":return this.maybeSetScopeValue({gSetter:this.setCoords,doDraw:u});case"options":if(!f)return this.createMarker(t,i,r,u)}},v.prototype.createMarker=function(n,t,i,r){return t==null&&(t=void 0),i==null&&(i=!1),r==null&&(r=!0),this.maybeSetScopeValue({gSetter:this.setOptions,doDraw:r}),this.firstTime=!1},v.prototype.maybeSetScopeValue=function(n){var t,i,r;return i=n.gSetter,t=(r=n.doDraw)!=null?r:!0,i!=null&&i(this.scope,t),this.doDrawSelf&&t?this.gManager.draw():void 0},v.prototype.isNotValid=function(n,t){var i,r;return t==null&&(t=!0),r=t?this.gObject===void 0:!1,i=this.trackModel?!1:n.$id!==this.scope.$id,i||r},v.prototype.setCoords=function(n,t){if(t==null&&(t=!0),!this.isNotValid(n)&&this.gObject!=null)return this.renderGMarker(t,function(t){return function(){var i,u,r;if(u=t.getProp("coords",n,t.model),i=t.getCoords(u),r=t.gObject.getPosition(),r==null||i==null||i.lng()!==r.lng()||i.lat()!==r.lat())return t.gObject.setPosition(i),t.gObject.setVisible(t.validateCoords(u))}}(this))},v.prototype.setIcon=function(n,t){if(t==null&&(t=!0),!this.isNotValid(n)&&this.gObject!=null)return this.renderGMarker(t,function(t){return function(){var i,r,u;if(u=t.gObject.getIcon(),r=t.getProp("icon",n,t.model),u!==r)return t.gObject.setIcon(r),i=t.getProp("coords",n,t.model),t.gObject.setPosition(t.getCoords(i)),t.gObject.setVisible(t.validateCoords(i))}}(this))},v.prototype.setOptions=function(n,t){var i;if(t==null&&(t=!0),!this.isNotValid(n,!1)){if(this.renderGMarker(t,function(t){return function(){var i,r,u;return r=t.getProp("coords",n,t.model),u=t.getProp("icon",n,t.model),i=t.getProp("options",n,t.model),t.opts=t.createOptions(r,u,i),t.isLabel(t.gObject)!==t.isLabel(t.opts)&&t.gObject!=null&&(t.gManager.remove(t.gObject),t.gObject=void 0),t.gObject!=null&&t.gObject.setOptions(t.setLabelOptions(t.opts)),t.gObject||(t.isLabel(t.opts)?t.gObject=new MarkerWithLabel(t.setLabelOptions(t.opts)):t.opts.content?(t.gObject=new RichMarker(t.opts),t.gObject.getIcon=t.gObject.getContent,t.gObject.setIcon=t.gObject.setContent):t.gObject=new google.maps.Marker(t.opts),_.extend(t.gObject,{model:t.model})),t.externalListeners&&t.removeEvents(t.externalListeners),t.internalListeners&&t.removeEvents(t.internalListeners),t.externalListeners=t.setEvents(t.gObject,t.scope,t.model,["dragend"]),t.internalListeners=t.setEvents(t.gObject,{events:t.internalEvents(),$evalAsync:function(){}},t.model),t.id!=null?t.gObject.key=t.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==l.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");((i=this.gObject)!=null?i.getMap():void 0)&&this.gManager.type===l.type||(e.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}if(this.model[this.fitKey])return this.gManager.fit()}},v.prototype.setLabelOptions=function(n){return n.labelAnchor&&(n.labelAnchor=this.getLabelPositionPoint(n.labelAnchor)),n},v.prototype.internalEvents=function(){return{dragend:function(n){return function(t,i,r,u){var f,e,o;return e=n.trackModel?n.scope.model:n.model,o=n.setCoordsFromEvent(n.modelOrKey(e,n.coordsKey),n.gObject.getPosition()),e=n.setVal(r,n.coordsKey,o),f=n.scope.events,(f!=null?f.dragend:void 0)!=null&&f.dragend(t,i,e,u),n.scope.$apply()}}(this),click:function(n){return function(i,r,u,f){var e;return e=n.getProp("click",n.scope,n.model),n.doClick&&t.isFunction(e)?n.scope.$evalAsync(e(i,r,n.model,f)):void 0}}(this)}},v}(u)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(t,i){var r,u;return u=function(n){return new google.maps.Polygon(n)},r=new t(i,u),function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i}(r)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(t,i){var r,u;return u=function(n){return new google.maps.Polyline(n)},r=t(i,u),function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i}(r)}])}.call(this),function(){var i=function(n,t){return function(){return n.apply(t,arguments)}},r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n},u={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(u,f,e,o,s,h,c,l){return function(u){function a(n){this.updateModel=i(this.updateModel,this);this.destroy=i(this.destroy,this);this.remove=i(this.remove,this);this.getLatestPosition=i(this.getLatestPosition,this);this.hideWindow=i(this.hideWindow,this);this.showWindow=i(this.showWindow,this);this.handleClick=i(this.handleClick,this);this.watchOptions=i(this.watchOptions,this);this.watchCoords=i(this.watchCoords,this);this.createGWin=i(this.createGWin,this);this.watchElement=i(this.watchElement,this);this.watchAndDoShow=i(this.watchAndDoShow,this);this.doShow=i(this.doShow,this);var t,r,u,f,o;this.model=(r=n.model)!=null?r:{};this.scope=n.scope;this.opts=n.opts;this.isIconVisibleOnClick=n.isIconVisibleOnClick;this.gMap=n.gMap;this.markerScope=n.markerScope;this.element=n.element;this.needToManualDestroy=(u=n.needToManualDestroy)!=null?u:!1;this.markerIsVisibleAfterWindowClose=(f=n.markerIsVisibleAfterWindowClose)!=null?f:!0;this.isScopeModel=(o=n.isScopeModel)!=null?o:!1;this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0));this.getGmarker=function(){var n,t;if(((n=this.markerScope)!=null?n.getGMarker:void 0)!=null)return(t=this.markerScope)!=null?t.getGMarker():void 0};this.listeners=[];this.createGWin();t=this.getGmarker();t!=null&&t.setClickable(!0);this.watchElement();this.watchOptions();this.watchCoords();this.watchAndDoShow();this.scope.$on("$destroy",function(n){return function(){return n.destroy()}}(this));e.info(this)}return r(a,u),a.include(f),a.include(l),a.prototype.doShow=function(n){return this.scope.show===!0||n?this.showWindow():this.hideWindow()},a.prototype.watchAndDoShow=function(){return this.model.show!=null&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},a.prototype.watchElement=function(){return this.scope.$watch(function(n){return function(){var t,i;if((n.element||n.html))return n.html!==n.element.html()&&n.gObject?((t=n.opts)!=null&&(t.content=void 0),i=n.gObject.isOpen(),n.remove(),n.createGWin(i)):void 0}}(this))},a.prototype.createGWin=function(t){var u,r,i,f,e;return t==null&&(t=!1),i=this.getGmarker(),r={},this.opts!=null&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),r=this.opts),this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),u=this.scope.options?this.scope.options:r,this.opts=this.createWindowOptions(i,this.markerScope||this.scope,this.html,u),this.opts!=null?(this.gObject||(this.gObject=this.opts.boxClass&&n.InfoBox&&typeof n.InfoBox=="function"?new n.InfoBox(this.opts):new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return c.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(n){return function(){return i&&(i.setAnimation(n.oldMarkerAnimation),n.markerIsVisibleAfterWindowClose&&_.delay(function(){return i.setVisible(!1),i.setVisible(n.markerIsVisibleAfterWindowClose)},250)),n.gObject.close(),n.model.show=!1,n.scope.closeClick!=null?n.scope.$evalAsync(n.scope.closeClick()):n.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick(((f=this.scope)!=null?(e=f.options)!=null?e.forceClick:void 0:void 0)||t),this.doShow(this.gObject.isOpen())):void 0},a.prototype.watchCoords=function(){var n;return n=this.markerScope!=null?this.markerScope:this.scope,n.$watch("coords",function(n){return function(t,i){var r;if(t!==i){if(t==null)n.hideWindow();else if(!n.validateCoords(t)){e.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(n.model));return}if(r=n.getCoords(t),n.doShow(),n.gObject.setPosition(r),n.opts)return n.opts.position=r}}}(this),!0)},a.prototype.watchOptions=function(){return this.scope.$watch("options",function(n){return function(t,i){if(t!==i&&(n.opts=t,n.gObject!=null)){if(n.gObject.setOptions(n.opts),n.opts.visible!=null&&n.opts.visible)return n.showWindow();if(n.opts.visible!=null)return n.hideWindow()}}}(this),!0)},a.prototype.handleClick=function(n){var i,t;if(this.gObject!=null)return t=this.getGmarker(),i=function(n){return function(){return n.gObject==null&&n.createGWin(),n.showWindow(),t!=null?(n.initialMarkerVisibility=t.getVisible(),n.oldMarkerAnimation=t.getAnimation(),t.setVisible(n.isIconVisibleOnClick)):void 0}}(this),n&&i(),t?this.listeners=this.listeners.concat(this.setEvents(t,{events:{click:i}},this.model)):void 0},a.prototype.showWindow=function(){var r,i,n;if(this.gObject!=null)return n=null,i=function(n){return function(){var i,t,r;if(!n.gObject.isOpen()){if(t=n.getGmarker(),n.gObject!=null&&n.gObject.getPosition!=null&&(r=n.gObject.getPosition()),t&&(r=t.getPosition()),!r)return;if(n.gObject.open(n.gMap,t),i=n.gObject.isOpen(),n.model.show!==i)return n.model.show=i}}}(this),this.scope.templateUrl?s.get(this.scope.templateUrl,{cache:h}).then(function(r){return function(u){var f;return n=r.scope.$new(),t.isDefined(r.scope.templateParameter)&&(n.parameter=r.scope.templateParameter),f=o(u.data)(n),r.gObject.setContent(f[0]),i()}}(this)):this.scope.template?(n=this.scope.$new(),t.isDefined(this.scope.templateParameter)&&(n.parameter=this.scope.templateParameter),r=o(this.scope.template)(n),this.gObject.setContent(r[0]),i()):i(),this.scope.$on("destroy",function(){return n.$destroy()})},a.prototype.hideWindow=function(){if(this.gObject!=null&&this.gObject.isOpen())return this.gObject.close()},a.prototype.getLatestPosition=function(n){var t;if(t=this.getGmarker(),this.gObject==null||t==null||n){if(n)return this.gObject.setPosition(n)}else return this.gObject.setPosition(t.getPosition())},a.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},a.prototype.destroy=function(n){var t;return n==null&&(n=!1),this.remove(),this.scope!=null&&!((t=this.scope)!=null?t.$$destroyed:void 0)&&(this.needToManualDestroy||n)?this.scope.$destroy():void 0},a.prototype.updateModel=function(n){return this.isScopeModel&&(this.clonedModel=_.clone(n,!0)),_.extend(this.model,this.clonedModel||n)},a}(u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(r,u,f,e,o,s,h,c){return function(r,l,a){return function(f){function v(t,i,f,e,s){this.element=i;this.attrs=f;this.gMap=e;this.defaults=s;this.maybeFit=n(this.maybeFit,this);this.createChild=n(this.createChild,this);this.pieceMeal=n(this.pieceMeal,this);this.createAllNew=n(this.createAllNew,this);this.watchIdKey=n(this.watchIdKey,this);this.createChildScopes=n(this.createChildScopes,this);this.watchDestroy=n(this.watchDestroy,this);this.onDestroy=n(this.onDestroy,this);this.rebuildAll=n(this.rebuildAll,this);this.doINeedToWipe=n(this.doINeedToWipe,this);this.watchModels=n(this.watchModels,this);v.__super__.constructor.call(this,t);this["interface"]=r;this.$log=u;this.plurals=new o;_.each(r.scopeKeys,function(n){return function(t){return n[t+"Key"]=void 0}}(this));this.models=void 0;this.firstTime=!0;this.$log.info(this);this.createChildScopes()}return i(v,f),v.include(e),v.prototype.watchModels=function(n){return n.$watch("models",function(t){return function(i,r){if(i!==r)return t.doINeedToWipe(i)||n.doRebuildAll?t.rebuildAll(n,!0,!0):t.createChildScopes(!1)}}(this),!0)},v.prototype.doINeedToWipe=function(n){var t;return t=n!=null?n.length===0:!0,this.plurals.length>0&&t},v.prototype.rebuildAll=function(n,t,i){return this.onDestroy(i).then(function(n){return function(){if(t)return n.createChildScopes()}}(this))},v.prototype.onDestroy=function(){return v.__super__.onDestroy.call(this,this.scope),s.promiseLock(this,h.promiseTypes["delete"],void 0,void 0,function(n){return function(){return s.each(n.plurals.values(),function(n){return n.destroy(!0)},s.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){var t;if((t=n.plurals)!=null)return t.removeAll()})}}(this))},v.prototype.watchDestroy=function(n){return n.$on("$destroy",function(t){return function(){return t.rebuildAll(n,!1,!0)}}(this))},v.prototype.createChildScopes=function(n){if(n==null&&(n=!0),t.isUndefined(this.scope.models)){this.$log.error("No models to create "+a+"s from! I Need direct models!");return}if(this.gMap!=null&&this.scope.models!=null)return this.watchIdKey(this.scope),n?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},v.prototype.watchIdKey=function(n){return this.setIdKey(n),n.$watch("idKey",function(t){return function(i,r){if(i!==r&&i==null)return t.idKey=i,t.rebuildAll(n,!0,!0)}}(this))},v.prototype.createAllNew=function(n,t){var i;if(t==null&&(t=!1),this.models=n.models,this.firstTime&&(this.watchModels(n),this.watchDestroy(n)),!this.didQueueInitPromise(this,n))return i=null,s.promiseLock(this,h.promiseTypes.create,"createAllNew",function(n){return i=n},function(t){return function(){return s.map(n.models,function(n){var r;return r=t.createChild(n,t.gMap),i&&(u.debug("createNew should fall through safely"),r.isEnabled=!1),i,r.pathPoints.getArray()},s.chunkSizeFrom(n.chunk)).then(function(n){return t.maybeFit(n),t.firstTime=!1})}}(this))},v.prototype.pieceMeal=function(n,t){var r,i;if(t==null&&(t=!0),!n.$$destroyed)return r=null,i=null,this.models=n.models,n!=null&&this.modelsLength()&&this.plurals.length?s.promiseLock(this,h.promiseTypes.update,"pieceMeal",function(n){return r=n},function(t){return function(){return h.promise(function(){return t.figureOutState(t.idKey,n,t.plurals,t.modelKeyComparison)}).then(function(u){return i=u,i.updates.length&&s.each(i.updates,function(n){return _.extend(n.child.scope,n.model),n.child.model=n.model}),s.each(i.removals,function(n){if(n!=null)return n.destroy(),t.plurals.remove(n.model[t.idKey]),r},s.chunkSizeFrom(n.chunk))}).then(function(){return s.each(i.adds,function(n){return r&&u.debug("pieceMeal should fall through safely"),t.createChild(n,t.gMap),r},s.chunkSizeFrom(n.chunk)).then(function(){return t.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0))},v.prototype.createChild=function(n,t){var u,i;if(i=this.scope.$new(!1),this.setChildScope(r.scopeKeys,i,n),i.$watch("model",function(n){return function(t,r){if(t!==r)return n.setChildScope(i,t)}}(this),!0),i["static"]=this.scope["static"],u=new l({isScopeModel:!0,scope:i,attrs:this.attrs,gMap:t,defaults:this.defaults,model:n,gObjectChangeCb:function(n){return function(){return n.maybeFit()}}(this)}),n[this.idKey]==null){this.$log.error(a+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key.");return}return this.plurals.put(n[this.idKey],u),u},v.prototype.maybeFit=function(n){return n==null&&(n=this.plurals.map(function(n){return n.pathPoints})),this.scope.fit?(n=_.flatten(n),c.fit(n,this.gMap)):void 0},v}(f)}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(i,r,u,f,e){var o;return o=function(n,t){return n.settingFromDirective=!0,t(),r(function(){return n.settingFromDirective=!1})},function(r){function e(n,r,f,e,s){var l,h,c;this.attrs=f;this.gMap=e;this.DEFAULTS=s;this.scope=n;c=null;l=function(n){return function(){return c=null,n.listeners!=null?(n.removeEvents(n.listeners),n.listeners=void 0):void 0}}(this);h=new google.maps.Circle(this.buildOpts(u.getCoords(n.center),n.radius));this.setMyOptions=function(t){return function(i,r){if(!n.settingFromDirective)return(_.isEqual(i,r)&&i===r&&(i!=null&&r!=null?i.coordinates===r.coordinates:!0))?void 0:h.setOptions(t.buildOpts(u.getCoords(n.center),n.radius))}}(this);this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]);this.watchProps();this.scope.control!=null&&(this.scope.control.getCircle=function(){return h});l();this.listeners=this.setEvents(h,n,n,["radius_changed"])||[];this.listeners.push(google.maps.event.addListener(h,"radius_changed",function(){var i,r;if(i=h.getRadius(),i!==c)return c=i,r=function(){return o(n,function(){var t,r;return i!==n.radius&&(n.radius=i),((t=n.events)!=null?t.radius_changed:void 0)&&_.isFunction((r=n.events)!=null?r.radius_changed:void 0)?n.events.radius_changed(h,"radius_changed",n,arguments):void 0})},t.mock?r():n.$evalAsync(function(){return r()})}));this.listeners.push(google.maps.event.addListener(h,"center_changed",function(){return n.$evalAsync(function(){return o(n,function(){return t.isDefined(n.center.type)?(n.center.coordinates[1]=h.getCenter().lat(),n.center.coordinates[0]=h.getCenter().lng()):(n.center.latitude=h.getCenter().lat(),n.center.longitude=h.getCenter().lng())})})}));n.$on("$destroy",function(){return l(),h.setMap(null)});i.info(this)}return n(e,r),e.include(u),e.include(f),e}(e)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(t,i,r,u){return function(t){function i(n,t,i,r){var u,f;this.scope=n;this.attrs=i;this.map=r;u=new google.maps.drawing.DrawingManager(this.scope.options);u.setMap(this.map);f=void 0;this.scope.control!=null&&(this.scope.control.getDrawingManager=function(){return u});!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(n){if(u!=null)return u.setOptions(n)},!0);this.scope.events!=null&&(f=this.setEvents(u,this.scope,this.scope),this.scope.$watch("events",function(n){return function(t,i){if(!_.isEqual(t,i))return f!=null&&n.removeEvents(f),f=n.setEvents(u,n.scope,n.scope)}}(this)));this.scope.$on("$destroy",function(n){return function(){return f!=null&&n.removeEvents(f),u.setMap(null),u=null}}(this))}return n(i,t),i.include(u),i}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(r,u){return function(r){function f(i,r,e,o){if(this.scope=i,this.element=r,this.attrs=e,this.map=o,this.onWatch=n(this.onWatch,this),this.watch=n(this.watch,this),this.validateScope=n(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=u,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=t.isDefined(this.attrs.click);this.scope.options!=null&&(this.DEFAULTS=this.scope.options);this.watch("coords",this.scope);this.watch("icon",this.scope);this.watch("options",this.scope);this.scope.$on("$destroy",function(n){return function(){return n.onDestroy(n.scope)}}(this))}return i(f,r),f.prototype.DEFAULTS={},f.prototype.validateScope=function(n){var t;return n==null?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(t=n.coords!=null,!t)?(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1):t},f.prototype.watch=function(n,t,i){return i==null&&(i=!0),t.$watch(n,function(i){return function(r,u){if(!_.isEqual(r,u))return i.onWatch(n,t,r,u)}}(this),i)},f.prototype.onWatch=function(){},f}(r)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(t,i,r){return function(t){function u(n,t,i,f,e,o,s,h){u.__super__.constructor.call(this,n);this.$log=r;this.$timeout=e;this.$compile=o;this.$http=s;this.$templateCache=h;this.DEFAULTS={};n.options!=null&&(this.DEFAULTS=n.options)}return n(u,t),u.include(i),u.prototype.getItem=function(n,t,i){return t==="models"?n[t][i]:n[t].get(i)},u}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(r,u){return function(r){function f(i,r,f,e,o,s){if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.onLayerCreated=o!=null?o:void 0,this.$log=s!=null?s:u,this.createGoogleLayer=n(this.createGoogleLayer,this),this.attrs.type==null){this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!");return}this.createGoogleLayer();this.doShow=!0;t.isDefined(this.attrs.show)&&(this.doShow=this.scope.show);this.doShow&&this.gMap!=null&&this.gObject.setMap(this.gMap);this.scope.$watch("show",function(n){return function(t,i){if(t!==i)return n.doShow=t,t?n.gObject.setMap(n.gMap):n.gObject.setMap(null)}}(this),!0);this.scope.$watch("options",function(n){return function(t,i){if(t!==i&&n.doShow)return n.gObject.setOptions(t)}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.gObject.setMap(null)}}(this))}return i(f,r),f.prototype.createGoogleLayer=function(){var n;return this.gObject=this.attrs.options==null?this.attrs.namespace===void 0?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.attrs.namespace===void 0?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),this.gObject!=null&&this.doShow&&this.gObject.setMap(this.gMap),this.gObject!=null&&this.onLayerCreated!=null?typeof(n=this.onLayerCreated(this.scope,this.gObject))=="function"?n(this.gObject):void 0:void 0},f}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(r,u){return function(r){function f(i,r,f,e,o){if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.$log=o!=null?o:u,this.hideOverlay=n(this.hideOverlay,this),this.showOverlay=n(this.showOverlay,this),this.refreshMapType=n(this.refreshMapType,this),this.createMapType=n(this.createMapType,this),this.attrs.options==null){this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!");return}this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0;this.doShow=!0;this.createMapType();t.isDefined(this.attrs.show)&&(this.doShow=this.scope.show);this.doShow&&this.gMap!=null&&this.showOverlay();this.scope.$watch("show",function(n){return function(t,i){if(t!==i)return n.doShow=t,t?n.showOverlay():n.hideOverlay()}}(this),!0);this.scope.$watchCollection("options",function(n){return function(t,i){var r,u;if(!_.isEqual(t,i)&&(u=["tileSize","maxZoom","minZoom","name","alt"],r=_.some(u,function(n){return!i||!t||!_.isEqual(t[n],i[n])}),r))return n.refreshMapType()}}(this));t.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(n){return function(t,i){if(!_.isEqual(t,i))return n.refreshMapType()}}(this),!0);this.scope.$on("$destroy",function(n){return function(){return n.hideOverlay(),n.mapType=null}}(this))}return i(f,r),f.prototype.createMapType=function(){if(this.scope.options.getTile!=null)this.mapType=this.scope.options;else if(this.scope.options.getTileUrl!=null)this.mapType=new google.maps.ImageMapType(this.scope.options);else{this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");return}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),t.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&this.gMap!=null?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var n;return n=!1,this.gMap.overlayMapTypes.forEach(function(t){return function(i,r){n||i.layerId!==t.id||(n=!0,t.gMap.overlayMapTypes.removeAt(r))}}(this))},f}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(r,u,f,e,o,s,h,c,l,a,v,y,p){var w;return w=function(n,t){return t.plurals=new f,t.scope.plurals=t.plurals,t},function(r){function c(t,i,r,u){this.maybeExecMappedEvent=n(this.maybeExecMappedEvent,this);this.onDestroy=n(this.onDestroy,this);this.newChildMarker=n(this.newChildMarker,this);this.pieceMeal=n(this.pieceMeal,this);this.rebuildAll=n(this.rebuildAll,this);this.createAllNew=n(this.createAllNew,this);this.bindToTypeEvents=n(this.bindToTypeEvents,this);this.createChildScopes=n(this.createChildScopes,this);this.validateScope=n(this.validateScope,this);this.onWatch=n(this.onWatch,this);c.__super__.constructor.call(this,t,i,r,u);this["interface"]=l;w(new f,this);this.scope.pluralsUpdate={updateCtr:0};this.$log.info(this);this.doRebuildAll=this.scope.doRebuildAll!=null?this.scope.doRebuildAll:!1;this.setIdKey(this.scope);this.scope.$watch("doRebuildAll",function(n){return function(t,i){if(t!==i)return n.doRebuildAll=t}}(this));this.modelsLength()||(this.modelsRendered=!1);this.scope.$watch("models",function(n){return function(t,i){if(!_.isEqual(t,i)||!n.modelsRendered){if(t.length===0&&i.length===0)return;n.modelsRendered=!0;return n.onWatch("models",n.scope,t,i)}}}(this),!this.isTrue(r.modelsbyref));this.watch("doCluster",this.scope);this.watch("type",this.scope);this.watch("clusterOptions",this.scope);this.watch("clusterEvents",this.scope);this.watch("typeOptions",this.scope);this.watch("typeEvents",this.scope);this.watch("fit",this.scope);this.watch("idKey",this.scope);this.gManager=void 0;this.createAllNew(this.scope)}return i(c,r),c.include(v),c.include(u),c.prototype.onWatch=function(n,t,i,r){return n==="idKey"&&i!==r&&(this.idKey=i),this.doRebuildAll||n==="doCluster"||n==="type"?this.rebuildAll(t):this.pieceMeal(t)},c.prototype.validateScope=function(n){var i;return i=t.isUndefined(n.models)||n.models===void 0,i&&this.$log.error(this.constructor.name+": no valid models attribute found"),c.__super__.validateScope.call(this,n)||i},c.prototype.createChildScopes=function(n){if(this.gMap!=null&&this.scope.models!=null)return n?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)},c.prototype.bindToTypeEvents=function(n,i){var r,u;return i==null&&(i=["click","mouseout","mouseover"]),u=this,this.origTypeEvents?t.extend(n,this.origTypeEvents):(this.origTypeEvents={},_.each(i,function(t){return function(i){return t.origTypeEvents[i]=n!=null?n[i]:void 0}}(this))),r={},_.each(i,function(n){return r[n]=function(t){return u.maybeExecMappedEvent(t,n)}}),t.extend(n,r)},c.prototype.createAllNew=function(n){var u,i,t,r;if(this.gManager!=null&&(this.gManager instanceof p&&(u=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),t=n.typeEvents||n.clusterEvents,r=n.typeOptions||n.clusterOptions,n.doCluster||n.type==="cluster"?(t!=null&&this.bindToTypeEvents(t),this.gManager=new s(this.map,void 0,r,t)):n.type==="spider"?(t!=null&&this.bindToTypeEvents(t,["spiderfy","unspiderfy"]),this.gManager=new p(this.map,void 0,r,t,this.scope),u&&this.gManager.spiderfy()):this.gManager=new h(this.map),!this.didQueueInitPromise(this,n))return i=null,o.promiseLock(this,a.promiseTypes.create,"createAllNew",function(n){return i=n},function(t){return function(){return o.each(n.models,function(r){return t.newChildMarker(r,n),i},o.chunkSizeFrom(n.chunk)).then(function(){return t.modelsRendered=!0,n.fit&&t.gManager.fit(),t.gManager.draw(),t.scope.pluralsUpdate.updateCtr+=1},o.chunkSizeFrom(n.chunk))}}(this))},c.prototype.rebuildAll=function(n){var t;if(n.doRebuild||n.doRebuild===void 0)return((t=this.scope.plurals)!=null?t.length:void 0)?this.onDestroy(n).then(function(t){return function(){return t.createAllNew(n)}}(this)):this.createAllNew(n)},c.prototype.pieceMeal=function(n){var i,t;if(!n.$$destroyed)return i=null,t=null,this.modelsLength()&&this.scope.plurals.length?o.promiseLock(this,a.promiseTypes.update,"pieceMeal",function(n){return i=n},function(r){return function(){return a.promise(function(){return r.figureOutState(r.idKey,n,r.scope.plurals,r.modelKeyComparison)}).then(function(u){return t=u,o.each(t.removals,function(n){if(n!=null)return n.destroy!=null&&n.destroy(),r.scope.plurals.remove(n.id),i},o.chunkSizeFrom(n.chunk))}).then(function(){return o.each(t.adds,function(t){return r.newChildMarker(t,n),i},o.chunkSizeFrom(n.chunk))}).then(function(){return o.each(t.updates,function(n){return r.updateChild(n.child,n.model),i},o.chunkSizeFrom(n.chunk))}).then(function(){return(t.adds.length>0||t.removals.length>0||t.updates.length>0)&&(n.plurals=r.scope.plurals,n.fit&&r.gManager.fit(),r.gManager.draw()),r.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(n))},c.prototype.newChildMarker=function(n,t){var i,r,u;if(!n)throw"model undefined";if(n[this.idKey]==null){this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.");return}return this.$log.info("child",i,"markers",this.scope.markerModels),r=t.$new(!1),r.events=t.events,u={},l.scopeKeys.forEach(function(n){return u[n]=t[n]}),i=new e({scope:r,model:n,keys:u,gMap:this.map,defaults:this.DEFAULTS,doClick:this.doClick,gManager:this.gManager,doDrawSelf:!1,isScopeModel:!0}),this.scope.plurals.put(n[this.idKey],i),i},c.prototype.onDestroy=function(n){return c.__super__.onDestroy.call(this,n),o.promiseLock(this,a.promiseTypes["delete"],void 0,void 0,function(n){return function(){return o.each(n.scope.plurals.values(),function(n){if(n!=null)return n.destroy(!1)},o.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){return n.gManager!=null&&n.gManager.destroy(),n.plurals.removeAll(),n.plurals!==n.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),n.scope.pluralsUpdate.updateCtr+=1})}}(this))},c.prototype.maybeExecMappedEvent=function(n,t){var i,r;if(!this.scope.$$destroyed)return r=this.scope.typeEvents||this.scope.clusterEvents,_.isFunction(r!=null?r[t]:void 0)&&(i=this.mapTypeToPlurals(n),this.origTypeEvents[t])?this.origTypeEvents[t](i.group,i.mapped):void 0},c.prototype.mapTypeToPlurals=function(n){var t,i,r;if(_.isArray(n)?t=n:_.isFunction(n.getMarkers)&&(t=n.getMarkers()),t==null){y.error("Unable to map event as we cannot find the array group to map");return}return i=((r=this.scope.plurals.values())!=null?r.length:void 0)?t.map(function(n){return function(t){return n.scope.plurals.get(t.key).model}}(this)):[],{cluster:n,mapped:i,group:n}},c.prototype.getItem=function(n,t,i){return t==="models"?n[t][i]:n[t].get(i)},c}(r)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(n){return t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+n+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+n+"ChildModel","uiGmapI"+n,function(t,i,r){return t(r,i,n)}])})}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(t,i,r,u){return function(u){function f(n,i,r,u,f){var e,a,v,c,y,o,p,s,h,l,w;this.scope=n;this.attrs=r;this.gMap=u;this.DEFAULTS=f;e=void 0;c=!1;h=[];s=void 0;y=function(n){return function(){if(n.isTrue(n.attrs.fit))return n.fitMapBounds(n.gMap,e)}}(this);v=function(n){return function(){var i,r,u;return n.scope.bounds!=null&&((i=n.scope.bounds)!=null?i.sw:void 0)!=null&&((r=n.scope.bounds)!=null?r.ne:void 0)!=null&&n.validateBoundPoints(n.scope.bounds)?(e=n.convertBoundPoints(n.scope.bounds),t.info("new new bounds created: "+JSON.stringify(e))):n.scope.bounds.getNorthEast!=null&&n.scope.bounds.getSouthWest!=null?e=n.scope.bounds:n.scope.bounds!=null?t.error("Invalid bounds for newValue: "+JSON.stringify((u=n.scope)!=null?u.bounds:void 0)):void 0}}(this);v();o=new google.maps.Rectangle(this.buildOpts(e));t.info("gObject (rectangle) created: "+o);l=!1;w=function(n){return function(){var t,i,r;if(t=o.getBounds(),i=t.getNorthEast(),r=t.getSouthWest(),!l)return n.scope.$evalAsync(function(n){return n.bounds!=null&&n.bounds.sw!=null&&n.bounds.ne!=null&&(n.bounds.ne={latitude:i.lat(),longitude:i.lng()},n.bounds.sw={latitude:r.lat(),longitude:r.lng()}),n.bounds.getNorthEast!=null&&n.bounds.getSouthWest!=null?n.bounds=t:void 0})}}(this);p=function(n){return function(){return y(),n.removeEvents(h),h.push(google.maps.event.addListener(o,"dragstart",function(){return c=!0})),h.push(google.maps.event.addListener(o,"dragend",function(){return c=!1,w()})),h.push(google.maps.event.addListener(o,"bounds_changed",function(){if(!c)return w()}))}}(this);a=function(n){return function(){return n.removeEvents(h),s!=null&&n.removeEvents(s),o.setMap(null)}}(this);e!=null&&p();this.scope.$watch("bounds",function(n,t){var i;if((!_.isEqual(n,t)||e==null)&&!c){if(l=!0,n==null){a();return}return e==null?i=!0:y(),v(),o.setBounds(e),l=!1,i&&e!=null?p():void 0}},!0);this.setMyOptions=function(n){return function(t,i){if(!_.isEqual(t,i)&&e!=null&&t!=null)return o.setOptions(n.buildOpts(e))}}(this);this.props.push("bounds");this.watchProps(this.props);this.attrs.events!=null&&(s=this.setEvents(o,this.scope,this.scope),this.scope.$watch("events",function(n){return function(t,i){if(!_.isEqual(t,i))return s!=null&&n.removeEvents(s),s=n.setEvents(o,n.scope,n.scope)}}(this)));this.scope.$on("$destroy",function(){return a()});t.info(this)}return n(f,u),f.include(i),f.include(r),f}(u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper",function(r,u,f){return function(r){function e(i,r,f,e,o,s,h){var c;if(this.scope=i,this.element=r,this.attrs=f,this.gMap=e,this.ctrlPosition=o,this.template=s,this.$log=h!=null?h:u,this.setVisibility=n(this.setVisibility,this),this.getBounds=n(this.getBounds,this),this.setBounds=n(this.setBounds,this),this.createSearchBox=n(this.createSearchBox,this),this.addToParentDiv=n(this.addToParentDiv,this),this.addAsMapControl=n(this.addAsMapControl,this),this.init=n(this.init,this),this.attrs.template==null){this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!");return}t.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0);t.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0);t.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1);this.visible=this.scope.options.visible;this.autocomplete=this.scope.options.autocomplete;c=t.element("<div><\/div>");c.append(this.template);this.input=c.find("input")[0];this.init()}return i(e,r),e.include(f),e.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(n){return function(i){if(t.isObject(i)&&(i.bounds!=null&&n.setBounds(i.bounds),i.visible!=null&&n.visible!==i.visible))return n.setVisibility(i.visible)}}(this),!0),this.attrs.parentdiv!=null?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.listener=this.autocomplete?google.maps.event.addListener(this.gObject,"place_changed",function(n){return function(){return n.places=n.gObject.getPlace()}}(this)):google.maps.event.addListener(this.gObject,"places_changed",function(n){return function(){return n.places=n.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$stateChangeSuccess",function(n){return function(){if(n.attrs.parentdiv!=null)return n.addToParentDiv()}}(this)),this.scope.$on("$destroy",function(n){return function(){return n.gObject=null}}(this))},e.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},e.prototype.addToParentDiv=function(){var n;return this.parentDiv=t.element(document.getElementById(this.scope.parentdiv)),((n=this.parentDiv)!=null?n.length:void 0)?this.parentDiv.append(this.input):void 0},e.prototype.createSearchBox=function(){return this.gObject=this.autocomplete?new google.maps.places.Autocomplete(this.input,this.scope.options):new google.maps.places.SearchBox(this.input,this.scope.options)},e.prototype.setBounds=function(n){if(t.isUndefined(n.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(n.isEmpty()===!1&&this.gObject!=null)return this.gObject.setBounds(n)},e.prototype.getBounds=function(){return this.gObject.getBounds()},e.prototype.setVisibility=function(n){return this.attrs.parentdiv!=null?n===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):n===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=n},e}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){return function(r){function k(t,i,r,u,e,s){this.gMap=e;this.markersScope=s;this.modelKeyComparison=n(this.modelKeyComparison,this);this.interpolateContent=n(this.interpolateContent,this);this.setChildScope=n(this.setChildScope,this);this.createWindow=n(this.createWindow,this);this.setContentKeys=n(this.setContentKeys,this);this.pieceMeal=n(this.pieceMeal,this);this.createAllNew=n(this.createAllNew,this);this.watchIdKey=n(this.watchIdKey,this);this.createChildScopes=n(this.createChildScopes,this);this.watchOurScope=n(this.watchOurScope,this);this.watchDestroy=n(this.watchDestroy,this);this.onDestroy=n(this.onDestroy,this);this.rebuildAll=n(this.rebuildAll,this);this.doINeedToWipe=n(this.doINeedToWipe,this);this.watchModels=n(this.watchModels,this);this.go=n(this.go,this);k.__super__.constructor.call(this,t,i,r,u,c,l,a,v);this["interface"]=w;this.plurals=new f;_.each(w.scopeKeys,function(n){return function(t){return n[t+"Key"]=void 0}}(this));this.linked=new o(t,i,r,u);this.contentKeys=void 0;this.isIconVisibleOnClick=void 0;this.firstTime=!0;this.firstWatchModels=!0;this.$log.info(self);this.parentScope=void 0;this.go(t)}return i(k,r),k.include(u),k.prototype.go=function(n){return this.watchOurScope(n),this.doRebuildAll=this.scope.doRebuildAll!=null?this.scope.doRebuildAll:!1,n.$watch("doRebuildAll",function(n){return function(t,i){if(t!==i)return n.doRebuildAll=t}}(this)),this.createChildScopes()},k.prototype.watchModels=function(n){var t;return t=this.markersScope!=null?"pluralsUpdate":"models",n.$watch(t,function(t){return function(i,r){var u;if(!_.isEqual(i,r)||t.firstWatchModels)return t.firstWatchModels=!1,t.doRebuildAll||t.doINeedToWipe(n.models)?t.rebuildAll(n,!0,!0):(u=t.plurals.length===0,t.existingPieces!=null?_.last(t.existingPieces._content).then(function(){return t.createChildScopes(u)}):t.createChildScopes(u))}}(this),!0)},k.prototype.doINeedToWipe=function(n){var t;return t=n!=null?n.length===0:!0,this.plurals.length>0&&t},k.prototype.rebuildAll=function(n,t,i){return this.onDestroy(i).then(function(n){return function(){if(t)return n.createChildScopes()}}(this))},k.prototype.onDestroy=function(){return k.__super__.onDestroy.call(this,this.scope),s.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(n){return function(){return s.each(n.plurals.values(),function(n){return n.destroy(!0)},s.chunkSizeFrom(n.scope.cleanchunk,!1)).then(function(){var t;if((t=n.plurals)!=null)return t.removeAll()})}}(this))},k.prototype.watchDestroy=function(n){return n.$on("$destroy",function(t){return function(){return t.firstWatchModels=!0,t.firstTime=!0,t.rebuildAll(n,!1,!0)}}(this))},k.prototype.watchOurScope=function(n){return _.each(w.scopeKeys,function(t){return function(i){var r;return r=i+"Key",t[r]=typeof n[i]=="function"?n[i]():n[i]}}(this))},k.prototype.createChildScopes=function(n){var i,r,u;if(n==null&&(n=!0),this.isIconVisibleOnClick=!0,t.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),i=t.isUndefined(this.linked.scope.models),i&&(this.markersScope===void 0||((r=this.markersScope)!=null?r.plurals:void 0)===void 0||((u=this.markersScope)!=null?u.models:void 0)===void 0)){this.$log.error("No models to create windows from! Need direct models or models derived from markers!");return}if(this.gMap!=null)return this.linked.scope.models!=null?(this.watchIdKey(this.linked.scope),n?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),n?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1))},k.prototype.watchIdKey=function(n){return this.setIdKey(n),n.$watch("idKey",function(t){return function(i,r){if(i!==r&&i==null)return t.idKey=i,t.rebuildAll(n,!0,!0)}}(this))},k.prototype.createAllNew=function(n,t,i,r){var u;if(i==null&&(i="models"),r==null&&(r=!1),this.firstTime&&(this.watchModels(n),this.watchDestroy(n)),this.setContentKeys(n.models),!this.didQueueInitPromise(this,n))return u=null,s.promiseLock(this,p.promiseTypes.create,"createAllNew",function(n){return u=n},function(r){return function(){return s.each(n.models,function(f){var e,o;return e=t?(o=r.getItem(n,i,f[r.idKey]))!=null?o.gObject:void 0:void 0,u||(!e&&r.markersScope&&h.error("Unable to get gMarker from markersScope!"),r.createWindow(f,e,r.gMap)),u},s.chunkSizeFrom(n.chunk)).then(function(){return r.firstTime=!1})}}(this))},k.prototype.pieceMeal=function(n,t,i,r){var u,f;if(i==null&&(i="models"),r==null&&(r=!0),!n.$$destroyed)return u=null,f=null,n!=null&&this.modelsLength()&&this.plurals.length?s.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(n){return u=n},function(t){return function(){return p.promise(function(){return t.figureOutState(t.idKey,n,t.plurals,t.modelKeyComparison)}).then(function(i){return f=i,s.each(f.removals,function(n){if(n!=null)return t.plurals.remove(n.id),n.destroy!=null&&n.destroy(!0),u},s.chunkSizeFrom(n.chunk))}).then(function(){return s.each(f.adds,function(r){var f,e;if(f=(e=t.getItem(n,i,r[t.idKey]))!=null?e.gObject:void 0,!f)throw"Gmarker undefined";return t.createWindow(r,f,t.gMap),u})}).then(function(){return s.each(f.updates,function(n){return t.updateChild(n.child,n.model),u},s.chunkSizeFrom(n.chunk))})}}(this)):(h.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0))},k.prototype.setContentKeys=function(n){if(this.modelsLength(n))return this.contentKeys=Object.keys(n[0])},k.prototype.createWindow=function(n,t,i){var u,r,f,o,s,h;if(r=this.linked.scope.$new(!1),this.setChildScope(r,n),r.$watch("model",function(n){return function(t,i){if(t!==i)return n.setChildScope(r,t)}}(this),!0),f={html:function(t){return function(){return t.interpolateContent(t.linked.element.html(),n)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,n)||{},o=this.createWindowOptions(t,r,f.html(),this.DEFAULTS),u=new e({model:n,scope:r,opts:o,isIconVisibleOnClick:this.isIconVisibleOnClick,gMap:i,markerScope:(s=this.markersScope)!=null?(h=s.plurals.get(n[this.idKey]))!=null?h.scope:void 0:void 0,element:f,needToManualDestroy:!1,markerIsVisibleAfterWindowClose:!0,isScopeModel:!0}),n[this.idKey]==null){this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.");return}return this.plurals.put(n[this.idKey],u),u},k.prototype.setChildScope=function(n,t){return _.each(w.scopeKeys,function(i){return function(r){var u,f;return u=r+"Key",f=i[u]==="self"?t:t[i[u]],f!==n[r]?n[r]=f:void 0}}(this)),n.model=t},k.prototype.interpolateContent=function(n,t){var e,i,r,u,o,f;if(this.contentKeys!==void 0&&this.contentKeys.length!==0){for(e=y(n),r={},f=this.contentKeys,i=0,o=f.length;i<o;i++)u=f[i],r[u]=t[u];return e(r)}},k.prototype.modelKeyComparison=function(n,t){var r,i;if(i=this.scope.coords!=null?this.scope:this.parentScope,i==null)throw"No scope or parentScope set!";return(r=b.equalCoords(this.evalModelHandle(n,i.coords),this.evalModelHandle(t,i.coords)),!r)?r:_.every(_.without(this["interface"].scopeKeys,"coords"),function(r){return function(u){return r.evalModelHandle(n,i[u])===r.evalModelHandle(t,i[u])}}(this))},k}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(n,t){return _.extend(n,{link:function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return new t(n,i,r,u)})}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(r,u,f,e,o,s){return function(h){function c(){this.link=n(this.link,this);c.__super__.constructor.call(this)}return i(c,h),c.prototype.link=function(n,i,h,c){return s.then(function(i){return function(s){var h,l;if(t.isUndefined(n.template)){i.$log.error("mapControl: could not find a valid template property");return}if(h=t.isDefined(n.index&&!isNaN(parseInt(n.index)))?parseInt(n.index):void 0,l=t.isDefined(n.position)?n.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",!s.ControlPosition[l]){i.$log.error("mapControl: invalid position property");return}return r.mapPromise(n,c).then(function(r){var s,c;return s=void 0,c=t.element("<div><\/div>"),u.get(n.template,{cache:f}).success(function(i){var u,r;return r=n.$new(),c.append(i),t.isDefined(n.controller)&&(u=o(n.controller,{$scope:r}),c.children().data("$ngControllerController",u)),s=e(c.children())(r),h?s[0].index=h:void 0}).error(function(){return i.$log.error("mapControl: template could not be found")}).then(function(){return r.controls[google.maps.ControlPosition[l]].push(s[0])})})}}(this))},c}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(n,t){return{restrict:"EMA",transclude:!0,template:'<div class="angular-google-map-dragzoom" ng-transclude style="display: none"><\/div>',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(t,i){return t.ctrlType="uiGmapDragZoom",_.extend(this,n.handle(t,i))}],link:function(i,r,u,f){return n.mapPromise(i,f).then(function(n){var r,u,f;return r=function(t){return n.enableKeyDragZoom(t)},u=new t(function(n,t){return t?r({key:t}):r()}),f=new t(function(n,t){if(t)return r(t)}),i.$watch("keyboardkey",u.sic("keyboardkey")),u.sic(i.keyboardkey),i.$watch("options",f.sic("options")),f.sic(i.options)})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(n,t){return _.extend(n,{link:function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return new t(n,i,r,u)})}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(t,r,u,f,e){return function(r){function o(){return this.link=n(this.link,this),o.__super__.constructor.apply(this,arguments)}return i(o,r),o.include(u),o.prototype.restrict="EMA",o.prototype.replace=!0,o.prototype.require="^uiGmapGoogleMap",o.prototype.scope={polygons:"=",draw:"="},o.prototype.link=function(n,i,r,u){return this.mapPromise(n,u).then(function(){return function(i){var o,r;return n.polygons?_.isArray(n.polygons)?(o=new f(i,u.getScope()),r=void 0,n.draw=function(){return typeof r=="function"&&r(),o.engage(n.polygons).then(function(){var t;return t=!0,r=n.$watchCollection("polygons",function(n,i){var r;if(t||n===i){t=!1;return}return r=e.differenceObjects(i,n),r.forEach(function(n){return n.setMap(null)})})})}):t.error("Free Draw Polygons must be of type Array!"):t.error("No polygons to bind to!")}}(this))},o}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var n;return n={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",control:"=",zIndex:"=zindex"}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r){return function(t){function u(){this.restrict="EA";this.replace=!0;this.require="^uiGmapGoogleMap";this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"};this.$log=i}return n(u,t),u.extend(r),u.prototype.link=function(){throw new Exception("Not implemented!!");},u}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(t,i){return function(t){function r(){this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.replace=!0;this.scope=_.extend(this.scope||{},r.scope)}return n(r,t),r.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},r.scopeKeys=_.keys(r.scope),r.keys=r.scopeKeys,r.extend(i),r}(t)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r,u){return function(i){function f(){}return n(f,i),f.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},f.scopeKeys=_.keys(f.scope),f.include(t),f.extend(u),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=r,f}(i)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(t,i,r,u){return function(i){function f(){}return n(f,i),f.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},f.scopeKeys=_.keys(f.scope),f.include(t),f.extend(u),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=r,f}(i)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var n;return n={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(t,i,r){return function(t){function u(){this.restrict="EMA";this.template=void 0;this.transclude=!0;this.priority=-100;this.require="^uiGmapGoogleMap";this.replace=!0;this.scope=_.extend(this.scope||{},u.scope)}return n(u,t),u.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},u.scopeKeys=_.keys(u.scope),u.include(i),u.extend(r),u}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","$log","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(r,u,f,e,o,s,h,c,l,a,v,y,p,w){var b,k;return b=void 0,k=[v,l,a],function(u){function o(){this.link=n(this.link,this);var t;t=function(n){var t,i;return i=void 0,n.$on("$destroy",function(){return h.decrement()}),t=s.handle(n),n.ctrlType="Map",n.deferred.promise.then(function(){return k.forEach(function(n){return n.init()})}),t.getMap=function(){return n.map},_.extend(this,t)};this.controller=["$scope",t]}return i(o,u),o.include(e),o.prototype.restrict="EMA",o.prototype.transclude=!0,o.prototype.replace=!1,o.prototype.template='<div class="angular-google-map"><div class="angular-google-map-container">\n<\/div><div ng-transclude style="display: none"><\/div><\/div>',o.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},o.prototype.link=function(n,i,u){var e,o;if(e=[],n.$on("$destroy",function(){return p.removeEvents(e),u.recycleMapInstance==="true"&&n.map?(w.recycleMapInstance(n.map),n.map=null):void 0}),n.idleAndZoomChanged=!1,n.center==null){o=n.$watch("center",function(t){return function(){if(n.center)return o(),t.link(n,i,u)}}(this));return}return y.then(function(o){return function(s){var l,nt,a,y,tt,k,ft,d,it,v,et,ot,g,ut,st,ht,rt;if(b={mapTypeId:s.MapTypeId.ROADMAP},ut=h.spawn(),ot=function(){return ut.deferred.resolve({instance:ut.instance,map:l})},!o.validateCoords(n.center)){f.error("angular-google-maps: could not find a valid center property");return}if(!t.isDefined(n.zoom)){f.error("angular-google-maps: map zoom property not set");return}if(tt=t.element(i),tt.addClass("angular-google-map"),v={options:{}},u.options&&(v.options=n.options),u.styles&&(v.styles=n.styles),u.type&&(st=u.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(st)?v.mapTypeId=google.maps.MapTypeId[u.type.toUpperCase()]:f.error("angular-google-maps: invalid map type '"+u.type+"'")),d=t.extend({},b,v,{center:o.getCoords(n.center),zoom:n.zoom,bounds:n.bounds}),l=u.recycleMapInstance==="true"?w.createMapInstance(tt.find("div")[1],d):new google.maps.Map(tt.find("div")[1],d),l.uiGmap_id=c.generate(),y=!1,e.push(google.maps.event.addListenerOnce(l,"idle",function(){return n.deferred.resolve(l),ot()})),a=u.events&&((et=n.events)!=null?et.blacklist:void 0)!=null?n.events.blacklist:[],_.isString(a)&&(a=[a]),it=function(t,i,r){if(!_.includes(a,t))return r&&r(),e.push(google.maps.event.addListener(l,t,function(){var t;if(!((t=n.update)!=null?t.lazy:void 0))return i()}))},_.includes(a,"all")||(it("dragstart",function(){return y=!0,n.$evalAsync(function(n){if(n.dragging!=null)return n.dragging=y})}),it("dragend",function(){return y=!1,n.$evalAsync(function(n){if(n.dragging!=null)return n.dragging=y})}),ht=function(i,r){if(i==null&&(i=l.center),r==null&&(r=n),!_.includes(a,"center"))if(t.isDefined(r.center.type)){if(r.center.coordinates[1]!==i.lat()&&(r.center.coordinates[1]=i.lat()),r.center.coordinates[0]!==i.lng())return r.center.coordinates[0]=i.lng()}else if(r.center.latitude!==i.lat()&&(r.center.latitude=i.lat()),r.center.longitude!==i.lng())return r.center.longitude=i.lng()},g=!1,it("idle",function(){var t,i,r;return t=l.getBounds(),i=t.getNorthEast(),r=t.getSouthWest(),g=!0,n.$evalAsync(function(t){return ht(),_.isUndefined(t.bounds)||_.includes(a,"bounds")||(t.bounds.northeast={latitude:i.lat(),longitude:i.lng()},t.bounds.southwest={latitude:r.lat(),longitude:r.lng()}),_.includes(a,"zoom")||(t.zoom=l.zoom,n.idleAndZoomChanged=!n.idleAndZoomChanged),g=!1})})),t.isDefined(n.events)&&n.events!==null&&t.isObject(n.events)){ft=function(t){return function(){return n.events[t].apply(n,[l,t,arguments])}};nt=[];for(k in n.events)n.events.hasOwnProperty(k)&&t.isFunction(n.events[k])&&nt.push(google.maps.event.addListener(l,k,ft(k)));e.concat(nt)}return l.getOptions=function(){return d},n.map=l,u.control!=null&&n.control!=null&&(n.control.refresh=function(n){var t,i,r;if(l!=null)return(typeof google!="undefined"&&google!==null?(i=google.maps)!=null?(r=i.event)!=null?r.trigger:void 0:void 0:void 0)!=null&&l!=null&&google.maps.event.trigger(l,"resize"),(n!=null?n.latitude:void 0)!=null&&(n!=null?n.longitude:void 0)!=null?(t=o.getCoords(n),o.isTrue(u.pan)?l.panTo(t):l.setCenter(t)):void 0},n.control.getGMap=function(){return l},n.control.getMapOptions=function(){return d},n.control.getCustomEventListeners=function(){return nt},n.control.removeEvents=function(n){return p.removeEvents(n)}),n.$watch("center",function(t,i){var r;if(t!==i&&!g)return(r=o.getCoords(n.center),r.lat()===l.center.lat()&&r.lng()===l.center.lng())?void 0:y?void 0:(o.validateCoords(t)||f.error("Invalid center for newValue: "+JSON.stringify(t)),o.isTrue(u.pan)&&n.zoom===l.zoom?l.panTo(r):l.setCenter(r))},!0),rt=null,n.$watch("zoom",function(t,i){var u,f;if(t!=null)return _.isEqual(t,i)||(l!=null?l.getZoom():void 0)===(n!=null?n.zoom:void 0)||g?void 0:(rt!=null&&r.cancel(rt),rt=r(function(){return l.setZoom(t)},((u=n.eventOpts)!=null?(f=u.debounce)!=null?f.zoomMs:void 0:void 0)+20,!1))}),n.$watch("bounds",function(n,t){var i,r,u,e,o,s,h;if(n!==t){if((n!=null?(u=n.northeast)!=null?u.latitude:void 0:void 0)==null||(n!=null?(e=n.northeast)!=null?e.longitude:void 0:void 0)==null||(n!=null?(o=n.southwest)!=null?o.latitude:void 0:void 0)==null||(n!=null?(s=n.southwest)!=null?s.longitude:void 0:void 0)==null){f.error("Invalid map bounds for new value: "+JSON.stringify(n));return}return r=new google.maps.LatLng(n.northeast.latitude,n.northeast.longitude),h=new google.maps.LatLng(n.southwest.latitude,n.southwest.longitude),i=new google.maps.LatLngBounds(h,r),l.fitBounds(i)}}),["options","styles"].forEach(function(t){return n.$watch(t,function(n,i){if(!_.isEqual(n,i))return t==="options"?v.options=n:v.options[t]=n,l!=null?l.setOptions(v):void 0},!0)})}}(this))},o}(o)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(t,i,r,u){return function(f){function e(){e.__super__.constructor.call(this);this.template='<span class="angular-google-map-marker" ng-transclude><\/span>';u.info(this)}return n(e,f),e.prototype.controller=["$scope","$element",function(n,i){return n.ctrlType="Marker",_.extend(this,t.handle(n,i))}],e.prototype.link=function(n,u,f,e){var o;return o=t.mapPromise(n,e),o.then(function(u){var f,e,o;return f=new r(u),e=_.object(t.keys,t.keys),o=new i({scope:n,model:n,keys:e,gMap:u,doClick:!0,gManager:f,doDrawSelf:!1,trackModel:!1}),o.deferred.promise.then(function(t){return n.deferred.resolve(t)}),n.control!=null?n.control.getGMarkers=f.getGMarkers:void 0}),n.$on("$destroy",function(){var n;return typeof n!="undefined"&&n!==null&&n.clear(),null})},e}(t)}])}.call(this),function(){var n=function(n,t){function u(){this.constructor=n}for(var r in t)i.call(t,r)&&(n[r]=t[r]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},i={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(t,i,r,u,f){return function(u){function e(){e.__super__.constructor.call(this);this.template='<span class="angular-google-map-markers" ng-transclude><\/span>';i.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents"});f.info(this)}return n(e,u),e.prototype.controller=["$scope","$element",function(n,i){return n.ctrlType="Markers",_.extend(this,t.handle(n,i))}],e.prototype.link=function(n,u,f,e){var o,s;return o=void 0,s=function(){return n.deferred.resolve()},t.mapPromise(n,e).then(function(t){var h;return h=e.getScope(),h.$watch("idleAndZoomChanged",function(){return _.defer(o.gManager.draw)}),o=new r(n,u,f,t),i.link(n,o),n.control!=null&&(n.control.getGMarkers=function(){var n;if((n=o.gManager)!=null)return n.getGMarkers()},n.control.getChildMarkers=function(){return o.plurals}),_.last(o.existingPieces._content).then(function(){return s()})})},e}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var n;return n=function(n,t){if(n.control!=null)return n.control.updateModels=function(i){return n.models=i,t.createChildScopes(!1)},n.control.newModels=function(i){return n.models=i,t.rebuildAll(n,!0,!0)},n.control.clean=function(){return t.rebuildAll(n,!1,!0)},n.control.getPlurals=function(){return t.plurals},n.control.getManager=function(){return t.gManager},n.control.hasManager=function(){return t.gManager!=null==!0},n.control.managerDraw=function(){var t;if(n.control.hasManager())return(t=n.control.getManager())!=null?t.draw():void 0}},{extend:function(n,t){return _.extend(n.scope||{},t||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(t,i){return n(t,i)}}}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(t,r,u){return function(r){function f(){return this.link=n(this.link,this),f.__super__.constructor.apply(this,arguments)}return i(f,r),f.prototype.link=function(n,i,r,f){var e,o;return e=[],o=t.mapPromise(n,f),n.control!=null&&(n.control.getInstance=this,n.control.polygons=e,n.control.promise=o),o.then(function(t){return function(i){return e.push(new u({scope:n,attrs:r,gMap:i,defaults:t.DEFAULTS}))}}(this))},f}(t)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",function(r,u,f,e){return function(r){function u(){this.link=n(this.link,this);u.__super__.constructor.call(this);e.extend(this);this.$log.info(this)}return i(u,r),u.prototype.link=function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return function(o){return(t.isUndefined(n.path)||n.path===null)&&u.$log.warn("polygons: no valid path attribute found"),n.models||u.$log.warn("polygons: no models found to create from"),e.link(n,new f(n,i,r,o,u.DEFAULTS))}}(this))},u}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(r,u,f){return function(u){function e(){return this.link=n(this.link,this),e.__super__.constructor.apply(this,arguments)}return i(e,u),e.prototype.link=function(n,i,u,e){return r.mapPromise(n,e).then(function(i){return function(r){return(t.isUndefined(n.path)||n.path===null||!i.validatePath(n.path))&&i.$log.warn("polyline: no valid path attribute found"),new f({scope:n,attrs:u,gMap:r,defaults:i.DEFAULTS})}}(this))},e}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(r,u,f,e){return function(r){function u(){this.link=n(this.link,this);u.__super__.constructor.call(this);e.extend(this);this.$log.info(this)}return i(u,r),u.prototype.link=function(n,i,r,u){return u.getScope().deferred.promise.then(function(u){return function(o){return(t.isUndefined(n.path)||n.path===null)&&u.$log.warn("polylines: no valid path attribute found"),n.models||u.$log.warn("polylines: no models found to create from"),e.link(n,new f(n,i,r,o,u.DEFAULTS))}}(this))},u}(r)}])}.call(this),function(){t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(n,t,i,r){return _.extend(i,{link:function(n,t,i,u){return u.getScope().deferred.promise.then(function(u){return new r(n,t,i,u)})}})}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(r,u,f,e,o){return function(s){function h(){this.link=n(this.link,this);h.__super__.constructor.call(this);this.require=["^uiGmapGoogleMap","^?uiGmapMarker"];this.template='<span class="angular-google-maps-window" ng-transclude><\/span>';o.debug(this);this.childWindows=[]}return i(h,s),h.include(u),h.prototype.link=function(n,i,u,f){var e,o;return e=f.length>1&&f[1]!=null?f[1]:void 0,o=e!=null?e.getScope():void 0,this.mapPromise=r.mapPromise(n,f[0]),this.mapPromise.then(function(r){return function(f){var s;if(s=!0,t.isDefined(u.isiconvisibleonclick)&&(s=n.isIconVisibleOnClick),!e){r.init(n,i,s,f);return}return o.deferred.promise.then(function(){return r.init(n,i,s,f,o)})}}(this))},h.prototype.init=function(n,t,i,r,u){var o,s,h,c,l;if(s=n.options!=null?n.options:{},c=n!=null&&this.validateCoords(n.coords),(u!=null?u.getGMarker:void 0)!=null&&(h=u.getGMarker()),l=c?this.createWindowOptions(h,n,t.html(),s):s,r!=null&&(o=new f({scope:n,opts:l,isIconVisibleOnClick:i,gMap:r,markerScope:u,element:t}),this.childWindows.push(o),n.$on("$destroy",function(n){return function(){return n.childWindows=e.withoutObjects(n.childWindows,[o],function(n,t){return n.scope.$id===t.scope.$id}),n.childWindows.length=0}}(this))),n.control!=null&&(n.control.getGWindows=function(n){return function(){return n.childWindows.map(function(n){return n.gObject})}}(this),n.control.getChildWindows=function(n){return function(){return n.childWindows}}(this),n.control.getPlurals=n.control.getChildWindows,n.control.showWindow=function(n){return function(){return n.childWindows.map(function(n){return n.showWindow()})}}(this),n.control.hideWindow=function(n){return function(){return n.childWindows.map(function(n){return n.hideWindow()})}}(this)),this.onChildCreation!=null&&o!=null)return this.onChildCreation(o)},h}(r)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}},i=function(n,t){function u(){this.constructor=n}for(var i in t)r.call(t,i)&&(n[i]=t[i]);return u.prototype=t.prototype,n.prototype=new u,n.__super__=t.prototype,n},r={}.hasOwnProperty;t.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(t,r,u,f,e){return function(t){function o(){this.link=n(this.link,this);o.__super__.constructor.call(this);this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"];this.template='<span class="angular-google-maps-windows" ng-transclude><\/span>';r.extend(this);e.debug(this)}return i(o,t),o.prototype.link=function(n,t,i,r){var o,e,u;return o=r[0].getScope(),e=r.length>1&&r[1]!=null?r[1]:void 0,u=e!=null?e.getScope():void 0,o.deferred.promise.then(function(e){return function(o){var s,h;return s=(u!=null?(h=u.deferred)!=null?h.promise:void 0:void 0)||f.resolve(),s.then(function(){var f,s;return f=(s=e.parentModel)!=null?s.existingPieces:void 0,f?f.then(function(){return e.init(n,t,i,r,o,u)}):e.init(n,t,i,r,o,u)})}}(this))},o.prototype.init=function(n,t,i,f,e,o){var s;return s=new u(n,t,i,f,e,o),r.link(n,s),n.control!=null?(n.control.getGWindows=function(){return s.plurals.map(function(n){return n.gObject})},n.control.getChildWindows=function(){return s.plurals}):void 0},o}(t)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(n,t){return new t(n)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(n,t){return new t(n)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(n,t){return t}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(n,t,i,r,u){return new u(n,t,i,r)}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(n,t,i,r,u,f){return new f(n,t,i,r,u)}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(t,i,r){var u;return u=function(){function t(){this.link=n(this.link,this);this.$log=i;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template="<span class='angular-google-map-layer' ng-transclude><\/span>";this.replace=!0;this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return t.prototype.link=function(n,t,i,u){return u.getScope().deferred.promise.then(function(){return function(u){return n.onCreated!=null?new r(n,t,i,u,n.onCreated):new r(n,t,i,u)}}(this))},t}(),new u}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(n){return new n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(n){return n}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(n){return new n}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(t,i,r){var u;return u=function(){function t(){this.link=n(this.link,this);this.$log=i;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template='<span class="angular-google-map-layer" ng-transclude><\/span>';this.replace=!0;this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return t.prototype.link=function(n,t,i,u){return u.getScope().deferred.promise.then(function(){return function(u){return new r(n,t,i,u)}}(this))},t}(),new u}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(n){return new n}])}.call(this),function(){var n=function(n,t){return function(){return n.apply(t,arguments)}};t.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(i,r,u,f,e,o){var s;return s=function(){function s(){this.link=n(this.link,this);this.$log=r;this.restrict="EMA";this.require="^uiGmapGoogleMap";this.priority=-1;this.transclude=!0;this.template="<span class='angular-google-map-search' ng-transclude><\/span>";this.replace=!0;this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return s.prototype.require="ngModel",s.prototype.link=function(n,r,s,h){return i.then(function(i){return function(c){return n.template==null&&(e.put("uigmap-searchbox-default.tpl.html",'<input type="text">'),n.template="uigmap-searchbox-default.tpl.html"),f.get(n.template,{cache:e}).success(function(f){if(t.isUndefined(n.events)){i.$log.error("searchBox: the events property is required");return}return h.getScope().deferred.promise.then(function(e){var h;if(h=t.isDefined(n.position)?n.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",!c.ControlPosition[h]){i.$log.error("searchBox: invalid position property");return}return new u(n,r,s,e,h,o(f)(n))})})}}(this))},s}(),new s}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(n,i){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(r,u){var e,o,f;return e=function(t,i){return n[t](u,"ng-hide").then(function(){return i()})},o=function(t,i){return n[t](u,"ng-hide",i)},f=function(n,r){return t.version.major>1?i.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+t.version.major+'"'):t.version.major===1&&t.version.minor<3?o(n,r):e(n,r)},r.$watch("uiGmapShow",function(n){return n&&f("removeClass",r.uiGmapAfterShow),n?void 0:f("addClass",r.uiGmapAfterHide)})}}}])}.call(this),function(){t.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(n,i,r,u){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'<div class="angular-google-map-street-view-panorama"><\/div>',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(e,o){return n.then(function(){return function(){var a,v,c,y,w,p,s,h,l,n;return h=void 0,n=void 0,c=!1,p=void 0,s=null,l=null,a=function(){return u.removeEvents(p),h!=null&&(h.unbind("position"),h.setVisible(!1)),n!=null?((n!=null?n.setVisible:void 0)!=null&&n.setVisible(!1),n=void 0):void 0},w=function(n,i){var r;return r=google.maps.geometry.spherical.computeHeading(n,i),c=!0,e.radius=e.radius||50,l=t.extend({heading:r,zoom:1,pitch:0},e.povoptions||{}),s=s=t.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:n,pov:l,visible:!0},e.options||{}),c=!1},v=function(){var t;if(!e.focalcoord){i.error(f+": focalCoord needs to be defined");return}if(!e.radius){i.error(f+": needs a radius to set the camera view from its focal target.");return}return a(),n==null&&(n=new google.maps.StreetViewService),e.events&&(p=u.setEvents(n,e,e)),t=r.getCoords(e.focalcoord),n.getPanoramaByLocation(t,e.radius,function(i,r){var u,f,c;return e.imagestatus!=null&&(e.imagestatus=r),((c=e.events)!=null?c.image_status_changed:void 0)!=null&&e.events.image_status_changed(n,"image_status_changed",e,r),r==="OK"?(f=i.location.latLng,w(f,t),u=o[0],h=new google.maps.StreetViewPanorama(u,s)):void 0})},e.control!=null&&(e.control.getOptions=function(){return s},e.control.getPovOptions=function(){return l},e.control.getGObject=function(){return n},e.control.getGPano=function(){return h}),e.$watch("options",function(n,t){if(n!==t&&n!==s&&!c)return v()}),y=!0,e.$watch("focalcoord",function(n,t){if(n!==t||y)return n==null?void 0:(y=!1,v())}),e.$on("$destroy",function(){return a()})}}(this))}}}])}.call(this);t.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function n(){}return n.generate=function(){var t=n._gri,i=n._ha;return i(t(32),8)+"-"+i(t(16),4)+"-"+i(16384|t(12),4)+"-"+i(32768|t(14),4)+"-"+i(t(48),12)},n._gri=function(n){return 0>n?NaN:30>=n?0|Math.random()*(1<<n):53>=n?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<n-30)):NaN},n._ha=function(n,t){for(var i=n.toString(16),r=t-i.length,u="0";0<r;r>>>=1,u+=u)r&1&&(i=u+i);return i},n});t.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:_.once(function(){+function(){function u(n){n=n||{};google.maps.OverlayView.apply(this,arguments);this.content_=n.content||"";this.disableAutoPan_=n.disableAutoPan||!1;this.maxWidth_=n.maxWidth||0;this.pixelOffset_=n.pixelOffset||new google.maps.Size(0,0);this.position_=n.position||new google.maps.LatLng(0,0);this.zIndex_=n.zIndex||null;this.boxClass_=n.boxClass||"infoBox";this.boxStyle_=n.boxStyle||{};this.closeBoxMargin_=n.closeBoxMargin||"2px";this.closeBoxURL_=n.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif";n.closeBoxURL===""&&(this.closeBoxURL_="");this.infoBoxClearance_=n.infoBoxClearance||new google.maps.Size(1,1);typeof n.visible=="undefined"&&(n.visible=typeof n.isHidden=="undefined"?!0:!n.isHidden);this.isHidden_=!n.visible;this.alignBottom_=n.alignBottom||!1;this.pane_=n.pane||"floatPane";this.enableEventPropagation_=n.enableEventPropagation||!1;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null}function o(n,t){n.getMarkerClusterer().extend(o,google.maps.OverlayView);this.cluster_=n;this.className_=n.getMarkerClusterer().getClusterClass();this.styles_=t;this.center_=null;this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(n.getMap())}function e(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinimumClusterSize();this.averageCenter_=n.getAverageCenter();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new o(this,n.getStyles())}function r(n,t,u){this.extend(r,google.maps.OverlayView);t=t||[];u=u||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=!1;this.gridSize_=u.gridSize||60;this.minClusterSize_=u.minimumClusterSize||2;this.maxZoom_=u.maxZoom||null;this.styles_=u.styles||[];this.title_=u.title||"";this.zoomOnClick_=!0;u.zoomOnClick!==i&&(this.zoomOnClick_=u.zoomOnClick);this.averageCenter_=!1;u.averageCenter!==i&&(this.averageCenter_=u.averageCenter);this.ignoreHidden_=!1;u.ignoreHidden!==i&&(this.ignoreHidden_=u.ignoreHidden);this.enableRetinaIcons_=!1;u.enableRetinaIcons!==i&&(this.enableRetinaIcons_=u.enableRetinaIcons);this.imagePath_=u.imagePath||r.IMAGE_PATH;this.imageExtension_=u.imageExtension||r.IMAGE_EXTENSION;this.imageSizes_=u.imageSizes||r.IMAGE_SIZES;this.calculator_=u.calculator||r.CALCULATOR;this.batchSize_=u.batchSize||r.BATCH_SIZE;this.batchSizeIE_=u.batchSizeIE||r.BATCH_SIZE_IE;this.clusterClass_=u.clusterClass||"cluster";navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize_=this.batchSizeIE_);this.setupStyles_();this.addMarkers(t,!0);this.setMap(n)}function c(n,t){function i(){}i.prototype=t.prototype;n.superClass_=t.prototype;n.prototype=new i;n.prototype.constructor=n}function f(n,t){this.marker_=n;this.handCursorURL_=n.handCursorURL;this.labelDiv_=document.createElement("div");this.labelDiv_.style.cssText="position: absolute; overflow: hidden;";this.eventDiv_=document.createElement("div");this.eventDiv_.style.cssText=this.labelDiv_.style.cssText;this.eventDiv_.setAttribute("onselectstart","return false;");this.eventDiv_.setAttribute("ondragstart","return false;");this.crossDiv_=f.getSharedCross(t)}function h(n){n=n||{};n.labelContent=n.labelContent||"";n.labelAnchor=n.labelAnchor||new google.maps.Point(0,0);n.labelClass=n.labelClass||"markerLabels";n.labelStyle=n.labelStyle||{};n.labelInBackground=n.labelInBackground||!1;typeof n.labelVisible=="undefined"&&(n.labelVisible=!0);typeof n.raiseOnDrag=="undefined"&&(n.raiseOnDrag=!0);typeof n.clickable=="undefined"&&(n.clickable=!0);typeof n.draggable=="undefined"&&(n.draggable=!1);typeof n.optimized=="undefined"&&(n.optimized=!1);n.crossImage=n.crossImage||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png";n.handCursor=n.handCursor||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur";n.optimized=!1;this.label=new f(this,n.crossImage,n.handCursor);google.maps.Marker.apply(this,arguments)}function t(n){var t=n||{};this.ready_=!1;this.dragging_=!1;n.visible==i&&(n.visible=!0);n.shadow==i&&(n.shadow="7px -3px 5px rgba(88,88,88,0.7)");n.anchor==i&&(n.anchor=s.BOTTOM);this.setValues(t)}u.prototype=new google.maps.OverlayView;u.prototype.createInfoBoxDiv_=function(){var n,t,i,u=this,r=function(n){n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()},f=function(n){n.returnValue=!1;n.preventDefault&&n.preventDefault();u.enableEventPropagation_||r(n)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),typeof this.content_.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:this.maxWidth_!==0&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(i=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-i.left-i.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],t=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],n=0;n<t.length;n++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,t[n],r));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,"mouseover",function(){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",f);google.maps.event.trigger(this,"domready")}};u.prototype.getCloseBoxImg_=function(){var n="";return this.closeBoxURL_!==""&&(n="<img",n+=" src='"+this.closeBoxURL_+"'",n+=" align=right",n+=" style='",n+=" position: relative;",n+=" cursor: pointer;",n+=" margin: "+this.closeBoxMargin_+";",n+="'>"),n};u.prototype.addClickHandler_=function(){var n;this.closeBoxURL_!==""?(n=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(n,"click",this.getCloseClickHandler_())):this.closeListener_=null};u.prototype.getCloseClickHandler_=function(){var n=this;return function(t){t.cancelBubble=!0;t.stopPropagation&&t.stopPropagation();google.maps.event.trigger(n,"closeclick");n.close()}};u.prototype.panBox_=function(n){var i,y,e=0,f=0,p;if(!n&&(i=this.getMap(),i instanceof google.maps.Map)){i.getBounds().contains(this.position_)||i.setCenter(this.position_);y=i.getBounds();var l=i.getDiv(),a=l.offsetWidth,o=l.offsetHeight,s=this.pixelOffset_.width,r=this.pixelOffset_.height,v=this.div_.offsetWidth,h=this.div_.offsetHeight,c=this.infoBoxClearance_.width,u=this.infoBoxClearance_.height,t=this.getProjection().fromLatLngToContainerPixel(this.position_);t.x<-s+c?e=t.x+s-c:t.x+v+s+c>a&&(e=t.x+v+s+c-a);this.alignBottom_?t.y<-r+u+h?f=t.y+r-u-h:t.y+r+u>o&&(f=t.y+r+u-o):t.y<-r+u?f=t.y+r-u:t.y+h+r+u>o&&(f=t.y+h+r+u-o);e===0&&f===0||(p=i.getCenter(),i.panBy(e,f))}};u.prototype.setBoxStyle_=function(){var n,t;if(this.div_){this.div_.className=this.boxClass_;this.div_.style.cssText="";t=this.boxStyle_;for(n in t)t.hasOwnProperty(n)&&(this.div_.style[n]=t[n]);this.div_.style.WebkitTransform="translateZ(0)";typeof this.div_.style.opacity!="undefined"&&this.div_.style.opacity!==""&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+this.div_.style.opacity*100+')"',this.div_.style.filter="alpha(opacity="+this.div_.style.opacity*100+")");this.div_.style.position="absolute";this.div_.style.visibility="hidden";this.zIndex_!==null&&(this.div_.style.zIndex=this.zIndex_)}};u.prototype.getBoxWidths_=function(){var i,n={top:0,bottom:0,left:0,right:0},t=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(i=t.ownerDocument.defaultView.getComputedStyle(t,""),i&&(n.top=parseInt(i.borderTopWidth,10)||0,n.bottom=parseInt(i.borderBottomWidth,10)||0,n.left=parseInt(i.borderLeftWidth,10)||0,n.right=parseInt(i.borderRightWidth,10)||0)):document.documentElement.currentStyle&&t.currentStyle&&(n.top=parseInt(t.currentStyle.borderTopWidth,10)||0,n.bottom=parseInt(t.currentStyle.borderBottomWidth,10)||0,n.left=parseInt(t.currentStyle.borderLeftWidth,10)||0,n.right=parseInt(t.currentStyle.borderRightWidth,10)||0),n};u.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)};u.prototype.draw=function(){this.createInfoBoxDiv_();var n=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=n.x+this.pixelOffset_.width+"px";this.alignBottom_?this.div_.style.bottom=-(n.y+this.pixelOffset_.height)+"px":this.div_.style.top=n.y+this.pixelOffset_.height+"px";this.div_.style.visibility=this.isHidden_?"hidden":"visible"};u.prototype.setOptions=function(n){typeof n.boxClass!="undefined"&&(this.boxClass_=n.boxClass,this.setBoxStyle_());typeof n.boxStyle!="undefined"&&(this.boxStyle_=n.boxStyle,this.setBoxStyle_());typeof n.content!="undefined"&&this.setContent(n.content);typeof n.disableAutoPan!="undefined"&&(this.disableAutoPan_=n.disableAutoPan);typeof n.maxWidth!="undefined"&&(this.maxWidth_=n.maxWidth);typeof n.pixelOffset!="undefined"&&(this.pixelOffset_=n.pixelOffset);typeof n.alignBottom!="undefined"&&(this.alignBottom_=n.alignBottom);typeof n.position!="undefined"&&this.setPosition(n.position);typeof n.zIndex!="undefined"&&this.setZIndex(n.zIndex);typeof n.closeBoxMargin!="undefined"&&(this.closeBoxMargin_=n.closeBoxMargin);typeof n.closeBoxURL!="undefined"&&(this.closeBoxURL_=n.closeBoxURL);typeof n.infoBoxClearance!="undefined"&&(this.infoBoxClearance_=n.infoBoxClearance);typeof n.isHidden!="undefined"&&(this.isHidden_=n.isHidden);typeof n.visible!="undefined"&&(this.isHidden_=!n.visible);typeof n.enableEventPropagation!="undefined"&&(this.enableEventPropagation_=n.enableEventPropagation);this.div_&&this.draw()};u.prototype.setContent=function(n){this.content_=n;this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),typeof n.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+n:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(n)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px",typeof n.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+n:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(n))),this.addClickHandler_());google.maps.event.trigger(this,"content_changed")};u.prototype.setPosition=function(n){this.position_=n;this.div_&&this.draw();google.maps.event.trigger(this,"position_changed")};u.prototype.setZIndex=function(n){this.zIndex_=n;this.div_&&(this.div_.style.zIndex=n);google.maps.event.trigger(this,"zindex_changed")};u.prototype.setVisible=function(n){this.isHidden_=!n;this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")};u.prototype.getContent=function(){return this.content_};u.prototype.getPosition=function(){return this.position_};u.prototype.getZIndex=function(){return this.zIndex_};u.prototype.getVisible=function(){return typeof this.getMap()=="undefined"||this.getMap()===null?!1:!this.isHidden_};u.prototype.show=function(){this.isHidden_=!1;this.div_&&(this.div_.style.visibility="visible")};u.prototype.hide=function(){this.isHidden_=!0;this.div_&&(this.div_.style.visibility="hidden")};u.prototype.open=function(n,t){var i=this;t&&(this.position_=t.getPosition(),this.moveListener_=google.maps.event.addListener(t,"position_changed",function(){i.setPosition(this.getPosition())}));this.setMap(n);this.div_&&this.panBox_()};u.prototype.close=function(){var n;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(n=0;n<this.eventListeners_.length;n++)google.maps.event.removeListener(this.eventListeners_[n]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null);this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),this.contextListener_=null);this.setMap(null)},function(){function t(n,t){var r=this,i=new google.maps.OverlayView;i.onAdd=function(){r.init_(n,t)};i.draw=function(){};i.onRemove=function(){};i.setMap(n);this.prjov_=i}var r=function(n){var t;switch(n){case"thin":t="2px";break;case"medium":t="4px";break;case"thick":t="6px";break;default:t=n}return t},o=function(n){var i,t={};if(document.defaultView&&document.defaultView.getComputedStyle){if(i=n.ownerDocument.defaultView.getComputedStyle(n,""),i)return t.top=parseInt(i.borderTopWidth,10)||0,t.bottom=parseInt(i.borderBottomWidth,10)||0,t.left=parseInt(i.borderLeftWidth,10)||0,t.right=parseInt(i.borderRightWidth,10)||0,t}else if(document.documentElement.currentStyle&&n.currentStyle)return t.top=parseInt(r(n.currentStyle.borderTopWidth),10)||0,t.bottom=parseInt(r(n.currentStyle.borderBottomWidth),10)||0,t.left=parseInt(r(n.currentStyle.borderLeftWidth),10)||0,t.right=parseInt(r(n.currentStyle.borderRightWidth),10)||0,t;return t.top=parseInt(n.style["border-top-width"],10)||0,t.bottom=parseInt(n.style["border-bottom-width"],10)||0,t.left=parseInt(n.style["border-left-width"],10)||0,t.right=parseInt(n.style["border-right-width"],10)||0,t},u={x:0,y:0},s=function(){u.x=typeof document.documentElement.scrollLeft!="undefined"?document.documentElement.scrollLeft:document.body.scrollLeft;u.y=typeof document.documentElement.scrollTop!="undefined"?document.documentElement.scrollTop:document.body.scrollTop};s();var h=function(t){var i=0,r=0;return t=t||n.event,typeof t.pageX!="undefined"?(i=t.pageX,r=t.pageY):typeof t.clientX!="undefined"&&(i=t.clientX+u.x,r=t.clientY+u.y),{left:i,top:r}},f=function(t){for(var f=t.offsetLeft,e=t.offsetTop,i=t.offsetParent,u,h;i!==null;){i!==document.body&&i!==document.documentElement&&(f-=i.scrollLeft,e-=i.scrollTop);var r=i,o=r.offsetLeft,s=r.offsetTop;o||s||!n.getComputedStyle||(u=document.defaultView.getComputedStyle(r,null).MozTransform||document.defaultView.getComputedStyle(r,null).WebkitTransform,u&&typeof u=="string"&&(h=u.split(","),o+=parseInt(h[4],10)||0,s+=parseInt(h[5],10)||0));f+=o;e+=s;i=i.offsetParent}return{left:f,top:e}},i=function(n,t){if(n&&t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},e=function(n,t){typeof t!="undefined"&&(n.style.opacity=t);typeof n.style.opacity!="undefined"&&n.style.opacity!==""&&(n.style.filter="alpha(opacity="+n.style.opacity*100+")")};t.prototype.init_=function(t,r){var u,f=this;for(this.map_=t,r=r||{},this.key_=r.key||"shift",this.key_=this.key_.toLowerCase(),this.borderWidths_=o(this.map_.getDiv()),this.veilDiv_=[],u=0;u<4;u++)this.veilDiv_[u]=document.createElement("div"),this.veilDiv_[u].onselectstart=function(){return!1},i(this.veilDiv_[u].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[u].style,r.paneStyle),i(this.veilDiv_[u].style,r.veilStyle),i(this.veilDiv_[u].style,{position:"absolute",overflow:"hidden",display:"none"}),this.key_==="shift"&&(this.veilDiv_[u].style.MozUserSelect="none"),e(this.veilDiv_[u]),this.veilDiv_[u].style.backgroundColor==="transparent"&&(this.veilDiv_[u].style.backgroundColor="white",e(this.veilDiv_[u],0)),this.map_.getDiv().appendChild(this.veilDiv_[u]);this.noZoom_=r.noZoom||!1;this.visualEnabled_=r.visualEnabled||!1;this.visualClass_=r.visualClass||"";this.visualPosition_=r.visualPosition||google.maps.ControlPosition.LEFT_TOP;this.visualPositionOffset_=r.visualPositionOffset||new google.maps.Size(35,0);this.visualPositionIndex_=r.visualPositionIndex||null;this.visualSprite_=r.visualSprite||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png";this.visualSize_=r.visualSize||new google.maps.Size(20,20);this.visualTips_=r.visualTips||{};this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode";this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode";this.boxDiv_=document.createElement("div");i(this.boxDiv_.style,{border:"4px solid #736AFF"});i(this.boxDiv_.style,r.boxStyle);i(this.boxDiv_.style,{position:"absolute",display:"none"});e(this.boxDiv_);this.map_.getDiv().appendChild(this.boxDiv_);this.boxBorderWidths_=o(this.boxDiv_);this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(n){f.onKeyDown_(n)}),google.maps.event.addDomListener(document,"keyup",function(n){f.onKeyUp_(n)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(n){f.onMouseDown_(n)}),google.maps.event.addDomListener(document,"mousedown",function(n){f.onMouseDownDocument_(n)}),google.maps.event.addDomListener(document,"mousemove",function(n){f.onMouseMove_(n)}),google.maps.event.addDomListener(document,"mouseup",function(n){f.onMouseUp_(n)}),google.maps.event.addDomListener(n,"scroll",s)];this.hotKeyDown_=!1;this.mouseDown_=!1;this.dragging_=!1;this.startPt_=null;this.endPt_=null;this.mapWidth_=null;this.mapHeight_=null;this.mousePosn_=null;this.mapPosn_=null;this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),this.visualPositionIndex_!==null&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)};t.prototype.initControl_=function(n){var r,u,t=this;return r=document.createElement("div"),r.className=this.visualClass_,r.style.position="relative",r.style.overflow="hidden",r.style.height=this.visualSize_.height+"px",r.style.width=this.visualSize_.width+"px",r.title=this.visualTips_.off,u=document.createElement("img"),u.src=this.visualSprite_,u.style.position="absolute",u.style.left=-(this.visualSize_.width*2)+"px",u.style.top="0px",r.appendChild(u),r.onclick=function(n){t.hotKeyDown_=!t.hotKeyDown_;t.hotKeyDown_?(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*0)+"px",t.buttonDiv_.title=t.visualTips_.on,t.activatedByControl_=!0,google.maps.event.trigger(t,"activate")):(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*2)+"px",t.buttonDiv_.title=t.visualTips_.off,google.maps.event.trigger(t,"deactivate"));t.onMouseMove_(n)},r.onmouseover=function(){t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*1)+"px"},r.onmouseout=function(){t.hotKeyDown_?(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*0)+"px",t.buttonDiv_.title=t.visualTips_.on):(t.buttonDiv_.firstChild.style.left=-(t.visualSize_.width*2)+"px",t.buttonDiv_.title=t.visualTips_.off)},r.ondragstart=function(){return!1},i(r.style,{cursor:"pointer",marginTop:n.height+"px",marginLeft:n.width+"px"}),r};t.prototype.isHotKeyDown_=function(t){var i;if(t=t||n.event,i=t.shiftKey&&this.key_==="shift"||t.altKey&&this.key_==="alt"||t.ctrlKey&&this.key_==="ctrl",!i)switch(t.keyCode){case 16:this.key_==="shift"&&(i=!0);break;case 17:this.key_==="ctrl"&&(i=!0);break;case 18:this.key_==="alt"&&(i=!0)}return i};t.prototype.isMouseOnMap_=function(){var n=this.mousePosn_,t,i;return n?(t=this.mapPosn_,i=this.map_.getDiv(),n.left>t.left&&n.left<t.left+i.offsetWidth&&n.top>t.top&&n.top<t.top+i.offsetHeight):!1};t.prototype.setVeilVisibility_=function(){var n,r;if(this.map_&&this.hotKeyDown_&&this.isMouseOnMap_())if(r=this.map_.getDiv(),this.mapWidth_=r.offsetWidth-(this.borderWidths_.left+this.borderWidths_.right),this.mapHeight_=r.offsetHeight-(this.borderWidths_.top+this.borderWidths_.bottom),this.activatedByControl_){var t=parseInt(this.buttonDiv_.style.left,10)+this.visualPositionOffset_.width,u=parseInt(this.buttonDiv_.style.top,10)+this.visualPositionOffset_.height,i=this.visualSize_.width,f=this.visualSize_.height;for(this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=t+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=t+i+"px",this.veilDiv_[1].style.width=this.mapWidth_-(t+i)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=t+"px",this.veilDiv_[2].style.width=i+"px",this.veilDiv_[2].style.height=u+"px",this.veilDiv_[3].style.top=u+f+"px",this.veilDiv_[3].style.left=t+"px",this.veilDiv_[3].style.width=i+"px",this.veilDiv_[3].style.height=this.mapHeight_-(u+f)+"px",n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="block"}else{for(this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.width=this.mapWidth_+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",n=1;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.width="0px",this.veilDiv_[n].style.height="0px";for(n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="block"}else for(n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="none"};t.prototype.onKeyDown_=function(n){this.map_&&!this.hotKeyDown_&&this.isHotKeyDown_(n)&&(this.mapPosn_=f(this.map_.getDiv()),this.hotKeyDown_=!0,this.activatedByControl_=!1,this.setVeilVisibility_(),google.maps.event.trigger(this,"activate"))};t.prototype.getMousePoint_=function(n){var i=h(n),t=new google.maps.Point;return t.x=i.left-this.mapPosn_.left-this.borderWidths_.left,t.y=i.top-this.mapPosn_.top-this.borderWidths_.top,t.x=Math.min(t.x,this.mapWidth_),t.y=Math.min(t.y,this.mapHeight_),t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t};t.prototype.onMouseDown_=function(n){if(this.map_&&this.hotKeyDown_){this.mapPosn_=f(this.map_.getDiv());this.dragging_=!0;this.startPt_=this.endPt_=this.getMousePoint_(n);this.boxDiv_.style.width=this.boxDiv_.style.height="0px";var t=this.prjov_.getProjection(),i=t.fromContainerPixelToLatLng(this.startPt_);google.maps.event.trigger(this,"dragstart",i)}};t.prototype.onMouseDownDocument_=function(){this.mouseDown_=!0};t.prototype.onMouseMove_=function(n){if(this.mousePosn_=h(n),this.dragging_){this.endPt_=this.getMousePoint_(n);var t=Math.min(this.startPt_.x,this.endPt_.x),i=Math.min(this.startPt_.y,this.endPt_.y),r=Math.abs(this.startPt_.x-this.endPt_.x),u=Math.abs(this.startPt_.y-this.endPt_.y),e=Math.max(0,r-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)),o=Math.max(0,u-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom));this.veilDiv_[0].style.top="0px";this.veilDiv_[0].style.left="0px";this.veilDiv_[0].style.width=t+"px";this.veilDiv_[0].style.height=this.mapHeight_+"px";this.veilDiv_[1].style.top="0px";this.veilDiv_[1].style.left=t+r+"px";this.veilDiv_[1].style.width=this.mapWidth_-(t+r)+"px";this.veilDiv_[1].style.height=this.mapHeight_+"px";this.veilDiv_[2].style.top="0px";this.veilDiv_[2].style.left=t+"px";this.veilDiv_[2].style.width=r+"px";this.veilDiv_[2].style.height=i+"px";this.veilDiv_[3].style.top=i+u+"px";this.veilDiv_[3].style.left=t+"px";this.veilDiv_[3].style.width=r+"px";this.veilDiv_[3].style.height=this.mapHeight_-(i+u)+"px";this.boxDiv_.style.top=i+"px";this.boxDiv_.style.left=t+"px";this.boxDiv_.style.width=e+"px";this.boxDiv_.style.height=o+"px";this.boxDiv_.style.display="block";google.maps.event.trigger(this,"drag",new google.maps.Point(t,i+u),new google.maps.Point(t+r,i),this.prjov_.getProjection())}else this.mouseDown_||(this.mapPosn_=f(this.map_.getDiv()),this.setVeilVisibility_())};t.prototype.onMouseUp_=function(n){var u,l=this,t,i;if(this.mouseDown_=!1,this.dragging_){if(this.getMousePoint_(n).x===this.startPt_.x&&this.getMousePoint_(n).y===this.startPt_.y){this.onKeyUp_(n);return}var f=Math.min(this.startPt_.x,this.endPt_.x),e=Math.min(this.startPt_.y,this.endPt_.y),a=Math.abs(this.startPt_.x-this.endPt_.x),v=Math.abs(this.startPt_.y-this.endPt_.y),o=!0;o&&(f+=this.borderWidths_.left,e+=this.borderWidths_.top);var r=this.prjov_.getProjection(),s=r.fromContainerPixelToLatLng(new google.maps.Point(f,e+v)),h=r.fromContainerPixelToLatLng(new google.maps.Point(f+a,e)),c=new google.maps.LatLngBounds(s,h);this.noZoom_?this.boxDiv_.style.display="none":(u=this.map_.getZoom(),this.map_.fitBounds(c),this.map_.getZoom()<u&&this.map_.setZoom(u),t=r.fromLatLngToContainerPixel(s),i=r.fromLatLngToContainerPixel(h),o&&(t.x-=this.borderWidths_.left,t.y-=this.borderWidths_.top,i.x-=this.borderWidths_.left,i.y-=this.borderWidths_.top),this.boxDiv_.style.left=t.x+"px",this.boxDiv_.style.top=i.y+"px",this.boxDiv_.style.width=Math.abs(i.x-t.x)-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)+"px",this.boxDiv_.style.height=Math.abs(i.y-t.y)-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom)+"px",setTimeout(function(){l.boxDiv_.style.display="none"},1e3));this.dragging_=!1;this.onMouseMove_(n);if(google.maps.event.trigger(this,"dragend",c),!this.isHotKeyDown_(n))this.onKeyUp_(n)}};t.prototype.onKeyUp_=function(){var n,t,i,u,f,r,e,o,s=null;if(this.map_&&this.hotKeyDown_){for(this.hotKeyDown_=!1,this.dragging_&&(this.boxDiv_.style.display="none",this.dragging_=!1,t=Math.min(this.startPt_.x,this.endPt_.x),i=Math.min(this.startPt_.y,this.endPt_.y),u=Math.abs(this.startPt_.x-this.endPt_.x),f=Math.abs(this.startPt_.y-this.endPt_.y),r=this.prjov_.getProjection(),e=r.fromContainerPixelToLatLng(new google.maps.Point(t,i+f)),o=r.fromContainerPixelToLatLng(new google.maps.Point(t+u,i)),s=new google.maps.LatLngBounds(e,o)),n=0;n<this.veilDiv_.length;n++)this.veilDiv_[n].style.display="none";this.visualEnabled_&&(this.buttonDiv_.firstChild.style.left=-(this.visualSize_.width*2)+"px",this.buttonDiv_.title=this.visualTips_.off,this.buttonDiv_.style.display="");google.maps.event.trigger(this,"deactivate",s)}};google.maps.Map.prototype.enableKeyDragZoom=function(n){this.dragZoom_=new t(this,n)};google.maps.Map.prototype.disableKeyDragZoom=function(){var t,n=this.dragZoom_;if(n){for(t=0;t<n.listeners_.length;++t)google.maps.event.removeListener(n.listeners_[t]);for(this.getDiv().removeChild(n.boxDiv_),t=0;t<n.veilDiv_.length;t++)this.getDiv().removeChild(n.veilDiv_[t]);n.visualEnabled_&&this.controls[n.visualPosition_].removeAt(n.controlIndex_);n.prjov_.setMap(null);this.dragZoom_=null}};google.maps.Map.prototype.keyDragZoomEnabled=function(){return this.dragZoom_!==null};google.maps.Map.prototype.getDragZoomObject=function(){return this.dragZoom_}}();o.prototype.onAdd=function(){var n=this,t,i;this.div_=document.createElement("div");this.div_.className=this.className_;this.visible_&&this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){i=t});google.maps.event.addDomListener(this.div_,"mousedown",function(){t=!0;i=!1});google.maps.event.addDomListener(this.div_,"click",function(r){if(t=!1,!i){var e,f,u=n.cluster_.getMarkerClusterer();google.maps.event.trigger(u,"click",n.cluster_);google.maps.event.trigger(u,"clusterclick",n.cluster_);u.getZoomOnClick()&&(f=u.getMaxZoom(),e=n.cluster_.getBounds(),u.getMap().fitBounds(e),setTimeout(function(){u.getMap().fitBounds(e);f!==null&&u.getMap().getZoom()>f&&u.getMap().setZoom(f+1)},100));r.cancelBubble=!0;r.stopPropagation&&r.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",n.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",n.cluster_)})};o.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)};o.prototype.draw=function(){if(this.visible_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.top=n.y+"px";this.div_.style.left=n.x+"px"}};o.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};o.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].trim(),10),i=parseInt(r[1].trim(),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";this.cluster_.getMarkerClusterer().enableRetinaIcons_||(n+="clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);");n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0};o.prototype.useStyle=function(n){var i,t;this.sums_=n;i=Math.max(0,n.index-1);i=Math.min(this.styles_.length-1,i);t=this.styles_[i];this.url_=t.url;this.height_=t.height;this.width_=t.width;this.anchorText_=t.anchorText||[0,0];this.anchorIcon_=t.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=t.textColor||"black";this.textSize_=t.textSize||11;this.textDecoration_=t.textDecoration||"none";this.fontWeight_=t.fontWeight||"bold";this.fontStyle_=t.fontStyle||"normal";this.fontFamily_=t.fontFamily||"Arial,sans-serif";this.backgroundPosition_=t.backgroundPosition||"0 0"};o.prototype.setCenter=function(n){this.center_=n};o.prototype.createCss=function(n){var t=[];return t.push("cursor: pointer;"),t.push("position: absolute; top: "+n.y+"px; left: "+n.x+"px;"),t.push("width: "+this.width_+"px; height: "+this.height_+"px;"),t.join("")};o.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return t.x-=this.anchorIcon_[1],t.y-=this.anchorIcon_[0],t.x=parseInt(t.x,10),t.y=parseInt(t.y,10),t};e.prototype.getSize=function(){return this.markers_.length};e.prototype.getMarkers=function(){return this.markers_};e.prototype.getCenter=function(){return this.center_};e.prototype.getMap=function(){return this.map_};e.prototype.getMarkerClusterer=function(){return this.markerClusterer_};e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),n=0;n<i.length;n++)t.extend(i[n].getPosition());return t};e.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};e.prototype.addMarker=function(n){var t,i,u;if(this.isMarkerAlreadyAdded_(n))return!1;if(this.center_){if(this.averageCenter_){var r=this.markers_.length+1,f=(this.center_.lat()*(r-1)+n.getPosition().lat())/r,e=(this.center_.lng()*(r-1)+n.getPosition().lng())/r;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,u=this.markerClusterer_.getMaxZoom(),u!==null&&this.map_.getZoom()>u)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i<this.minClusterSize_)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i===this.minClusterSize_)for(t=0;t<i;t++)this.markers_[t].setMap(null);else n.setMap(null);return this.updateIcon_(),!0};e.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};e.prototype.calculateBounds_=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};e.prototype.updateIcon_=function(){var r=this.markers_.length,n=this.markerClusterer_.getMaxZoom(),t,i;if(n!==null&&this.map_.getZoom()>n){this.clusterIcon_.hide();return}if(r<this.minClusterSize_){this.clusterIcon_.hide();return}t=this.markerClusterer_.getStyles().length;i=this.markerClusterer_.getCalculator()(this.markers_,t);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(i);this.clusterIcon_.show()};e.prototype.isMarkerAlreadyAdded_=function(n){var t;if(this.markers_.indexOf)return this.markers_.indexOf(n)!==-1;for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t])return!0;return!1};r.prototype.onAdd=function(){var n=this;this.activeMap_=this.getMap();this.ready_=!0;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){n.resetViewport_(!1);(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){n.redraw_()})]};r.prototype.onRemove=function(){for(var n=0;n<this.markers_.length;n++)this.markers_[n].getMap()!==this.activeMap_&&this.markers_[n].setMap(this.activeMap_);for(n=0;n<this.clusters_.length;n++)this.clusters_[n].remove();for(this.clusters_=[],n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n]);this.listeners_=[];this.activeMap_=null;this.ready_=!1};r.prototype.draw=function(){};r.prototype.setupStyles_=function(){var n,t;if(!(this.styles_.length>0))for(n=0;n<this.imageSizes_.length;n++)t=this.imageSizes_[n],this.styles_.push({url:this.imagePath_+(n+1)+"."+this.imageExtension_,height:t,width:t})};r.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),i=new google.maps.LatLngBounds,n=0;n<t.length;n++)i.extend(t[n].getPosition());this.getMap().fitBounds(i)};r.prototype.getGridSize=function(){return this.gridSize_};r.prototype.setGridSize=function(n){this.gridSize_=n};r.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};r.prototype.setMinimumClusterSize=function(n){this.minClusterSize_=n};r.prototype.getMaxZoom=function(){return this.maxZoom_};r.prototype.setMaxZoom=function(n){this.maxZoom_=n};r.prototype.getStyles=function(){return this.styles_};r.prototype.setStyles=function(n){this.styles_=n};r.prototype.getTitle=function(){return this.title_};r.prototype.setTitle=function(n){this.title_=n};r.prototype.getZoomOnClick=function(){return this.zoomOnClick_};r.prototype.setZoomOnClick=function(n){this.zoomOnClick_=n};r.prototype.getAverageCenter=function(){return this.averageCenter_};r.prototype.setAverageCenter=function(n){this.averageCenter_=n};r.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};r.prototype.setIgnoreHidden=function(n){this.ignoreHidden_=n};r.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};r.prototype.setEnableRetinaIcons=function(n){this.enableRetinaIcons_=n};r.prototype.getImageExtension=function(){return this.imageExtension_};r.prototype.setImageExtension=function(n){this.imageExtension_=n};r.prototype.getImagePath=function(){return this.imagePath_};r.prototype.setImagePath=function(n){this.imagePath_=n};r.prototype.getImageSizes=function(){return this.imageSizes_};r.prototype.setImageSizes=function(n){this.imageSizes_=n};r.prototype.getCalculator=function(){return this.calculator_};r.prototype.setCalculator=function(n){this.calculator_=n};r.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};r.prototype.setBatchSizeIE=function(n){this.batchSizeIE_=n};r.prototype.getClusterClass=function(){return this.clusterClass_};r.prototype.setClusterClass=function(n){this.clusterClass_=n};r.prototype.getMarkers=function(){return this.markers_};r.prototype.getTotalMarkers=function(){return this.markers_.length};r.prototype.getClusters=function(){return this.clusters_};r.prototype.getTotalClusters=function(){return this.clusters_.length};r.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw_()};r.prototype.addMarkers=function(n,t){var i;for(i in n)n.hasOwnProperty(i)&&this.pushMarkerTo_(n[i]);t||this.redraw_()};r.prototype.pushMarkerTo_=function(n){if(n.getDraggable()){var t=this;google.maps.event.addListener(n,"dragend",function(){t.ready_&&(this.isAdded=!1,t.repaint())})}n.isAdded=!1;this.markers_.push(n)};r.prototype.removeMarker=function(n,t){var i=this.removeMarker_(n);return!t&&i&&this.repaint(),i};r.prototype.removeMarkers=function(n,t){for(var u,r=!1,i=0;i<n.length;i++)u=this.removeMarker_(n[i]),r=r||u;return!t&&r&&this.repaint(),r};r.prototype.removeMarker_=function(n){var t,i=-1;if(this.markers_.indexOf)i=this.markers_.indexOf(n);else for(t=0;t<this.markers_.length;t++)if(n===this.markers_[t]){i=t;break}return i===-1?!1:(n.setMap(null),this.markers_.splice(i,1),!0)};r.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=[]};r.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_=[];this.resetViewport_(!1);this.redraw_();setTimeout(function(){for(var t=0;t<n.length;t++)n[t].remove()},0)};r.prototype.getExtendedBounds=function(n){var t=this.getProjection(),e=new google.maps.LatLng(n.getNorthEast().lat(),n.getNorthEast().lng()),o=new google.maps.LatLng(n.getSouthWest().lat(),n.getSouthWest().lng()),r=t.fromLatLngToDivPixel(e),i,u,f;return r.x+=this.gridSize_,r.y-=this.gridSize_,i=t.fromLatLngToDivPixel(o),i.x-=this.gridSize_,i.y+=this.gridSize_,u=t.fromDivPixelToLatLng(r),f=t.fromDivPixelToLatLng(i),n.extend(u),n.extend(f),n};r.prototype.redraw_=function(){this.createClusters_(0)};r.prototype.resetViewport_=function(n){for(var i,t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.markers_.length;t++)i=this.markers_[t],i.isAdded=!1,n&&i.setMap(null)};r.prototype.distanceBetweenPoints_=function(n,t){var i=(t.lat()-n.lat())*Math.PI/180,r=(t.lng()-n.lng())*Math.PI/180,u=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2),f=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*f};r.prototype.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};r.prototype.addToClosestCluster_=function(n){for(var u,t,f,o=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),u<o&&(o=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new e(this),t.addMarker(n),this.clusters_.push(t))};r.prototype.createClusters_=function(n){var i,t,u,e=this,f,r;if(this.ready_){for(n===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),u=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625)),f=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),i=n;i<r;i++)t=this.markers_[i],!t.isAdded&&this.isMarkerInBounds_(t,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&t.getVisible())&&this.addToClosestCluster_(t);r<this.markers_.length?this.timerRefStatic=setTimeout(function(){e.createClusters_(r)},0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}};r.prototype.extend=function(n,t){return function(n){var t;for(t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};r.CALCULATOR=function(n,t){for(var i=0,u=n.length.toString(),r=u;r!==0;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i,title:""}};r.BATCH_SIZE=2e3;r.BATCH_SIZE_IE=500;r.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";r.IMAGE_EXTENSION="png";r.IMAGE_SIZES=[53,56,66,78,90];c(f,google.maps.OverlayView);f.getSharedCross=function(n){var t;return typeof f.getSharedCross.crossDiv=="undefined"&&(t=document.createElement("img"),t.style.cssText="position: absolute; z-index: 1000002; display: none;",t.style.marginLeft="-8px",t.style.marginTop="-9px",t.src=n,f.getSharedCross.crossDiv=t),f.getSharedCross.crossDiv};f.prototype.onAdd=function(){var n=this,r=!1,t=!1,s,h,c,e,i,l,a,u=20,v="url("+this.handCursorURL_+")",o=function(n){n.preventDefault&&n.preventDefault();n.cancelBubble=!0;n.stopPropagation&&n.stopPropagation()},y=function(){n.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_);this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_);typeof f.getSharedCross.processed=="undefined"&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),f.getSharedCross.processed=!0);this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseover",t))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(i){(n.marker_.getDraggable()||n.marker_.getClickable())&&!t&&(this.style.cursor=n.marker_.getCursor(),google.maps.event.trigger(n.marker_,"mouseout",i))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(i){t=!1;n.marker_.getDraggable()&&(r=!0,this.style.cursor=v);(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"mousedown",i),o(i))}),google.maps.event.addDomListener(document,"mouseup",function(f){var o;if(r&&(r=!1,n.eventDiv_.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseup",f)),t){if(i){o=n.getProjection().fromLatLngToDivPixel(n.marker_.getPosition());o.y+=u;n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(o));try{n.marker_.setAnimation(google.maps.Animation.BOUNCE);setTimeout(y,1406)}catch(h){}}n.crossDiv_.style.display="none";n.marker_.setZIndex(s);e=!0;t=!1;f.latLng=n.marker_.getPosition();google.maps.event.trigger(n.marker_,"dragend",f)}}),google.maps.event.addListener(n.marker_.getMap(),"mousemove",function(f){var e;r&&(t?(f.latLng=new google.maps.LatLng(f.latLng.lat()-h,f.latLng.lng()-c),e=n.getProjection().fromLatLngToDivPixel(f.latLng),i&&(n.crossDiv_.style.left=e.x+"px",n.crossDiv_.style.top=e.y+"px",n.crossDiv_.style.display="",e.y-=u),n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(e)),i&&(n.eventDiv_.style.top=e.y+u+"px"),google.maps.event.trigger(n.marker_,"drag",f)):(h=f.latLng.lat()-n.marker_.getPosition().lat(),c=f.latLng.lng()-n.marker_.getPosition().lng(),s=n.marker_.getZIndex(),l=n.marker_.getPosition(),a=n.marker_.getMap().getCenter(),i=n.marker_.get("raiseOnDrag"),t=!0,n.marker_.setZIndex(1e6),f.latLng=n.marker_.getPosition(),google.maps.event.trigger(n.marker_,"dragstart",f)))}),google.maps.event.addDomListener(document,"keydown",function(r){t&&r.keyCode===27&&(i=!1,n.marker_.setPosition(l),n.marker_.getMap().setCenter(a),google.maps.event.trigger(document,"mouseup",r))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(e?e=!1:(google.maps.event.trigger(n.marker_,"click",t),o(t)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"dblclick",t),o(t))}),google.maps.event.addListener(this.marker_,"dragstart",function(){t||(i=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(){t||i&&(n.setPosition(u),n.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(){t||i&&n.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){n.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){n.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){n.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){n.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){n.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){n.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){n.setStyles()})]};f.prototype.onRemove=function(){var n;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n])};f.prototype.draw=function(){this.setContent();this.setTitle();this.setStyles()};f.prototype.setContent=function(){var n=this.marker_.get("labelContent");typeof n.nodeType=="undefined"?(this.labelDiv_.innerHTML=n,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(n),n=n.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(n))};f.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""};f.prototype.setStyles=function(){var n,t;this.labelDiv_.className=this.marker_.get("labelClass");this.eventDiv_.className=this.labelDiv_.className;this.labelDiv_.style.cssText="";this.eventDiv_.style.cssText="";t=this.marker_.get("labelStyle");for(n in t)t.hasOwnProperty(n)&&(this.labelDiv_.style[n]=t[n],this.eventDiv_.style[n]=t[n]);this.setMandatoryStyles()};f.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute";this.labelDiv_.style.overflow="hidden";typeof this.labelDiv_.style.opacity!="undefined"&&this.labelDiv_.style.opacity!==""&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity='+this.labelDiv_.style.opacity*100+')"',this.labelDiv_.style.filter="alpha(opacity="+this.labelDiv_.style.opacity*100+")");this.eventDiv_.style.position=this.labelDiv_.style.position;this.eventDiv_.style.overflow=this.labelDiv_.style.overflow;this.eventDiv_.style.opacity=.01;this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity=1)"';this.eventDiv_.style.filter="alpha(opacity=1)";this.setAnchor();this.setPosition();this.setVisible()};f.prototype.setAnchor=function(){var n=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-n.x+"px";this.labelDiv_.style.marginTop=-n.y+"px";this.eventDiv_.style.marginLeft=-n.x+"px";this.eventDiv_.style.marginTop=-n.y+"px"};f.prototype.setPosition=function(n){var t=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());typeof n=="undefined"&&(n=0);this.labelDiv_.style.left=Math.round(t.x)+"px";this.labelDiv_.style.top=Math.round(t.y-n)+"px";this.eventDiv_.style.left=this.labelDiv_.style.left;this.eventDiv_.style.top=this.labelDiv_.style.top;this.setZIndex()};f.prototype.setZIndex=function(){var n=this.marker_.get("labelInBackground")?-1:1;typeof this.marker_.getZIndex()=="undefined"?(this.labelDiv_.style.zIndex=parseInt(this.labelDiv_.style.top,10)+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)};f.prototype.setVisible=function(){this.labelDiv_.style.display=this.marker_.get("labelVisible")?this.marker_.getVisible()?"block":"none":"none";this.eventDiv_.style.display=this.labelDiv_.style.display};c(h,google.maps.Marker);h.prototype.setMap=function(n){google.maps.Marker.prototype.setMap.apply(this,arguments);this.label.setMap(n)};t.prototype=new google.maps.OverlayView;n.RichMarker=t;t.prototype.getVisible=function(){return this.get("visible")};t.prototype.getVisible=t.prototype.getVisible;t.prototype.setVisible=function(n){this.set("visible",n)};t.prototype.setVisible=t.prototype.setVisible;t.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())};t.prototype.visible_changed=t.prototype.visible_changed;t.prototype.setFlat=function(n){this.set("flat",!!n)};t.prototype.setFlat=t.prototype.setFlat;t.prototype.getFlat=function(){return this.get("flat")};t.prototype.getFlat=t.prototype.getFlat;t.prototype.getWidth=function(){return this.get("width")};t.prototype.getWidth=t.prototype.getWidth;t.prototype.getHeight=function(){return this.get("height")};t.prototype.getHeight=t.prototype.getHeight;t.prototype.setShadow=function(n){this.set("shadow",n);this.flat_changed()};t.prototype.setShadow=t.prototype.setShadow;t.prototype.getShadow=function(){return this.get("shadow")};t.prototype.getShadow=t.prototype.getShadow;t.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())};t.prototype.flat_changed=t.prototype.flat_changed;t.prototype.setZIndex=function(n){this.set("zIndex",n)};t.prototype.setZIndex=t.prototype.setZIndex;t.prototype.getZIndex=function(){return this.get("zIndex")};t.prototype.getZIndex=t.prototype.getZIndex;t.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())};t.prototype.zIndex_changed=t.prototype.zIndex_changed;t.prototype.getDraggable=function(){return this.get("draggable")};t.prototype.getDraggable=t.prototype.getDraggable;t.prototype.setDraggable=function(n){this.set("draggable",!!n)};t.prototype.setDraggable=t.prototype.setDraggable;t.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?this.addDragging_(this.markerWrapper_):this.removeDragListeners_())};t.prototype.draggable_changed=t.prototype.draggable_changed;t.prototype.getPosition=function(){return this.get("position")};t.prototype.getPosition=t.prototype.getPosition;t.prototype.setPosition=function(n){this.set("position",n)};t.prototype.setPosition=t.prototype.setPosition;t.prototype.position_changed=function(){this.draw()};t.prototype.position_changed=t.prototype.position_changed;t.prototype.getAnchor=function(){return this.get("anchor")};t.prototype.getAnchor=t.prototype.getAnchor;t.prototype.setAnchor=function(n){this.set("anchor",n)};t.prototype.setAnchor=t.prototype.setAnchor;t.prototype.anchor_changed=function(){this.draw()};t.prototype.anchor_changed=t.prototype.anchor_changed;t.prototype.htmlToDocumentFragment_=function(n){var t=document.createElement("DIV"),i;if(t.innerHTML=n,t.childNodes.length==1)return t.removeChild(t.firstChild);for(i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.firstChild);return i};t.prototype.removeChildren_=function(n){if(n)for(var t;t=n.firstChild;)n.removeChild(t)};t.prototype.setContent=function(n){this.set("content",n)};t.prototype.setContent=t.prototype.setContent;t.prototype.getContent=function(){return this.get("content")};t.prototype.getContent=t.prototype.getContent;t.prototype.content_changed=function(){var n,t,u,i,r;if(this.markerContent_){if(this.removeChildren_(this.markerContent_),n=this.getContent(),n){for(typeof n=="string"&&(n=n.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),n=this.htmlToDocumentFragment_(n)),this.markerContent_.appendChild(n),t=this,u=this.markerContent_.getElementsByTagName("IMG"),i=0;r=u[i];i++)google.maps.event.addDomListener(r,"mousedown",function(n){t.getDraggable()&&(n.preventDefault&&n.preventDefault(),n.returnValue=!1)}),google.maps.event.addDomListener(r,"load",function(){t.draw()});google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}};t.prototype.content_changed=t.prototype.content_changed;t.prototype.setCursor_=function(n){if(this.ready_){var t="";navigator.userAgent.indexOf("Gecko/")!==-1?(n=="dragging"&&(t="-moz-grabbing"),n=="dragready"&&(t="-moz-grab"),n=="draggable"&&(t="pointer")):((n=="dragging"||n=="dragready")&&(t="move"),n=="draggable"&&(t="pointer"));this.markerWrapper_.style.cursor!=t&&(this.markerWrapper_.style.cursor=t)}};t.prototype.startDrag=function(n){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var t=this.getMap();this.mapDraggable_=t.get("draggable");t.set("draggable",!1);this.mouseX_=n.clientX;this.mouseY_=n.clientY;this.setCursor_("dragready");this.markerWrapper_.style.MozUserSelect="none";this.markerWrapper_.style.KhtmlUserSelect="none";this.markerWrapper_.style.WebkitUserSelect="none";this.markerWrapper_.unselectable="on";this.markerWrapper_.onselectstart=function(){return!1};this.addDraggingListeners_();google.maps.event.trigger(this,"dragstart")}};t.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())};t.prototype.drag=function(n){var r,u,t,i;if(!this.getDraggable()||!this.dragging_){this.stopDrag();return}r=this.mouseX_-n.clientX;u=this.mouseY_-n.clientY;this.mouseX_=n.clientX;this.mouseY_=n.clientY;t=parseInt(this.markerWrapper_.style.left,10)-r;i=parseInt(this.markerWrapper_.style.top,10)-u;this.markerWrapper_.style.left=t+"px";this.markerWrapper_.style.top=i+"px";var f=this.getOffset_(),e=new google.maps.Point(t-f.width,i-f.height),o=this.getProjection();this.setPosition(o.fromDivPixelToLatLng(e));this.setCursor_("dragging");google.maps.event.trigger(this,"drag")};t.prototype.removeDragListeners_=function(){this.draggableListener_&&(google.maps.event.removeListener(this.draggableListener_),delete this.draggableListener_);this.setCursor_("")};t.prototype.addDragging_=function(n){if(n){var t=this;this.draggableListener_=google.maps.event.addDomListener(n,"mousedown",function(n){t.startDrag(n)});this.setCursor_("draggable")}};t.prototype.addDraggingListeners_=function(){var t=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",function(n){t.drag(n)},!0),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){t.stopDrag();t.markerWrapper_.releaseCapture()},!0)]):this.draggingListeners_=[google.maps.event.addDomListener(n,"mousemove",function(n){t.drag(n)},!0),google.maps.event.addDomListener(n,"mouseup",function(){t.stopDrag()},!0)]};t.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var n=0,t;t=this.draggingListeners_[n];n++)google.maps.event.removeListener(t);this.draggingListeners_.length=0}};t.prototype.getOffset_=function(){var r=this.getAnchor(),n,t,i;if(typeof r=="object")return r;if(n=new google.maps.Size(0,0),!this.markerContent_)return n;t=this.markerContent_.offsetWidth;i=this.markerContent_.offsetHeight;switch(r){case s.TOP:n.width=-t/2;break;case s.TOP_RIGHT:n.width=-t;break;case s.LEFT:n.height=-i/2;break;case s.MIDDLE:n.width=-t/2;n.height=-i/2;break;case s.RIGHT:n.width=-t;n.height=-i/2;break;case s.BOTTOM_LEFT:n.height=-i;break;case s.BOTTOM:n.width=-t/2;n.height=-i;break;case s.BOTTOM_RIGHT:n.width=-t;n.height=-i}return n};t.prototype.onAdd=function(){var n,t;this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute");this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex());this.markerWrapper_.style.display=this.getVisible()?"":"none";this.markerContent_||(this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_),n=this,google.maps.event.addDomListener(this.markerContent_,"click",function(){google.maps.event.trigger(n,"click")}),google.maps.event.addDomListener(this.markerContent_,"mouseover",function(){google.maps.event.trigger(n,"mouseover")}),google.maps.event.addDomListener(this.markerContent_,"mouseout",function(){google.maps.event.trigger(n,"mouseout")}));this.ready_=!0;this.content_changed();this.flat_changed();this.draggable_changed();t=this.getPanes();t&&t.overlayMouseTarget.appendChild(this.markerWrapper_);google.maps.event.trigger(this,"ready")};t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=function(){var n,t,i;if(this.ready_&&!this.dragging_&&(n=this.getProjection(),n)){var f=this.get("position"),r=n.fromLatLngToDivPixel(f),u=this.getOffset_();this.markerWrapper_.style.top=r.y+u.height+"px";this.markerWrapper_.style.left=r.x+u.width+"px";t=this.markerContent_.offsetHeight;i=this.markerContent_.offsetWidth;i!=this.get("width")&&this.set("width",i);t!=this.get("height")&&this.set("height",t)}};t.prototype.draw=t.prototype.draw;t.prototype.onRemove=function(){this.markerWrapper_&&this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_);this.removeDragListeners_()};t.prototype.onRemove=t.prototype.onRemove;var s={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};n.RichMarkerPosition=s;n.InfoBox=u;n.Cluster=e;n.ClusterIcon=o;n.MarkerClusterer=r;n.MarkerLabel_=f;n.MarkerWithLabel=h;n.RichMarker=t}()})}}),function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,i,r){t.module("uiGmapgoogle-maps.wrapped").service("uiGmapDataStructures",function(){return{Graph:r(1).Graph,Queue:r(1).Queue}})},function(n,t,i){(function(){n.exports={Graph:i(2),Heap:i(3),LinkedList:i(4),Map:i(5),Queue:i(6),RedBlackTree:i(7),Trie:i(8)}}).call(this)},function(n){(function(){var i,t={}.hasOwnProperty;i=function(){function n(){this._nodes={};this.nodeSize=0;this.edgeSize=0}return n.prototype.addNode=function(n){if(!this._nodes[n])return this.nodeSize++,this._nodes[n]={_outEdges:{},_inEdges:{}}},n.prototype.getNode=function(n){return this._nodes[n]},n.prototype.removeNode=function(n){var r,i,u,f,e;if(i=this._nodes[n],i){f=i._outEdges;for(u in f)t.call(f,u)&&this.removeEdge(n,u);e=i._inEdges;for(r in e)t.call(e,r)&&this.removeEdge(r,n);this.nodeSize--;delete this._nodes[n]}else return;return i},n.prototype.addEdge=function(n,t,i){var r,u,f;if(i==null&&(i=1),!this.getEdge(n,t))return(u=this._nodes[n],f=this._nodes[t],!u||!f)?void 0:(r={weight:i},u._outEdges[t]=r,f._inEdges[n]=r,this.edgeSize++,r)},n.prototype.getEdge=function(n,t){var i,r;return i=this._nodes[n],r=this._nodes[t],i&&r?i._outEdges[t]:void 0},n.prototype.removeEdge=function(n,t){var i,r,u;if(r=this._nodes[n],u=this._nodes[t],i=this.getEdge(n,t),i)return delete r._outEdges[t],delete u._inEdges[n],this.edgeSize--,i},n.prototype.getInEdgesOf=function(n){var i,r,u,f;u=this._nodes[n];r=[];f=u!=null?u._inEdges:void 0;for(i in f)t.call(f,i)&&r.push(this.getEdge(i,n));return r},n.prototype.getOutEdgesOf=function(n){var i,r,u,f;i=this._nodes[n];r=[];f=i!=null?i._outEdges:void 0;for(u in f)t.call(f,u)&&r.push(this.getEdge(n,u));return r},n.prototype.getAllEdgesOf=function(n){var i,t,f,o,r,u,e;if(t=this.getInEdgesOf(n),f=this.getOutEdgesOf(n),t.length===0)return f;for(o=this.getEdge(n,n),i=r=0,u=t.length;0<=u?r<u:r>u;i=0<=u?++r:--r)if(t[i]===o){e=[t[t.length-1],t[i]];t[i]=e[0];t[t.length-1]=e[1];t.pop();break}return t.concat(f)},n.prototype.forEachNode=function(n){var i,u,r=this._nodes;for(i in r)t.call(r,i)&&(u=r[i],n(u,i))},n.prototype.forEachEdge=function(n){var e,u,o,f,i,r;i=this._nodes;for(u in i)if(t.call(i,u)){o=i[u];r=o._outEdges;for(f in r)t.call(r,f)&&(e=r[f],n(e))}},n}();n.exports=i}).call(this)},function(n){(function(){var u,i,t,r;u=function(){function n(n){var u,f,r,t,e,i;for(n==null&&(n=[]),this._data=[void 0],r=0,e=n.length;r<e;r++)f=n[r],f!=null&&this._data.push(f);if(this._data.length>1)for(u=t=2,i=this._data.length;2<=i?t<i:t>i;u=2<=i?++t:--t)this._upHeap(u);this.size=this._data.length-1}return n.prototype.add=function(n){if(n!=null)return this._data.push(n),this._upHeap(this._data.length-1),this.size++,n},n.prototype.removeMin=function(){var n;if(this._data.length!==1)return(this.size--,this._data.length===2)?this._data.pop():(n=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),n)},n.prototype.peekMin=function(){return this._data[1]},n.prototype._upHeap=function(n){for(var i,r=this._data[n];this._data[n]<this._data[t(n)]&&n>1;)i=[this._data[t(n)],this._data[n]],this._data[n]=i[0],this._data[t(n)]=i[1],n=t(n)},n.prototype._downHeap=function(){for(var t,u,n=1;i(n<this._data.length);)if(t=i(n),t<this._data.length-1&&this._data[r(n)]<this._data[t]&&(t=r(n)),this._data[t]<this._data[n])u=[this._data[n],this._data[t]],this._data[t]=u[0],this._data[n]=u[1],n=t;else break},n}();t=function(n){return n>>1};i=function(n){return n<<1};r=function(n){return(n<<1)+1};n.exports=u}).call(this)},function(n){(function(){var t;t=function(){function n(n){var i,t,r;for(n==null&&(n=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,t=0,r=n.length;t<r;t++)i=n[t],this.add(i)}return n.prototype.at=function(n){var t,i,r,u,f;if(-this.size<=n&&n<this.size){if(n=this._adjust(n),n*2<this.size)for(t=this.head,i=r=1;r<=n;i=r+=1)t=t.next;else for(t=this.tail,i=u=1,f=this.size-n-1;u<=f;i=u+=1)t=t.prev;return t}},n.prototype.add=function(n,t){var r,i,f,u,e;if(t==null&&(t=this.size),-this.size<=t&&t<=this.size)return i={value:n},t=this._adjust(t),this.size===0?this.head=i:t===0?(f=[i,this.head,i],this.head.prev=f[0],i.next=f[1],this.head=f[2]):(r=this.at(t-1),u=[r.next,i,i,r],i.next=u[0],(e=r.next)!=null?e.prev=u[1]:void 0,r.next=u[2],i.prev=u[3]),t===this.size&&(this.tail=i),this.size++,n},n.prototype.removeAt=function(n){var t,i,r;if(n==null&&(n=this.size-1),-this.size<=n&&n<this.size)return this.size===0?void 0:(n=this._adjust(n),this.size===1?(i=this.head.value,this.head.value=this.tail.value=void 0):n===0?(i=this.head.value,this.head=this.head.next,this.head.prev=void 0):(t=this.at(n),i=t.value,t.prev.next=t.next,(r=t.next)!=null&&(r.prev=t.prev),n===this.size-1&&(this.tail=t.prev)),this.size--,i)},n.prototype.remove=function(n){var t;if(n!=null){for(t=this.head;t&&t.value!==n;)t=t.next;if(t)return this.size===1?this.head.value=this.tail.value=void 0:t===this.head?(this.head=this.head.next,this.head.prev=void 0):t===this.tail?(this.tail=this.tail.prev,this.tail.next=void 0):(t.prev.next=t.next,t.next.prev=t.prev),this.size--,n}},n.prototype.indexOf=function(n,t){var i,r;if(t==null&&(t=0),this.head.value==null&&!this.head.next||t>=this.size)return-1;for(t=Math.max(0,this._adjust(t)),i=this.at(t),r=t;i;){if(i.value===n)break;i=i.next;r++}return r===this.size?-1:r},n.prototype._adjust=function(n){return n<0?this.size+n:n},n}();n.exports=t}).call(this)},function(n){(function(){var u,t,i,r,f={}.hasOwnProperty;t="_mapId_";u=function(){function n(t){var i,r;this._content={};this._itemId=0;this._id=n._newMapId();this.size=0;for(i in t)f.call(t,i)&&(r=t[i],this.set(i,r))}return n._mapIdTracker=0,n._newMapId=function(){return this._mapIdTracker++},n.prototype.hash=function(n,u){var f,e;return u==null&&(u=!1),e=i(n),r(n)?(f=t+this._id,u&&!n[f]&&(n[f]=this._itemId++),f+"_"+n[f]):e+"_"+n},n.prototype.set=function(n,t){return this.has(n)||this.size++,this._content[this.hash(n,!0)]=[t,n],t},n.prototype.get=function(n){var t;if((t=this._content[this.hash(n)])!=null)return t[0]},n.prototype.has=function(n){return this.hash(n)in this._content},n.prototype["delete"]=function(n){var i;return(i=this.hash(n),i in this._content)?(delete this._content[i],r(n)&&delete n[t+this._id],this.size--,!0):!1},n.prototype.forEach=function(n){var t,i,r=this._content;for(t in r)f.call(r,t)&&(i=r[t],n(i[1],i[0]))},n}();r=function(n){var r,u,f,t,e;for(r=["Boolean","Number","String","Undefined","Null","RegExp","Function"],f=i(n),t=0,e=r.length;t<e;t++)if(u=r[t],f===u)return!1;return!0};i=function(n){return Object.prototype.toString.apply(n).match(/\[object (.+)\]/)[1]};n.exports=u}).call(this)},function(n){(function(){var t;t=function(){function n(n){n==null&&(n=[]);this._content=n;this._dequeueIndex=0;this.size=this._content.length}return n.prototype.enqueue=function(n){return this.size++,this._content.push(n),n},n.prototype.dequeue=function(){var n;if(this.size!==0)return this.size--,n=this._content[this._dequeueIndex],this._dequeueIndex++,this._dequeueIndex*2>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),n},n.prototype.peek=function(){return this._content[this._dequeueIndex]},n}();n.exports=t}).call(this)},function(n){(function(){var t,f,e,o,i,p,c,s,u,r,h,v,l,a,y;f=0;e=1;o=2;c=3;i=1;t=2;p=function(){function n(n){var i,t,r;for(n==null&&(n=[]),this._root,this.size=0,t=0,r=n.length;t<r;t++)i=n[t],i!=null&&this.add(i)}return n.prototype.add=function(n){var h,a,l,v;if(n!=null){if(this.size++,l={value:n,_color:i},this._root){if(a=s(this._root,function(t){return n===t.value?f:n<t.value?t._left?e:(l._parent=t,t._left=l,c):t._right?o:(l._parent=t,t._right=l,c)}),a!=null)return}else this._root=l;for(h=l;;){if(h===this._root){h._color=t;break}if(h._parent._color===t)break;if(((v=y(h))!=null?v._color:void 0)===i){h._parent._color=t;y(h)._color=t;u(h)._color=i;h=u(h);continue}!r(h)&&r(h._parent)?(this._rotateLeft(h._parent),h=h._left):r(h)&&!r(h._parent)&&(this._rotateRight(h._parent),h=h._right);h._parent._color=t;u(h)._color=i;r(h)?this._rotateRight(u(h)):this._rotateLeft(u(h));break}return n}},n.prototype.has=function(n){var t;return t=s(this._root,function(t){return n===t.value?f:n<t.value?e:o}),t?!0:!1},n.prototype.peekMin=function(){var n;if((n=l(this._root))!=null)return n.value},n.prototype.peekMax=function(){var n;if((n=v(this._root))!=null)return n.value},n.prototype.remove=function(n){var t;if(t=s(this._root,function(t){return n===t.value?f:n<t.value?e:o}),t)return this._removeNode(this._root,t),this.size--,n},n.prototype.removeMin=function(){var n,t;if(n=l(this._root),n)return t=n.value,this._removeNode(this._root,n),t},n.prototype.removeMax=function(){var n,t;if(n=v(this._root),n)return t=n.value,this._removeNode(this._root,n),t},n.prototype._removeNode=function(n,u){var f,e,o,s,c,v,y,p,w,b;if(u._left&&u._right&&(e=l(u._right),u.value=e.value,u=e),e=u._left||u._right,e||(e={color:t,_right:void 0,_left:void 0,isLeaf:!0}),e._parent=u._parent,(o=u._parent)!=null&&(o[h(u)]=e),u._color===t)if(e._color===i)e._color=t,e._parent||(this._root=e);else for(;;){if(!e._parent){this._root=e.isLeaf?void 0:e;break}if(f=a(e),(f!=null?f._color:void 0)===i&&(e._parent._color=i,f._color=t,r(e)?this._rotateLeft(e._parent):this._rotateRight(e._parent)),f=a(e),e._parent._color===t&&(!f||f._color===t&&(!f._left||f._left._color===t)&&(!f._right||f._right._color===t))){f!=null&&(f._color=i);e.isLeaf&&(e._parent[h(e)]=void 0);e=e._parent;continue}if(e._parent._color===i&&(!f||f._color===t&&(!f._left||((s=f._left)!=null?s._color:void 0)===t)&&(!f._right||((c=f._right)!=null?c._color:void 0)===t))){f!=null&&(f._color=i);e._parent._color=t;break}if((f!=null?f._color:void 0)===t){r(e)&&(!f._right||f._right._color===t)&&((v=f._left)!=null?v._color:void 0)===i?(f._color=i,(y=f._left)!=null&&(y._color=t),this._rotateRight(f)):r(e)||f._left&&f._left._color!==t||((p=f._right)!=null?p._color:void 0)!==i||(f._color=i,(w=f._right)!=null&&(w._color=t),this._rotateLeft(f));break}f=a(e);f._color=e._parent._color;r(e)?(f._right._color=t,this._rotateRight(e._parent)):(f._left._color=t,this._rotateLeft(e._parent))}if(e.isLeaf)return(b=e._parent)!=null?b[h(e)]=void 0:void 0},n.prototype._rotateLeft=function(n){var t,i;return(t=n._parent)!=null&&(t[h(n)]=n._right),n._right._parent=n._parent,n._parent=n._right,n._right=n._right._left,n._parent._left=n,(i=n._right)!=null&&(i._parent=n),n._parent._parent==null?this._root=n._parent:void 0},n.prototype._rotateRight=function(n){var t,i;return(t=n._parent)!=null&&(t[h(n)]=n._left),n._left._parent=n._parent,n._parent=n._left,n._left=n._left._right,n._parent._right=n,(i=n._left)!=null&&(i._parent=n),n._parent._parent==null?this._root=n._parent:void 0},n}();r=function(n){return n===n._parent._left};h=function(n){return r(n)?"_left":"_right"};s=function(n,t){for(var r,i=n,u=void 0;i;){if(r=t(i),r===f){u=i;break}if(r===e)i=i._left;else if(r===o)i=i._right;else if(r===c)break}return u};l=function(n){return s(n,function(n){return n._left?e:f})};v=function(n){return s(n,function(n){return n._right?o:f})};u=function(n){var t;if((t=n._parent)!=null)return t._parent};y=function(n){if(u(n))return r(n._parent)?u(n)._right:u(n)._left};a=function(n){return r(n)?n._parent._right:n._parent._left};n.exports=p}).call(this)},function(n,t,i){(function(){var u,f,t,r,e={}.hasOwnProperty;u=i(6);t="end";f=function(){function n(n){var i,t,r;for(n==null&&(n=[]),this._root={},this.size=0,t=0,r=n.length;t<r;t++)i=n[t],this.add(i)}return n.prototype.add=function(n){var i,r,u,f;if(n!=null){for(this.size++,i=this._root,u=0,f=n.length;u<f;u++)r=n[u],i[r]==null&&(i[r]={}),i=i[r];return i[t]=!0,n}},n.prototype.has=function(n){var i,u,r,f;if(n==null)return!1;for(i=this._root,r=0,f=n.length;r<f;r++){if(u=n[r],i[u]==null)return!1;i=i[u]}return i[t]?!0:!1},n.prototype.longestPrefixOf=function(n){var t,i,u,r,f;if(n==null)return"";for(t=this._root,u="",r=0,f=n.length;r<f;r++){if(i=n[r],t[i]==null)break;u+=i;t=t[i]}return u},n.prototype.wordsWithPrefix=function(n){var h,r,i,f,o,a,c,s,v,l;if(n==null)return[];for(n!=null||(n=""),c=[],r=this._root,s=0,v=n.length;s<v;s++)if(i=n[s],r=r[i],r==null)return[];for(o=new u,o.enqueue([r,""]);o.size!==0;){l=o.dequeue();f=l[0];h=l[1];f[t]&&c.push(n+h);for(i in f)e.call(f,i)&&(a=f[i],o.enqueue([a,h+i]))}return c},n.prototype.remove=function(n){var i,f,o,u,s,e,c,h;if(n!=null){for(i=this._root,u=[],s=0,c=n.length;s<c;s++){if(o=n[s],i[o]==null)return;i=i[o];u.push([o,i])}if(i[t]){if(this.size--,delete i[t],r(i,1))return n;for(f=e=h=u.length-1;h<=1?e<=1:e>=1;f=h<=1?++e:--e)if(r(u[f][1],1))break;else delete u[f-1][1][u[f][0]];return r(this._root[u[0][0]],1)||delete this._root[u[0][0]],n}}},n}();r=function(n,t){var r,i;if(t===0)return!0;i=0;for(r in n)if(e.call(n,r)&&(i++,i>=t))return!0;return!1};n.exports=f}).call(this)}]);t.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(t){var i=this;return+function(){var t={}.hasOwnProperty,i=[].slice;this.OverlappingMarkerSpiderfier=function(){function l(n,i){var o,r,f,s,e,h;this.map=n;i==null&&(i={});for(r in i)t.call(i,r)&&(h=i[r],this[r]=h);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},e=["click","zoom_changed","maptypeid_changed"],f=0,s=e.length;f<s;f++)o=e[f],u.addListener(this.map,o,function(n){return function(){return n.unspiderfy()}}(this))}var u,e,c,o,s,v,f,r,a,h,y;for(r=l.prototype,a=[l,r],c=0,v=a.length;c<v;c++)y=a[c],y.VERSION="0.3.3";return e=void 0,u=void 0,f=void 0,h=Math.PI*2,r.keepSpiderfied=!1,r.markersWontHide=!1,r.markersWontMove=!1,r.nearbyDistance=20,r.circleSpiralSwitchover=9,r.circleFootSeparation=23,r.circleStartAngle=h/12,r.spiralFootSeparation=26,r.spiralLengthStart=11,r.spiralLengthFactor=4,r.spiderfiedZIndex=1e3,r.usualLegZIndex=10,r.highlightedLegZIndex=20,r.event="click",r.minZoomLevel=!1,r.legWeight=1.5,r.legColors={usual:{},highlighted:{}},s=r.legColors.usual,o=r.legColors.highlighted,l.initializeGoogleMaps=function(n){return e=n.maps,u=e.event,f=e.MapTypeId,s[f.HYBRID]=s[f.SATELLITE]="#fff",o[f.HYBRID]=o[f.SATELLITE]="#f00",s[f.TERRAIN]=s[f.ROADMAP]="#444",o[f.TERRAIN]=o[f.ROADMAP]="#f00",this.ProjHelper=function(n){return this.setMap(n)},this.ProjHelper.prototype=new e.OverlayView,this.ProjHelper.prototype.draw=function(){}},r.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},r.addMarker=function(n){var t;return n._oms!=null?this:(n._oms=!0,t=[u.addListener(n,this.event,function(t){return function(i){return t.spiderListener(n,i)}}(this))],this.markersWontHide||t.push(u.addListener(n,"visible_changed",function(t){return function(){return t.markerChangeListener(n,!1)}}(this))),this.markersWontMove||t.push(u.addListener(n,"position_changed",function(t){return function(){return t.markerChangeListener(n,!0)}}(this))),this.markerListenerRefs.push(t),this.markers.push(n),this)},r.markerChangeListener=function(n,t){if(n._omsData!=null&&(t||!n.getVisible())&&!(this.spiderfying!=null||this.unspiderfying!=null))return this.unspiderfy(t?n:null)},r.getMarkers=function(){return this.markers.slice(0)},r.removeMarker=function(n){var t,i,f,e,r;if(n._omsData!=null&&this.unspiderfy(),t=this.arrIndexOf(this.markers,n),t<0)return this;for(r=this.markerListenerRefs.splice(t,1)[0],i=0,f=r.length;i<f;i++)e=r[i],u.removeListener(e);return delete n._oms,this.markers.splice(t,1),this},r.clearMarkers=function(){var n,i,e,o,s,r,h,t,f;for(this.unspiderfy(),f=this.markers,n=i=0,e=f.length;i<e;n=++i){for(h=f[n],r=this.markerListenerRefs[n],t=0,o=r.length;t<o;t++)s=r[t],u.removeListener(s);delete h._oms}return this.initMarkerArrays(),this},r.addListener=function(n,t){var i;return((i=this.listeners)[n]!=null?i[n]:i[n]=[]).push(t),this},r.removeListener=function(n,t){var i;return i=this.arrIndexOf(this.listeners[n],t),i<0||this.listeners[n].splice(i,1),this},r.clearListeners=function(n){return this.listeners[n]=[],this},r.trigger=function(){var u,f,e,n,o,s,t,r;for(f=arguments[0],u=2<=arguments.length?i.call(arguments,1):[],t=(s=this.listeners[f])!=null?s:[],r=[],n=0,o=t.length;n<o;n++)e=t[n],r.push(e.apply(null,u));return r},r.generatePtsCircle=function(n,t){var u,c,l,f,i,o,r,s;for(l=this.circleFootSeparation*(2+n),o=l/h,c=h/n,s=[],f=i=0,r=n;0<=r?i<r:i>r;f=0<=r?++i:--i)u=this.circleStartAngle+f*c,s.push(new e.Point(t.x+o*Math.cos(u),t.y+o*Math.sin(u)));return s},r.generatePtsSpiral=function(n,t){var i,o,r,u,c,f,s;for(u=this.spiralLengthStart,i=0,s=[],o=r=0,f=n;0<=f?r<f:r>f;o=0<=f?++r:--r)i+=this.spiralFootSeparation/u+o*.0005,c=new e.Point(t.x+u*Math.cos(i),t.y+u*Math.sin(i)),u+=h*this.spiralLengthFactor/i,s.push(c);return s},r.spiderListener=function(t,i){var a,v,f,y,u,o,p,s,h,e,c,w,l;if(s=t._omsData!=null,s&&this.keepSpiderfied||(this.event==="mouseover"?(a=this,v=function(){return a.unspiderfy()},n.clearTimeout(r.timeout),r.timeout=setTimeout(v,3e3)):this.unspiderfy()),s||this.map.getStreetView().getVisible()||this.map.getMapTypeId()==="GoogleEarthAPI")return this.trigger("click",t,i);for(e=[],c=[],h=this.nearbyDistance,w=h*h,p=this.llToPt(t.position),l=this.markers,f=0,y=l.length;f<y;f++)(u=l[f],u.map!=null&&u.getVisible())&&(o=this.llToPt(u.position),this.ptDistanceSq(o,p)<w?e.push({marker:u,markerPt:o}):c.push(u));return e.length===1?this.trigger("click",t,i):this.spiderfy(e,c)},r.markersNearMarker=function(n,t){var r,o,i,s,h,u,f,c,e,l,a;if(t==null&&(t=!1),this.projHelper.getProjection()==null)throw"Must wait for 'idle' event on map before calling markersNearMarker";for(f=this.nearbyDistance,c=f*f,h=this.llToPt(n.position),u=[],e=this.markers,r=0,o=e.length;r<o;r++)if((i=e[r],i!==n&&i.map!=null&&i.getVisible())&&(s=this.llToPt((l=(a=i._omsData)!=null?a.usualPosition:void 0)!=null?l:i.position),this.ptDistanceSq(s,h)<c&&(u.push(i),t)))break;return u},r.markersNearAnyOtherMarker=function(){var r,n,t,o,b,k,d,i,s,u,h,f,e,c,l,g,a,v,y,p,w;if(this.projHelper.getProjection()==null)throw"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker";for(l=this.nearbyDistance,g=l*l,e=function(){var n,u,t,f,e,r;for(t=this.markers,r=[],n=0,u=t.length;n<u;n++)i=t[n],r.push({pt:this.llToPt((f=(e=i._omsData)!=null?e.usualPosition:void 0)!=null?f:i.position),willSpiderfy:!1});return r}.call(this),v=this.markers,n=o=0,b=v.length;o<b;n=++o)if((s=v[n],s.map!=null&&s.getVisible())&&(u=e[n],!u.willSpiderfy))for(y=this.markers,t=c=0,k=y.length;c<k;t=++c)if((h=y[t],t!==n)&&h.map!=null&&h.getVisible()&&(f=e[t],!(t<n)||f.willSpiderfy)&&this.ptDistanceSq(u.pt,f.pt)<g){u.willSpiderfy=f.willSpiderfy=!0;break}for(p=this.markers,w=[],r=a=0,d=p.length;a<d;r=++a)i=p[r],e[r].willSpiderfy&&w.push(i);return w},r.makeHighlightListenerFuncs=function(n){return{highlight:function(t){return function(){return n._omsData.leg.setOptions({strokeColor:t.legColors.highlighted[t.map.mapTypeId],zIndex:t.highlightedLegZIndex})}}(this),unhighlight:function(t){return function(){return n._omsData.leg.setOptions({strokeColor:t.legColors.usual[t.map.mapTypeId],zIndex:t.usualLegZIndex})}}(this)}},r.spiderfy=function(n,t){var o,s,r,h,c,l,i,a,v,f,y;return this.minZoomLevel&&this.map.getZoom()<this.minZoomLevel?!1:(this.spiderfying=!0,f=n.length,o=this.ptAverage(function(){var t,r,i;for(i=[],t=0,r=n.length;t<r;t++)a=n[t],i.push(a.markerPt);return i}()),h=f>=this.circleSpiralSwitchover?this.generatePtsSpiral(f,o).reverse():this.generatePtsCircle(f,o),y=function(){var t,o,f;for(f=[],t=0,o=h.length;t<o;t++)r=h[t],s=this.ptToLl(r),v=this.minExtract(n,function(n){return function(t){return n.ptDistanceSq(t.markerPt,r)}}(this)),i=v.marker,l=new e.Polyline({map:this.map,path:[i.position,s],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),i._omsData={usualPosition:i.position,leg:l},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(c=this.makeHighlightListenerFuncs(i),i._omsData.hightlightListeners={highlight:u.addListener(i,"mouseover",c.highlight),unhighlight:u.addListener(i,"mouseout",c.unhighlight)}),i.setPosition(s),i.setZIndex(Math.round(this.spiderfiedZIndex+r.y)),f.push(i);return f}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",y,t))},r.unspiderfy=function(n){var i,s,r,t,f,e,o;if(n==null&&(n=null),this.spiderfied==null)return this;for(this.unspiderfying=!0,o=[],f=[],e=this.markers,i=0,s=e.length;i<s;i++)t=e[i],t._omsData!=null?(t._omsData.leg.setMap(null),t!==n&&t.setPosition(t._omsData.usualPosition),t.setZIndex(null),r=t._omsData.hightlightListeners,r!=null&&(u.removeListener(r.highlight),u.removeListener(r.unhighlight)),delete t._omsData,o.push(t)):f.push(t);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",o,f),this},r.ptDistanceSq=function(n,t){var i,r;return i=n.x-t.x,r=n.y-t.y,i*i+r*r},r.ptAverage=function(n){var t,o,i,r,u,f;for(u=f=0,t=0,o=n.length;t<o;t++)r=n[t],u+=r.x,f+=r.y;return i=n.length,new e.Point(u/i,f/i)},r.llToPt=function(n){return this.projHelper.getProjection().fromLatLngToDivPixel(n)},r.ptToLl=function(n){return this.projHelper.getProjection().fromDivPixelToLatLng(n)},r.minExtract=function(n,t){for(var i,e,o,u,f,r=u=0,s=n.length;u<s;r=++u)o=n[r],f=t(o),(typeof i=="undefined"||i===null||f<e)&&(e=f,i=r);return n.splice(i,1)[0]},r.arrIndexOf=function(n,t){var i,r,u,f;if(n.indexOf!=null)return n.indexOf(t);for(i=r=0,u=n.length;r<u;i=++r)if(f=n[i],f===t)return i;return-1},l}()}.apply(i),t.then(function(){i.OverlappingMarkerSpiderfier.initializeGoogleMaps(n.google)}),this.OverlappingMarkerSpiderfier}]);t.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(t,i){return{init:_.once(function(){(function(){var u={}.hasOwnProperty,r=function(n,t){function r(){this.constructor=n}for(var i in t)u.call(t,i)&&(n[i]=t[i]);return r.prototype=t.prototype,n.prototype=new r,n.__super__=t.prototype,n};n.NgMapCluster=function(n){function u(n){u.__super__.constructor.call(this,n);this.markers_=new i}return r(u,n),u.prototype.addMarker=function(n){var i,r,u;if(this.isMarkerAlreadyAdded_(n)&&(u=this.markers_.get(n.key),u.getPosition().lat()==n.getPosition().lat()&&u.getPosition().lon()==n.getPosition().lon()))return!1;if(this.center_){if(this.averageCenter_){var t=this.markers_.length+1,f=(this.center_.lat()*(t-1)+n.getPosition().lat())/t,e=(this.center_.lng()*(t-1)+n.getPosition().lng())/t;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();return n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,r=this.markerClusterer_.getMaxZoom(),r!==null&&this.map_.getZoom()>r?n.getMap()!==this.map_&&n.setMap(this.map_):i<this.minClusterSize_?n.getMap()!==this.map_&&n.setMap(this.map_):i===this.minClusterSize_?this.markers_.each(function(n){n.setMap(null)}):n.setMap(null),!0},u.prototype.isMarkerAlreadyAdded_=function(n){return t.isNullOrUndefined(this.markers_.get(n.key))},u.prototype.getBounds=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);return this.getMarkers().each(function(t){n.extend(t.getPosition())}),n},u.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=new i;delete this.markers_},u}(Cluster);n.NgMapMarkerClusterer=function(n){function t(n,r,u){t.__super__.constructor.call(this,n,r,u);this.markers_=new i}return r(t,n),t.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=new i},t.prototype.removeMarker_=function(n){return this.markers_.get(n.key)?(n.setMap(null),this.markers_.remove(n.key),!0):!1},t.prototype.createClusters_=function(n){var t,i,u,f=this;if(this.ready_){n===0&&(google.maps.event.trigger(this,"clusteringbegin",this),typeof this.timerRefStatic!="undefined"&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic));u=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625));var e=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),o=this.markers_.values();for(t=n;t<r;t++)i=o[t],!i.isAdded&&this.isMarkerInBounds_(i,e)&&(!this.ignoreHidden_||this.ignoreHidden_&&i.getVisible())&&this.addToClosestCluster_(i);if(r<this.markers_.length)this.timerRefStatic=setTimeout(function(){f.createClusters_(r)},0);else{for(t=0;t<this.clusters_.length;t++)this.clusters_[t].updateIcon_();delete this.timerRefStatic;google.maps.event.trigger(this,"clusteringend",this)}}},t.prototype.addToClosestCluster_=function(n){for(var u,t,f,e=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),u<e&&(e=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new NgMapCluster(this),t.addMarker(n),this.clusters_.push(t))},t.prototype.redraw_=function(){this.createClusters_(0)},t.prototype.resetViewport_=function(n){for(var t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();this.clusters_=[];this.markers_.each(function(t){t.isAdded=!1;n&&t.setMap(null)})},t.prototype.extend=function(n,t){return function(n){var t;for(t in n.prototype)t!=="constructor"&&(this.prototype[t]=n.prototype[t]);return this}.apply(n,[t])},ClusterIcon.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].trim(),10),i=parseInt(r[1].trim(),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";n+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);";n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+this.sums_.text+"<\/div>";this.div_.title=typeof this.sums_.title=="undefined"||this.sums_.title===""?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0},t}(MarkerClusterer)}).call(this)})}}])})(window,angular);$(document).ready(function(){window.onload=function(){document.onclick=docOnClick};$("#txtSearch").click(function(){$(".search-results").show()})});$(document).mouseup(function(n){var t=$(".header-right-search");t.is(n.target)||t.has(n.target).length!==0||($("#resultSearch").hide(),$(".quicklink").removeAttr("style"))});$(".tablecompare").parent().css("overflow","auto").addClass("custom-scroll");firstLoadMap=!0;markers=[];var addParams=function(n,t,i){var r=i.split("?"),e,s;if(r.length==1)return i+"?"+n+"="+t;if(r.length==2){var h=r[1].split("&"),u={},f=[],o=[];$.each(h,function(n,t){f=t.split("=");u[f[0]]=f[1]});u[n]=t;for(e in u)o.push(e+"="+u[e]);return s=o.join("&"),r[0]+"?"+s}},JWebsiteUtils=function(n,t){var i={};return i.scrollTo=function(n,i,r){var u=i||150,f=r||0;t("html, body").animate({scrollTop:n.offset().top-f},u)},i}(window,jQuery),JDateUtils=function(n,t){var i={};return i.cultureForcus="vi-VN",i.cultureFormat={"vi-VN":{date:"DD/MM/YYYY",datetime:"HH:mm:ss DD/MM/YYYY"},"en-US":{date:"MM/DD/YYYY",datetime:"HH:mm:ss MM/DD/YYYY"}},i.today=function(){var n=i.cultureFormat[i.cultureForcus].date;return moment(moment().format(n),n)._d},i.parseDate=function(n){return moment(n,i.cultureFormat[i.cultureForcus].date)._d},i.greaterToday=function(n){var t=i.parseDate(n),r=i.today();return t.getTime()>r.getTime()},i.getElement=function(n,r){return i.isEmpty(r)&&(r="html"),i.isEmpty(n)&&(n=r),t(n)},i.isEmpty=function(n){return n==undefined||n==null||n.length==0},i.isNotEmpty=function(n){return!i.isEmpty(n)},i.registerDatepicker=function(n){var r=i.getElement(n),u=r.find(".datepicker:not(.registered-dp)");u.each(function(){var n=t(this),r={format:"dd/mm/yyyy",language:"vi",autoclose:!0},u=n.attr("start-date"),f=n.attr("end-date");i.isNotEmpty(u)&&(r.startDate=i.getRangeDateConfigs(u));i.isNotEmpty(f)&&(r.startDate=i.getRangeDateConfigs(f));n.datepicker(r);n.parent().find(".input-group-addon").on("click",function(){n.trigger("focus")})});r.find(".datepicker:not(.registered-dp)").addClass("registered-dp");t.validator&&t.validator.methods&&t.validator.methods.date&&(t.validator.methods.date=function(n){return i.validateDate(n)})},i.validateDate=function(n){var t=i.parseDate(n);return t!=null},i}(window,jQuery);!function(n,t,i,r){function u(t,i){this.settings=null;this.options=n.extend({},u.Defaults,i);this.$element=n(t);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"]}};n.each(["onResize","onThrottledResize"],n.proxy(function(t,i){this._handlers[i]=n.proxy(this[i],this)},this));n.each(u.Plugins,n.proxy(function(n,t){this._plugins[n.charAt(0).toLowerCase()+n.slice(1)]=new t(this)},this));n.each(u.Workers,n.proxy(function(t,i){this._pipe.push({filter:i.filter,run:n.proxy(i.run,this)})},this));this.setup();this.initialize()}u.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:t,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"};u.Width={Default:"default",Inner:"inner",Outer:"outer"};u.Type={Event:"event",State:"state"};u.Plugins={};u.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(n){n.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(n){var t=this.settings.margin||"",u=!this.settings.autoWidth,i=this.settings.rtl,r={width:"auto","margin-left":i?t:"","margin-right":i?"":t};u||this.$stage.children().css(r);n.css=r}},{filter:["width","items","settings"],run:function(n){var r=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,t=null,i=this._items.length,f=!this.settings.autoWidth,u=[];for(n.items={merge:!1,width:r};i--;)t=this._mergers[i],t=this.settings.mergeFit&&Math.min(t,this.settings.items)||t,n.items.merge=t>1||n.items.merge,u[i]=f?r*t:this._items[i].width();this._widths=u}},{filter:["items","settings"],run:function(){var t=[],i=this._items,r=this.settings,f=Math.max(2*r.items,4),s=2*Math.ceil(i.length/2),e=r.loop&&i.length?r.rewind?f:Math.max(f,s):0,o="",u="";for(e/=2;e--;)t.push(this.normalize(t.length/2,!0)),o+=i[t[t.length-1]][0].outerHTML,t.push(this.normalize(i.length-1-(t.length-1)/2,!0)),u=i[t[t.length-1]][0].outerHTML+u;this._clones=t;n(o).addClass("cloned").appendTo(this.$stage);n(u).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var u=this.settings.rtl?1:-1,f=this._clones.length+this._items.length,n=-1,i=0,r=0,t=[];++n<f;)i=t[n-1]||0,r=this._widths[this.relative(n)]+this.settings.margin,t.push(i+r*u);this._coordinates=t}},{filter:["width","items","settings"],run:function(){var n=this.settings.stagePadding,t=this._coordinates,i={width:Math.ceil(Math.abs(t[t.length-1]))+2*n,"padding-left":n||"","padding-right":n||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(n){var t=this._coordinates.length,i=!this.settings.autoWidth,r=this.$stage.children();if(i&&n.items.merge)for(;t--;)n.css.width=this._widths[this.relative(t)],r.eq(t).css(n.css);else i&&(n.css.width=n.items.width,r.css(n.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(n){n.current=n.current?this.$stage.children().index(n.current):0;n.current=Math.max(this.minimum(),Math.min(this.maximum(),n.current));this.reset(n.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){for(var t,i,f=this.settings.rtl?1:-1,e=2*this.settings.stagePadding,r=this.coordinates(this.current())+e,o=r+this.width()*f,s=[],n=0,u=this._coordinates.length;n<u;n++)t=this._coordinates[n-1]||0,i=Math.abs(this._coordinates[n])+e*f,(this.op(t,"<=",r)&&this.op(t,">",o)||this.op(i,"<",r)&&this.op(i,">",o))&&s.push(n);this.$stage.children(".active").removeClass("active");this.$stage.children(":eq("+s.join("), :eq(")+")").addClass("active");this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}];u.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 t,i,u;t=this.$element.find("img");i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:r;u=this.$element.children(i).width();t.length&&u<=0&&this.preloadAutoWidthImages(t)}this.$element.addClass(this.options.loadingClass);this.$stage=n("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>');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")};u.prototype.setup=function(){var u=this.viewport(),r=this.options.responsive,i=-1,t=null;r?(n.each(r,function(n){n<=u&&n>i&&(i=Number(n))}),t=n.extend({},this.options,r[i]),"function"==typeof t.stagePadding&&(t.stagePadding=t.stagePadding()),delete t.responsive,t.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):t=n.extend({},this.options);this.trigger("change",{property:{name:"settings",value:t}});this._breakpoint=i;this.settings=t;this.invalidate("settings");this.trigger("changed",{property:{name:"settings",value:this.settings}})};u.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)};u.prototype.prepare=function(t){var i=this.trigger("prepare",{content:t});return i.data||(i.data=n("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:i.data}),i.data};u.prototype.update=function(){for(var t=0,i=this._pipe.length,r=n.proxy(function(n){return this[n]},this._invalidated),u={};t<i;)(this._invalidated.all||n.grep(this._pipe[t].filter,r).length>0)&&this._pipe[t].run(u),t++;this._invalidated={};this.is("valid")||this.enter("valid")};u.prototype.width=function(n){switch(n=n||u.Width.Default){case u.Width.Inner:case u.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}};u.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")};u.prototype.onThrottledResize=function(){t.clearTimeout(this.resizeTimer);this.resizeTimer=t.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)};u.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")))};u.prototype.registerEventHandlers=function(){n.support.transition&&this.$stage.on(n.support.transition.end+".owl.core",n.proxy(this.onTransitionEnd,this));this.settings.responsive!==!1&&this.on(t,"resize",this._handlers.onThrottledResize);this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",n.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",n.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",n.proxy(this.onDragEnd,this)))};u.prototype.onDragStart=function(t){var r=null;3!==t.which&&(n.support.transform?(r=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),r={x:r[16===r.length?12:4],y:r[16===r.length?13:5]}):(r=this.$stage.position(),r={x:this.settings.rtl?r.left+this.$stage.width()-this.width()+this.settings.margin:r.left,y:r.top}),this.is("animating")&&(n.support.transform?this.animate(r.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=n(t.target),this._drag.stage.start=r,this._drag.stage.current=r,this._drag.pointer=this.pointer(t),n(i).on("mouseup.owl.core touchend.owl.core",n.proxy(this.onDragEnd,this)),n(i).one("mousemove.owl.core touchmove.owl.core",n.proxy(function(t){var r=this.difference(this._drag.pointer,this.pointer(t));n(i).on("mousemove.owl.core touchmove.owl.core",n.proxy(this.onDragMove,this));Math.abs(r.x)<Math.abs(r.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))};u.prototype.onDragMove=function(n){var t=null,i=null,u=null,f=this.difference(this._drag.pointer,this.pointer(n)),r=this.difference(this._drag.stage.start,f);this.is("dragging")&&(n.preventDefault(),this.settings.loop?(t=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-t,r.x=((r.x-t)%i+i)%i+t):(t=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),u=this.settings.pullDrag?f.x/-5:0,r.x=Math.max(Math.min(r.x,t+u),i+u)),this._drag.stage.current=r,this.animate(r.x))};u.prototype.onDragEnd=function(t){var r=this.difference(this._drag.pointer,this.pointer(t)),f=this._drag.stage.current,u=r.x>0^this.settings.rtl?"left":"right";n(i).off(".owl.core");this.$element.removeClass(this.options.grabClass);(0!==r.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(f.x,0!==r.x?u:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=u,(Math.abs(r.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"))};u.prototype.closest=function(t,i){var r=-1,u=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||n.each(f,n.proxy(function(n,o){return"left"===i&&t>o-u&&t<o+u?r=n:"right"===i&&t>o-e-u&&t<o-e+u?r=n+1:this.op(t,"<",o)&&this.op(t,">",f[n+1]||o-e)&&(r="left"===i?n+1:n),r===-1},this)),this.settings.loop||(this.op(t,">",f[this.minimum()])?r=t=this.minimum():this.op(t,"<",f[this.maximum()])&&(r=t=this.maximum())),r};u.prototype.animate=function(t){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd();i&&(this.enter("animating"),this.trigger("translate"));n.support.transform3d&&n.support.transition?this.$stage.css({transform:"translate3d("+t+"px,0px,0px)",transition:this.speed()/1e3+"s"}):i?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,n.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"})};u.prototype.is=function(n){return this._states.current[n]&&this._states.current[n]>0};u.prototype.current=function(n){if(n===r)return this._current;if(0===this._items.length)return r;if(n=this.normalize(n),this._current!==n){var t=this.trigger("change",{property:{name:"position",value:n}});t.data!==r&&(n=this.normalize(t.data));this._current=n;this.invalidate("position");this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current};u.prototype.invalidate=function(t){return"string"===n.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),n.map(this._invalidated,function(n,t){return t})};u.prototype.reset=function(n){n=this.normalize(n);n!==r&&(this._speed=0,this._current=n,this.suppress(["translate","translated"]),this.animate(this.coordinates(n)),this.release(["translate","translated"]))};u.prototype.normalize=function(n,t){var i=this._items.length,u=t?0:this._clones.length;return!this.isNumeric(n)||i<1?n=r:(n<0||n>=i+u)&&(n=((n-u/2)%i+i)%i+u/2),n};u.prototype.relative=function(n){return n-=this._clones.length/2,this.normalize(n,!0)};u.prototype.maximum=function(n){var t,u,f,i=this.settings,r=this._coordinates.length;if(i.loop)r=this._clones.length/2+this._items.length-1;else if(i.autoWidth||i.merge){for(t=this._items.length,u=this._items[--t].width(),f=this.$element.width();t--&&(u+=this._items[t].width()+this.settings.margin,!(u>f)););r=t+1}else r=i.center?this._items.length-1:this._items.length-i.items;return n&&(r-=this._clones.length/2),Math.max(r,0)};u.prototype.minimum=function(n){return n?0:this._clones.length/2};u.prototype.items=function(n){return n===r?this._items.slice():(n=this.normalize(n,!0),this._items[n])};u.prototype.mergers=function(n){return n===r?this._mergers.slice():(n=this.normalize(n,!0),this._mergers[n])};u.prototype.clones=function(t){var i=this._clones.length/2,f=i+this._items.length,u=function(n){return n%2==0?f+n/2:i-(n+1)/2};return t===r?n.map(this._clones,function(n,t){return u(t)}):n.map(this._clones,function(n,i){return n===t?u(i):null})};u.prototype.speed=function(n){return n!==r&&(this._speed=n),this._speed};u.prototype.coordinates=function(t){var i,f=1,u=t-1;return t===r?n.map(this._coordinates,n.proxy(function(n,t){return this.coordinates(t)},this)):(this.settings.center?(this.settings.rtl&&(f=-1,u=t+1),i=this._coordinates[t],i+=(this.width()-i+(this._coordinates[u]||0))/2*f):i=this._coordinates[u]||0,i=Math.ceil(i))};u.prototype.duration=function(n,t,i){return 0===i?0:Math.min(Math.max(Math.abs(t-n),1),6)*Math.abs(i||this.settings.smartSpeed)};u.prototype.to=function(n,t){var f=this.current(),r=null,i=n-this.relative(f),s=(i>0)-(i<0),e=this._items.length,o=this.minimum(),u=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(i)>e/2&&(i+=s*-1*e),n=f+i,r=((n-o)%e+e)%e+o,r!==n&&r-i<=u&&r-i>0&&(f=r-i,n=r,this.reset(f))):this.settings.rewind?(u+=1,n=(n%u+u)%u):n=Math.max(o,Math.min(u,n));this.speed(this.duration(f,n,t));this.current(n);this.$element.is(":visible")&&this.update()};u.prototype.next=function(n){n=n||!1;this.to(this.relative(this.current())+1,n)};u.prototype.prev=function(n){n=n||!1;this.to(this.relative(this.current())-1,n)};u.prototype.onTransitionEnd=function(n){if(n!==r&&(n.stopPropagation(),(n.target||n.srcElement||n.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating");this.trigger("translated")};u.prototype.viewport=function(){var r;return this.options.responsiveBaseElement!==t?r=n(this.options.responsiveBaseElement).width():t.innerWidth?r=t.innerWidth:i.documentElement&&i.documentElement.clientWidth?r=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),r};u.prototype.replace=function(t){this.$stage.empty();this._items=[];t&&(t=t instanceof jQuery?t:n(t));this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector));t.filter(function(){return 1===this.nodeType}).each(n.proxy(function(n,t){t=this.prepare(t);this.$stage.append(t);this._items.push(t);this._mergers.push(1*t.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")};u.prototype.add=function(t,i){var u=this.relative(this._current);i=i===r?this._items.length:this.normalize(i,!0);t=t instanceof jQuery?t:n(t);this.trigger("add",{content:t,position:i});t=this.prepare(t);0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[i-1].after(t),this._items.push(t),this._mergers.push(1*t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(t),this._items.splice(i,0,t),this._mergers.splice(i,0,1*t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1));this._items[u]&&this.reset(this._items[u].index());this.invalidate("items");this.trigger("added",{content:t,position:i})};u.prototype.remove=function(n){n=this.normalize(n,!0);n!==r&&(this.trigger("remove",{content:this._items[n],position:n}),this._items[n].remove(),this._items.splice(n,1),this._mergers.splice(n,1),this.invalidate("items"),this.trigger("removed",{content:null,position:n}))};u.prototype.preloadAutoWidthImages=function(t){t.each(n.proxy(function(t,i){this.enter("pre-loading");i=n(i);n(new Image).one("load",n.proxy(function(n){i.attr("src",n.target.src);i.css("opacity",1);this.leave("pre-loading");!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))};u.prototype.destroy=function(){this.$element.off(".owl.core");this.$stage.off(".owl.core");n(i).off(".owl.core");this.settings.responsive!==!1&&(t.clearTimeout(this.resizeTimer),this.off(t,"resize",this._handlers.onThrottledResize));for(var r in this._plugins)this._plugins[r].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(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")};u.prototype.op=function(n,t,i){var r=this.settings.rtl;switch(t){case"<":return r?n>i:n<i;case">":return r?n<i:n>i;case">=":return r?n<=i:n>=i;case"<=":return r?n>=i:n<=i}};u.prototype.on=function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r):n.attachEvent&&n.attachEvent("on"+t,i)};u.prototype.off=function(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r):n.detachEvent&&n.detachEvent("on"+t,i)};u.prototype.trigger=function(t,i,r){var o={item:{count:this._items.length,index:this.current()}},e=n.camelCase(n.grep(["on",t,r],function(n){return n}).join("-").toLowerCase()),f=n.Event([t,"owl",r||"carousel"].join(".").toLowerCase(),n.extend({relatedTarget:this},o,i));return this._supress[t]||(n.each(this._plugins,function(n,t){t.onTrigger&&t.onTrigger(f)}),this.register({type:u.Type.Event,name:t}),this.$element.trigger(f),this.settings&&"function"==typeof this.settings[e]&&this.settings[e].call(this,f)),f};u.prototype.enter=function(t){n.each([t].concat(this._states.tags[t]||[]),n.proxy(function(n,t){this._states.current[t]===r&&(this._states.current[t]=0);this._states.current[t]++},this))};u.prototype.leave=function(t){n.each([t].concat(this._states.tags[t]||[]),n.proxy(function(n,t){this._states.current[t]--},this))};u.prototype.register=function(t){if(t.type===u.Type.Event){if(n.event.special[t.name]||(n.event.special[t.name]={}),!n.event.special[t.name].owl){var i=n.event.special[t.name]._default;n.event.special[t.name]._default=function(n){return!i||!i.apply||n.namespace&&n.namespace.indexOf("owl")!==-1?n.namespace&&n.namespace.indexOf("owl")>-1:i.apply(this,arguments)};n.event.special[t.name].owl=!0}}else t.type===u.Type.State&&(this._states.tags[t.name]=this._states.tags[t.name]?this._states.tags[t.name].concat(t.tags):t.tags,this._states.tags[t.name]=n.grep(this._states.tags[t.name],n.proxy(function(i,r){return n.inArray(i,this._states.tags[t.name])===r},this)))};u.prototype.suppress=function(t){n.each(t,n.proxy(function(n,t){this._supress[t]=!0},this))};u.prototype.release=function(t){n.each(t,n.proxy(function(n,t){delete this._supress[t]},this))};u.prototype.pointer=function(n){var i={x:null,y:null};return n=n.originalEvent||n||t.event,n=n.touches&&n.touches.length?n.touches[0]:n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,n.pageX?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i};u.prototype.isNumeric=function(n){return!isNaN(parseFloat(n))};u.prototype.difference=function(n,t){return{x:n.x-t.x,y:n.y-t.y}};n.fn.owlCarousel=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var f=n(this),r=f.data("owl.carousel");r||(r=new u(this,"object"==typeof t&&t),f.data("owl.carousel",r),n.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,i){r.register({type:u.Type.Event,name:i});r.$element.on(i+".owl.carousel.core",n.proxy(function(n){n.namespace&&n.relatedTarget!==this&&(this.suppress([i]),r[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},r))}));"string"==typeof t&&"_"!==t.charAt(0)&&r[t].apply(r,i)})};n.fn.owlCarousel.Constructor=u}(window.Zepto||window.jQuery,window,document),function(n,t){var i=function(t){this._core=t;this._interval=null;this._visible=null;this._handlers={"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoRefresh&&this.watch()},this)};this._core.options=n.extend({},i.Defaults,this._core.options);this._core.$element.on(this._handlers)};i.Defaults={autoRefresh:!0,autoRefreshInterval:500};i.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=t.setInterval(n.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))};i.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())};i.prototype.destroy=function(){var n,i;t.clearInterval(this._interval);for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)};n.fn.owlCarousel.Constructor.Plugins.AutoRefresh=i}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){var u=function(t){this._core=t;this._loaded=[];this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":n.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type))for(var i=this._core.settings,f=i.center&&Math.ceil(i.items/2)||i.items,e=i.center&&f*-1||0,u=(t.property&&t.property.value!==r?t.property.value:this._core.current())+e,o=this._core.clones().length,s=n.proxy(function(n,t){this.load(t)},this);e++<f;)this.load(o/2+this._core.relative(u)),o&&n.each(this._core.clones(this._core.relative(u)),s),u++},this)};this._core.options=n.extend({},u.Defaults,this._core.options);this._core.$element.on(this._handlers)};u.Defaults={lazyLoad:!1};u.prototype.load=function(i){var r=this._core.$stage.children().eq(i),u=r&&r.find(".owl-lazy");!u||n.inArray(r.get(0),this._loaded)>-1||(u.each(n.proxy(function(i,r){var e,u=n(r),f=t.devicePixelRatio>1&&u.attr("data-src-retina")||u.attr("data-src");this._core.trigger("load",{element:u,url:f},"lazy");u.is("img")?u.one("load.owl.lazy",n.proxy(function(){u.css("opacity",1);this._core.trigger("loaded",{element:u,url:f},"lazy")},this)).attr("src",f):(e=new Image,e.onload=n.proxy(function(){u.css({"background-image":'url("'+f+'")',opacity:"1"});this._core.trigger("loaded",{element:u,url:f},"lazy")},this),e.src=f)},this)),this._loaded.push(r.get(0)))};u.prototype.destroy=function(){var n,t;for(n in this.handlers)this._core.$element.off(n,this.handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Lazy=u}(window.Zepto||window.jQuery,window,document),function(n){var t=function(i){this._core=i;this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&"position"==n.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(n){n.namespace&&this._core.settings.autoHeight&&n.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)};this._core.options=n.extend({},t.Defaults,this._core.options);this._core.$element.on(this._handlers)};t.Defaults={autoHeight:!1,autoHeightClass:"owl-height"};t.prototype.update=function(){var t=this._core._current,u=t+this._core.settings.items,f=this._core.$stage.children().toArray().slice(t,u),i=[],r=0;n.each(f,function(t,r){i.push(n(r).height())});r=Math.max.apply(null,i);this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)};t.prototype.destroy=function(){var n,t;for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.AutoHeight=t}(window.Zepto||window.jQuery,window,document),function(n,t,i){var r=function(t){this._core=t;this._videos={};this._playing=null;this._handlers={"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.video&&this.isInFullScreen()&&n.preventDefault()},this),"refreshed.owl.carousel":n.proxy(function(n){n.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&"position"===n.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":n.proxy(function(t){if(t.namespace){var i=n(t.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,n(t.content)))}},this)};this._core.options=n.extend({},r.Defaults,this._core.options);this._core.$element.on(this._handlers);this._core.$element.on("click.owl.video",".owl-video-play-icon",n.proxy(function(n){this.play(n)},this))};r.Defaults={video:!1,videoHeight:!1,videoWidth:!1};r.prototype.fetch=function(n,t){var u=function(){return n.attr("data-vimeo-id")?"vimeo":n.attr("data-vzaar-id")?"vzaar":"youtube"}(),i=n.attr("data-vimeo-id")||n.attr("data-youtube-id")||n.attr("data-vzaar-id"),f=n.attr("data-width")||this._core.settings.videoWidth,e=n.attr("data-height")||this._core.settings.videoHeight,r=n.attr("href");if(!r)throw new Error("Missing video URL.");if(i=r.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+)?/),i[3].indexOf("youtu")>-1)u="youtube";else if(i[3].indexOf("vimeo")>-1)u="vimeo";else{if(!(i[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");u="vzaar"}i=i[6];this._videos[r]={type:u,id:i,width:f,height:e};t.attr("data-video",r);this.thumbnail(n,this._videos[r])};r.prototype.thumbnail=function(t,i){var o,s,r,c=i.width&&i.height?'style="width:'+i.width+"px;height:"+i.height+'px;"':"",f=t.find("img"),e="src",h="",l=this._core.settings,u=function(n){s='<div class="owl-video-play-icon"><\/div>';o=l.lazyLoad?'<div class="owl-video-tn '+h+'" '+e+'="'+n+'"><\/div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+n+')"><\/div>';t.after(o);t.after(s)};if(t.wrap('<div class="owl-video-wrapper"'+c+"><\/div>"),this._core.settings.lazyLoad&&(e="data-src",h="owl-lazy"),f.length)return u(f.attr(e)),f.remove(),!1;"youtube"===i.type?(r="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",u(r)):"vimeo"===i.type?n.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(n){r=n[0].thumbnail_large;u(r)}}):"vzaar"===i.type&&n.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(n){r=n.framegrab_url;u(r)}})};r.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")};r.prototype.play=function(t){var u,o=n(t.target),r=o.closest("."+this._core.settings.itemClass),i=this._videos[r.attr("data-video")],f=i.width||"100%",e=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),r=this._core.items(this._core.relative(r.index())),this._core.reset(r.index()),"youtube"===i.type?u='<iframe width="'+f+'" height="'+e+'" src="//www.youtube.com/embed/'+i.id+"?autoplay=1&rel=0&v="+i.id+'" frameborder="0" allowfullscreen><\/iframe>':"vimeo"===i.type?u='<iframe src="//player.vimeo.com/video/'+i.id+'?autoplay=1" width="'+f+'" height="'+e+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen><\/iframe>':"vzaar"===i.type&&(u='<iframe frameborder="0"height="'+e+'"width="'+f+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+i.id+'/player?autoplay=true"><\/iframe>'),n('<div class="owl-video-frame">'+u+"<\/div>").insertAfter(r.find(".owl-video")),this._playing=r.addClass("owl-video-playing"))};r.prototype.isInFullScreen=function(){var t=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return t&&n(t).parent().hasClass("owl-video-frame")};r.prototype.destroy=function(){var n,t;this._core.$element.off("click.owl.video");for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Video=r}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){var u=function(t){this.core=t;this.core.options=n.extend({},u.Defaults,this.core.options);this.swapping=!0;this.previous=r;this.next=r;this.handlers={"change.owl.carousel":n.proxy(function(n){n.namespace&&"position"==n.property.name&&(this.previous=this.core.current(),this.next=n.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":n.proxy(function(n){n.namespace&&(this.swapping="translated"==n.type)},this),"translate.owl.carousel":n.proxy(function(n){n.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)};this.core.$element.on(this.handlers)};u.Defaults={animateOut:!1,animateIn:!1};u.prototype.swap=function(){if(1===this.core.settings.items&&n.support.animation&&n.support.transition){this.core.speed(0);var t,i=n.proxy(this.clear,this),f=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),r=this.core.settings.animateIn,u=this.core.settings.animateOut;this.core.current()!==this.previous&&(u&&(t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),f.one(n.support.animation.end,i).css({left:t+"px"}).addClass("animated owl-animated-out").addClass(u)),r&&e.one(n.support.animation.end,i).addClass("animated owl-animated-in").addClass(r))}};u.prototype.clear=function(t){n(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);this.core.onTransitionEnd()};u.prototype.destroy=function(){var n,t;for(n in this.handlers)this.core.$element.off(n,this.handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.Animate=u}(window.Zepto||window.jQuery,window,document),function(n,t,i){var r=function(t){this._core=t;this._timeout=null;this._paused=!1;this._handlers={"changed.owl.carousel":n.proxy(function(n){n.namespace&&"settings"===n.property.name?this._core.settings.autoplay?this.play():this.stop():n.namespace&&"position"===n.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":n.proxy(function(n,t,i){n.namespace&&this.play(t,i)},this),"stop.owl.autoplay":n.proxy(function(n){n.namespace&&this.stop()},this),"mouseover.owl.autoplay":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":n.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":n.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)};this._core.$element.on(this._handlers);this._core.options=n.extend({},r.Defaults,this._core.options)};r.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1};r.prototype.play=function(){this._paused=!1;this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())};r.prototype._getNextTimeout=function(r,u){return this._timeout&&t.clearTimeout(this._timeout),t.setTimeout(n.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||i.hidden||this._core.next(u||this._core.settings.autoplaySpeed)},this),r||this._core.settings.autoplayTimeout)};r.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()};r.prototype.stop=function(){this._core.is("rotating")&&(t.clearTimeout(this._timeout),this._core.leave("rotating"))};r.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)};r.prototype.destroy=function(){var n,t;this.stop();for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};n.fn.owlCarousel.Constructor.Plugins.autoplay=r}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var t=function(i){this._core=i;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":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"<\/div>")},this),"added.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.dotsData&&this._templates.splice(n.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(n){n.namespace&&this._core.settings.dotsData&&this._templates.splice(n.position,1)},this),"changed.owl.carousel":n.proxy(function(n){n.namespace&&"position"==n.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(n){n.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":n.proxy(function(n){n.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)};this._core.options=n.extend({},t.Defaults,this._core.options);this.$element.on(this._handlers)};t.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};t.prototype.initialize=function(){var i,t=this._core.settings;this._controls.$relative=(t.navContainer?n(t.navContainer):n("<div>").addClass(t.navContainerClass).appendTo(this.$element)).addClass("disabled");this._controls.$previous=n("<"+t.navElement+">").addClass(t.navClass[0]).html(t.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(){this.prev(t.navSpeed)},this));this._controls.$next=n("<"+t.navElement+">").addClass(t.navClass[1]).html(t.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(){this.next(t.navSpeed)},this));t.dotsData||(this._templates=[n("<div>").addClass(t.dotClass).append(n("<span>")).prop("outerHTML")]);this._controls.$absolute=(t.dotsContainer?n(t.dotsContainer):n("<div>").addClass(t.dotsClass).appendTo(this.$element)).addClass("disabled");this._controls.$absolute.on("click","div",n.proxy(function(i){var r=n(i.target).parent().is(this._controls.$absolute)?n(i.target).index():n(i.target).parent().index();i.preventDefault();this.to(r,t.dotsSpeed)},this));for(i in this._overrides)this._core[i]=n.proxy(this[i],this)};t.prototype.destroy=function(){var n,r,t,i;for(n in this._handlers)this.$element.off(n,this._handlers[n]);for(r in this._controls)this._controls[r].remove();for(i in this.overides)this._core[i]=this._overrides[i];for(t in Object.getOwnPropertyNames(this))"function"!=typeof this[t]&&(this[t]=null)};t.prototype.update=function(){var t,i,f,r=this._core.clones().length/2,o=r+this._core.items().length,u=this._core.maximum(!0),n=this._core.settings,e=n.center||n.autoWidth||n.dotsData?1:n.dotsEach||n.items;if("page"!==n.slideBy&&(n.slideBy=Math.min(n.slideBy,n.items)),n.dots||"page"==n.slideBy)for(this._pages=[],t=r,i=0,f=0;t<o;t++){if(i>=e||0===i){if(this._pages.push({start:Math.min(u,t-r),end:t-r+e-1}),Math.min(u,t-r)===u)break;i=0;++f}i+=this._core.mergers(this._core.relative(t))}};t.prototype.draw=function(){var i,t=this._core.settings,r=this._core.items().length<=t.items,u=this._core.relative(this._core.current()),f=t.loop||t.rewind;this._controls.$relative.toggleClass("disabled",!t.nav||r);t.nav&&(this._controls.$previous.toggleClass("disabled",!f&&u<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&u>=this._core.maximum(!0)));this._controls.$absolute.toggleClass("disabled",!t.dots||r);t.dots&&(i=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!==i?this._controls.$absolute.html(this._templates.join("")):i>0?this._controls.$absolute.append(new Array(i+1).join(this._templates[0])):i<0&&this._controls.$absolute.children().slice(i).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))};t.prototype.onTrigger=function(t){var i=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}};t.prototype.current=function(){var t=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(n){return n.start<=t&&n.end>=t},this)).pop()};t.prototype.getPosition=function(t){var i,r,u=this._core.settings;return"page"==u.slideBy?(i=n.inArray(this.current(),this._pages),r=this._pages.length,t?++i:--i,i=this._pages[(i%r+r)%r].start):(i=this._core.relative(this._core.current()),r=this._core.items().length,t?i+=u.slideBy:i-=u.slideBy),i};t.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)};t.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)};t.prototype.to=function(t,i,r){var u;!r&&this._pages.length?(u=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%u+u)%u].start,i)):n.proxy(this._overrides.to,this._core)(t,i)};n.fn.owlCarousel.Constructor.Plugins.Navigation=t}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){"use strict";var u=function(i){this._core=i;this._hashes={};this.$element=this._core.$element;this._handlers={"initialized.owl.carousel":n.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&n(t).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":n.proxy(function(t){if(t.namespace){var i=n(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=t.content}},this),"changed.owl.carousel":n.proxy(function(i){if(i.namespace&&"position"===i.property.name){var u=this._core.items(this._core.relative(this._core.current())),r=n.map(this._hashes,function(n,t){return n===u?t:null}).join();if(!r||t.location.hash.slice(1)===r)return;t.location.hash=r}},this)};this._core.options=n.extend({},u.Defaults,this._core.options);this.$element.on(this._handlers);n(t).on("hashchange.owl.navigation",n.proxy(function(){var i=t.location.hash.substring(1),u=this._core.$stage.children(),n=this._hashes[i]&&u.index(this._hashes[i]);n!==r&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};u.Defaults={URLhashListener:!1};u.prototype.destroy=function(){var i,r;n(t).off("hashchange.owl.navigation");for(i in this._handlers)this._core.$element.off(i,this._handlers[i]);for(r in Object.getOwnPropertyNames(this))"function"!=typeof this[r]&&(this[r]=null)};n.fn.owlCarousel.Constructor.Plugins.Hash=u}(window.Zepto||window.jQuery,window,document),function(n,t,i,r){function u(t,i){var u=!1,f=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+h.join(f+" ")+f).split(" "),function(n,t){if(s[t]!==r)return u=!i||t,!1}),u}function e(n){return u(n,!0)}var s=n("<support>").get(0).style,h="Webkit Moz O ms".split(" "),o={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},f={csstransforms:function(){return!!u("transform")},csstransforms3d:function(){return!!u("perspective")},csstransitions:function(){return!!u("transition")},cssanimations:function(){return!!u("animation")}};f.csstransitions()&&(n.support.transition=new String(e("transition")),n.support.transition.end=o.transition.end[n.support.transition]);f.cssanimations()&&(n.support.animation=new String(e("animation")),n.support.animation.end=o.animation.end[n.support.animation]);f.csstransforms()&&(n.support.transform=new String(e("transform")),n.support.transform3d=f.csstransforms3d())}(window.Zepto||window.jQuery,window,document),function(n,t,i){"use strict";i.module("googlechart",[]).value("googleChartApiConfig",{version:"1",optionalSettings:{packages:["corechart"]}}).provider("googleJsapiUrl",function(){var n="https:",t="//www.google.com/jsapi";this.setProtocol=function(t){n=t};this.setUrl=function(n){t=n};this.$get=function(){return(n?n:"")+t}}).factory("googleChartApiPromise",["$rootScope","$q","googleChartApiConfig","googleJsapiUrl",function(r,u,f,e){var s=u.defer(),h=function(){var n={callback:function(){var n=f.optionalSettings.callback;r.$apply(function(){s.resolve()});i.isFunction(n)&&n.call(this)}};n=i.extend({},f.optionalSettings,n);t.google.load("visualization",f.version,n)},c=n.getElementsByTagName("head")[0],o=n.createElement("script");return o.setAttribute("type","text/javascript"),o.src=e,o.addEventListener?o.addEventListener("load",h,!1):o.onreadystatechange=function(){(o.readyState==="loaded"||o.readyState==="complete")&&(o.onreadystatechange=null,h())},c.appendChild(o),s.promise}]).directive("googleChart",["$timeout","$window","$rootScope","googleChartApiPromise",function(n,t,r,u){return{restrict:"A",scope:{beforeDraw:"&",chart:"=chart",onReady:"&",onSelect:"&",select:"&"},link:function(t,f,e){function o(n,r,u){var o,s,e,f;if(typeof t.chart.formatters[n]!="undefined"){if(!i.equals(t.chart.formatters[n],t.oldChartFormatters[n]))if(t.oldChartFormatters[n]=t.chart.formatters[n],t.formatters[n]=[],n==="color")for(o=0;o<t.chart.formatters[n].length;o++){for(s=new r,f=0;f<t.chart.formatters[n][o].formats.length;f++)e=t.chart.formatters[n][o].formats[f],typeof e.fromBgColor!="undefined"&&typeof e.toBgColor!="undefined"?s.addGradientRange(e.from,e.to,e.color,e.fromBgColor,e.toBgColor):s.addRange(e.from,e.to,e.color,e.bgcolor);t.formatters[n].push(s)}else for(f=0;f<t.chart.formatters[n].length;f++)t.formatters[n].push(new r(t.chart.formatters[n][f]));for(f=0;f<t.formatters[n].length;f++)t.chart.formatters[n][f].columnNum<u.getNumberOfColumns()&&t.formatters[n][f].format(u,t.chart.formatters[n][f].columnNum);(n==="arrow"||n==="bar"||n==="color")&&(t.chart.options.allowHtml=!0)}}function s(){s.triggered||t.chart==undefined||(s.triggered=!0,n(function(){var u,i,r;if(typeof t.chartWrapper=="undefined"?(u={chartType:t.chart.type,dataTable:t.chart.data,view:t.chart.view,options:t.chart.options,containerId:f[0]},t.chartWrapper=new google.visualization.ChartWrapper(u),google.visualization.events.addListener(t.chartWrapper,"ready",function(){t.chart.displayed=!0;t.$apply(function(n){n.onReady({chartWrapper:n.chartWrapper})})}),google.visualization.events.addListener(t.chartWrapper,"error",function(n){console.log("Chart not displayed due to error: "+n.message+". Full error object follows.");console.log(n)}),google.visualization.events.addListener(t.chartWrapper,"select",function(){var n=t.chartWrapper.getChart().getSelection()[0];t.$apply(function(){if(e.select)console.log("Angular-Google-Chart: The 'select' attribute is deprecated and will be removed in a future release.  Please use 'onSelect'."),t.select({selectedItem:n});else t.onSelect({selectedItem:n})})})):(t.chartWrapper.setChartType(t.chart.type),t.chartWrapper.setDataTable(t.chart.data),t.chartWrapper.setView(t.chart.view),t.chartWrapper.setOptions(t.chart.options)),typeof t.formatters=="undefined"&&(t.formatters={}),typeof t.chart.formatters!="undefined"&&(o("number",google.visualization.NumberFormat,t.chartWrapper.getDataTable()),o("arrow",google.visualization.ArrowFormat,t.chartWrapper.getDataTable()),o("date",google.visualization.DateFormat,t.chartWrapper.getDataTable()),o("bar",google.visualization.BarFormat,t.chartWrapper.getDataTable()),o("color",google.visualization.ColorFormat,t.chartWrapper.getDataTable())),i=t.chart.customFormatters,typeof i!="undefined")for(r in i)o(r,i[r],t.chartWrapper.getDataTable());n(function(){t.beforeDraw({chartWrapper:t.chartWrapper});t.chartWrapper.draw();s.triggered=!1})},0,!0))}function h(){u.then(function(){s()})}t.$watch(function(){return t.chart?{customFormatters:t.chart.customFormatters,data:t.chart.data,formatters:t.chart.formatters,options:t.chart.options,type:t.chart.type,view:t.chart.view}:t.chart},function(){h()},!0);var c=r.$on("resizeMsg",function(){n(function(){t.chartWrapper&&h()})});t.$on("$destroy",function(){c()});t.oldChartFormatters={}}}}]).run(["$rootScope","$window",function(n,t){i.element(t).bind("resize",function(){n.$emit("resizeMsg")})}])}(document,window,window.angular),function(){var n,f,i,r,u,t=function(n,t){return function(){return n.apply(t,arguments)}},e=[].indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(t in this&&this[t]===n)return t;return-1};f=function(){function n(){}return n.prototype.extend=function(n,t){var i,r;for(i in t)r=t[i],null==n[i]&&(n[i]=r);return n},n.prototype.isMobile=function(n){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n)},n.prototype.createEvent=function(n,t,i,r){var u;return null==t&&(t=!1),null==i&&(i=!1),null==r&&(r=null),null!=document.createEvent?(u=document.createEvent("CustomEvent"),u.initCustomEvent(n,t,i,r)):null!=document.createEventObject?(u=document.createEventObject(),u.eventType=n):u.eventName=n,u},n.prototype.emitEvent=function(n,t){return null!=n.dispatchEvent?n.dispatchEvent(t):t in(null!=n)?n[t]():"on"+t in(null!=n)?n["on"+t]():void 0},n.prototype.addEvent=function(n,t,i){return null!=n.addEventListener?n.addEventListener(t,i,!1):null!=n.attachEvent?n.attachEvent("on"+t,i):n[t]=i},n.prototype.removeEvent=function(n,t,i){return null!=n.removeEventListener?n.removeEventListener(t,i,!1):null!=n.detachEvent?n.detachEvent("on"+t,i):delete n[t]},n.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},n}();i=this.WeakMap||this.MozWeakMap||(i=function(){function n(){this.keys=[];this.values=[]}return n.prototype.get=function(n){var t,u,i,f,r;for(r=this.keys,t=i=0,f=r.length;f>i;t=++i)if(u=r[t],u===n)return this.values[t]},n.prototype.set=function(n,t){var i,f,r,e,u;for(u=this.keys,i=r=0,e=u.length;e>r;i=++r)if(f=u[i],f===n)return void(this.values[i]=t);return this.keys.push(n),this.values.push(t)},n}());n=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(n=function(){function n(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser.");"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return n.notSupported=!0,n.prototype.observe=function(){},n}());r=this.getComputedStyle||function(n){return this.getPropertyValue=function(t){var i;return"float"===t&&(t="styleFloat"),u.test(t)&&t.replace(u,function(n,t){return t.toUpperCase()}),(null!=(i=n.currentStyle)?i[t]:void 0)||null},this};u=/(\-([a-z]){1})/g;this.WOW=function(){function u(n){null==n&&(n={});this.scrollCallback=t(this.scrollCallback,this);this.scrollHandler=t(this.scrollHandler,this);this.resetAnimation=t(this.resetAnimation,this);this.start=t(this.start,this);this.scrolled=!0;this.config=this.util().extend(n,this.defaults);null!=n.scrollContainer&&(this.config.scrollContainer=document.querySelector(n.scrollContainer));this.animationNameCache=new i;this.wowEvent=this.util().createEvent(this.config.boxClass)}return u.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},u.prototype.init=function(){var n;return this.element=window.document.documentElement,"interactive"===(n=document.readyState)||"complete"===n?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},u.prototype.start=function(){var t,i,u,r;if(this.stopped=!1,this.boxes=function(){var n,u,i,r;for(i=this.element.querySelectorAll("."+this.config.boxClass),r=[],n=0,u=i.length;u>n;n++)t=i[n],r.push(t);return r}.call(this),this.all=function(){var n,u,i,r;for(i=this.boxes,r=[],n=0,u=i.length;u>n;n++)t=i[n],r.push(t);return r}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(r=this.boxes,i=0,u=r.length;u>i;i++)t=r[i],this.applyStyle(t,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new n(function(n){return function(t){var i,u,f,e,r;for(r=[],i=0,u=t.length;u>i;i++)e=t[i],r.push(function(){var n,r,t,i;for(t=e.addedNodes||[],i=[],n=0,r=t.length;r>n;n++)f=t[n],i.push(this.doSync(f));return i}.call(n));return r}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},u.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},u.prototype.sync=function(){if(n.notSupported)return this.doSync(this.element)},u.prototype.doSync=function(n){var t,i,f,u,r;if(null==n&&(n=this.element),1===n.nodeType){for(n=n.parentNode||n,u=n.querySelectorAll("."+this.config.boxClass),r=[],i=0,f=u.length;f>i;i++)t=u[i],e.call(this.all,t)<0?(this.boxes.push(t),this.all.push(t),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(t,!0),r.push(this.scrolled=!0)):r.push(void 0);return r}},u.prototype.show=function(n){return this.applyStyle(n),n.className=n.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(n),this.util().emitEvent(n,this.wowEvent),this.util().addEvent(n,"animationend",this.resetAnimation),this.util().addEvent(n,"oanimationend",this.resetAnimation),this.util().addEvent(n,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(n,"MSAnimationEnd",this.resetAnimation),n},u.prototype.applyStyle=function(n,t){var i,r,u;return r=n.getAttribute("data-wow-duration"),i=n.getAttribute("data-wow-delay"),u=n.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(n,t,r,i,u)}}(this))},u.prototype.animate=function(){return"requestAnimationFrame"in window?function(n){return window.requestAnimationFrame(n)}:function(n){return n()}}(),u.prototype.resetStyle=function(){var r,n,u,t,i;for(t=this.boxes,i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(r.style.visibility="visible");return i},u.prototype.resetAnimation=function(n){var t;if(n.type.toLowerCase().indexOf("animationend")>=0)return(t=n.target||n.srcElement,t.className=t.className.replace(this.config.animateClass,"").trim())},u.prototype.customStyle=function(n,t,i,r,u){return t&&this.cacheAnimationName(n),n.style.visibility=t?"hidden":"visible",i&&this.vendorSet(n.style,{animationDuration:i}),r&&this.vendorSet(n.style,{animationDelay:r}),u&&this.vendorSet(n.style,{animationIterationCount:u}),this.vendorSet(n.style,{animationName:t?"none":this.cachedAnimationName(n)}),n},u.prototype.vendors=["moz","webkit"],u.prototype.vendorSet=function(n,t){var i,r,u,f;r=[];for(i in t)u=t[i],n[""+i]=u,r.push(function(){var t,o,r,e;for(r=this.vendors,e=[],t=0,o=r.length;o>t;t++)f=r[t],e.push(n[""+f+i.charAt(0).toUpperCase()+i.substr(1)]=u);return e}.call(this));return r},u.prototype.vendorCSS=function(n,t){var i,o,f,u,e,s;for(e=r(n),u=e.getPropertyCSSValue(t),f=this.vendors,i=0,o=f.length;o>i;i++)s=f[i],u=u||e.getPropertyCSSValue("-"+s+"-"+t);return u},u.prototype.animationName=function(n){var t;try{t=this.vendorCSS(n,"animation-name").cssText}catch(i){t=r(n).getPropertyValue("animation-name")}return"none"===t?"":t},u.prototype.cacheAnimationName=function(n){return this.animationNameCache.set(n,this.animationName(n))},u.prototype.cachedAnimationName=function(n){return this.animationNameCache.get(n)},u.prototype.scrollHandler=function(){return this.scrolled=!0},u.prototype.scrollCallback=function(){var n;if(this.scrolled&&!(this.scrolled=!1,this.boxes=function(){var t,u,i,r;for(i=this.boxes,r=[],t=0,u=i.length;u>t;t++)n=i[t],n&&(this.isVisible(n)?this.show(n):r.push(n));return r}.call(this),this.boxes.length||this.config.live))return this.stop()},u.prototype.offsetTop=function(n){for(var t;void 0===n.offsetTop;)n=n.parentNode;for(t=n.offsetTop;n=n.offsetParent;)t+=n.offsetTop;return t},u.prototype.isVisible=function(n){var r,u,t,f,i;return u=n.getAttribute("data-wow-offset")||this.config.offset,i=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,f=i+Math.min(this.element.clientHeight,this.util().innerHeight())-u,t=this.offsetTop(n),r=t+n.clientHeight,f>=t&&r>=i},u.prototype.util=function(){return null!=this._util?this._util:this._util=new f},u.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},u}()}.call(this);angular.module("pdf-viewer",[]).directive("pdfViewer",["$q",function(){return{restrict:"E",scope:{url:"@"},link:function(n,t,i){n.$watch("url",function(r){r&&PDFJS.getDocument(n.url).then(function(n){var r=function(u,f){var e=document.createElement("canvas");e.className=i.class?i.class:"";t[0].appendChild(e);n.getPage(u).then(function(n){var o=n.getViewport(1),s=i.width?i.width/o.width:1,t=n.getViewport(s),h=e.getContext("2d"),c={canvasContext:h,viewport:t};e.height=t.height;e.width=t.width;n.render(c);u<f&&r(u+1,f)})};r(1,n.numPages)})})}}}]),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n,t){function ot(n){function u(){t?(r(),et(u),i=!0,t=!1):i=!1}var r=n,t=!1,i=!1;this.kick=function(){t=!0;i||u()};this.end=function(n){var u=r;n&&(i?(r=t?function(){u();n()}:n,t=!0):n())}}function st(){return!0}function c(){return!1}function l(n){n.preventDefault()}function a(n){h[n.target.tagName.toLowerCase()]||n.preventDefault()}function ht(n){return n.which===1&&!n.ctrlKey&&!n.altKey}function o(n,t){var i,r;if(n.identifiedTouch)return n.identifiedTouch(t);for(i=-1,r=n.length;++i<r;)if(n[i].identifier===t)return n[i]}function v(n,t){var i=o(n.changedTouches,t.identifier);if(i)return i.pageX===t.pageX&&i.pageY===t.pageY?void 0:i}function ct(n){var t;ht(n)&&(t={target:n.target,startX:n.pageX,startY:n.pageY,timeStamp:n.timeStamp},i(document,u.move,y,t),i(document,u.cancel,p,t))}function y(n){var t=n.data;g(n,t,n,w)}function p(){w()}function w(){r(document,u.move,y);r(document,u.cancel,p)}function lt(n){var t,r;h[n.target.tagName.toLowerCase()]||(t=n.changedTouches[0],r={target:t.target,startX:t.pageX,startY:t.pageY,timeStamp:n.timeStamp,identifier:t.identifier},i(document,f.move+"."+t.identifier,b,r),i(document,f.cancel+"."+t.identifier,k,r))}function b(n){var t=n.data,i=v(n,t);i&&g(n,t,i,d)}function k(n){var t=n.data,i=o(n.changedTouches,t.identifier);i&&d(t.identifier)}function d(n){r(document,"."+n,b);r(document,"."+n,k)}function g(n,t,i,r){var u=i.pageX-t.startX,f=i.pageY-t.startY;u*u+f*f<s*s||vt(n,t,i,u,f,r)}function at(){return this._handled=st,!1}function nt(n){n._handled()}function vt(n,t,i,r,u,f){var h=t.target,o,s;o=n.targetTouches;s=n.timeStamp-t.timeStamp;t.type="movestart";t.distX=r;t.distY=u;t.deltaX=r;t.deltaY=u;t.pageX=i.pageX;t.pageY=i.pageY;t.velocityX=r/s;t.velocityY=u/s;t.targetTouches=o;t.finger=o?o.length:1;t._handled=at;t._preventTouchmoveDefault=function(){n.preventDefault()};e(t.target,t);f(t.identifier)}function tt(n){var t=n.data.timer;n.data.touch=n;n.data.timeStamp=n.timeStamp;t.kick()}function it(n){var t=n.data.event,i=n.data.timer;yt();ft(t,i,function(){setTimeout(function(){r(t.target,"click",c)},0)})}function yt(){r(document,u.move,tt);r(document,u.end,it)}function rt(n){var t=n.data.event,r=n.data.timer,i=v(n,t);i&&(n.preventDefault(),t.targetTouches=n.targetTouches,n.data.touch=i,n.data.timeStamp=n.timeStamp,r.kick())}function ut(n){var t=n.data.event,i=n.data.timer,r=o(n.changedTouches,t.identifier);r&&(pt(t),ft(t,i))}function pt(n){r(document,"."+n.identifier,rt);r(document,"."+n.identifier,ut)}function wt(n,t,i){var r=i-n.timeStamp;n.type="move";n.distX=t.pageX-n.startX;n.distY=t.pageY-n.startY;n.deltaX=t.pageX-n.pageX;n.deltaY=t.pageY-n.pageY;n.velocityX=.3*n.velocityX+.7*n.deltaX/r;n.velocityY=.3*n.velocityY+.7*n.deltaY/r;n.pageX=t.pageX;n.pageY=t.pageY}function ft(n,t,i){t.end(function(){return n.type="moveend",e(n.target,n),i&&i()})}function bt(){return i(this,"movestart.move",nt),!0}function kt(){return r(this,"dragstart drag",l),r(this,"mousedown touchstart",a),r(this,"movestart",nt),!0}function dt(n){n.namespace!=="move"&&n.namespace!=="moveend"&&(i(this,"dragstart."+n.guid+" drag."+n.guid,l,t,n.selector),i(this,"mousedown."+n.guid,a,t,n.selector))}function gt(n){n.namespace!=="move"&&n.namespace!=="moveend"&&(r(this,"dragstart."+n.guid+" drag."+n.guid),r(this,"mousedown."+n.guid))}var s=6,i=n.event.add,r=n.event.remove,e=function(t,i,r){n.event.trigger(i,r,t)},et=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(n){return window.setTimeout(function(){n()},25)}}(),h={textarea:!0,input:!0,select:!0,button:!0},u={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},f={move:"touchmove",cancel:"touchend",end:"touchend"};n.event.special.movestart={setup:bt,teardown:kt,add:dt,remove:gt,_default:function(n){function s(){wt(o,r.touch,r.timeStamp);e(n.target,o)}var o,r;n._handled()&&(o={target:n.target,startX:n.startX,startY:n.startY,pageX:n.pageX,pageY:n.pageY,distX:n.distX,distY:n.distY,deltaX:n.deltaX,deltaY:n.deltaY,velocityX:n.velocityX,velocityY:n.velocityY,timeStamp:n.timeStamp,identifier:n.identifier,targetTouches:n.targetTouches,finger:n.finger},r={event:o,timer:new ot(s),touch:t,timeStamp:t},n.identifier===t?(i(n.target,"click",c),i(document,u.move,tt,r),i(document,u.end,it,r)):(n._preventTouchmoveDefault(),i(document,f.move+"."+n.identifier,rt,r),i(document,f.end+"."+n.identifier,ut,r)))}};n.event.special.move={setup:function(){i(this,"movestart.move",n.noop)},teardown:function(){r(this,"movestart.move",n.noop)}};n.event.special.moveend={setup:function(){i(this,"movestart.moveend",n.noop)},teardown:function(){r(this,"movestart.moveend",n.noop)}};i(document,"mousedown.move",ct);i(document,"touchstart.move",lt);typeof Array.prototype.indexOf=="function"&&function(n){for(var t=["changedTouches","targetTouches"],i=t.length;i--;)n.event.props.indexOf(t[i])===-1&&n.event.props.push(t[i])}(n)}),function(){(function(n){var r,u,f,i,e,o,s,t,h,c;return r=function(n,t){return this.$element=n,this.$slides=this.$element.find(".slides ul li"),this.$slides.length<1&&(this.$slides=this.$element.find('[data-group="slides"] ul li')),this.$prevNext=this.$element.find("[data-jump]"),this.$pages=this.$element.find("[data-jump-to]"),this.$slidesContainer=this.$element.find('[data-group="slides"]'),this.$rel=this.$element.find('[data-group="slides"] ul'),this.$rel.css("position","relative"),this.slideChangeInProgress=!1,this.interval=!1,this.options=t,this.current=2,this.slide=1,this.set(2,!0),this.options.onInit.call(this),this.runAnimations(),null},r.prototype={getGlobalWidth:function(){return this.$element.width()},updateControls:function(){return this.$pages.removeClass("active"),this.$pages.filter("[data-jump-to="+(this.current-1)+"]").addClass("active")},runAnimations:function(){var t,i;return i=this,t=n(this.$slides[this.current-1]).find("[data-animate]"),t.each(function(){var t;return t=n(this),i.options.animations[t.data("animate")](t,t.data("delay"),t.data("length"))})},hideAnimatedCaptions:function(t){return n(this.$slides[t-1]).find("[data-animate]").css({opacity:0})},calculateScroll:function(n){var t;return t=this.getGlobalWidth(),(n-1)*t},resize:function(){return this.$rel.css("right",this.calculateScroll(this.current))},jump:function(n,t,i){var f,e,r,u;return t==null&&(t=this.options.transitionTime),i==null&&(i=!1),r=this,n===r.current&&(i=!0),this.$slides.length>=n&&!this.slideChangeInProgress&&(e=this.getGlobalWidth(),i||this.hideAnimatedCaptions(n),u=void 0,this.options.parallax&&(this.currentBgPosition=parseInt(r.$slidesContainer.css("background-position")),this.moveStartScroll=parseInt(this.$rel.css("right"),10),u=function(){var n;return n=Math.round(r.currentBgPosition-(r.moveStartScroll-parseInt(r.$rel.css("right"),10))*r.options.parallaxDistance*r.options.parallaxDirection)+"px 0",r.$slidesContainer.css("background-position",n)}),f={duration:t,step:u,done:function(){return n===1?(r.hideAnimatedCaptions(r.$slides.length-1),r.set(r.$slides.length-1)):n===r.$slides.length?(r.hideAnimatedCaptions(2),r.set(2)):(r.current=n,r.slide=n-1),r.updateControls(),i||r.runAnimations(),r.options.onSlideChange.call(r),null},always:function(){return r.slideChangeInProgress=!1,null}},this.slideChangeInProgress=!0,this.$rel.animate({right:this.calculateScroll(n)},f)),null},set:function(n,t){var i;return t==null&&(t=!1),i=this.getGlobalWidth(),this.$rel.css("right",this.calculateScroll(n)),this.current=n,this.slide=n-1,this.updateControls(),null},movestart:function(n){return n.distX>n.distY&&n.distX<-n.distY||n.distX<n.distY&&n.distX>-n.distY?n.preventDefault():(this.stop(),this.options.parallax&&(this.currentBgPosition=parseInt(this.$slidesContainer.css("background-position"))),this.hideAnimatedCaptions(this.current-1),this.hideAnimatedCaptions(this.current+1),this.moveStartScroll=parseInt(this.$rel.css("right"),10),this.$rel.stop(),this.$rel.addClass("drag"),this.timeStart=new Date)},move:function(n){var t;return this.options.parallax&&(t=Math.round(this.currentBgPosition-n.distX*this.options.parallaxDistance*this.options.parallaxDirection)+"px 0",this.$slidesContainer.css("background-position",t)),this.$rel.css("right",this.moveStartScroll-n.distX)},moveend:function(n){var i,r,u,f,t;return i=Math.abs(n.distX),f=(new Date).getTime()-this.timeStart.getTime(),u=this.getGlobalWidth(),r=i/u,t=f/r*(1-r),t=t<1e3?t:1e3,this.$rel.removeClass("drag"),i<u/this.options.moveDistanceToSlideChange?this.jump(this.current,t,!0):n.distX<0?this.next(t):this.prev(t)},stop:function(n){return n==null&&(n=!0),clearInterval(this.interval),n&&(this.$element.off("mouseover"),this.$element.off("mouseleave")),null},start:function(){var n;return n=this,this.interval=setInterval(function(){return n.next()},this.options.interval)},autoplay:function(){var n;n=this;this.stop();this.start();this.$element.on("mouseover",function(){return n.stop(!1)});return this.$element.on("mouseleave",function(){return n.stop(!1),n.start()})},prev:function(n,t){return n==null&&(n=this.options.transitionTime),t==null&&(t=!1),this.jump(this.current-1,n,t),this.options.onSlidePrev.call(this),this.options.onSlidePageChange.call(this)},next:function(n,t){return n==null&&(n=this.options.transitionTime),t==null&&(t=!1),this.jump(this.current+1,n,t),this.options.onSlideNext.call(this),this.options.onSlidePageChange.call(this)}},n.fn.responsiveSlider=function(t){var f,i,e,o,u;if(o=this,i=n.extend({},n.fn.responsiveSlider.defaults,typeof t=="object"&&t),i.animations=n.fn.responsiveSlider.animations,e={next:"next",prev:"prev",stop:"stop",start:"autoplay"},f=function(t){var e,o,u,f;i=n.metadata?n.extend({},i,t.metadata()):i;f=t.find("ul li");f.length>1&&(e=n(f[0]),o=n(f[f.length-1]),e.before(o.clone()),o.after(e.clone()));t.data("slider",u=new r(t,i));i.autoplay&&(u.interval=setInterval(function(){return u.next()},i.interval),u.autoplay());n(window).on("resize",function(){return u.resize()});t.find("[data-jump]").on("click",function(){return u[n(this).data("jump")](),!1});t.find("[data-jump-to]").on("click",function(){return u.jump(n(this).data("jump-to")+1),!1});if(i.touch)return t.find('[data-group="slide"]').on("movestart",function(n){return u.movestart(n)}).on("move",function(n){return u.move(n)}).on("moveend",function(n){return u.moveend(n)})},u=function(){return o.each(function(){var r,u;return r=n(this),u=r.data("slider"),u?typeof t=="string"?u[e[t]]():typeof t=="number"&&u.jump(Math.abs(t)+1):f(r,i),r})},n.fn.responsiveSlider.run)return u();n(window).on("load",u);return n.fn.responsiveSlider.run=!0},n.fn.responsiveSlider.animations={slideAppearRightToLeft:function(n,t,i){var u,r;return t==null&&(t=0),i==null&&(i=300),r={"margin-left":100,"margin-right":-100},n.css(r),u=function(){return r={"margin-left":0,"margin-right":0,opacity:1},n.animate(r,i)},t>0?setTimeout(u,t):u()},slideAppearLeftToRight:function(n,t,i){var u,r;return t==null&&(t=0),i==null&&(i=300),r={"margin-left":-100,"margin-right":100},n.css(r),u=function(){return r={"margin-left":0,"margin-right":0,opacity:1},n.animate(r,i)},t>0?setTimeout(u,t):u()},slideAppearUpToDown:function(n,t,i){var u,r;return t==null&&(t=0),i==null&&(i=300),r={"margin-top":100,"margin-bottom":-100},n.css(r),u=function(){return r={"margin-top":0,"margin-bottom":0,opacity:1},n.animate(r,i)},t>0?setTimeout(u,t):u()},slideAppearDownToUp:function(n,t,i){var u,r;return t==null&&(t=0),i==null&&(i=300),r={"margin-top":-100,"margin-bottom":100},n.css(r),u=function(){return r={"margin-top":0,"margin-bottom":0,opacity:1},n.animate(r,i)},t>0?setTimeout(u,t):u()}},n.fn.responsiveSlider.defaults={autoplay:!1,interval:5e3,touch:!0,parallax:!1,parallaxDistance:1/10,parallaxDirection:1,transitionTime:300,moveDistanceToSlideChange:4,onSlideChange:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSlidePageChange:function(){},onInit:function(){}},n.fn.responsiveSlider.run=!1,t=n('[data-spy="responsive-slider"]'),t.length&&(i={},(u=t.data("autoplay"))&&(i.autoplay=u),(f=t.data("interval"))&&(i.interval=f),(e=t.data("parallax"))&&(i.parallax=e),(s=t.data("parallax-distance"))&&(i.parallaxDistance=parseInt(s,10)),(o=t.data("parallax-direction"))&&(i.parallaxDirection=parseInt(o,10)),(h=t.data("touch"))||(i.touch=h),(c=t.data("transitiontime"))&&(i.transitionTime=c),t.responsiveSlider(i)),null})(jQuery)}.call(this);var JScriptRoles=function(n,t){function r(n,t){if(!JCommonUtils.isEmpty(n)){var i=t;return n.indexOf("input-no-sign")!=-1&&(i=JCommonUtils.toNoSign(i)),n.indexOf("input-letter-or-digit")!=-1&&(i=i.replace(/[^0-9a-zA-Z]/g,"")),n.indexOf("input-lowercase")!=-1&&(i=i.toLowerCase()),n.indexOf("input-auth-username")!=-1&&(i=JCommonUtils.toNoSign(i),i=i.toLowerCase(),i=i.replace(/[^0-9a-zA-Z_/\s\s]/g,"")),n.indexOf("input-number-only")!=-1&&(i=i.replace(/[^0-9.,]/g,"")),n.indexOf("input-email")!=-1&&(i=JCommonUtils.toNoSign(i),i=i.toLowerCase(),i=i.replace(/\s\s+/g,""),i=i.replace(/[^0-9a-zA-Z_@.]/g,"")),i=i.replace(/\s\s+/g," "),i.trim()==""&&(i=""),i}}var i={};return i.register=function(){t(document).on("input",'*[script-role~="input-filter"]',function(n){i.inputFilterSpec(n.currentTarget,n)});t(document).on("change",'*[script-role~="input-filter"]',function(n){i.inputFilterSpec(n.currentTarget,n)})},i.inputFilterSpec=function(n,u){var e=t(n),f=e.attr("script-role").split(" ");i.setValueKeepSelectionIndex(n,r(f,n.value));i.handCustomInput(n,u,function(){i.setValueKeepSelectionIndex(n,r(f,n.value))})},i.setValueKeepSelectionIndex=function(n,t){var i=n.selectionStart,r=n.selectionEnd;n.value=t;n.setSelectionRange(i,r)},i.handCustomInput=function(t,i,r){if(i==undefined&&(i=n.event||i),i.type=="paste"){i.preventDefault();return}var u=i.charCode||i.keyCode;if(i!==undefined)switch(u){case 16:break;case 17:break;case 18:break;case 27:this.value="";break;case 35:break;case 36:break;case 37:break;case 38:break;case 39:break;case 40:break;case 78:break;case 110:break;case 190:break;default:typeof r=="function"&&r()}},i}(window,jQuery),JCommonUtils=function(n,t){var i={};return i.KEY_CODE_ENTER=13,i.KEY_CODE_TAB=9,i.KEY_CODE_SPACE=32,i.KEY_LEFT=37,i.KEY_RIGHT=39,i.KEY_BACKSPACE=8,i.UNDERLINE="_",i.STR_COMMA=",",i.STR_NA_VALUE="---",i.TYPE_OBJECT="object",i.isObject=function(n){return typeof n==i.TYPE_OBJECT},i.isArray=function(n){return Array.isArray(n)},i.isNull=function(n){return n==undefined||n==null||n.length==0||n=="null"||n=="undefined"},i.isNotNull=function(n){return!i.isNull(n)},i.printLocal=function(n,t){n.toLocaleString(t)},i.localStore={set:function(n,t){try{return localStorage.setItem(n,t),!0}catch(i){return!1}},get:function(n){try{return localStorage.getItem(n)}catch(t){return null}}},i.roundNumber=function(n,t){var r=parseInt(t)||0,i=Math.pow(10,r);return Math.round(n*i)/i},i.dateServerToClient=function(n){if(i.isEmpty(n))return n;var t=n.replace("/Date(","").replace(")/",""),r=parseInt(t),u=new Date(r);return moment(u).format("DD/MM/YYYY")},i.dateFormatVN=function(n){if(i.isEmpty(n))return n;var t=n.replace("/Date(","").replace(")/",""),r=parseInt(t),u=new Date(r);return moment(u).format("DD/MM/YYYY HH:mm:ss")},i.isEmpty=function(n){return n==undefined||n==null||n.length==0},i.isNotEmpty=function(n){return!i.isEmpty(n)},i.isNill=function(n){return n==null||n==undefined},i.isNotNill=function(n){return!i.isNill(n)},i.checkLeftRightOrBackspace=function(n){return n.which==i.KEY_LEFT||n.which==i.KEY_RIGHT||n.which==i.KEY_BACKSPACE||n.which==i.KEY_CODE_SPACE||n.which==0},i.keepSelectIndex=function(n){var i=t(n);i.blur();i.select()},i.inputToNoSign=function(n){var r=i.checkCtrlA(n);if(r||i.checkLeftRightOrBackspace(n))return!0;if(i.checkEnterShift(n)&&!r)return!1;var u=t(n.target),f=u.val(),e=n.target.selectionStart,o=n.target.selectionStart;f&&(u.val(i.toNoSign(f)),r?u.select():(n.target.selectionStart=e,n.target.selectionEnd=o))},i.toUpperCase=function(n){return i.isEmpty(n)?"":n.toUpperCase()},i.checkEnterShift=function(n){return n.ctrlKey||n.shiftKey},i.checkCtrlA=function(n){return n.which==65&&n.ctrlKey},i.isWord=function(n){return n>=65&&n<=90?!0:n>=97&&n<=122?!0:!1},i.isNumberKey=function(n){return n>=48&&n<=57?!0:!1},i.toNoSign=function(n){if(n=="")return"";var t=n;return t=t.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a"),t=t.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e"),t=t.replace(/ì|í|ị|ỉ|ĩ/g,"i"),t=t.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o"),t=t.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u"),t=t.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y"),t=t.replace(/đ/g,"d"),t=t.replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g,"A"),t=t.replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g,"E"),t=t.replace(/Ì|Í|Ị|Ỉ|Ĩ/g,"I"),t=t.replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g,"O"),t=t.replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g,"U"),t=t.replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g,"Y"),t.replace(/Đ/g,"D")},i.getElement=function(n,r){return i.isEmpty(r)&&(r="html"),i.isEmpty(n)&&(n=r),t(n)},i.registerDatepicker=function(n){var r=JCommonUtils.getElement(n),u=r.find(".datetimepicker:not(.registered-dp)");u.each(function(){var n=t(this),r={format:"dd/mm/yyyy",language:"vi",autoclose:!0},u=n.attr("start-date"),f=n.attr("end-date");JCommonUtils.isNotEmpty(u)&&(r.startDate=i.getRangeDateConfigs(u));JCommonUtils.isNotEmpty(f)&&(r.startDate=i.getRangeDateConfigs(f));n.datepicker(r);n.parent().find(".input-group-addon").on("click",function(){n.trigger("focus")})});r.find(".datetimepicker:not(.registered-dp)").addClass("registered-dp");t.validator&&t.validator.methods&&t.validator.methods.date&&(t.validator.methods.date=function(n,t){return!t.required||JDateUtils.validateDate(n)})},i.regisValidateUnobtrusive=function(n){if(!i.isEmpty(n)){var r=null;r=n.is("form")?n:n.find("form");r.each(function(){t.validator.unobtrusive.parse(this)})}},i.getRangeDateConfigs=function(n){if(JCommonUtils.isEmpty(n))return"";var t=n,i=JDateUtils.today();return n=="today"&&(t=JDateUtils.toLocaleString(i)),n=="+1d"&&(t=JDateUtils.toLocaleString(JDateUtils.dateAdd(i,1,"days"))),n=="-1d"&&(t=JDateUtils.toLocaleString(JDateUtils.dateAdd(i,-1,"days"))),t},i.isInteger=function(n){return i.isEmpty(n)?!1:!isNaN(parseInt(n))},i.evalFunc=function(n){typeof n=="function"&&n()},i.isNullOrUndefined=function(n){return n==null||n==undefined},i.ajaxStackMap={},i.startAjaxStack=function(n,t){(i.isNullOrUndefined(i.ajaxStackMap[n])&&(i.ajaxStackMap[n]=[]),i.ajaxStackMap[n].indexOf(t)==-1)&&i.ajaxStackMap[n].push(t)},i.arrayRemove=function(n,t){if(!i.isEmpty(n)&&!i.isEmpty(t)){var r=n.indexOf(t);r!=-1&&n.splice(r,1)}},i.endAjaxStack=function(n,t,r){i.isNullOrUndefined(i.ajaxStackMap[n])||i.arrayRemove(i.ajaxStackMap[n],t);i.isEmpty(i.ajaxStackMap[n])&&i.isFunction(r)&&r()},i.isFunction=function(n){return typeof n=="function"},i.currentPage=function(){return n.location.href},i.goPage=function(t){n.location.href=urlSubDomain+t},i.goPageFromOrigin=function(t,r){(i.isNill(t)||t=="null/")&&r||i.goPage(n.location.origin+t)},i.refreshPage=function(){location.reload()},i.eval=function(expression){try{return eval(expression)}catch(e){return""}},i.scrollTop=function(){t("html, body").animate({scrollTop:0},"fast")},i.stringToNumberString=function(n){return/^\d+$/.test(n)?n:""},i.genRandomID=function(n){var t,i,r;for(JCommonUtils.isNill(n)&&(n=5),t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r<n;r++)t+=i.charAt(Math.floor(Math.random()*i.length));return t},i.split=function(n,t){if(JCommonUtils.isNill(n))return[];JCommonUtils.isNill(t)&&(t=i.STR_COMMA);n=n.trim();for(var u=n.split(t),r=0;r<u.length;r++)u[r]=u[r].trim();return u},i.ajax=function(r){ajaxConfigs={type:r.type,url:urlSubDomain+r.url,beforeSend:function(i){t.get(urlSubDomain+"/Home/_IsAuthenticated",function(t){t.status=="F"&&n.location.replace(n.location.origin)}).fail(function(){n.location.replace(n.location.origin)}).error(function(){n.location.replace(n.location.origin)});typeof r.beforeSend=="function"&&r.beforeSend(i)},success:function(n){if(typeof r.success=="function"&&r.success(n),typeof r.onEndRequest=="function")r.onEndRequest(n);i.registerFormDefault();JBootstrap.domChange()},error:function(n,t,i){if(i!=null&&i.message=="Unexpected end of JSON input"&&typeof r.success=="function"&&r.success(null),typeof r.error=="function"&&r.error(n,t,i),typeof r.onEndRequest=="function")r.onEndRequest(null,n,t,i)},always:function(){typeof r.always=="function"&&r.always()}};r.async!=null&&(ajaxConfigs.async=r.async);r.data!=null&&(ajaxConfigs.data=r.data);r.cache!=null&&(ajaxConfigs.cache=r.cache);r.contentType!=null&&(ajaxConfigs.contentType=r.contentType);r.processData!=null&&(ajaxConfigs.processData=r.processData);r.dataType!=null&&(ajaxConfigs.dataType=r.dataType);r.context!=null&&(ajaxConfigs.context=r.context);t.ajax(ajaxConfigs).done(function(n){typeof r.done=="function"&&r.done(n)}).fail(function(n){typeof r.fail=="function"&&r.fail(n)})},i.lyLoading=function(n){n&&n.length!=0||(n=t("body"));n.addClass("ly-loading")},i.removeLyLoading=function(n){n||n.length!=0||(n=t("body"));n.removeClass("ly-loading");n.find(".ly-loading").removeClass("ly-loading")},i}(window,jQuery),JStringUtils=function(){var n={};return n.reverse=function(n){return n.split("").reverse().join("")},n}(window,jQuery),JDateUtils=function(){var n={};return n.getAge=function(n){var t=new Date,i=new Date(n);return t.getFullYear()-i.getFullYear()},n.cultureForcus="vi-VN",n.cultureFormat={"vi-VN":{date:"DD/MM/YYYY",datetime:"HH:mm:ss DD/MM/YYYY"},"en-US":{date:"MM/DD/YYYY",datetime:"HH:mm:ss MM/DD/YYYY"}},n.today=function(){var t=n.cultureFormat[n.cultureForcus].date;return moment(moment().format(t),t)._d},n.stringDateTostringDate=function(t,i,r){var u=moment(t,n.cultureFormat[n.cultureForcus].date);return moment(u).format(r)},n.parseDate=function(t){var i=moment(t,n.cultureFormat[n.cultureForcus].date);return JCommonUtils.isNotEmpty(i)?i._d:null},n.greaterToday=function(t){var i=n.parseDate(t),r=n.today();return i.getTime()>=r.getTime()},n.greater=function(n,t){return JCommonUtils.isEmpty(n)||JCommonUtils.isEmpty(t)?!1:n.getTime()>=t.getTime()},n.printDateJsonLocale=function(t){if(JCommonUtils.isEmpty(t))return"";var i=t.substring(6,t.length-2),r=new Date(parseFloat(i)),u=n.cultureFormat[n.cultureForcus].date;return moment(r).format(u)},n.validateDate=function(t){var i=n.parseDate(t);return i!=null},n.toLocaleString=function(n){return JCommonUtils.isEmpty(n)?"":moment(n).format(JDateUtils.cultureFormat[JDateUtils.cultureForcus].date)},n.dateAdd=function(n,t,i){return JCommonUtils.isEmpty(n)?null:moment(n).add(t,i).toDate()},n}(window,jQuery),JMath=function(){var n={};return n.roundFloat=function(n,t){var r=parseInt(t)||0,i=Math.pow(10,r);return Math.round(n*i)/i},n.floatToInt=function(n){return n|0},n.isInt=function(n){return n!=""&&!isNaN(n)&&Math.round(n)==n},n.isFloat=function(n){return JCommonUtils.isNull(n)||JCommonUtils.isNotNull(n)&&n.match(REG_FLOAT_IN)&&!isNaN(Number(n))},n.isFloatLocale=function(t){return JCommonUtils.isNull(t)||JCommonUtils.isNotNull(t)&&JCommonUtils.isNotNull(n.parseFloatLocale(t))},n.parseFloatLocale=function(t){if(JCommonUtils.isNull(t))return t;var i;return(JGlobal.regFloat==REG_FLOAT_VI?i=t.replace(/\./g,"").replace(",","."):JGlobal.regFloat==REG_FLOAT_IN&&(i=t.replace(/\,/g,"")),!n.isFloat(i))?null:parseFloat(i)},n.floatToLocaleString=function(t,i){var v,o,r,y,u,h,c,e,l,s,a,f;if(JCommonUtils.isNull(t))return null;if(v=t+"",o=!0,v.indexOf("e+")!=-1&&(o=!1),r="",JCommonUtils.isNotNull(i)&&n.isInt(i)&&i>0&&o)if(y=t,u=t.toFixed(0),r=t.toLocaleString(JGlobal.language),h=0,c=(t+"").length,c>u.length&&(h=c-1-u.length),t<u&&u--,e=(t-u).toFixed(h),u=u*1+.1,r=u.toLocaleString(JGlobal.language),l=r,r=r.substr(0,r.length-1),e!=0)if(s=e.length-2,s>i)r+=e.substr(2,i);else if(s<i)for(r+=e.substr(2),f=0;f<i-s;f++)r+="0";else r+=e.substr(2);else if(a=!1,l.indexOf(",")!=-1&&(a=!0),a)for(f=0;f<i;f++)r+="0";else r=l+",000";else r=t.toLocaleString(JGlobal.language),o||(r=t.toLocaleString(JGlobal.language)+",000");return r},n.printNumberLocale=function(t,i){return JCommonUtils.isNotNull(t)?n.floatToLocaleString(t,i):JStringUtil.STR_NA_VALUE},n.regenFloatLocaleString=function(t){if(JCommonUtils.isNull(t))return null;var i,r;return JGlobal.regFloat==REG_FLOAT_VI?i=",":JGlobal.regFloat==REG_FLOAT_IN&&(i="."),r=t.split(i),r.length==1?n.floatToLocaleString(n.parseFloatLocale(t)):n.floatToLocaleString(n.parseFloatLocale(r[0]))+i+r[1]},n.METRIC_PREFIX_VALUE={none:1,kilo:1e3,mega:1e6,giga:1e9},n}(window)