"".concat(e.address.fullStreetAddress,", ").concat(e.address.cityStateZip):"",r=a.coStarBrand.is("citysnap");return e.listing&&e.listing.sourceNumber&&r?t+=" | RLS #".concat(e.listing.sourceNumber):e.listing&&e.listing.sourceNumber&&!r&&(t+=" | MLS #".concat(e.listing.sourceNumber)),t},getGraphImage:function(e){return{raw:e,large:e.replace("{w}","1000").replace("{h}","120")}},getPieChartImage:function(e,t){var r="";for(var n in t)t.hasOwnProperty(n)&&(r+=t[n].Value+" - "+t[n].Label,r+="|");return{raw:e,small:e.replace("{w}","320").replace("{h}","160").replace("{color0}","00A3E1").replace("{color1}","56BBE1").replace("{color2}","abddf0").replace("{color3}","cccccc")+"&chdl="+r.slice(0,-1)}},getStatusBadges:function(e){function t(e,t,r){this.text=e,this.color=t,this.secondaryColor=r}var r=[];if(e.listing){if(e.listing.specialFeatures.comingSoon){var n=new t("Coming Soon","#fac332","");r.push(n)}else{var o,i,s=2===e.transactionType.raw;if(e.listing.sListingStatus.active)o=s? "increased":"dropped"," ").concat(c.string.getPrice(a).dollars," on ").concat(r[0].date.monthDayYear)}}return null}function i(t){return t.filter(function(t){return t.status.isCurrentListing})[0]}var o=t("ControllerObjects"),c=t("Utilities"),u=new o.Unique(e),d=new o.Callbacks,l=new o.ChildControllerManager,g=new o.StateManager(l,{});new o.Getter({namespace:u.get(),success:function(t){},template:{name:"controllers/ListingHistoryCapsule",html:""}});return{update:r,restore:function(t){g.restore(t,n)},uninit:function(){l.uninit()},getState:g.getState.bind(g),register:d.register.bind(d),event:function(t,e){l.event(t,e)}}}}); (D.$dom&&D.$dom.content)}}),M&&M.listingID){var N=M;w.add("listingDisclaimer",new v.ChildController({type:"controllers/ListingDisclaimer",namespace:I.get(),register:{bubble:r}}),!0),D.updateController("listingDisclaimer",{$dom:P.divListingDisclaimer,data:{mlsID:N.mlsID,sourceNumber:N.sourceNumber,listingID:N.listingID,modificationTimestamp:N.modificationTimestamp}})}M&&M.schools.length>0&&(w.add("schoolDisclaimer",new v.ChildController({type:"controllers/SchoolDisclaimer",namespace:I.get(),register:{bubble:r}}),!0),D.updateController("schoolDisclaimer",{$dom:P.divSchoolDisclaimer})),D.updateController("nearByAreas",{$dom:P.divNearByAreas,data:{propertyAddressID:D.get("propertyAddressID"),propertyID:D.get("propertyID"),listingID:M.listingID?M.listingID:null,propertyAddressItem:M,searchDefinition:D.get("searchDefinition")}}),P.btnSuggestEdit.length&&H.propertyID&&P.btnSuggestEdit.on("click",function(e){return u(H.propertyID),!1}),H.url&&(D.url=new v.ControllerStateUrl(H.url,h.propertyAddress.getPageTitle(H),M.metaDescription)),E&&(E=!1,A.call("bubble",{type:"url.handled",data:H})),A.call("bubble",{type:"url.update"})}function u(e){w.add("userSuggestedEdit",new v.ChildController({type:"controllers/UserSuggestedEdit",namespace:I.get(),register:{bubble:r}}),!0),D.updateController("userSuggestedEdit",{data:{entityID:e,entityType:3}})}function y(e){return{promoCampaign:(null===e||void 0===e?void 0:e.utm_campaign)||null,promoSource:(null===e||void 0===e?void 0:e.utm_source)||null,promoMedium:"web-".concat(k),promoTerm:(null===e||void 0===e?void 0:e.utm_term)||null,promoContent:(null===e||void 0===e?void 0:e.utm_content)||null,promoDate:(null===e||void 0===e?void 0:e.date)||null}}function m(){w.uninit()}function g(e,t){switch(e){case"window.newSize":A.call("window.resize",t),k=t.size.new}w.event(e,t)}var v=e("ControllerObjects"),b=e("Objects"),h=e("Utilities"),C=e("controllers/Variable"),f=e("Application"),I=new v.Unique(t),A=new v.Callbacks,w=new v.ChildControllerManager,D=new v.StateManager(w,{propertyAddressItem:[["listingID","listing.id"],["propertyID","propertyID"],["propertyAddressID","id"]],listingID:!0,propertyID:!0,propertyAddressID:!0,actionBar:!0});w.add("mediaMaster",new v.ChildController({type:"controllers/MediaCenter/MediaMaster",namespace:I.get(),register:{bubble:r}})),w.add("schema",new v.ChildController({type:"controllers/Property/PropertyAddressSchema",namespace:I.get(),register:{bubble:r}})),w.add("searchBreadCrumbs",new v.ChildController({type:"controllers/SearchBreadcrumbs",namespace:I.get(),register:{bubble:r}})),w.add("header",new v.ChildController({type:"controllers/Property/PropertyAddressHeader",namespace:I.get(),register:{bubble:r}})),w.add("badges",new v.ChildController({type:"controllers/Badges",namespace:I.get(),register:{bubble:r}})),w.add("details",new v.ChildController({type:C,namespace:I.get(),register:{bubble:r}})),w.add("propertyCommuteTimes",new v.ChildController({type:"controllers/PropertyCommuteTimes",namespace:I.get(),register:{bubble:r}})),w.add("nearByAreas",new v.ChildController({type:"controllers/Property/NearByAreas",namespace:I.get(),register:{bubble:r}})),w.add("collapses",new v.ChildController({type:"controllers/Property/PropertyCollapses",namespace:I.get(),register:{bubble:r}})),w.add("likelihoodToList",new v.ChildController({type:"controllers/Property/LikelihoodToList",namespace:I.get(),register:{bubble:r}})),w.add("ownershipSnapshot",new v.ChildController({type:"controllers/Property/OwnershipSnapshot",namespace:I.get(),register:{bubble:r}}));var P,S,T,B,H,M,L,k,O,j={main:new v.Getter({namespace:I.get(),success:function(e){try{d(e)}catch(e){throw D&&console.info(D),e}},template:{url:"controllers/Property/PropertyAddressMaster.html",dom:["divSchema","divActionBar","divHeader","divBadges","divPriceContainer","spanEstMortgage","divListingHistoryCapsule","divBreadCrumbs","divKeyStats","divSideBar","divThrobber","divDetails","divListingRemarks","divPropertySummary","divPropertyAdminPanel","divOpenHouses","divHistory","divAnalysis","divMobileActionsContainer","divMobileConversations","divMobileAgents","divCollapses","divListingDisclaimer","divSchoolDisclaimer","divPropertyCommuteTimes","listingMediaCardsContainer","listingMediaCards","listingMediaCircles","divNearByAreas","divLikelihoodToList","divOwnershipSnapshot","divUnits","buildingSearchMatches","btnSuggestEdit","divPropertyAmenities","aExploreNeighborhood","divExploreNeighborhoodContainer","idxDisclaimer","spanEstTax","spanEstHOA"]}}),itemByIds:new v.Getter({namespace:I.get(),type:b.HSPropertyAddressItem,webService:"/service/PropertyAddresses/GetByIDs",success:n,cache:{expire:5}}),getByUrl:new v.Getter({namespace:I.get(),type:b.HSPropertyAddressItem,webService:"/service/PropertyAddresses/GetByUrl",cache:{expire:5}}),getListingDetails:new v.Getter({namespace:I.get(),type:b.HSListingDetail,webService:"/service/Listings/GetDetails",success:function(e){try{c(e,"/Listings/GetDetails")}catch(e){throw D&&console.info(D),e}},cache:{expire:5}}),getPropertyAddressDetails:new v.Getter({namespace:I.get(),type:b.HSPropertyAddressDetail,webService:"/service/PropertyAddresses/GetDetails",success:function(e){try{c(e,"/PropertyAddresses/GetDetails")}catch(e){throw D&&console.info(D),e}},cache:{expire:5}}),getPropertyDetails:new v.Getter({namespace:I.get(),type:b.HSPropertyDetail,webService:"/service/Properties/GetDetails",success:function(e){try{c(e,"/Properties/GetDetails")}catch(e){throw D&&console.info(D),e}},cache:{expire:5}})},E=!1,U=new b.LocalStorage("MLSFeedbackParams");f.getDeviceSize(function(e){k=e}),f.getAppMode(function(e){O=e});!function(){var e=$.Deferred();f.getCurrentUser(function(t){L=t.user,e.resolve()})}();return{update:o,restore:function(e){D.restore(e,s)},uninit:m,getState:D.getState.bind(D),register:A.register.bind(A),event:g}}});