"use strict";!function(e){function o(o){if(e("#banner-line").length){var n=e(o),t=n.find(".js-search-form");new app.Vivus("banner-line",{type:"async",start:"autostart",ignoreInvisible:!1,duration:50},function(){var o=e("#banner-line").closest(".slider__item");o.hasClass("slick-slide")&&!o.hasClass("slick-active")||(n.find(".js-arrow-end").css({opacity:1}),t.addClass("form--anim"))})}}function n(o){var n=e(o);n.length&&n.each(function(){var o=e(this),n=o.find(".js-slick-current"),t=o.find(".js-slick-total");o.find(".js-slick-slider").on("init",function(e,o){t.html(o.slideCount)}).slick({dots:!1,infinite:!0,speed:300,slidesToShow:1,centerMode:!1,prevArrow:o.find(".js-slick-prev"),nextArrow:o.find(".js-slick-next")}).on("afterChange",function(e,o,t){n.html(t+1+" /")})})}function t(o,n){var t=e(o);if(t.length){var a=[];requestAnimationFrame(function(){app.createMap(t,e(".js-map-btn"),function(){var e=new google.maps.Map(t[0],s);a=[],_.each(n,function(o){var n=i(o),s=app.createGmapInfoboxMarker(e,new google.maps.LatLng(o.lat,o.lng),o.address,n,t.data("infoboxTheme"));a.push(s)}),app.createGmapClustering(e,a)})})}}function a(o,n){var t=e(o);if(t.length){var a=e(".js-map-btn"),i=t.find(".js-map");app.createMap(i,a,function(){function o(e){d?d.setPosition(e):r(e.lat(),e.lng()),l(e.lat(),e.lng()),n(e)}function n(e){f.geocode({latLng:e},function(e,o){o==google.maps.GeocoderStatus.OK?e[0]?g[0].value=e[0].formatted_address:g[0].value="No results":g[0].value=o})}function a(){var e=h.getPlace();if(e.geometry){if(p.panTo(e.geometry.location),p.setZoom(15),d){var o=new google.maps.LatLng(e.geometry.location.A,e.geometry.location.F);d.setPosition(o)}else r(e.geometry.location.A,e.geometry.location.F);l(e.geometry.location.A,e.geometry.location.F)}else h.placeholder="Enter a address"}function r(e,n){var t=new google.maps.LatLng(e,n);d=app.createGmapMarker.createAdvanced({position:t,map:p,draggable:!0}),google.maps.event.addListener(d,"dragend",function(){o(d.getPosition())})}function l(e,o){m[0].value=e,m[1].value=o}function c(){for(var e=0;e"+e.address+"
Type:
"+e.type+"
Area:
"+e.area+" m2
Bedrooms:
"+e.bedrooms+"
$"+e.price+" Details"}app.initTheme({colorTheme:"default",loadSvgWithAjax:!1}),app.activateHeaderSpy(),app.activateScrollToTopSpy(),app.scrollAnimation(),app.activateUIPanel();var s={zoom:10,center:new google.maps.LatLng(33.74229160384012,-117.86845207214355),scrollwheel:!1,zoomControl:!0,mapTypeControl:!0,autocomplete:{componentRestrictions:{country:"us"}},mapTypeControlOptions:{position:google.maps.ControlPosition.LEFT_TOP},zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_CENTER},scaleControl:!0,scaleControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},panControl:!0,panControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP}};!function(o){e(o).length&&plyr.setup()}(".player"),function(o){var n=e(o);n.length&&n.find(".js-slick-slider").slick({dots:!1,infinite:!0,speed:300,slidesToShow:5,autoplay:!0,accessibility:!1,prevArrow:n.find(".js-partners-prev"),nextArrow:n.find(".js-partners-next"),responsive:[{breakpoint:1100,settings:{slidesToShow:4}},{breakpoint:1e3,settings:{slidesToShow:3}},{breakpoint:768,settings:{slidesToShow:1}}]})}("#partners-slider"),function(o){var n=e(o),t=e(".widget select");n.length&&n.select2({width:"100%"}),t.length&&t.select2({width:"100%"})}("select.form-control"),function(o){function n(){t.trigger("formChange")}var t=e(o),a=t.find(".js-select-checkboxes"),i=t.find(".js-select-checkboxes"),s=t.find(".js-search-range"),r=t.find('input[type="text"]'),l=t.find("textarea"),c=t.find("select"),p=t.find('input[type="checkbox"]');a.each(function(){var o=e(this),n=e(this).prev(".js-select-checkboxes-btn"),t=n.data("placeholder");o.find(".in-checkbox").change(function(){var o,a,i=[];o=e(this).closest(".js-select-checkboxes"),e(o).find(".in-checkbox:checked").each(function(){var o=e(this).next("label").text();i.push(o)}),a=i.join(", ")||t,e(n).text(a)})}),e(".js-select-checkboxes-reset").on("click",function(){var o=e(this).closest(".js-select-checkboxes");o.find('input[type="checkbox"]').prop({checked:!1,indeterminate:!1}),o.find('input[type="checkbox"]').first().trigger("change")}),e(".js-select-checkboxes-accept").on("click",function(){e(this).closest(".js-select-checkboxes").closest(".dropdown").removeClass("open")}),e(".js-form-reset").on("click",function(){r.val(""),l.text(""),c.each(function(o,n){e(n).find("option").removeAttr("selected"),e(n).trigger("change")}),p.prop({checked:!1,indeterminate:!1}),i.each(function(o,n){e(n).find('input[type="checkbox"]').first().trigger("change")}),s.each(function(o,n){e(n).data("ionRangeSlider").reset()})}),e("body").on("click",".js-dropdown-menu",function(e){e.stopPropagation()});var d=e(".js-checkboxes-tree");d.length&&(d.bonsai(),d.qubit());var f=_.debounce(n,500);s.on("change",f),r.on("input",n),l.on("change",n),c.on("change",n),p.on("change",n)}(".js-search-form"),function(o){e(o).length&&app.createPhotoSwipe(o,{})}(".js-gallery-item"),function(o){var n=e(o);n.length&&(n.find(":submit"),n.parsley())}(".js-contact-form"),function(o){var n=e(o);n.length&&n.parsley().on("form:success",function(e){return app.notifier.showSuccess("You have been successfully subscribed!"),!1}).on("form:error",function(e){return app.notifier.showError("Subscription failed! Please try again."),!1})}(".js-subscribe-form"),function(o){var n=e(o);n.length&&n.find(".js-slick-slider").slick({dots:!0,infinite:!0,speed:800,slidesToShow:1,autoplay:!0,autoplaySpeed:5e3})}("#review-slider"),function(n){function a(){p||"lg"===app.gridSize.get()&&requestAnimationFrame(function(){l.hasClass("navbar--overlay")&&(r.addClass("header--white"),l.addClass("navbar--overlay-map")),c.addClass("opened"),s.addClass("form--white"),p=!0})}var i=e(n);if(i.length){var s=i.find(".js-search-form"),r=e(".header"),l=e("#header-nav"),c=i.find(".map");i.addClass("banner--play"),s.on("formChange",_.throttle(a,500)),o(n),t(".js-map-index-canvas");var p=!1}}(".js-banner"),function(o){var n=e(o);if(n.length){var t=n.find(".js-slick-slider");t.slick({dots:!1,infinite:!0,speed:300,slidesToShow:1,lazyLoad:"progressive",prevArrow:n.find(".js-banner-prev"),nextArrow:n.find(".js-banner-next"),responsive:[{breakpoint:1300,settings:{centerMode:!1,variableWidth:!1,arrows:!0}}]}),t.on("setPosition",function(e,o){n.addClass("slider--init")})}}("#slider-wide"),function(o){"xs"!==app.gridSize.get()&&e(o).find(".js-slick-slider").slick({dots:!0,infinite:!0,autoplay:!0,autoplaySpeed:3e3,speed:600,slidesToShow:1,lazyLoad:"progressive",accessibility:!1,arrows:!1,focusOnSelect:!1})}(".js-banner-slider"),function(o){var n=e(o);if(n.length){var t,a;n.each(function(){var o=e(this),n=o.find(".js-slick-slider"),i=o.siblings(".slider");t=i.find(".js-slick-slider"),n.slick({dots:!1,infinite:!0,speed:300,slidesToShow:1,centerMode:!1,arrows:!1,accessibility:!1,fade:!0}),a=t.html(),t.slick({slidesToShow:5,slidesToScroll:1,focusOnSelect:!0,arrows:!0,accessibility:!1,centerMode:!0,centerPadding:0,prevArrow:i.find(".js-slick-prev"),nextArrow:i.find(".js-slick-next"),responsive:[{breakpoint:768,settings:{slidesToShow:3}}]});var s,r=e(".js-slider-category");r.on("click",function(){r.removeClass("active"),e(this).addClass("active");var o,i=e(this).data("filter");t.slick("slickRemove",!0,!0,!0),o="all"===i?a:e(a).filter(".slider__item--"+i),t.slick("slickAdd",o),s=t.find(".slick-current").data("slide-rel"),n.slick("slickGoTo",s,!1)}),t.on("afterChange",function(e,o,a,i){s=t.find(".slick-current").data("slide-rel"),n.slick("slickGoTo",s,!1)}).on("click",".slider__item",function(){var o=e(this);s=e(o).data("slide-rel"),n.slick("slickGoTo",s,!1)})})}}(".js-slider-thumbs"),t(".js-map-index-canvas",window.demodata),t(".js-map-canvas-fullscreen",window.demodata),function(o,n,t){var a=e(o),r=e(n);if(a.length&&r){var l,c=new google.maps.LatLng(t.lat,t.lng),p=e(".js-map-btn"),d=e(".js-panorama-btn");app.createMap(a,p,function(){var e=new google.maps.Map(a[0],_.merge(s,{zoom:7,coordinates:c})),o=i(t);app.createGmapInfoboxMarker(e,c,t.address,o,a.data("infoboxTheme"))}),app.createMap(r,d,function(){new google.maps.StreetViewPanorama(r[0],{position:c,pov:{heading:34,pitch:10},zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_CENTER},panControl:!0,panControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP}})}),l=p.add(d).filter(".active");var f=function(o){l&&l.removeClass("active"),(l=e(o)).addClass("active")};p.on("click",function(){"xs"!==app.gridSize.get()&&(f(this),r.css({zIndex:5}),a.css({zIndex:10}))}),d.on("click",function(){"xs"!==app.gridSize.get()&&(f(this),r.css({zIndex:10}),a.css({zIndex:5}))})}}('.js-map-canvas[data-type="map"]','.js-map-canvas[data-type="panorama"]',window.demodata[3]),function(o){var n=e(o);if(n.length){var t=e(o+"-block");n.each(function(){e(this).parsley().on("form:success",function(e){return app.notifier.showSuccess("You have successfully submit the form!"),!1}).on("form:error",function(o){return app.notifier.showError("Submited failed! Please try again."),_.each(t,function(o){var n,t=e(o).find(".parsley-required"),a=e(o).attr("id");t.length&&(e(o).addClass("opened"),e('[data-rel="#'+a+'"]').addClass("active"),(n=e(o).find("#autocomplete-map")).length&&google.maps.event.trigger(n[0],"resize"))}),!1})})}}(".js-form"),function(){var o=e("#range_area"),n=e("#range_price"),t=e("#range_commision"),a=e("#range_room"),i=e("#range_ui");o.length&&o.ionRangeSlider({type:"double",min:0,max:2e3,hide_min_max:!0,hide_from_to:!1,grid:!1,postfix:" sq ft",force_edges:!0,step:10,max_postfix:"+",onFinish:app.rangeInputInteraction}),n.length&&n.ionRangeSlider({type:"double",min:0,max:5e6,hide_min_max:!0,hide_from_to:!1,grid:!1,prefix:"$",force_edges:!0,max_postfix:"+",step:1e3,prettify:function(e){return app.utils.abbreviateNumber(e)},onFinish:app.rangeInputInteraction}),a.length&&a.ionRangeSlider({type:"double",min:0,max:10,from:0,to:10,hide_min_max:!0,hide_from_to:!1,grid:!1,max_postfix:"+",onFinish:app.rangeInputInteraction}),t.length&&t.ionRangeSlider({type:"double",min:0,max:1e4,from:0,to:1e4,hide_min_max:!0,hide_from_to:!1,grid:!1,max_postfix:"+",prefix:"RM ",onFinish:app.rangeInputInteraction}),i.length&&i.ionRangeSlider({type:"double",min:1e3,max:2e3,from:1200,to:1800,hide_min_max:!0,hide_from_to:!1,grid:!1,onFinish:app.rangeInputInteraction})}(),n(".js-slick-blog"),n(".js-slick-plan"),n("#counter-slider"),n("#properties-banner"),function(o,n){var t=e(o);t.length&&function(){var o=new google.maps.LatLng(n.lat,n.lng),a=e(".js-map-btn");app.createMap(t,a,function(){var e=new google.maps.Map(t[0],_.merge(s,{zoom:7,coordinates:o}));app.createGmapMarker.create(e,o,n.address)})}()}(".js-map-canvas-contact",window.demodata[3]),function(o){var n=e(o);n.length&&n.on("click",function(){var o=e(this),n=o.data("state")||"success";return o.addClass("loading"),setTimeout(function(){o.addClass("progress")},500),setTimeout(function(){o.removeClass("loading"),o.removeClass("progress"),o.addClass(n)},1e3),!1})}(".js-btn-demo"),function(o){var n=e(o);n.length&&n.popover()}(".js-popover"),a(".js-map-location-dashboard-submit",{lat:37.7749295,lng:-122.41941550000001}),a(".js-map-location-dashboard",{lat:37.7749295,lng:-122.41941550000001}),a(".js-map-location-dashboard-hidden",{lat:37.7749295,lng:-122.41941550000001}),function(o,n){var t=e(o);if(t.length){var a,s=new L.LatLng(33.74229160384012,-117.86845207214355),r=!1;app.createMap(t,e(".js-map-btn"),function(){r?a.invalidateSize():(a=L.map(t[0],_.merge({zoom:10,center:s,zoomControl:!1,scrollWheelZoom:!1})),L.tileLayer("http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",{maxZoom:19,attribution:'© OpenStreetMap, Tiles courtesy of Humanitarian OpenStreetMap Team'}).addTo(a),L.control.zoom({position:"topright"}).addTo(a),a.invalidateSize(),_.each(n,function(e){var o=i(e);app.createLeafletInfoboxMarker(a,new L.LatLng(e.lat,e.lng),e.address,o,t.data("infoboxTheme"))})),r=!0})}}(".js-map-canvas-leaflet",window.demodata),function(){0!==e(".js-form-property-1").length&&e(".js-form-property-1").parsley().on("form:success",function(o){return app.notifier.showSuccess("You have successfully submit the form! 1"),e('.form-property--dashboard a[href="#Location"]').tab("show"),!1}).on("form:error",function(e){return app.notifier.showError("Submited failed! Please try again. 2"),!1}).on("form:submit",function(e){console.log(arguments),e.submitEvent.preventDefault()})}()}(jQuery);