@maplander/components 0.21.10 → 0.21.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@maplander/components/lib/pipes/address/address-format.pipe.ts","ng://@maplander/components/lib/pipes/address/address-format.module.ts","ng://@maplander/components/lib/utils/classes/filters-wrapper.ts","ng://@maplander/components/lib/utils/classes/mDate.ts","ng://@maplander/components/lib/pipes/format-date/format-date.pipe.ts","ng://@maplander/components/lib/pipes/format-date/format-date.module.ts","ng://@maplander/components/lib/utils/enums/amenity-name.ts","ng://@maplander/components/lib/constantsComponents.ts","ng://@maplander/components/lib/utils.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.pipe.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.module.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.pipe.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.module.ts","ng://@maplander/components/lib/pipes/property-type/property-type.pipe.ts","ng://@maplander/components/lib/pipes/property-type/property-type.module.ts","ng://@maplander/components/lib/directives/format-price/format-price.directive.ts","ng://@maplander/components/lib/directives/format-price/format-price.module.ts","ng://@maplander/components/lib/directives/image-error/image-error.directive.ts","ng://@maplander/components/lib/directives/image-error/image-error.module.ts","ng://@maplander/components/lib/components/document-visor/document-visor.component.ts","ng://@maplander/components/lib/components/document-visor/document-visor.service.ts","ng://@maplander/components/lib/components/document-visor/document-visor.module.ts","ng://@maplander/components/lib/utils/enums/filter-chip-type.ts","ng://@maplander/components/lib/utils/enums/filters-change-type.ts","ng://@maplander/components/lib/components/filters/token.ts","ng://@maplander/components/lib/components/filters/filters.service.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.component.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.module.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.service.ts","ng://@maplander/components/lib/utils/classes/mUtils.ts","ng://@maplander/components/lib/components/property/validators/remove-error.ts","ng://@maplander/components/lib/components/filters/filters.component.ts","ng://@maplander/components/lib/components/property/validators/currency-filter-validator.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.module.ts","ng://@maplander/components/lib/components/filters/filters.module.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.component.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.module.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.component.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.service.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.component.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.service.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.component.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.service.ts","ng://@maplander/components/lib/components/property/token.ts","ng://@maplander/components/lib/components/property/components/stats/stats.component.ts","ng://@maplander/components/lib/components/property/components/stats/stats.service.ts","ng://@maplander/components/lib/components/property/components/property/property.component.ts","ng://@maplander/components/lib/components/property/validators/property-editor-validators.ts","ng://@maplander/components/lib/components/property/components/editor/editor.component.ts","ng://@maplander/components/lib/components/property/validators/phone-fields-validator.ts","ng://@maplander/components/lib/components/property/components/owner-info/owner-info.component.ts","ng://@maplander/components/lib/components/property/components/documents/documents.component.ts","ng://@maplander/components/lib/components/property/components/details/details.component.ts","ng://@maplander/components/lib/components/property/components/slideshow/slide-show.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/date-adapter.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker-header/custom-datepicker-header.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker/custom-datepicker.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker.module.ts","ng://@maplander/components/lib/components/property/components/custom-drag-and-drop/custom-drag-and-drop.component.ts","ng://@maplander/components/lib/components/property/property.module.ts","ng://@maplander/components/lib/components/property-card/token.ts","ng://@maplander/components/lib/components/property-card/property-card.component.ts","ng://@maplander/components/lib/components/property-card/property-card.module.ts","ng://@maplander/components/lib/services/markers/markers.service.ts","ng://@maplander/components/lib/services/markers/markers.module.ts"],"names":["extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","AddressFormatPipe","transform","value","long","country","result","language","street","colony","postalCode","city","state","Pipe","args","name","AddressFormatModule","forChild","ngModule","providers","NgModule","imports","CommonModule","declarations","exports","FiltersWrapper","component","this","_component","open","close","MDate","date","_timestamp","toString","getTimestamp","time","timestamp","getHours","getMinutes","getSeconds","Number","getFullYear","getMonth","getDate","slice","getWeekDayName","day","toLowerCase","getMonthName","month","toDate","cDate","getYear","getMoth","getDay","cTime","Date","getFormat","format","_a","_b","_c","_d","_e","format12Hours","FormatDatePipe","mDate","FormatDateModule","AdjacentCommerce","AdjacentGym","AdjacentPicnic","AirConditioner","Balcony","CustomerParking","DiningRoom","DoubleHeight","DressingRooms","FacingStreet","Finishings","Furnished","Garden","Gym","HighResistanceFloors","HighSpeedInternet","InCommercialArea","InIndustrialPark","InShoppingCenter","Jacuzzi","KitchenServices","MaidsBathroom","ManeuverArea","MeetingRoom","Mezzanine","MixedBuilding","NaturalLighting","Offices","OpenSpace","Platforms","Playground","Playroom","Pool","RailSpur","RailYard","Reception","SecurityGuard","Storage","VisitorParking","NearPublicTransportation","NearShops","OnBusyRoad","CountrySide","Downtown","GoodReachableTraffic","NearFitnessCentre","NearHighway","NearHospital","NearPark","NearSchools","OnQuietRoad","RoofGarden","PetFriendly","DifferentAbilities","ConstantsComponents","Amenities","roofGarden","checked","iconName","AmenityName","petFriendly","differentAbilities","adjacentCommerce","adjacentGym","adjacentPicnic","airConditioner","balcony","customerParking","diningRoom","doubleHeight","dressingRooms","facingStreet","finishings","furnished","garden","gym","highResistanceFloors","highSpeedInternet","inCommercialArea","inIndustrialPark","inShoppingCenter","jacuzzi","kitchenServices","maidsBathroom","maneuverArea","meetingRoom","mezzanine","mixedBuilding","naturalLighting","offices","openSpace","platforms","playground","playroom","pool","railSpur","railyard","reception","securityGuard","storage","visitorParking","features","DurationList","CommissionList","SALE","RENT","SharedCommissionList","LandUseList","LandUseEnum","SINGLE_FAMILY_HOUSING","MULTI_FAMILY_HOUSING","HOUSING_WITH_COMMERCE","HOUSING_WITH_OFFICE","MIXED_HOUSING","COMMERCE","OFFICE","SERVICES","INDUSTRY","AGRICULTURAL","OTHER","AnnounceCheckList","DocumentsList","PFileTypeEnum","DEED","loaded","OWNER_ID","WATER_BILL","ELECTRICITY_BILL","PROPERTY_BILL","CONSTANCY_OF_NO_DEBT","EXEMPTION_TAX","BUILDING_LICENSE","COMPLETION_OF_CONSTRUCTION","ALIGNMENT_AND_OFFICIAL_NUMBER","MORTGAGE","BedroomList","BathroomList","ParkingSpacesList","SurfaceList","ROIList","PropertyTypeList","PropertyTypeEnum","HOUSE","shortName","amenities","RESIDENTIAL","APARTMENT","ROOM","RETAIL","WAREHOUSE","LAND","INVESTMENT","NONE","OfferingTypeList","OfferingTypeEnum","LocateList","USD","locate","currency","MXN","GBP","EUR","BRL","CNY","PropertyStatusList","icon","StatusTypeEnum","ANNOUNCED","EXPIRED","HIDDEN","READY","DRAFT","Utils","round","precision","multiplier","Math","pow","getFilterByPropertyType","filter","type","offering","distance","location","latitude","longitude","upLimitPrice","downLimitPrice","bathrooms","exclusivity","bedrooms","parkingPlaces","extras","mainArea","roi","mls","getInitialFilter","isOPI","listErrorsByPropertyTypeForPublish","errorField","concat","getErrorsForPublish","property","price","description","image","secondaryArea","removeDiacritics","str","diacriticsMap","A","AA","AE","AO","AU","AV","AY","B","C","D","DZ","Dz","E","F","G","H","I","J","K","L","LJ","Lj","M","N","NJ","Nj","O","OI","OO","OU","P","Q","R","S","T","TZ","U","V","VY","W","X","Y","Z","a","aa","ae","ao","au","av","ay","c","dz","e","f","g","h","hv","j","k","l","lj","m","nj","o","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","Symbol","iterator","next","done","tslib_1.__values","keys","replace","MarkerPricePipe","outputPrice","toLocaleString","style","toFixed","MarkerPriceModule","OfferingTypePipe","prefix","response","forEach","OfferingTypeModule","PropertyTypePipe","PropertyTypeModule","FormatPriceDirective","_elRef","_currency","_subscription","Subscription","_el","nativeElement","removeError","control","error","err","errors","setErrors","ngOnChanges","changes","_this","currentValue","_value","validateFormatPrice","add","valueChanges","subscribe","ngAfterViewInit","addEventListener","onFocus","bind","onBlur","formatPrice","ngOnDestroy","unsubscribe","removeEventListener","event","target","isNaN","Directive","selector","ElementRef","CurrencyPipe","Input","FormatPriceModule","ImageErrorDirective","_ref","CDN_URL","constructor","HTMLImageElement","Error","_onError","updateUrl","typeImage","src","ImageErrorModule","DocumentVisorComponent","_data","_dialog","isBase64","btoa","atob","isURL","url","RegExp","test","ngOnInit","URL","revokeObjectURL","Component","template","Inject","MAT_DIALOG_DATA","MatDialogRef","DocumentVisorService","document","data","disableClose","panelClass","Injectable","MatDialog","MATERIAL","MatButtonModule","MatDialogModule","MatIconModule","DocumentVisorModule","SafeUrlModule","entryComponents","OFFERING","PROPERTY_TYPE","PRICE","BEDROOMS","BATHROOMS","PARKING_PLACES","SURFACE","AMENITIES","LISTING","APPLY","INIT","AREA","SAVE","LIST_TYPE","FILTERS_TOKEN","InjectionToken","FiltersService","_config","_startComponent","Subject","_notifier","BehaviorSubject","FiltersChangeType","ft","removeFiltersSaved","LocalStorageService","removeItem","FILTERS_SAVED_KEY","getFiltersSaved","getItem","saveFilters","config","setItem","filters","isSharedProperties","setChange","change","getChanges","asObservable","startComponent","wrapper","onStartComponent","Optional","FabFiltersComponent","_offeringPipe","_filtersService","METERS_TO_SQ","chips","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","sharedProperties","_filter","listingType","offeringType","propertyType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","FabFiltersModule","MatChipsModule","CurrencyConverterService","list","prices","currencies","from","to","valueFrom","getValueByCurrency","valueTo","map","number","MUtils","linSpaceExp","start","stop","phi","log","length_1","log10","FiltersComponent","_render","_service","_formBuilder","_converter","changeFilter","EventEmitter","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","changePropertyType","index","resetFilters","municipality","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","emit","payload","changeOffering","ev","changeCurrency","changeState","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","getFilterByForm","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","controlName","controlName2","group","minPrice","Validators","required","pattern","maxPrice","surfaceUnit","validator","peerControl","peerControl2","patchValue","locationType","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","Output","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatFormFieldModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","MatInputModule","PanoramaVisorComponent","_lazy","checkTouchSupported","window","navigator","msMaxTouchPoints","undefined","load","then","setTimeout","showPanorama","catch","_panorama","dispose","_viewer","destroy","fullscreen","toggleFullscreen","changeControl","enableControl","PANOLENS","CONTROLS","ORBIT","requestPermissions","DEVICEORIENTATION","confirm","href","alert","changeMode","mode","disableEffect","enableEffect","MODES","CARDBOARD","STEREO","isTouch","ImagePanorama","Viewer","container","_container","controlBar","controlButtons","onWindowResize","offsetWidth","offsetHeight","doc","docEl","requestFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","cancelFullScreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullScreen","success","of","failed","DeviceMotionEvent","requestPermission","fromPromise","DeviceOrientationEvent","pipe","mergeMap","response2","LazyLoadService","ViewChild","static","PanoramaVisorModule","MatMenuModule","LazyLoaderModule","MultimediaUploaderComponent","currentType","IMAGE","fileType","currentIndex","SPHERIC","VIDEO","images","images360","videos","_newMedia","getYouTubeID","arr","split","parseMultimedia","onUploadImage","isArray","createImagePFile","createImage360PFile","onTabChanged","tab","onListChanged","position","removeMedia","id","fileCS","thumbnail","onYouTubeInputTextChanged","input","file","PFile","media","getTime","blobName","accept","multimedia","joinMultimediaTypes","newMedia","fileName","now","random","blob","MultimediaUploaderService","AnnounceConfirmComponent","_dialogRef","code","DialogResponseType","CANCEL","ACCEPT","AnnounceConfirmService","GalleryComponent","_breakpointObserver","getPFilesByType","sideOpened","indexSelected","typeSelected","count","sphere","video","observe","_mobileVersion","matches","assignCountByType","assignMultimediaByType","updateSideNav","selectPFile","onIndexSelectedChange","changePFileType","pFileType","BreakpointObserver","GalleryService","PROPERTY_TOKEN","StatsComponent","LeadInfo","decorators","StatsService","leadInfo","CREATE","UPDATE","ANNOUNCE","HIDE","SHOW","ADDRESS","OFFER","FAVORITE","REQUEST_INFO","SHARE","ARCHIVE","REAL_ESTATE_EXCHANGE","SHARE_COMMISSION","BROCHURE","POSTER","CLIENTS","BACK","SHOW_AGENTS","TARPS","PropertyComponent","_uploaderService","_announceService","_snackBar","_share","_gallery","_documentService","_statsService","sharedProperty","isShared","ownerAvailable","initCompleteProperty","modeChange","disableShareCommission","disableConfirmAnnounce","_allMultimedia","multimediaCount","completeProperty","NewCompleteProperty","validateMultimediaTypeCount","saveData","restoreFrontImageError","_editorInstance","validateFormInvalid","setMessage","parseDataByComponents","PropertyEventType","agentActions","shareProperty","urlUser","userUrl","openGallery","goToStats","goToEditProperty","goToBack","goToClients","goToUpdateVisibility","status","goToPublish","validateFrontImageOnErrors","setErrorsOnFields","afterClosed","onMultimediaIndexChanged","changeMultimediaType","openUploaderMultimedia","assignFrontImage","onEditorInstance","onOwnerInstance","_ownerInstance","onDocumentsInstance","_documentsInstance","onSelectAddress","frontImageError","spherics","getMultimediaByType","getProperty","propertyInfo","owner","getOwner","documentsResponse","getDocuments","files","documents","complete","NewProperty","PropertyInfo","SnackBarService","ShareService","PropertyEditorValidators","form","get","condition","minPriceInvalid","markAsTouched","commissionInvalid","sharedCommissionInvalid","moment","momentImported","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","EditorComponent","_adapter","REGEX_ONLY_INTEGERS","REGEX_MIDDLE_NUMBER","REGEX_WEBSITE","REGEX_ALPHA_NUMBER","editorInstance","selectAddress","offeringTypeList","landUseList","commissionList","durationList","sharedCommissionList","setLocale","_errorFields","_validators","parkingSpaces","externalLink","sku","propertyForm","consumerReporting","consumerReportingOption","maintenance","maintenancePrice","transfer","transferPrice","unit","AreaUnitEnum","M2","buildIn","landUse","mlm","sharedCommission","agreementDate","disabled","duration","commission","notes","address","township","extNumber","intNumber","mz","lt","visible","validators","geoPtGenerator","geoPt","minDistance","maxDistance","alpha","PI","sx","cos","deltaLat","sin","lat","deltaLong","searchAmenitiesByPropertyType","createProperty","updateAddressForm","setValidatorOnFields","updatePropertyByForm","getRawValue","_property","invalid","goToSelectAddress","_btnSubmitRef","click","outdoorNumber","assignAmenities","amenitiesList","assignLocationFeatures","featuresList","assignCommission","assignBusinessRules","updateFormByProperty","lowestPrice","condominiumFeePrice","leaseTransferPrice","areaUnit","builtIn","listingAgreementStartDate","listingAgreementTime","interiorNumber","publicLocation","_propertyTypeItem","Features","Address","remove","clearValidators","setValidators","updateValueAndValidity","MAT_DATE_LOCALE","DateAdapter","useClass","MomentDateAdapter","deps","MAT_MOMENT_DATE_ADAPTER_OPTIONS","MAT_DATE_FORMATS","ɵ0","DialogService","read","phoneFieldsValidator","parent","phoneFieldsError","OwnerInfoComponent","ownerInstance","ownerForm","lastName","email","phone","maxLength","minLength","createOwner","disable","onCodePhoneChanged","updateOwnerByForm","_owner","codePhone","updateFormByOwner","Owner","DocumentsComponent","_visor","_http","documentsInstance","_files","validateDocumentsLoaded","openFile","getPFileByType","getUserMediaByType","openBlobFile","onUploadFile","updateDocument","downloadFile","responseType","Blob","createObjectURL","HttpClient","DetailsComponent","_sanitizer","searchPropertyType","createAmenities","createFeatures","validateAgreement","getTourUrl","bypassSecurityTrustResourceUrl","startDate","setDate","agreementEndDate","DomSanitizer","SlideShowComponent","initialIndex","moveImageByIndex","validateHTTPS","moveImage","_slider","ContentChild","TemplateRef","CustomDateAdapter","__","create","tslib_1.__extends","displayFormat","NativeDateAdapter","CustomDatepickerHeaderComponent","_calendar","_dateAdapter","_dateFormats","cdr","_destroyed","stateChanges","takeUntil","markForCheck","defineProperty","currentDate","activeDate","previousClicked","addCalendarYears","nextClicked","MatCalendar","ChangeDetectorRef","CustomDatepickerComponent","_injector","customHeader","currentYear","year","_control","NgControl","valueAccessor","onYearSelected","datepicker","registerOnChange","fn","registerOnTouched","writeValue","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","ɵ0$1","Injector","MatDatepickerModule","COMPONENTS","CustomDatepickerModule","CustomDragAndDropComponent","_viewportRuler","itemsChanged","source","dropListEnterPredicate","drag","drop","placeholder","activeContainer","phElement","element","sourceElement","dropContainer","dropElement","dragIndex","__indexOf","parentElement","children","dropIndex","sourceIndex","width","clientWidth","height","clientHeight","removeChild","targetIndex","insertBefore","nextSibling","enter","offsetLeft","offsetTop","dragMoved","point","getPointerPositionOnPage","listGroup","_items","dropList","getBoundingClientRect","top","bottom","left","right","__isInsideDropListClientRect","dropListDropped","appendChild","moveItemInArray","items","startsWith","__isTouchEvent","touches","changedTouches","scrollPosition","getViewportScrollPosition","pageX","pageY","ViewportRuler","CdkDropListGroup","CdkDropList","collection","node","MatCheckboxModule","MatRadioModule","MatSidenavModule","MatToolbarModule","MatTabsModule","MatTooltipModule","MatNativeDateModule","DragDropModule","PAGES","ENTRY_COMPONENTS","PROVIDERS","PropertyModule","EcoFabSpeedDialModule","UploadFileModule","StringManipulationModule","ShareModule","CountryCodeModule","LocationModule","DialogModule","SnackBarModule","forRoot","PROPERTY_CARD_CONFIG_MODULE","PropertyCardComponent","markerChanged","favoriteChanged","propertyDiscarded","positionLatLng","latLng","info","onFrontImageOver","marker","hover","onFrontImageLeave","favorite","propertyId","discard","deg2rad","deg","lng","lat1","lon1","lat2","lon2","dLat","dLon","atan2","sqrt","trunc","PropertyCardModule","RouterModule","MarkersService","_propertyTypePipe","_offeringTypePipe","getPropertyTypeItemByType","validatePropertyInFavorites","favorites","calculateLocationFrom","bearingInRadians","distanceInMetres","coordinateLatitudeInRadians","coordinateLongitudeInRadians","distanceComparedToEarth","resultLatitudeInRadians","asin","resultLongitudeInRadians","newCoordinates","buildURL","validatePropertiesInPoly","properties","paths","polygon","google","maps","Polygon","el","customLatLng","LatLng","geometry","poly","containsLocation","markersToCurrency","markers","toCurrency","buildMarkers","entities","entity","visited","createPropertyInfoCard","isFavorite","NewPropertyLite","buildSpider","polyLines","size","radiansBetweenAnnotations","locationShare","heading","newLocation","path","authUsers","MarkersModule"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgBC,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIC,KAAKD,EAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,KAQlE,IAAIE,EAAWR,OAAOS,QAAU,SAAkBC,GACrD,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOZ,OAAOgB,UAAUT,eAAeU,KAAKN,EAAGL,KAAII,EAAEJ,GAAKK,EAAEL,IAE9E,OAAOI,oBC5BX,SAAAQ,KAoCA,OA/BEA,EAAAF,UAAAG,UAAA,SAAUC,E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tB2uB,KAAM,CACJ,CACEv/B,SAAUpN,OAAOwsC,EAAcp/B,UAC/BC,UAAWrN,OAAOwsC,EAAcn/B,YAElC,CACED,SAAUpN,OAAO0sC,EAAYt/B,UAC7BC,UAAWrN,OAAO0sC,EAAYr/B,eAGpCi/B,EAAKpvC,GAAGiQ,SAAWu/B,EAGvB,OAAOtB,KAETz2B,EAASg3B,QAAU/sB,EACZjK,GAGDi1B,EAAAtsC,UAAA2uC,uBAAR,SAA+BF,GAC7B,MAAQ,CACNxT,QAAS,IAAIkD,EAAAA,QAAQsQ,EAAOxT,SAAW,MACvCqU,UAAYb,aAAkBI,EAAAA,gBAAmBJ,EAAOa,UAAY,GACpElhC,SAAUqgC,EAAOrgC,SACjBk9B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOzf,GAAKyf,EAAOnD,WACrEn6B,MAAOs9B,EAAOt9B,MACdxB,SAAU8+B,EAAO9+B,SACjBsB,MAAOw9B,EAAOx9B,MACdvB,KAAM++B,EAAO/+B,KACb0L,IAAKxZ,KAAK0rC,SAAS,CACjBrS,QAASwT,EAAOxT,QAChBtrB,SAAU8+B,EAAO9+B,SACjB6Q,aAAciuB,EAAO/+B,KACrB47B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOzf,GAAKyf,EAAOnD,aAEvEzV,OAAS4Y,aAAkBI,EAAAA,gBAAmBJ,EAAO5Y,OAAS,KAC9DlrB,SAAW8jC,aAAkBI,EAAAA,gBAAmBJ,EAAO9jC,SAAW,2BA5KvEyR,EAAAA,sDANO5E,SADAL,SAGAkK,MAmLRirB,EArMA,GCAAiD,GAAA,WAKA,SAAAA,KAeA,OARSA,EAAAruC,SAAP,WACE,MAAQ,CACNC,SAAUouC,EACVnuC,UAAW,CACTkrC,0BAXPjrC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACAumB,GAAwB5mB,gBAY5BquC,EApBA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {Address} from '@maplander/types';\r\n\r\n@Pipe({\r\n name: 'addressFormat'\r\n})\r\nexport class AddressFormatPipe implements PipeTransform {\r\n\r\n transform(value: Address, long?: boolean, country?: string): string {\r\n let result = '';\r\n const language = country || 'mx';\r\n result += value.street;\r\n switch (language) {\r\n case 'mx':\r\n if (long) {\r\n result += `, ${value.colony || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.colony || ''}`;\r\n }\r\n break;\r\n case 'usa':\r\n if (long) {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {AddressFormatPipe} from './address-format.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AddressFormatPipe\r\n ],\r\n exports: [\r\n AddressFormatPipe\r\n ]\r\n})\r\nexport class AddressFormatModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: AddressFormatModule,\r\n providers: [\r\n AddressFormatPipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {FiltersComponent} from '../../components/filters/filters.component';\r\n\r\nexport class FiltersWrapper {\r\n private _component: FiltersComponent;\r\n\r\n constructor(component: FiltersComponent) {\r\n this._component = component;\r\n }\r\n\r\n open(): void {\r\n this._component.open();\r\n }\r\n\r\n close(): void {\r\n this._component.close();\r\n }\r\n\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\n/**\r\n *\r\n * @author Alejandro Lopez Arreola\r\n * Custom class for dates compatible with Google Data Store\r\n *\r\n * */\r\n\r\nexport class MDate {\r\n\r\n private _timestamp: string;\r\n\r\n /**\r\n * @param date Timestamp with format YYYYMMDD\r\n * @example 20190812\r\n * */\r\n constructor(date: number) {\r\n this._timestamp = date.toString();\r\n }\r\n\r\n /**\r\n * @param date Date object\r\n * @param time Returns timestamp as time, default is date\r\n * @example Date: Format YYYYMMDD = 20190812, Time: Format HHMMSS = 171401\r\n * @return number\r\n * */\r\n public static getTimestamp(date: Date, time?: boolean): number {\r\n let timestamp = '';\r\n if (time) {\r\n timestamp += `${date.getHours()}`;\r\n timestamp += date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;\r\n timestamp += date.getSeconds() < 10 ? `0${date.getSeconds()}` : `${date.getSeconds()}`;\r\n return Number(timestamp);\r\n } else {\r\n timestamp += `${date.getFullYear().toString()}`;\r\n timestamp += (date.getMonth() + 1) < 10 ? `0${(date.getMonth() + 1)}` : `${date.getMonth() + 1}`;\r\n timestamp += date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate().toString()}`;\r\n return Number(timestamp);\r\n }\r\n }\r\n\r\n private static getHours(time: string): string {\r\n return time.slice(0, 2);\r\n }\r\n\r\n private static getMinutes(time: string): string {\r\n return time.slice(2, 4);\r\n }\r\n\r\n private static getSeconds(time: string): string {\r\n return time.slice(4, time.length);\r\n }\r\n\r\n private static getWeekDayName(day: number, toLowerCase?: boolean): string {\r\n switch (day) {\r\n case 0:\r\n return toLowerCase ? 'lunes' : 'Lunes';\r\n case 1:\r\n return toLowerCase ? 'martes' : 'Martes';\r\n case 2:\r\n return toLowerCase ? 'miercoles' : 'Miercoles';\r\n case 3:\r\n return toLowerCase ? 'jueves' : 'Jueves';\r\n case 4:\r\n return toLowerCase ? 'viernes' : 'Viernes';\r\n case 5:\r\n return toLowerCase ? 'sabado' : 'Sabado';\r\n case 6:\r\n return toLowerCase ? 'domingo' : 'Domingo';\r\n }\r\n }\r\n\r\n private static getMonthName(month: string, toLowerCase?: boolean): string {\r\n switch (month) {\r\n case '01':\r\n return toLowerCase ? 'ene.' : 'Ene.';\r\n case '02':\r\n return toLowerCase ? 'feb.' : 'Feb.';\r\n case '03':\r\n return toLowerCase ? 'mar.' : 'Mar.';\r\n case '04':\r\n return toLowerCase ? 'abr.' : 'Abr.';\r\n case '05':\r\n return toLowerCase ? 'may.' : 'May.';\r\n case '06':\r\n return toLowerCase ? 'jun.' : 'Jun.';\r\n case '07':\r\n return toLowerCase ? 'jul.' : 'Jul.';\r\n case '08':\r\n return toLowerCase ? 'ago.' : 'Ago.';\r\n case '09':\r\n return toLowerCase ? 'sep.' : 'Sep.';\r\n case '10':\r\n return toLowerCase ? 'oct.' : 'Oct.';\r\n case '11':\r\n return toLowerCase ? 'nov.' : 'Nov.';\r\n case '12':\r\n return toLowerCase ? 'dic.' : 'Dic.';\r\n }\r\n }\r\n\r\n /**\r\n * @param time Timestamp with format HHMMSS\r\n * @example 171401\r\n * @return Date\r\n * Converting timestamp with format YYYYMMDD,\r\n * if you not assign the time param, the hours, minutes and seconds is a zero\r\n * */\r\n public toDate(time?: number): Date {\r\n if (time) {\r\n const cDate = `${this.getYear()}-${this.getMoth()}-${this.getDay()}`;\r\n const cTime = `${MDate.getHours(time.toString())}:${MDate.getMinutes(time.toString())}:${MDate.getSeconds(time.toString())}`;\r\n const fullCDate = `${cDate}T${cTime}Z`;\r\n return new Date(fullCDate);\r\n } else {\r\n return new Date(Number(this.getYear()), Number(this.getMoth()) - 1, Number(this.getDay()));\r\n }\r\n }\r\n\r\n /**\r\n * @param format Format date | 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' |'dd MMMMM yyyy HH:mm'\r\n * @param time Timestamp as time with format HHMMSS\r\n * @param toLowerCase Words on lower case\r\n * @param format12Hours 12 hours format on time\r\n * @return string\r\n * Return string with date format\r\n * */\r\n public getFormat(format: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm', {\r\n time = null,\r\n toLowerCase = false,\r\n format12Hours = false\r\n } = {}): string {\r\n let date = '', d: Date = null;\r\n switch (format) {\r\n case 'dd/MM/yyyy':\r\n date = `${this.getDay()}/${this.getMoth()}/${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM yyyy':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n break;\r\n case 'EEEEE HH:mm':\r\n date += `${MDate.getWeekDayName(this.toDate(time).getDay() - 1, toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM yyyy HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n }\r\n return date;\r\n }\r\n\r\n private getYear(): string {\r\n return this._timestamp.slice(0, 4);\r\n }\r\n\r\n private getMoth(): string {\r\n return this._timestamp.slice(4, 6);\r\n }\r\n\r\n private getDay(): string {\r\n return this._timestamp.slice(6, this._timestamp.length);\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {MDate} from '../../utils/classes';\r\n\r\n@Pipe({\r\n name: 'libFormatDate'\r\n})\r\nexport class FormatDatePipe implements PipeTransform {\r\n\r\n transform(value: any, mDate?: boolean, format?: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm'): any {\r\n if (mDate) {\r\n return new MDate(value).getFormat(format, {toLowerCase: true});\r\n } else {\r\n const d = new Date(Number(value));\r\n return `${d.getDate() < 10 ? '0' + d.getDate() : d.getDate()}/${d.getMonth() < 10 ? '0' + d.getMonth() : d.getMonth()}/${d.getFullYear()}`;\r\n }\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FormatDatePipe} from './format-date.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatDatePipe\r\n ],\r\n exports: [\r\n FormatDatePipe\r\n ]\r\n})\r\nexport class FormatDateModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatDateModule,\r\n providers: [\r\n FormatDatePipe\r\n ]\r\n };\r\n }\r\n}\r\n","export enum AmenityName {\r\n AdjacentCommerce = 'adjacentCommerce',\r\n AdjacentGym = 'gym',\r\n AdjacentPicnic = 'adjacentPicnic',\r\n AirConditioner = 'airConditioner',\r\n Balcony = 'balcony',\r\n CustomerParking = 'customerParking',\r\n DiningRoom = 'diningRoom',\r\n DoubleHeight = 'doubleHeight',\r\n DressingRooms = 'dressingRooms',\r\n FacingStreet = 'facingStreet',\r\n Finishings = 'finishings',\r\n Furnished = 'furnished',\r\n Garden = 'garden',\r\n Gym = 'gym',\r\n HighResistanceFloors = 'highResistanceFloors',\r\n HighSpeedInternet = 'highSpeedInternet',\r\n InCommercialArea = 'inCommercialArea',\r\n InIndustrialPark = 'inIndustrialPark',\r\n InShoppingCenter = 'inShoppingCenter',\r\n Jacuzzi = 'jacuzzi',\r\n KitchenServices = 'kitchenServices',\r\n MaidsBathroom = 'maidsBathroom',\r\n ManeuverArea = 'maneuverArea',\r\n MeetingRoom = 'meetingRoom',\r\n Mezzanine = 'mezzanine',\r\n MixedBuilding = 'mixedBuilding',\r\n NaturalLighting = 'naturalLighting',\r\n Offices = 'offices',\r\n OpenSpace = 'openSpace',\r\n Platforms = 'platforms',\r\n Playground = 'playground',\r\n Playroom = 'playroom',\r\n Pool = 'pool',\r\n RailSpur = 'railSpur',\r\n RailYard = 'maneuverArea',\r\n Reception = 'reception',\r\n SecurityGuard = 'securityGuard',\r\n Storage = 'storage',\r\n VisitorParking = 'visitorParking',\r\n NearPublicTransportation = 'nearPublicTransportation',\r\n NearShops = 'nearShops',\r\n OnBusyRoad = 'onBusyRoad',\r\n CountrySide = 'countrySide',\r\n Downtown = 'downtown',\r\n GoodReachableTraffic = 'goodReachableTraffic',\r\n NearFitnessCentre = 'nearFitnessCentre',\r\n NearHighway = 'nearHighway',\r\n NearHospital = 'nearHospital',\r\n NearPark = 'nearPark',\r\n NearSchools = 'nearSchools',\r\n OnQuietRoad = 'onQuietRoad',\r\n RoofGarden = 'roofGarden',\r\n PetFriendly = 'petFriendly',\r\n DifferentAbilities = 'differentAbilities'\r\n}\r\n","import {LandUseEnum, OfferingTypeEnum, PFileTypeEnum, PropertyTypeEnum, StatusTypeEnum} from '@maplander/types';\r\nimport {AmenitiesList} from './utils/models/amenities-list';\r\nimport {AmenityName} from './utils/enums/amenity-name';\r\nimport {PropertyTypeItem} from './utils/models/property-type-item';\r\nimport {PropertyStatusItem} from './utils/models/propertyStatusItem';\r\n\r\nexport class ConstantsComponents {\r\n static Amenities: AmenitiesList = {\r\n roofGarden: {\r\n checked: false,\r\n iconName: AmenityName.RoofGarden,\r\n value: AmenityName.RoofGarden,\r\n name: 'Terraza'\r\n },\r\n petFriendly: {\r\n checked: false,\r\n iconName: AmenityName.PetFriendly,\r\n value: AmenityName.PetFriendly,\r\n name: 'Acepta Mascotas'\r\n },\r\n differentAbilities: {\r\n checked: false,\r\n iconName: AmenityName.DifferentAbilities,\r\n value: AmenityName.DifferentAbilities,\r\n name: 'Con capacidades diferentes'\r\n },\r\n adjacentCommerce: {\r\n checked: false,\r\n iconName: AmenityName.AdjacentCommerce,\r\n value: AmenityName.AdjacentCommerce,\r\n name: 'Comercio adyacente'\r\n },\r\n adjacentGym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.AdjacentGym, name: 'Gym adyacente'},\r\n adjacentPicnic: {checked: false, iconName: AmenityName.AdjacentPicnic, value: AmenityName.AdjacentPicnic, name: 'Merendero adyacente'},\r\n airConditioner: {checked: false, iconName: AmenityName.AirConditioner, value: AmenityName.AirConditioner, name: 'Aire acondicionado'},\r\n balcony: {checked: false, iconName: AmenityName.Balcony, value: AmenityName.Balcony, name: 'Balcón'},\r\n customerParking: {\r\n checked: false,\r\n iconName: AmenityName.CustomerParking,\r\n value: AmenityName.CustomerParking,\r\n name: 'Estacionamiento para clientes'\r\n },\r\n diningRoom: {checked: false, iconName: AmenityName.DiningRoom, value: AmenityName.DiningRoom, name: 'Comedor'},\r\n doubleHeight: {checked: false, iconName: AmenityName.DoubleHeight, value: AmenityName.DoubleHeight, name: 'Doble altura'},\r\n dressingRooms: {checked: false, iconName: AmenityName.DressingRooms, value: AmenityName.DressingRooms, name: 'Con vestidores'},\r\n facingStreet: {checked: false, iconName: AmenityName.FacingStreet, value: AmenityName.FacingStreet, name: 'Frente a calle'},\r\n finishings: {checked: false, iconName: AmenityName.Finishings, value: AmenityName.Finishings, name: 'Con acabados'},\r\n furnished: {checked: false, iconName: AmenityName.Furnished, value: AmenityName.Furnished, name: 'Amueblada'},\r\n garden: {checked: false, iconName: AmenityName.Garden, value: AmenityName.Garden, name: 'Jardín'},\r\n gym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.Gym, name: 'Gym'},\r\n highResistanceFloors: {\r\n checked: false,\r\n iconName: AmenityName.HighResistanceFloors,\r\n value: AmenityName.HighResistanceFloors,\r\n name: 'Pisos de alta resistencia'\r\n },\r\n highSpeedInternet: {\r\n checked: false,\r\n iconName: AmenityName.HighSpeedInternet,\r\n value: AmenityName.HighSpeedInternet,\r\n name: 'Internet de alta velocidad'\r\n },\r\n inCommercialArea: {\r\n checked: false,\r\n iconName: AmenityName.InCommercialArea,\r\n value: AmenityName.InCommercialArea,\r\n name: 'En zona comercial'\r\n },\r\n inIndustrialPark: {\r\n checked: false,\r\n iconName: AmenityName.InIndustrialPark,\r\n value: AmenityName.InIndustrialPark,\r\n name: 'En parque industrial'\r\n },\r\n inShoppingCenter: {\r\n checked: false,\r\n iconName: AmenityName.InShoppingCenter,\r\n value: AmenityName.InShoppingCenter,\r\n name: 'En centro comercial'\r\n },\r\n jacuzzi: {checked: false, iconName: AmenityName.Jacuzzi, value: AmenityName.Jacuzzi, name: 'Jacuzzi'},\r\n kitchenServices: {\r\n checked: false,\r\n iconName: AmenityName.KitchenServices,\r\n value: AmenityName.KitchenServices,\r\n name: 'Servicios para cocina'\r\n },\r\n maidsBathroom: {checked: false, iconName: AmenityName.MaidsBathroom, value: AmenityName.MaidsBathroom, name: 'Cuarto de Servicio'},\r\n maneuverArea: {checked: false, iconName: AmenityName.ManeuverArea, value: AmenityName.ManeuverArea, name: 'Área de maniobras'},\r\n meetingRoom: {checked: false, iconName: AmenityName.MeetingRoom, value: AmenityName.MeetingRoom, name: 'Sala de conferencias'},\r\n mezzanine: {checked: false, iconName: AmenityName.Mezzanine, value: AmenityName.Mezzanine, name: 'Con entrepiso'},\r\n mixedBuilding: {checked: false, iconName: AmenityName.MixedBuilding, value: AmenityName.MixedBuilding, name: 'En edificio mixto'},\r\n naturalLighting: {\r\n checked: false,\r\n iconName: AmenityName.NaturalLighting,\r\n value: AmenityName.NaturalLighting,\r\n name: 'Iluminacion natural'\r\n },\r\n offices: {checked: false, iconName: AmenityName.Offices, value: AmenityName.Offices, name: 'Con oficinas'},\r\n openSpace: {checked: false, iconName: AmenityName.OpenSpace, value: AmenityName.OpenSpace, name: 'Espacio abierto'},\r\n platforms: {checked: false, iconName: AmenityName.Platforms, value: AmenityName.Platforms, name: 'Andenes'},\r\n playground: {checked: false, iconName: AmenityName.Playground, value: AmenityName.Playground, name: 'Juegos infantiles'},\r\n playroom: {checked: false, iconName: AmenityName.Playroom, value: AmenityName.Playroom, name: 'Salón de juegos'},\r\n pool: {checked: false, iconName: AmenityName.Pool, value: AmenityName.Pool, name: 'Alberca'},\r\n railSpur: {checked: false, iconName: AmenityName.RailSpur, value: AmenityName.RailSpur, name: 'Espuela de FF.CC'},\r\n railyard: {checked: false, iconName: AmenityName.RailYard, value: AmenityName.RailYard, name: 'Patio de maniobras'},\r\n reception: {checked: false, iconName: AmenityName.Reception, value: AmenityName.Reception, name: 'Recepción'},\r\n securityGuard: {checked: false, iconName: AmenityName.SecurityGuard, value: AmenityName.SecurityGuard, name: 'Con vigilancia'},\r\n storage: {checked: false, iconName: AmenityName.Storage, value: AmenityName.Storage, name: 'Bodega'},\r\n visitorParking: {\r\n checked: false,\r\n iconName: AmenityName.VisitorParking,\r\n value: AmenityName.VisitorParking,\r\n name: 'Estacionamiento para visitas'\r\n },\r\n features: [\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPublicTransportation,\r\n value: AmenityName.NearPublicTransportation,\r\n name: 'Cerca de estaciones de transporte'\r\n },\r\n {checked: false, iconName: AmenityName.AdjacentCommerce, value: AmenityName.NearShops, name: 'Cerca de comercios'},\r\n {checked: false, iconName: AmenityName.OnBusyRoad, value: AmenityName.OnBusyRoad, name: 'Avenida principal'},\r\n {checked: false, iconName: AmenityName.CountrySide, value: AmenityName.CountrySide, name: 'Suburbio'},\r\n {checked: false, iconName: AmenityName.Downtown, value: AmenityName.Downtown, name: 'Céntrico'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.GoodReachableTraffic,\r\n value: AmenityName.GoodReachableTraffic,\r\n name: 'Se llega sin trafico'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearFitnessCentre,\r\n value: AmenityName.NearFitnessCentre,\r\n name: 'Cerca de centro deportivo'\r\n },\r\n {checked: false, iconName: AmenityName.NearHighway, value: AmenityName.NearHighway, name: 'Cerca de autopista'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearHospital,\r\n value: AmenityName.NearHospital,\r\n name: 'Cerca de centros de salud'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPark,\r\n value: AmenityName.NearPark,\r\n name: 'Cerca de parque'\r\n },\r\n {checked: false, iconName: AmenityName.NearSchools, value: AmenityName.NearSchools, name: 'Cerca de escuelas'},\r\n {checked: false, iconName: AmenityName.OnQuietRoad, value: AmenityName.OnQuietRoad, name: 'En calle tranquila'},\r\n ]\r\n };\r\n static DurationList = [\r\n 30, 60, 90, 180, 365\r\n ];\r\n static CommissionList: {SALE: number[], RENT: number[]} = {\r\n SALE: [0.06, 0.055, 0.05, 0.045, 0.04, 0.035, 0.030, 0.025, 0.020, 0.015, 0.01],\r\n RENT: [2, 1.5, 1, 0.5]\r\n };\r\n static SharedCommissionList: number[] = [\r\n 0.50, 0.40, 0.30, 0.20, 0.10\r\n ];\r\n static LandUseList: {name: string, value: LandUseEnum}[] = [\r\n {\r\n name: 'Habitacional unifamiliar',\r\n value: LandUseEnum.SINGLE_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional plurifamiliar',\r\n value: LandUseEnum.MULTI_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional con comercio',\r\n value: LandUseEnum.HOUSING_WITH_COMMERCE\r\n },\r\n {\r\n name: 'Habitacional con oficina',\r\n value: LandUseEnum.HOUSING_WITH_OFFICE\r\n },\r\n {\r\n name: 'Habitacional mixto',\r\n value: LandUseEnum.MIXED_HOUSING\r\n },\r\n {\r\n name: 'Comercio',\r\n value: LandUseEnum.COMMERCE\r\n },\r\n {\r\n name: 'Oficina',\r\n value: LandUseEnum.OFFICE\r\n },\r\n {\r\n name: 'Servicios',\r\n value: LandUseEnum.SERVICES\r\n },\r\n {\r\n name: 'Industria',\r\n value: LandUseEnum.INDUSTRY\r\n },\r\n {\r\n name: 'Agrícola',\r\n value: LandUseEnum.AGRICULTURAL\r\n }, {\r\n name: 'No especificado',\r\n value: LandUseEnum.OTHER\r\n }\r\n ];\r\n static AnnounceCheckList = [\r\n {\r\n name: 'Las fotos y videos son los correctos',\r\n value: 0,\r\n checked: false\r\n },\r\n {\r\n name: 'La ortografía y gramática es correcta',\r\n value: 1,\r\n checked: false\r\n },\r\n {\r\n name: 'Los datos de contacto son correctos',\r\n value: 2,\r\n checked: false\r\n },\r\n {\r\n name: 'La dirección, email y web están correctos',\r\n value: 3,\r\n checked: false\r\n },\r\n {\r\n name: 'Todo está correcto y apruebo mi anuncio',\r\n value: 4,\r\n checked: false\r\n }\r\n ];\r\n static DocumentsList: {name: string, value: PFileTypeEnum, loaded: boolean}[] = [\r\n {\r\n name: 'Escritura',\r\n value: PFileTypeEnum.DEED,\r\n loaded: false\r\n },\r\n {\r\n name: 'Identificación Propietario',\r\n value: PFileTypeEnum.OWNER_ID,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de agua',\r\n value: PFileTypeEnum.WATER_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de luz',\r\n value: PFileTypeEnum.ELECTRICITY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo predial',\r\n value: PFileTypeEnum.PROPERTY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Constancia de no adeudo',\r\n value: PFileTypeEnum.CONSTANCY_OF_NO_DEBT,\r\n loaded: false\r\n },\r\n {\r\n name: 'Libertad de Gravamen',\r\n value: PFileTypeEnum.EXEMPTION_TAX,\r\n loaded: false\r\n },\r\n {\r\n name: 'Licencia de construcción',\r\n value: PFileTypeEnum.BUILDING_LICENSE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Terminación de obra',\r\n value: PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,\r\n loaded: false\r\n },\r\n {\r\n name: 'Alineación y número oficial',\r\n value: PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,\r\n loaded: false\r\n },\r\n {\r\n name: 'Hipoteca',\r\n value: PFileTypeEnum.MORTGAGE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Otros',\r\n value: PFileTypeEnum.OTHER,\r\n loaded: false\r\n }\r\n ];\r\n static BedroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static BathroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static ParkingSpacesList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static SurfaceList: number[] = [\r\n 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000\r\n ];\r\n static ROIList: number[] = [\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20\r\n ];\r\n static PropertyTypeList: PropertyTypeItem[] = [\r\n {\r\n value: PropertyTypeEnum.HOUSE,\r\n iconName: 'house',\r\n name: 'Casa',\r\n shortName: 'Casa',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RESIDENTIAL,\r\n iconName: 'residential',\r\n name: 'Vivienda',\r\n shortName: 'Vivienda',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.APARTMENT,\r\n iconName: 'apartment',\r\n name: 'Departamento',\r\n shortName: 'Depto',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.ROOM,\r\n iconName: 'room',\r\n name: 'Habitación',\r\n shortName: 'Habitación',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.OFFICE,\r\n iconName: 'office',\r\n name: 'Oficina',\r\n shortName: 'Oficina',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.reception,\r\n ConstantsComponents.Amenities.adjacentPicnic,\r\n ConstantsComponents.Amenities.meetingRoom,\r\n ConstantsComponents.Amenities.adjacentGym,\r\n ConstantsComponents.Amenities.openSpace,\r\n ConstantsComponents.Amenities.airConditioner,\r\n ConstantsComponents.Amenities.adjacentCommerce,\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RETAIL,\r\n iconName: 'retail',\r\n name: 'Comercio',\r\n shortName: 'Comercio',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.facingStreet,\r\n ConstantsComponents.Amenities.maneuverArea,\r\n ConstantsComponents.Amenities.kitchenServices,\r\n ConstantsComponents.Amenities.finishings,\r\n ConstantsComponents.Amenities.mezzanine,\r\n ConstantsComponents.Amenities.inShoppingCenter,\r\n ConstantsComponents.Amenities.inCommercialArea,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.WAREHOUSE,\r\n iconName: 'warehouse',\r\n name: 'Bodega',\r\n shortName: 'Bodega',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.railyard,\r\n ConstantsComponents.Amenities.platforms,\r\n ConstantsComponents.Amenities.highResistanceFloors,\r\n ConstantsComponents.Amenities.offices,\r\n ConstantsComponents.Amenities.dressingRooms,\r\n ConstantsComponents.Amenities.diningRoom,\r\n ConstantsComponents.Amenities.inIndustrialPark,\r\n ConstantsComponents.Amenities.naturalLighting,\r\n ConstantsComponents.Amenities.railSpur,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.LAND,\r\n iconName: 'land',\r\n name: 'Terreno',\r\n shortName: 'Terreno',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.INVESTMENT,\r\n iconName: 'investment',\r\n name: 'Inversión',\r\n shortName: 'Inversión',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: []\r\n },\r\n {\r\n value: PropertyTypeEnum.NONE,\r\n name: 'Todo',\r\n shortName: 'Todo',\r\n iconName: 'all',\r\n features: [],\r\n amenities: []\r\n }\r\n ];\r\n static OfferingTypeList: { value: OfferingTypeEnum, name: string }[] = [\r\n {\r\n value: OfferingTypeEnum.SALE,\r\n name: 'Venta'\r\n },\r\n {\r\n value: OfferingTypeEnum.RENT,\r\n name: 'Renta'\r\n },\r\n ];\r\n static LocateList: any = {\r\n USD: {locate: 'en-US', currency: 'USD'},\r\n MXN: {locate: 'es-MX', currency: 'MXN'},\r\n GBP: {locate: 'en-GB', currency: 'GBP'},\r\n EUR: {locate: 'de-DE', currency: 'EUR'},\r\n BRL: {locate: 'pt-BR', currency: 'BRL'},\r\n CNY: {locate: 'zh-CH', currency: 'CNY'}\r\n };\r\n static PropertyStatusList: PropertyStatusItem[] = [\r\n { icon: 'announce', name: 'Anunciadas', value: StatusTypeEnum.ANNOUNCED },\r\n { icon: 'expired', name: 'Expiradas', value: StatusTypeEnum.EXPIRED },\r\n { icon: 'hidden', name: 'Ocultas', value: StatusTypeEnum.HIDDEN },\r\n { icon: 'ready', name: 'Listas para anunciar', value: StatusTypeEnum.READY },\r\n { icon: 'draft', name: 'Borrador', value: StatusTypeEnum.DRAFT }\r\n ];\r\n}\r\n","import {Filter, NewProperty, OfferingTypeEnum, PropertyTypeEnum} from '@maplander/types';\r\n\r\nexport class Utils {\r\n static round(value: number, precision: number): number {\r\n const multiplier = Math.pow(10, precision || 0);\r\n return Math.round(value * multiplier) / multiplier;\r\n }\r\n static getFilterByPropertyType(filter: Filter): Filter {\r\n return {\r\n type: filter.type,\r\n offering: filter.offering,\r\n distance: filter.distance,\r\n location: {\r\n latitude: filter.location.latitude,\r\n longitude: filter.location.longitude\r\n },\r\n currency: filter.currency,\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter.exclusivity,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter.mls\r\n };\r\n }\r\n static getInitialFilter(isOPI: boolean, filter: Filter = null): Filter {\r\n return {\r\n type: isOPI ? PropertyTypeEnum.NONE : PropertyTypeEnum.RESIDENTIAL,\r\n offering: isOPI ? OfferingTypeEnum.RENT : OfferingTypeEnum.RENT,\r\n distance: filter ? filter.distance : 0,\r\n location: {\r\n latitude: filter ? filter.location.latitude : 0,\r\n longitude: filter ? filter.location.longitude : 0\r\n },\r\n currency: filter ? filter.currency : 'MXN',\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter ? filter.exclusivity : false,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter ? filter.mls : true\r\n };\r\n }\r\n static listErrorsByPropertyTypeForPublish(type: PropertyTypeEnum): string[] {\r\n let errorField = ['price', 'currency', 'description', 'image'];\r\n switch (type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat(['mainArea', 'bedrooms', 'bathrooms']);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n case PropertyTypeEnum.OFFICE:\r\n case PropertyTypeEnum.RETAIL:\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat(['mainArea']);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat(['mainArea', 'secondaryArea']);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat(['roi']);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static getErrorsForPublish(property: NewProperty): string[] {\r\n let errorField = [];\r\n errorField = errorField.concat((!property.price || property.price === 0) ? ['price'] : []);\r\n errorField = errorField.concat((!property.currency || property.currency === '') ? ['currency'] : []);\r\n errorField = errorField.concat((!property.description || property.description === '') ? ['description'] : []);\r\n errorField = errorField.concat((!property.image || property.image === '') ? ['image'] : []);\r\n switch (property.type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bedrooms || property.features.bedrooms === 0)) ? ['bedrooms'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bathrooms || property.features.bathrooms === 0)) ? ['bathrooms'] : []);\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat(\r\n (property.features && (!property.features.secondaryArea || property.features.secondaryArea === 0)) ? ['secondaryArea'] : []);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.roi || property.features.roi === 0)) ? ['roi'] : []);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static removeDiacritics (str): string {\r\n const diacriticsMap = {\r\n A: /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g,\r\n AA: /[\\uA732]/g,\r\n AE: /[\\u00C6\\u01FC\\u01E2]/g,\r\n AO: /[\\uA734]/g,\r\n AU: /[\\uA736]/g,\r\n AV: /[\\uA738\\uA73A]/g,\r\n AY: /[\\uA73C]/g,\r\n B: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g,\r\n C: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g,\r\n D: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g,\r\n DZ: /[\\u01F1\\u01C4]/g,\r\n Dz: /[\\u01F2\\u01C5]/g,\r\n E: /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g,\r\n F: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g,\r\n G: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g,\r\n H: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g,\r\n I: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g,\r\n J: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g,\r\n K: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g,\r\n L: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g,\r\n LJ: /[\\u01C7]/g,\r\n Lj: /[\\u01C8]/g,\r\n M: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g,\r\n N: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g,\r\n NJ: /[\\u01CA]/g,\r\n Nj: /[\\u01CB]/g,\r\n O: /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g,\r\n OI: /[\\u01A2]/g,\r\n OO: /[\\uA74E]/g,\r\n OU: /[\\u0222]/g,\r\n P: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g,\r\n Q: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g,\r\n R: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g,\r\n S: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g,\r\n T: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g,\r\n TZ: /[\\uA728]/g,\r\n U: /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g,\r\n V: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g,\r\n VY: /[\\uA760]/g,\r\n W: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g,\r\n X: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g,\r\n Y: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g,\r\n Z: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g,\r\n a: /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g,\r\n aa: /[\\uA733]/g,\r\n ae: /[\\u00E6\\u01FD\\u01E3]/g,\r\n ao: /[\\uA735]/g,\r\n au: /[\\uA737]/g,\r\n av: /[\\uA739\\uA73B]/g,\r\n ay: /[\\uA73D]/g,\r\n b: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g,\r\n c: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g,\r\n d: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g,\r\n dz: /[\\u01F3\\u01C6]/g,\r\n e: /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g,\r\n f: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g,\r\n g: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g,\r\n h: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g,\r\n hv: /[\\u0195]/g,\r\n i: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g,\r\n j: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g,\r\n k: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g,\r\n l: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g,\r\n lj: /[\\u01C9]/g,\r\n m: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g,\r\n n: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g,\r\n nj: /[\\u01CC]/g,\r\n o: /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g,\r\n oi: /[\\u01A3]/g,\r\n ou: /[\\u0223]/g,\r\n oo: /[\\uA74F]/g,\r\n p: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g,\r\n q: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g,\r\n r: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g,\r\n s: /[\\u0073\\u24E2\\uFF53\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g,\r\n ss: /[\\u00DF]/g,\r\n t: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g,\r\n tz: /[\\uA729]/g,\r\n u: /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g,\r\n v: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g,\r\n vy: /[\\uA761]/g,\r\n w: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g,\r\n x: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g,\r\n y: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g,\r\n z: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\r\n };\r\n for (const x of Object.keys(diacriticsMap)) {\r\n // Iterate through each keys in the above object and perform a replace\r\n str = str.replace(diacriticsMap[x], x);\r\n }\r\n return str;\r\n }\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\nimport {Pipe, PipeTransform} from '@angular/core';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\n\r\n@Pipe({\r\n name: 'markerPrice'\r\n})\r\nexport class MarkerPricePipe implements PipeTransform {\r\n\r\n transform(price: number, currency?: string): string {\r\n const locate: {locate: string, currency: string} = ConstantsComponents.LocateList[currency || 'MXN'];\r\n let outputPrice;\r\n if (((price / 100000.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100000.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'M';\r\n } else if (((price / 100.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'K';\r\n } else {\r\n outputPrice = Number(price).toFixed(2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n }\r\n return '' + outputPrice;\r\n }\r\n\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {MarkerPricePipe} from './marker-price.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n MarkerPricePipe\r\n ],\r\n exports: [\r\n MarkerPricePipe\r\n ]\r\n})\r\nexport class MarkerPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkerPriceModule,\r\n providers: [\r\n MarkerPricePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {OfferingTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'offeringType'\r\n})\r\nexport class OfferingTypePipe implements PipeTransform {\r\n\r\n transform(value: OfferingTypeEnum, prefix?: string): string {\r\n let response = prefix ? prefix : 'en';\r\n ConstantsComponents.OfferingTypeList.forEach(type => {\r\n if (type.value === value) {\r\n response += ` ${type.name.toLowerCase()}`;\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {OfferingTypePipe} from './offering-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n OfferingTypePipe\r\n ],\r\n exports: [\r\n OfferingTypePipe\r\n ]\r\n})\r\nexport class OfferingTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: OfferingTypeModule,\r\n providers: [\r\n OfferingTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'propertyType'\r\n})\r\nexport class PropertyTypePipe implements PipeTransform {\r\n transform(value: PropertyTypeEnum, toLowerCase?: boolean): string {\r\n let result = '';\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === value) {\r\n result = type.name;\r\n }\r\n });\r\n return (toLowerCase) ? result.toLowerCase() : result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PropertyTypePipe} from './property-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n PropertyTypePipe\r\n ],\r\n exports: [\r\n PropertyTypePipe\r\n ]\r\n})\r\nexport class PropertyTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyTypeModule,\r\n providers: [\r\n PropertyTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\r\nimport {CurrencyPipe} from '@angular/common';\r\nimport {AbstractControl} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[libFormatPrice]'\r\n})\r\nexport class FormatPriceDirective implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n @Input() control: AbstractControl;\r\n @Input() currency: string;\r\n private _el: HTMLInputElement;\r\n private _value: any;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n private _elRef: ElementRef,\r\n private _currency: CurrencyPipe\r\n ) {\r\n this._subscription = new Subscription();\r\n this._el = this._elRef.nativeElement;\r\n }\r\n\r\n private static removeError(control: AbstractControl, error: string): void {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n if (this._value) {\r\n this.validateFormatPrice(this._value);\r\n }\r\n }\r\n if (changes['control'] && changes['control'].currentValue) {\r\n this._subscription.add(\r\n this.control.valueChanges.subscribe(response => {\r\n this._value = response;\r\n })\r\n );\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._el.addEventListener('focus', this.onFocus.bind(this));\r\n this._el.addEventListener('blur', this.onBlur.bind(this));\r\n this._value = this._el.value;\r\n this._el.value = this.formatPrice(this._el.value);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n this._el.removeEventListener('focus', this.onFocus.bind(this));\r\n this._el.removeEventListener('blur', this.onBlur.bind(this));\r\n }\r\n\r\n private formatPrice(value: any): any {\r\n return this._currency.transform(value, this.currency && this.currency !== 'MXN' ? this.currency : null, 'symbol', '1.0-0');\r\n }\r\n\r\n private onFocus() {\r\n this._el.value = this._value;\r\n }\r\n\r\n private onBlur(event: any) {\r\n this.validateFormatPrice(event.target.value);\r\n }\r\n\r\n private validateFormatPrice(value: any): void {\r\n if (Number.isNaN(Number(value))) {\r\n this.control.setErrors({\r\n format: true\r\n });\r\n return;\r\n }\r\n FormatPriceDirective.removeError(this.control, 'format');\r\n this._value = value;\r\n this._el.value = this.formatPrice(value);\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {FormatPriceDirective} from './format-price.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatPriceDirective\r\n ],\r\n exports: [\r\n FormatPriceDirective\r\n ]\r\n})\r\nexport class FormatPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatPriceModule,\r\n providers: [\r\n CurrencyPipe,\r\n FormatPriceDirective\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnDestroy} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\n\r\n@Directive({\r\n selector: '[libImageError]'\r\n})\r\nexport class ImageErrorDirective implements AfterViewInit, OnDestroy {\r\n\r\n @Input() typeImage: PropertyTypeEnum;\r\n private _el: HTMLImageElement;\r\n private _onError;\r\n private readonly CDN_URL: string = 'https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock';\r\n\r\n constructor(private _ref: ElementRef) {\r\n this._el = this._ref.nativeElement;\r\n if (this._el.constructor !== HTMLImageElement) {\r\n throw new Error('libImageError directive works only image element');\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._onError = () => {\r\n this.updateUrl();\r\n };\r\n this._el.addEventListener('error', this._onError);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._el.removeEventListener('error', this._onError);\r\n }\r\n\r\n updateUrl() {\r\n switch (this.typeImage) {\r\n case PropertyTypeEnum.HOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n this._el.src = `${this.CDN_URL}/Stock-Office.jpg`;\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n this._el.src = `${this.CDN_URL}/Stock-Retail.jpg`;\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n this._el.src = `${this.CDN_URL}/Stock-Land.jpg`;\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-Warehouse.jpg`;\r\n break;\r\n case PropertyTypeEnum.APARTMENT:\r\n case PropertyTypeEnum.ROOM:\r\n this._el.src = `${this.CDN_URL}/Stock-Apartment.jpg`;\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this._el.src = `${this.CDN_URL}/Stock-Investment.jpg`;\r\n break;\r\n case PropertyTypeEnum.RESIDENTIAL:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n default:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {ImageErrorDirective} from './image-error.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n ImageErrorDirective\r\n ],\r\n exports: [\r\n ImageErrorDirective\r\n ]\r\n})\r\nexport class ImageErrorModule { }\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'lib-document-visor',\r\n templateUrl: './document-visor.component.html',\r\n styleUrls: ['./document-visor.component.scss']\r\n})\r\nexport class DocumentVisorComponent implements OnInit {\r\n\r\n public url: string;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: string,\r\n private _dialog: MatDialogRef<DocumentVisorComponent>\r\n ) {\r\n }\r\n\r\n private static isBase64(str): boolean {\r\n try {\r\n return btoa(atob(str)) === str;\r\n } catch (err) {\r\n return false;\r\n }\r\n }\r\n\r\n private static isURL(url: string): boolean {\r\n const pattern = new RegExp('^(?:(?:(?:https?|ftp):)?\\\\/\\\\/)(?:\\\\S+(?::\\\\S*)?@)?(?:(?!(?:10|127)(?:\\\\.\\\\d{1,3}){3})(?!(?:169\\\\.254|192\\\\.168)(?:\\\\.\\\\d{1,3}){2})(?!172\\\\.(?:1[6-9]|2\\\\d|3[0-1])(?:\\\\.\\\\d{1,3}){2})(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\\\d{2,5})?(?:[/?#]\\\\S*)?$', 'i');\r\n return pattern.test(url);\r\n }\r\n\r\n ngOnInit() {\r\n this.url = this._data;\r\n }\r\n\r\n close(): void {\r\n if (!DocumentVisorComponent.isBase64(this.url) && !DocumentVisorComponent.isURL(this.url)) {\r\n URL.revokeObjectURL(this.url);\r\n }\r\n this._dialog.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\n\r\n@Injectable()\r\nexport class DocumentVisorService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(document: string): MatDialogRef<DocumentVisorComponent> {\r\n return this._dialog.open(DocumentVisorComponent, {\r\n data: document,\r\n disableClose: true,\r\n panelClass: 'document_visor_dialog'\r\n });\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatDialogModule} from '@angular/material/dialog';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\nimport {DocumentVisorService} from './document-visor.service';\r\nimport {SafeUrlModule} from '@maplander/shared';\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SafeUrlModule.forChild(),\r\n MATERIAL\r\n ],\r\n declarations: [\r\n DocumentVisorComponent\r\n ],\r\n exports: [\r\n DocumentVisorComponent\r\n ],\r\n entryComponents: [\r\n DocumentVisorComponent\r\n ]\r\n})\r\nexport class DocumentVisorModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: DocumentVisorModule,\r\n providers: [\r\n DocumentVisorService\r\n ]\r\n };\r\n }\r\n}\r\n","export enum FilterChipType {\r\n OFFERING = 'OFFERING',\r\n PROPERTY_TYPE = 'PROPERTY_TYPE',\r\n PRICE = 'PRICE',\r\n BEDROOMS = 'BEDROOMS',\r\n BATHROOMS = 'BATHROOMS',\r\n PARKING_PLACES = 'PARKING_PLACES',\r\n SURFACE = 'SURFACE',\r\n AMENITIES = 'AMENITIES',\r\n LISTING = 'LISTING'\r\n}\r\n","export enum FiltersChangeType {\r\n APPLY,\r\n INIT,\r\n AREA,\r\n SAVE,\r\n LIST_TYPE\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const FILTERS_TOKEN = new InjectionToken<boolean>('FILTERS MODULE CONFIG');\r\n","import {Inject, Injectable, Optional} from '@angular/core';\r\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\r\nimport {LocalStorageService} from '@maplander/static';\r\nimport {FiltersChangeType} from '../../utils/enums/filters-change-type';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {Utils} from '../../utils';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\nimport {FiltersSaved} from '../../utils/models';\r\n\r\n@Injectable()\r\nexport class FiltersService {\r\n\r\n private static FILTERS_SAVED_KEY = 'FILTERS';\r\n private _notifier: BehaviorSubject<FiltersChange>;\r\n private _startComponent: Subject<FiltersWrapper>;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean\r\n ) {\r\n this._startComponent = new Subject<FiltersWrapper>();\r\n this._notifier = new BehaviorSubject<FiltersChange>({\r\n filter: Utils.getInitialFilter(this._config || false),\r\n type: FiltersChangeType.INIT,\r\n ft: false\r\n });\r\n }\r\n\r\n static removeFiltersSaved(): void {\r\n LocalStorageService.removeItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static getFiltersSaved(): FiltersSaved {\r\n return LocalStorageService.getItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static saveFilters(config: FiltersSaved): void {\r\n LocalStorageService.setItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY, {\r\n filters: config.filters,\r\n ft: config.ft || false,\r\n isSharedProperties: config.isSharedProperties || false\r\n });\r\n }\r\n\r\n setChange(change: FiltersChange): void {\r\n this._notifier.next(change);\r\n }\r\n\r\n getChanges(): Observable<FiltersChange> {\r\n return this._notifier.asObservable();\r\n }\r\n\r\n startComponent(wrapper: FiltersWrapper): void {\r\n this._startComponent.next(wrapper);\r\n }\r\n\r\n onStartComponent(): Observable<FiltersWrapper> {\r\n return this._startComponent.asObservable();\r\n }\r\n}\r\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {Filter, PropertyTypeEnum} from '@maplander/types';\r\nimport {MarkerPricePipe} from './../../pipes/marker-price/marker-price.pipe';\r\nimport {OfferingTypePipe} from './../../pipes/offering-type/offering-type.pipe';\r\nimport {FilterChip} from './../../utils/models/filter-chip';\r\nimport {FilterChipType} from '../../utils/enums/filter-chip-type';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {FiltersService} from './../filters/filters.service';\r\nimport {Subscription} from 'rxjs';\r\nimport {FiltersChange} from '././../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\n\r\n@Component({\r\n selector: 'lib-fab-filters',\r\n templateUrl: './fab-filters.component.html',\r\n styleUrls: ['./fab-filters.component.scss']\r\n})\r\nexport class FabFiltersComponent implements OnInit, OnDestroy {\r\n @Input() isOPI: boolean;\r\n @Input() mlsLabel: string;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _filter: Filter;\r\n private _wrapper: FiltersWrapper;\r\n private _subscription: Subscription;\r\n public chips: FilterChip[];\r\n\r\n constructor(\r\n private _currency: MarkerPricePipe,\r\n private _offeringPipe: OfferingTypePipe,\r\n private _filtersService: FiltersService\r\n ) {\r\n this.chips = [];\r\n this._subscription = new Subscription();\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._filtersService.onStartComponent().subscribe(response => {\r\n this._wrapper = response;\r\n })\r\n );\r\n this._subscription.add(\r\n this._filtersService.getChanges().subscribe((response: FiltersChange) => {\r\n this.init(response.filter, response.ft, response.isSharedProperties);\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n openFilters(): void {\r\n if (!this._wrapper) {\r\n console.warn('[FabFiltersComponent] waiting onStartComponent');\r\n return;\r\n }\r\n this._wrapper.open();\r\n }\r\n\r\n onClickChip(type: FilterChipType): void {\r\n if (type === FilterChipType.PROPERTY_TYPE || type === FilterChipType.OFFERING) {\r\n this.openFilters();\r\n }\r\n }\r\n\r\n private init(filter: Filter, ft: boolean, sharedProperties?: boolean): void {\r\n this.chips = [];\r\n this._filter = filter;\r\n this.listingType(sharedProperties);\r\n this.offeringType();\r\n this.propertyType();\r\n this.price();\r\n this.surface(ft);\r\n this.bedrooms();\r\n this.bathrooms();\r\n this.parkingPlaces();\r\n this.amenities();\r\n }\r\n\r\n private listingType(sharedProperties?: boolean): void {\r\n if (!this.isOPI) {\r\n return;\r\n }\r\n this.chips.push({\r\n type: FilterChipType.LISTING,\r\n text: sharedProperties ? 'Compartidas' : (this._filter.mls ? this.mlsLabel || 'MLS' : 'Mi lista'),\r\n icon: [this._filter.mls ? 'mlm' : 'list']\r\n });\r\n }\r\n\r\n private offeringType(): void {\r\n if (this._filter.offering && this._filter.type !== PropertyTypeEnum.NONE) {\r\n let offering = this._offeringPipe.transform(this._filter.offering, ' ').replace(/ /g, '');\r\n const firstLetter = offering.substr(0, 1);\r\n offering = offering.replace(firstLetter, '');\r\n offering = `${firstLetter.toLocaleUpperCase()}${offering}`;\r\n this.chips.push({\r\n type: FilterChipType.OFFERING,\r\n text: offering,\r\n icon: null\r\n });\r\n }\r\n }\r\n\r\n private propertyType(): void {\r\n if (this._filter.type && this._filter.type !== PropertyTypeEnum.NONE) {\r\n ConstantsComponents.PropertyTypeList.forEach(item => {\r\n if (item.value === this._filter.type) {\r\n this.chips.push({\r\n type: FilterChipType.PROPERTY_TYPE,\r\n text: item.name,\r\n icon: [item.iconName]\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private price(): void {\r\n let min = '', max = '', currency;\r\n if (this._filter.downLimitPrice !== 0) {\r\n min += this._currency.transform(this._filter.downLimitPrice);\r\n }\r\n if (this._filter.upLimitPrice !== 0) {\r\n max += this._currency.transform(this._filter.upLimitPrice);\r\n }\r\n if (min !== '' || max !== '') {\r\n currency = this._filter.currency ? this._filter.currency : '';\r\n this.chips.push({\r\n type: FilterChipType.PRICE,\r\n text: `${min}${min !== '' && max !== '' ? ' - ' : ''}${max} ${currency}`,\r\n icon: ['price']\r\n });\r\n }\r\n }\r\n\r\n private surface(ft: boolean): void {\r\n if (this._filter.mainArea !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.SURFACE,\r\n text: (ft ? (this._filter.mainArea / this.METERS_TO_SQ).toFixed(0).toString() : this._filter.mainArea.toString()) + (ft ? ' sq ft' : ' m2'),\r\n icon: ['surface']\r\n });\r\n }\r\n }\r\n\r\n private bedrooms(): void {\r\n if (this._filter.bedrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BEDROOMS,\r\n text: this._filter.bedrooms.toString(),\r\n icon: ['bedroom']\r\n });\r\n }\r\n }\r\n\r\n private bathrooms(): void {\r\n if (this._filter.bathrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BATHROOMS,\r\n text: this._filter.bathrooms.toString(),\r\n icon: ['bathroom']\r\n });\r\n }\r\n }\r\n\r\n private parkingPlaces(): void {\r\n if (this._filter.parkingPlaces !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.PARKING_PLACES,\r\n text: this._filter.parkingPlaces.toString(),\r\n icon: ['parking']\r\n });\r\n }\r\n }\r\n\r\n private amenities(): void {\r\n if (this._filter.extras && this._filter.extras.length > 0) {\r\n this.chips.push({\r\n type: FilterChipType.AMENITIES,\r\n text: this._filter.extras.length.toString(),\r\n icon: [this._filter.extras[0]]\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {FabFiltersComponent} from './fab-filters.component';\r\nimport {MatChipsModule} from '@angular/material/chips';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n OfferingTypeModule.forChild(),\r\n MarkerPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FabFiltersComponent\r\n ],\r\n exports: [\r\n FabFiltersComponent\r\n ]\r\n})\r\nexport class FabFiltersModule {\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CER, Currency} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class CurrencyConverterService {\r\n\r\n list(prices: number[], currencies: CER[], from: Currency, to: Currency): number[] {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n prices = prices.map(price => {\r\n if (from === to) {\r\n return price;\r\n } else {\r\n return valueTo * (price / valueFrom);\r\n }\r\n });\r\n return prices;\r\n }\r\n\r\n number(price: number, currencies: CER[], from: Currency, to: Currency): number {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n return valueTo * (price / valueFrom);\r\n }\r\n\r\n private getValueByCurrency(currencies: CER[], c: Currency): number {\r\n let value = 0;\r\n currencies.forEach(currency => {\r\n if (currency.type === c.toString()) {\r\n value = currency.value;\r\n }\r\n });\r\n return value;\r\n }\r\n}\r\n","export class MUtils {\r\n static linSpaceExp(start: number, stop: number, n: number): number[] {\r\n const list: number[] = [];\r\n const phi = 1.618033988749895, b = Math.log(stop / start) / ((n - 1) * Math.log(phi));\r\n for (let i = 0; i < n; i++) {\r\n list[i] = start * Math.pow(phi, b * i);\r\n const length = (Math.log10(list[i]) + 1);\r\n if (length > 2) {\r\n list[i] = (Math.round(list[i] / Math.pow(10, length - 2)) * Math.pow(10, length - 2));\r\n }\r\n }\r\n return list;\r\n }\r\n}\r\n","import {AbstractControl} from '@angular/forms';\r\n\r\nexport function removeError(control: AbstractControl, error: string) {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef, EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional, Output,\r\n Renderer2,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\nimport {AppUtil, CER, Currency, Filter, LimitPrice, OfferingTypeEnum, PropertyRange, PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes/filters-wrapper';\r\nimport {PropertyTypeItem} from './../../utils/models/property-type-item';\r\nimport {CurrencyConverterService} from './../../services/currency-converter/currency-converter.service';\r\nimport {Filters} from '../../utils/interfaces/filters';\r\nimport {FiltersService} from './filters.service';\r\nimport {FiltersChangeType} from '../../utils/enums';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {MUtils} from '../../utils/classes/mUtils';\r\nimport {AmenityItem} from '../../utils/models';\r\nimport {CurrencyFilterValidator} from '../property/validators/currency-filter-validator';\r\n\r\n@Component({\r\n selector: 'lib-filters',\r\n templateUrl: './filters.component.html',\r\n styleUrls: ['./filters.component.scss']\r\n})\r\nexport class FiltersComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy, Filters {\r\n @Input() utils: AppUtil;\r\n @Input() newFilters: boolean;\r\n @Input() stateOptions: Array<{name: string, total: number}>;\r\n @Input() propertyTotal: number;\r\n @Output() changeFilter: EventEmitter<{type: 'propertyType' | 'filter', payload: {filter: Filter, value: any}}>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _tmpMinPriceList: number[];\r\n private _tmpMaxPriceList: number[];\r\n private _subscription: Subscription;\r\n private _isSharedProperties: boolean;\r\n public filtersForm: FormGroup;\r\n public propertyTypeList: PropertyTypeItem[];\r\n public bedroomsList: number[];\r\n public bathroomsList: number[];\r\n public parkingPlacesList: number[];\r\n public currencyList: CER[];\r\n public minPriceList: number[];\r\n public maxPriceList: number[];\r\n public surfaceList: number[];\r\n public roiList: number[];\r\n public propertyTypeSelected: PropertyTypeItem;\r\n public filter: Filter;\r\n public isOPI: boolean;\r\n public surfaceUnitSelected: number;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean,\r\n private _render: Renderer2,\r\n private _ref: ElementRef,\r\n private _service: FiltersService,\r\n private _formBuilder: FormBuilder,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n this.changeFilter = new EventEmitter<{type: 'propertyType' | 'filter', payload: {filter: Filter, value: any}}>();\r\n this.isOPI = this._config || false;\r\n this._subscription = new Subscription();\r\n this.propertyTypeList = ConstantsComponents.PropertyTypeList.map(item => ({...item}));\r\n this.bedroomsList = Object.assign([], ConstantsComponents.BedroomList);\r\n this.bathroomsList = Object.assign([], ConstantsComponents.BathroomList);\r\n this.parkingPlacesList = Object.assign([], ConstantsComponents.ParkingSpacesList);\r\n this.surfaceList = Object.assign([], ConstantsComponents.SurfaceList);\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.surfaceUnitSelected = 0;\r\n this.buildForm();\r\n this.initComponentByPropertyType();\r\n this.restoreLastFiltersSaved(true);\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.openComponent(false);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.utils) {\r\n return console.warn('[FiltersComponent] utils param is required');\r\n }\r\n this.initComponent();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n console.log('[FiltersComponent] utils ready');\r\n this.initComponent();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n open(): void {\r\n this.restoreLastFiltersSaved();\r\n this.openComponent(true);\r\n }\r\n\r\n close(): void {\r\n this.openComponent(false);\r\n }\r\n\r\n changePropertyType(index: number): void {\r\n this.resetFilters(index);\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\r\n this.applyAmenities();\r\n this.filter.type = this.propertyTypeSelected.value;\r\n switch (this.propertyTypeSelected.value) {\r\n case PropertyTypeEnum.ROOM:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.RENT);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.SALE);\r\n break;\r\n }\r\n this.changeFilter.emit({type: 'propertyType', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeState(ev: string): void {\r\n this.filter.state = ev;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n if (amenity.checked) {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n if (i > -1) {\r\n this.filter.extras.splice(i, 1);\r\n }\r\n } else {\r\n this.filter.extras.push(amenity.value);\r\n }\r\n amenity.checked = !amenity.checked;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n saveSearchByFilters(): void {\r\n this.applyFilters(FiltersChangeType.SAVE);\r\n }\r\n\r\n applyFilters(type?: FiltersChangeType): void {\r\n this.getFilterByForm();\r\n const filterToSearch = Object.assign({}, this.filter);\r\n if (this.surfaceUnitSelected === 1) {\r\n filterToSearch.mainArea = filterToSearch.mainArea * this.METERS_TO_SQ;\r\n }\r\n this.updateFiltersSaved(filterToSearch);\r\n this._service.setChange({\r\n type: type || FiltersChangeType.APPLY,\r\n filter: filterToSearch,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties\r\n });\r\n this.openComponent(false);\r\n }\r\n\r\n resetFilters(propertyTypeItemIndex?: number): void {\r\n this.filter.currency = !propertyTypeItemIndex ? 'MXN' : this.filter.currency;\r\n this.initComponentByPropertyType(propertyTypeItemIndex);\r\n this.surfaceUnitSelected = 0;\r\n this.filter = propertyTypeItemIndex ? Utils.getFilterByPropertyType(this.filter) : Utils.getInitialFilter(this.isOPI, this.filter);\r\n this.updateFormByFilters();\r\n this.setPrices();\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n state: [],\r\n offering: [],\r\n currency: [],\r\n minPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n maxPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n bedrooms: [],\r\n bathrooms: [],\r\n parkingPlaces: [],\r\n surface: [],\r\n surfaceUnit: [],\r\n roi: []\r\n }, {\r\n validator: CurrencyFilterValidator('minPrice', 'maxPrice')\r\n });\r\n this.filtersForm.valueChanges.subscribe(() => {\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n });\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n state: this.filter.state,\r\n offering: this.filter.offering,\r\n currency: this.filter.currency,\r\n minPrice: this.filter.downLimitPrice,\r\n maxPrice: this.filter.upLimitPrice,\r\n bedrooms: this.filter.bedrooms,\r\n bathrooms: this.filter.bathrooms,\r\n parkingPlaces: this.filter.parkingPlaces,\r\n surface: this.filter.mainArea,\r\n surfaceUnit: this.surfaceUnitSelected,\r\n roi: this.filter.roi\r\n });\r\n }\r\n\r\n private getFilterByForm(): void {\r\n const data = this.filtersForm.value;\r\n this.filter.locationType = 'STATE';\r\n this.filter.state = data.state;\r\n this.filter.offering = data.offering;\r\n this.filter.currency = data.currency;\r\n this.filter.downLimitPrice = Number(data.minPrice);\r\n this.filter.upLimitPrice = Number(data.maxPrice);\r\n this.filter.bedrooms = Number(data.bedrooms);\r\n this.filter.bathrooms = Number(data.bathrooms);\r\n this.filter.parkingPlaces = Number(data.parkingPlaces);\r\n this.filter.mainArea = Number(data.surface);\r\n this.surfaceUnitSelected = Number(data.surfaceUnit);\r\n this.filter.roi = Number(data.roi);\r\n }\r\n\r\n private initComponent(): void {\r\n this.initUtils();\r\n this._subscription.add(\r\n this._service.getChanges().subscribe((response: FiltersChange) => {\r\n switch (response.type) {\r\n case FiltersChangeType.LIST_TYPE:\r\n this._isSharedProperties = response.isSharedProperties;\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n case FiltersChangeType.AREA:\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n }\r\n })\r\n );\r\n this._service.startComponent(new FiltersWrapper(this));\r\n }\r\n\r\n private initUtils(): void {\r\n this.currencyList = this.utils.cers;\r\n this.setPrices();\r\n }\r\n\r\n private setPrices(to?: Currency): void {\r\n this.filtersForm.controls['minPrice'].reset(0);\r\n this.filtersForm.controls['maxPrice'].reset(0);\r\n const offering = this.filtersForm.controls['offering'].value;\r\n this.minPriceList = this.createPrices(this.utils.limitPrice, this.propertyTypeSelected.value, offering);\r\n this.minPriceList = this._converter.list(this.minPriceList, this.utils.cers, Currency.USD, to || this.filter.currency as Currency);\r\n this.maxPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMinPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMaxPriceList = Object.assign([], this.maxPriceList);\r\n }\r\n\r\n private applyAmenities(): void {\r\n this.propertyTypeSelected.amenities = this.propertyTypeSelected.amenities.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n this.propertyTypeSelected.features = this.propertyTypeSelected.features.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n }\r\n\r\n private createPrices(limitPrice: LimitPrice, propertyType: PropertyTypeEnum, offering: OfferingTypeEnum): number[] {\r\n let list: number[] = [];\r\n limitPrice.propertyRanges.forEach((range: PropertyRange) => {\r\n if (range.offering === offering && range.type === propertyType) {\r\n list = MUtils.linSpaceExp(range.min, range.max, 20);\r\n }\r\n });\r\n return list;\r\n }\r\n\r\n private initComponentByPropertyType(propertyTypeItemIndex: number = null): void {\r\n this.propertyTypeSelected = JSON.parse(\r\n JSON.stringify(ConstantsComponents.PropertyTypeList[propertyTypeItemIndex !== null ? propertyTypeItemIndex : 9]));\r\n }\r\n\r\n private updateFiltersSaved(filters: Filter): void {\r\n this.filter = filters;\r\n FiltersService.saveFilters({\r\n filters: filters,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties || false\r\n });\r\n }\r\n\r\n private restoreLastFiltersSaved(init?: boolean): void {\r\n const filtersSaved = FiltersService.getFiltersSaved() || null;\r\n this.filter = filtersSaved ? filtersSaved.filters : Utils.getInitialFilter(this.isOPI);\r\n if (filtersSaved) {\r\n if (filtersSaved.ft) {\r\n this.filter.mainArea = Number((this.filter.mainArea / this.METERS_TO_SQ).toFixed(0));\r\n this.surfaceUnitSelected = filtersSaved.ft ? 1 : 0;\r\n }\r\n this._isSharedProperties = filtersSaved.isSharedProperties || false;\r\n }\r\n this.propertyTypeSelected = ConstantsComponents.PropertyTypeList.find(item => item.value === this.filter.type);\r\n this.applyAmenities();\r\n this.updateFormByFilters();\r\n if (init) {\r\n this.applyFilters(FiltersChangeType.INIT);\r\n }\r\n }\r\n\r\n private openComponent(open: boolean): void {\r\n if (open) {\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '1');\r\n } else {\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '0');\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'collapse');\r\n }\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.filtersForm.controls['offering'].valueChanges.subscribe(() => {\r\n this.setPrices();\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['currency'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.setPrices(value.toString() as Currency);\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['minPrice'].valueChanges.subscribe((value) => {\r\n if (!value) {\r\n return;\r\n }\r\n this.maxPriceList = Object.assign([], this._tmpMaxPriceList);\r\n const i = this.minPriceList.indexOf(value);\r\n if (i > -1) {\r\n this.maxPriceList.splice(0, i + 1);\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['maxPrice'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.minPriceList = Object.assign([], this._tmpMinPriceList);\r\n const i = this.maxPriceList.indexOf(value);\r\n if (i > -1) {\r\n const difference = this.minPriceList.length - this.maxPriceList.length;\r\n this.minPriceList.splice(i + difference, this.minPriceList.length - 1);\r\n }\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import {AbstractControl, FormGroup, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\n\r\nexport function CurrencyFilterValidator(controlName: string, controlName2: string): ValidatorFn {\r\n return (control: FormGroup): { [key: string]: boolean } | null => {\r\n if (control) {\r\n const peerControl = control.controls[controlName];\r\n const peerControl2 = control.controls[controlName2];\r\n if (peerControl2.value) {\r\n if (peerControl.value >= peerControl2.value) {\r\n peerControl2.setErrors({\r\n currency: true\r\n });\r\n }\r\n if (peerControl.value < peerControl2.value) {\r\n removeError(peerControl2, 'currency');\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {CurrencyConverterService} from './currency-converter.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class CurrencyConverterModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: CurrencyConverterModule,\r\n providers: [\r\n CurrencyConverterService\r\n ]\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FiltersComponent} from './filters.component';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatDividerModule} from '@angular/material/divider';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {CurrencyConverterModule} from './../../services/currency-converter/currency-converter.module';\r\nimport {FiltersService} from './filters.service';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {MatRippleModule} from '@angular/material/core';\r\nimport { MatInputModule } from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MatRippleModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatButtonToggleModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDividerModule,\r\n MatInputModule,\r\n MarkerPriceModule.forChild(),\r\n CurrencyConverterModule.forChild()\r\n ],\r\n declarations: [\r\n FiltersComponent\r\n ],\r\n exports: [\r\n FiltersComponent\r\n ],\r\n providers: [\r\n FiltersService\r\n ]\r\n})\r\nexport class FiltersModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: FiltersModule,\r\n providers: [\r\n FiltersService,\r\n {\r\n provide: FILTERS_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';\r\nimport {LazyLoadService} from '@maplander/shared';\r\nimport {Observable, of} from 'rxjs';\r\nimport {fromPromise} from 'rxjs/internal-compatibility';\r\nimport {map, mergeMap} from 'rxjs/operators';\r\n\r\ndeclare var PANOLENS: any;\r\ndeclare var DeviceOrientationEvent: any;\r\ndeclare var DeviceMotionEvent: any;\r\n\r\n@Component({\r\n selector: 'lib-panorama-visor',\r\n templateUrl: './panorama-visor.component.html',\r\n styleUrls: ['./panorama-visor.component.scss']\r\n})\r\nexport class PanoramaVisorComponent implements AfterViewInit, OnDestroy {\r\n @Input() url: string;\r\n @ViewChild('container', {static: true}) private _container: ElementRef;\r\n private _panorama: any;\r\n private _viewer: any;\r\n public isTouch: boolean;\r\n public showPanorama: boolean;\r\n public isFullScreen: boolean;\r\n\r\n constructor(\r\n private _lazy: LazyLoadService\r\n ) {\r\n }\r\n\r\n private static checkTouchSupported(): boolean {\r\n return window ? (\r\n window.navigator.msMaxTouchPoints !== null &&\r\n window.navigator.msMaxTouchPoints !== undefined)\r\n || 'ontouchstart' in window : false;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.url || this.url === '') {\r\n return;\r\n }\r\n this._lazy.load('https://pchen66.github.io/js/three/three.min.js').then(() => {\r\n return this._lazy.load('https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js');\r\n }).then(() => {\r\n setTimeout(() => {\r\n this.showPanorama = true;\r\n this.init();\r\n }, 500);\r\n }).catch((e) => {\r\n console.log('Failed', e);\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._panorama) {\r\n this._panorama.dispose();\r\n }\r\n if (this._viewer) {\r\n this._viewer.dispose();\r\n this._viewer.destroy();\r\n }\r\n }\r\n\r\n fullscreen(): void {\r\n this.toggleFullscreen();\r\n }\r\n\r\n changeControl(type: 'TOUCH' | 'MOUSE' | 'SENSOR'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (type) {\r\n case 'MOUSE':\r\n case 'TOUCH':\r\n this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);\r\n break;\r\n case 'SENSOR':\r\n this.requestPermissions().subscribe((value) => {\r\n if (value) {\r\n this._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION);\r\n } else {\r\n if (confirm(`No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?`)) {\r\n window.location.href = 'prefs:root=Safari';\r\n } else {\r\n alert('Permisos de movimiento y orientación no otorgados');\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n }\r\n\r\n changeMode(mode: 'NORMAL' | 'CARDBOARD' | 'STEREOSCOPIC'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (mode) {\r\n case 'NORMAL':\r\n this._viewer.disableEffect();\r\n break;\r\n case 'CARDBOARD':\r\n this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);\r\n break;\r\n case 'STEREOSCOPIC':\r\n this._viewer.enableEffect(PANOLENS.MODES.STEREO);\r\n break;\r\n }\r\n }\r\n\r\n private init(): void {\r\n try {\r\n this.isTouch = PanoramaVisorComponent.checkTouchSupported();\r\n this._panorama = new PANOLENS.ImagePanorama(this.url);\r\n this._viewer = new PANOLENS.Viewer({container: this._container.nativeElement, controlBar: true, controlButtons: []});\r\n this._viewer.onWindowResize(this._container.nativeElement.offsetWidth, this._container.nativeElement.offsetHeight);\r\n this._viewer.add(this._panorama);\r\n } catch (e) {\r\n console.log('Failed', e);\r\n }\r\n }\r\n\r\n private toggleFullscreen(): void {\r\n const doc: any = window.document;\r\n const docEl: any = this._container.nativeElement;\r\n const requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen ||\r\n docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;\r\n const cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;\r\n if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {\r\n requestFullScreen.call(docEl);\r\n this.isFullScreen = true;\r\n } else {\r\n cancelFullScreen.call(doc);\r\n this.isFullScreen = false;\r\n }\r\n }\r\n\r\n private requestPermissions(): Observable<boolean> {\r\n const success = of(true), failed = of(false);\r\n if (typeof DeviceMotionEvent.requestPermission === 'function') {\r\n return fromPromise(DeviceOrientationEvent.requestPermission()).pipe(\r\n mergeMap((response) => {\r\n if (response === 'granted') {\r\n return fromPromise(DeviceMotionEvent.requestPermission()).pipe(\r\n map((response2) => {\r\n return response2 === 'granted';\r\n })\r\n );\r\n } else {\r\n return failed;\r\n }\r\n })\r\n );\r\n } else {\r\n return success;\r\n }\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PanoramaVisorComponent} from './panorama-visor.component';\r\nimport {LazyLoaderModule} from '@maplander/shared';\r\nimport {MatButtonModule, MatIconModule, MatMenuModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatMenuModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n LazyLoaderModule.forChild()\r\n ],\r\n declarations: [\r\n PanoramaVisorComponent\r\n ],\r\n exports: [\r\n PanoramaVisorComponent\r\n ]\r\n})\r\nexport class PanoramaVisorModule {\r\n}\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\n\r\ninterface MultimediaUploaderData {\r\n currentType: PFileTypeEnum;\r\n multimedia: PFile[];\r\n newMedia: UserMedia[];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property-multimedia-uploader',\r\n templateUrl: './multimedia-uploader.component.html',\r\n styleUrls: ['./multimedia-uploader.component.scss']\r\n})\r\nexport class MultimediaUploaderComponent implements OnInit {\r\n\r\n public fileType: 'image' | 'image360' | 'document';\r\n public images: PFile[];\r\n public images360: PFile[];\r\n public videos: PFile[];\r\n public currentIndex: number;\r\n private _newMedia: UserMedia[];\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: MultimediaUploaderData,\r\n private _dialog: MatDialogRef<MultimediaUploaderComponent, { multimedia: PFile[], newMedia: UserMedia[] }>\r\n ) {\r\n switch (this._data.currentType) {\r\n case PFileTypeEnum.IMAGE:\r\n this.fileType = 'image';\r\n this.currentIndex = 0;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.fileType = 'image360';\r\n this.currentIndex = 1;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.fileType = 'document';\r\n this.currentIndex = 2;\r\n break;\r\n }\r\n this.images = [];\r\n this.images360 = [];\r\n this.videos = [];\r\n this._newMedia = [];\r\n }\r\n\r\n private static getYouTubeID(text: string): string {\r\n if (text.indexOf('https://youtu.be/') !== -1) {\r\n text = text.replace('https://youtu.be/', '');\r\n return text;\r\n } else if (text.indexOf('https://www.youtube.com/') !== -1) {\r\n text = text.replace('https://www.youtube.com/', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('watch?v=') !== -1) {\r\n text = text.replace('watch?v=', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('&')) {\r\n const arr = text.split('&');\r\n text = arr[0];\r\n }\r\n return text;\r\n }\r\n\r\n ngOnInit() {\r\n this.parseMultimedia();\r\n }\r\n\r\n onUploadImage(ev: UserMedia | UserMedia[]): void {\r\n if (!ev) {\r\n return;\r\n }\r\n switch (this.fileType) {\r\n case 'image':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImagePFile(image);\r\n });\r\n } else {\r\n this.createImagePFile(ev);\r\n }\r\n break;\r\n case 'image360':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImage360PFile(image);\r\n });\r\n } else {\r\n this.createImage360PFile(ev);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n onTabChanged(tab: number): void {\r\n this.currentIndex = tab;\r\n switch (tab) {\r\n case 0:\r\n this.fileType = 'image';\r\n break;\r\n case 1:\r\n this.fileType = 'image360';\r\n break;\r\n }\r\n }\r\n\r\n onListChanged(ev: PFile[]): void {\r\n switch (this.currentIndex) {\r\n case 0:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images = ev;\r\n }\r\n break;\r\n case 1:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images360 = ev;\r\n }\r\n break;\r\n case 2:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.videos = ev;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n removeMedia(ev: PFile): void {\r\n let i = -1;\r\n if (!ev.id) {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n this._newMedia.forEach((item, index) => {\r\n if (item.url === ev.fileCS.thumbnail) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n } else {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n onYouTubeInputTextChanged(input: HTMLInputElement): void {\r\n if (input.value === '') {\r\n return;\r\n }\r\n const id = MultimediaUploaderComponent.getYouTubeID(input.value);\r\n if (!id) {\r\n return;\r\n }\r\n if (id.length >= 11) {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.VIDEO;\r\n file.media = true;\r\n file.name = `video_${new Date().getTime()}`;\r\n file.fileCS = {\r\n thumbnail: id,\r\n blobName: null\r\n };\r\n file.position = this.videos.length === 0 ? 0 : this.videos.length;\r\n this.videos.push(file);\r\n input.value = '';\r\n }\r\n }\r\n\r\n accept(): void {\r\n this._dialog.close({multimedia: this.joinMultimediaTypes(), newMedia: this._newMedia});\r\n }\r\n\r\n close(): void {\r\n this._dialog.close(null);\r\n }\r\n\r\n private createImagePFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.IMAGE;\r\n image.type = PFileTypeEnum.IMAGE;\r\n file.media = true;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n const fileName = `image_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.position = this.images.length === 0 ? 0 : this.images.length;\r\n this._newMedia.push(image);\r\n this.images.push(file);\r\n }\r\n\r\n private createImage360PFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.SPHERIC;\r\n image.type = PFileTypeEnum.SPHERIC;\r\n file.media = true;\r\n const fileName = `spheric_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n file.position = this.images360.length === 0 ? 0 : this.images360.length;\r\n this._newMedia.push(image);\r\n this.images360.push(file);\r\n }\r\n\r\n private parseMultimedia(): void {\r\n if (this._data) {\r\n this._data.multimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.push(item);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.push(item);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.push(item);\r\n break;\r\n }\r\n });\r\n this._newMedia = this._data.newMedia || [];\r\n }\r\n }\r\n\r\n private joinMultimediaTypes(): PFile[] {\r\n let response = [];\r\n response = response.concat(this.images);\r\n response = response.concat(this.images360);\r\n response = response.concat(this.videos);\r\n return response;\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {MultimediaUploaderComponent} from './multimedia-uploader.component';\r\n\r\n@Injectable()\r\nexport class MultimediaUploaderService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[]): MatDialogRef<MultimediaUploaderComponent> {\r\n return this._dialog.open<MultimediaUploaderComponent, {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]},\r\n {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]}>\r\n (MultimediaUploaderComponent, {\r\n data: {currentType: currentType || PFileTypeEnum.IMAGE, multimedia: multimedia || [], newMedia: newMedia || []},\r\n panelClass: 'multimedia-uploader-panel-class',\r\n disableClose: true\r\n });\r\n }\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse, DialogResponseType} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\n\r\n@Component({\r\n selector: 'lib-property-announce-confirm',\r\n templateUrl: './announce-confirm.component.html',\r\n styleUrls: ['./announce-confirm.component.scss']\r\n})\r\nexport class AnnounceConfirmComponent {\r\n\r\n public list: { name: string, value: number, checked: boolean }[];\r\n public errorField: boolean;\r\n constructor(\r\n private _dialogRef: MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>>\r\n ) {\r\n this.list = ConstantsComponents.AnnounceCheckList.map(item => ({...item}));\r\n }\r\n\r\n public close(): void {\r\n this._dialogRef.close({code: DialogResponseType.CANCEL});\r\n }\r\n\r\n public accept(): void {\r\n this.errorField = false;\r\n this.list.forEach(item => {\r\n if (!item.checked) {\r\n this.errorField = true;\r\n }\r\n });\r\n if (this.errorField) {\r\n return;\r\n }\r\n this._dialogRef.close({code: DialogResponseType.ACCEPT});\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse} from '@maplander/types';\r\nimport {AnnounceConfirmComponent} from './announce-confirm.component';\r\n\r\n@Injectable()\r\nexport class AnnounceConfirmService {\r\n\r\n constructor(private _dialog: MatDialog) {\r\n }\r\n\r\n public open():\r\n MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>> {\r\n return this._dialog.open(AnnounceConfirmComponent, {\r\n disableClose: true,\r\n panelClass: 'confirm-announce-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, Inject, OnDestroy, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum} from '@maplander/types';\r\nimport {BreakpointObserver} from '@angular/cdk/layout';\r\nimport {GalleryConfig} from './gallery.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-gallery',\r\n templateUrl: './gallery.component.html',\r\n styleUrls: ['./gallery.component.scss']\r\n})\r\nexport class GalleryComponent implements OnInit, OnDestroy {\r\n\r\n public multimedia: PFile[];\r\n public sideOpened: boolean;\r\n public typeSelected: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n public indexSelected: number;\r\n public count: {\r\n image: number,\r\n video: number,\r\n sphere: number\r\n };\r\n private _mobileVersion: boolean;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: GalleryConfig,\r\n private _ref: MatDialogRef<GalleryComponent>,\r\n private _breakpointObserver: BreakpointObserver\r\n ) {\r\n this._subscription = new Subscription();\r\n this.multimedia = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia || []);\r\n this.sideOpened = true;\r\n this.indexSelected = this._data.indexSelected;\r\n this.typeSelected = 'IMAGE';\r\n this.count = {\r\n image: 0,\r\n sphere: 0,\r\n video: 0\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._breakpointObserver.observe(['(max-width: 1024px)']).subscribe((state) => {\r\n this._mobileVersion = state.matches;\r\n })\r\n );\r\n this.assignCountByType();\r\n this.assignMultimediaByType();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n close(): void {\r\n this._ref.close();\r\n }\r\n\r\n updateSideNav(): void {\r\n this.sideOpened = !this.sideOpened;\r\n }\r\n\r\n selectPFile(index: number): void {\r\n this.indexSelected = index;\r\n if (this._mobileVersion) {\r\n this.updateSideNav();\r\n }\r\n }\r\n\r\n onIndexSelectedChange(ev: number): void {\r\n this.indexSelected = ev;\r\n }\r\n\r\n changePFileType(type: 'IMAGE' | 'VIDEO' | 'SPHERIC'): void {\r\n this.indexSelected = 0;\r\n this.typeSelected = type;\r\n const pFileType = type as PFileTypeEnum;\r\n this.multimedia = this.getPFilesByType(pFileType, this._data.multimedia);\r\n }\r\n\r\n private assignCountByType(): void {\r\n this.count.image = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia).length;\r\n this.count.video = this.getPFilesByType(PFileTypeEnum.VIDEO, this._data.multimedia).length;\r\n this.count.sphere = this.getPFilesByType(PFileTypeEnum.SPHERIC, this._data.multimedia).length;\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n if (this._data.type) {\r\n this.typeSelected = this._data.type;\r\n this.multimedia = this.getPFilesByType(this.typeSelected as PFileTypeEnum, this._data.multimedia);\r\n }\r\n }\r\n\r\n private getPFilesByType(type: PFileTypeEnum, list: PFile[]): PFile[] {\r\n return list.filter(item => {\r\n return (item.type === type);\r\n }) || [];\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile} from '@maplander/types';\r\nimport {GalleryComponent} from './gallery.component';\r\n\r\nexport interface GalleryConfig {\r\n multimedia: PFile[];\r\n indexSelected: number;\r\n type: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n}\r\n\r\n\r\n@Injectable()\r\nexport class GalleryService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(multimedia: PFile[], indexSelected?: number, type?: 'IMAGE' | 'VIDEO' | 'SPHERIC'): MatDialogRef<GalleryComponent> {\r\n return this._dialog.open<GalleryComponent, GalleryConfig>(\r\n GalleryComponent, {\r\n data: {\r\n multimedia: multimedia || [],\r\n indexSelected: indexSelected || 0,\r\n type: type || null\r\n },\r\n disableClose: true,\r\n panelClass: 'gallery_dialog'\r\n });\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_TOKEN = new InjectionToken<boolean>('PROPERTY MODULE CONFIG');\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-stats',\r\n templateUrl: './stats.component.html',\r\n styleUrls: ['./stats.component.scss']\r\n})\r\nexport class StatsComponent implements OnInit {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: LeadInfo,\r\n private _dialogRef: MatDialogRef<StatsComponent>\r\n ) {\r\n this.data = new LeadInfo(this.data || null);\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n close(): void {\r\n this._dialogRef.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog} from '@angular/material';\r\nimport {StatsComponent} from './stats.component';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class StatsService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(leadInfo: LeadInfo): void {\r\n this._dialog.open<void, LeadInfo>(StatsComponent, {\r\n data: leadInfo || null,\r\n panelClass: 'stats-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\r\nimport {\r\n Address,\r\n AppUtil,\r\n DialogResponseType,\r\n NewCompleteProperty,\r\n NewProperty,\r\n PFile,\r\n PFileTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum,\r\n UserMedia\r\n} from '@maplander/types';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {EditorComponent} from '../editor/editor.component';\r\nimport {OwnerInfoComponent} from '../owner-info/owner-info.component';\r\nimport {DocumentsComponent} from '../documents/documents.component';\r\nimport {MultimediaUploaderService} from '../multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from '../announce-confirm/announce-confirm.service';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {Utils} from '../../../../utils';\r\nimport {ShareService} from '@maplander/shared';\r\nimport {GalleryService} from '../gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from '../../token';\r\nimport {StatsService} from '../stats/stats.service';\r\n\r\nexport enum PropertyEventType {\r\n CREATE = 'CREATE',\r\n UPDATE = 'UPDATE',\r\n ANNOUNCE = 'ANNOUNCE',\r\n HIDE = 'HIDE',\r\n SHOW = 'SHOW',\r\n ADDRESS = 'ADDRESS',\r\n OFFER = 'OFFER',\r\n FAVORITE = 'FAVORITE',\r\n REQUEST_INFO = 'REQUEST_INFO',\r\n SHARE = 'SHARE',\r\n ARCHIVE = 'ARCHIVE',\r\n REAL_ESTATE_EXCHANGE = 'REAL_ESTATE_EXCHANGE',\r\n SHARE_COMMISSION = 'SHARE_COMMISSION',\r\n BROCHURE = 'BROCHURE',\r\n POSTER = 'POSTER',\r\n CLIENTS = 'CLIENTS',\r\n BACK = 'BACK',\r\n SHOW_AGENTS = 'SHOW_AGENTS',\r\n TARPS = 'TARPS'\r\n}\r\n\r\nexport interface PropertyEventChange {\r\n type: PropertyEventType;\r\n payload?: any;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property',\r\n templateUrl: './property.component.html',\r\n styleUrls: ['./property.component.scss']\r\n})\r\nexport class PropertyComponent implements OnInit, OnChanges {\r\n @Input() property: NewCompleteProperty;\r\n @Input() utils: AppUtil;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() mode: 'detail' | 'record' | 'add';\r\n @Input() sharedProperty: { isShared: boolean, ownerAvailable: boolean } = {isShared: false, ownerAvailable: true};\r\n @Input() address: Address;\r\n @Input() mlsLabel: string;\r\n @Input() disableShareCommission: boolean;\r\n @Input() isFavorite: boolean;\r\n @Input() disableConfirmAnnounce: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() userUrl: string;\r\n @Output() change: EventEmitter<PropertyEventChange>;\r\n @Output() modeChange: EventEmitter<'detail' | 'record' | 'add'>;\r\n public multimedia: PFile[];\r\n public isOPI: boolean;\r\n public currentIndex: number;\r\n public frontImageError: boolean;\r\n public currentType: PFileTypeEnum;\r\n public multimediaCount: {\r\n images: number,\r\n images360: number,\r\n videos: number\r\n };\r\n public completeProperty: NewCompleteProperty;\r\n private _allMultimedia: PFile[];\r\n private _newMedia: UserMedia[];\r\n private _editorInstance: EditorComponent;\r\n private _ownerInstance: OwnerInfoComponent;\r\n private _documentsInstance: DocumentsComponent;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_TOKEN) private _config: boolean,\r\n private _uploaderService: MultimediaUploaderService,\r\n private _announceService: AnnounceConfirmService,\r\n private _snackBar: SnackBarService,\r\n private _share: ShareService,\r\n private _gallery: GalleryService,\r\n private _documentService: DocumentVisorService,\r\n private _statsService: StatsService\r\n ) {\r\n this.initCompleteProperty();\r\n this.change = new EventEmitter<PropertyEventChange>();\r\n this.modeChange = new EventEmitter<'detail' | 'record' | 'add'>();\r\n this.disableShareCommission = false;\r\n this.disableConfirmAnnounce = false;\r\n this.currentIndex = 0;\r\n this.multimedia = [];\r\n this._allMultimedia = [];\r\n this._newMedia = [];\r\n this.multimediaCount = {\r\n images: 0,\r\n images360: 0,\r\n videos: 0\r\n };\r\n this.isOPI = this._config || false;\r\n this.currentType = PFileTypeEnum.IMAGE;\r\n }\r\n\r\n ngOnInit() {\r\n // this.agentActions('SHOW_AGENTS');\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.completeProperty = new NewCompleteProperty(changes['property'].currentValue || null);\r\n this.parseMultimedia();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n }\r\n\r\n saveData(): void {\r\n this.restoreFrontImageError();\r\n if (this._editorInstance.validateFormInvalid()) {\r\n this._snackBar.setMessage('Verifique todos los campos obligatorios', 'OK', 5000, 'left', 'bottom');\r\n return;\r\n }\r\n this.parseDataByComponents();\r\n this.change.emit({\r\n type: this.completeProperty.property.id ? PropertyEventType.UPDATE : PropertyEventType.CREATE,\r\n payload: {\r\n property: this.completeProperty,\r\n newMedia: this._newMedia\r\n }\r\n });\r\n }\r\n\r\n agentActions(type: any): void {\r\n this.change.emit({\r\n type: type as PropertyEventType,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n shareProperty(): void {\r\n this.agentActions('SHARE');\r\n this._share.open({\r\n url: this.completeProperty.property.url,\r\n urlUser: this.userUrl\r\n });\r\n }\r\n\r\n openGallery(): void {\r\n if (this._allMultimedia.length === 0) {\r\n return;\r\n }\r\n let type = null;\r\n if (this.multimedia.length > 0) {\r\n type = this.multimedia[0].type;\r\n }\r\n this._gallery.open(this._allMultimedia, this.currentIndex, type);\r\n }\r\n\r\n goToStats(): void {\r\n this._statsService.open(this.completeProperty.leadInfo || null);\r\n }\r\n\r\n goToEditProperty(): void {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n }\r\n\r\n goToBack(): void {\r\n this.restoreFrontImageError();\r\n this.change.emit({\r\n type: PropertyEventType.BACK\r\n });\r\n }\r\n\r\n goToClients(): void {\r\n this.change.emit({\r\n type: PropertyEventType.CLIENTS\r\n });\r\n }\r\n\r\n goToUpdateVisibility(): void {\r\n this.change.emit({\r\n type: this.completeProperty.property.status === StatusTypeEnum.ANNOUNCED ? PropertyEventType.HIDE : PropertyEventType.SHOW,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n goToPublish(): void {\r\n if (this.mode === 'add') {\r\n this.parseDataByComponents();\r\n }\r\n const errors = Utils.getErrorsForPublish(this.completeProperty.property);\r\n if (errors.length > 0) {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n setTimeout(() => {\r\n this.validateFrontImageOnErrors(errors);\r\n this._editorInstance.setErrorsOnFields(errors);\r\n }, 200);\r\n this._snackBar.setMessage('Complete los campos faltantes para poder publicar', 'OK', 5000, 'left', 'bottom');\r\n } else {\r\n if (this.disableConfirmAnnounce) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n return;\r\n }\r\n this._announceService.open().afterClosed().subscribe((response) => {\r\n if (response.code === DialogResponseType.ACCEPT) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n onMultimediaIndexChanged(ev: number): void {\r\n this.currentIndex = ev;\r\n }\r\n\r\n changeMultimediaType(type: string): void {\r\n this.currentType = type as PFileTypeEnum;\r\n this.assignMultimediaByType();\r\n }\r\n\r\n openUploaderMultimedia(): void {\r\n this._uploaderService.open(this.currentType, this._allMultimedia, this._newMedia).afterClosed().subscribe((response) => {\r\n if (response) {\r\n this._newMedia = response.newMedia || [];\r\n this._allMultimedia = Object.assign([], response.multimedia || []);\r\n this.assignFrontImage();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n });\r\n }\r\n\r\n onEditorInstance(ev: EditorComponent): void {\r\n this._editorInstance = ev;\r\n }\r\n\r\n onOwnerInstance(ev: OwnerInfoComponent): void {\r\n this._ownerInstance = ev;\r\n }\r\n\r\n onDocumentsInstance(ev: DocumentsComponent): void {\r\n this._documentsInstance = ev;\r\n }\r\n\r\n onSelectAddress(): void {\r\n this.change.emit({\r\n type: PropertyEventType.ADDRESS\r\n });\r\n }\r\n\r\n private restoreFrontImageError(): void {\r\n this.frontImageError = false;\r\n }\r\n\r\n private parseMultimedia(): void {\r\n this._allMultimedia = [];\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.images || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.videos || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.spherics || []);\r\n }\r\n\r\n private getMultimediaByType(type: PFileTypeEnum): PFile[] {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === type) {\r\n response.push(item);\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n private assignFrontImage(): void {\r\n const images: PFile[] = [];\r\n this._allMultimedia.forEach(multimedia => {\r\n if (multimedia.type === PFileTypeEnum.IMAGE) {\r\n images.push(multimedia);\r\n }\r\n });\r\n if (images.length > 0) {\r\n this.completeProperty.property.image = images[0].fileCS.thumbnail;\r\n this.frontImageError = false;\r\n } else {\r\n this.completeProperty.property.image = null;\r\n }\r\n this.completeProperty = new NewCompleteProperty(this.completeProperty);\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === this.currentType) {\r\n response.push(item);\r\n }\r\n });\r\n this.multimedia = Object.assign([], response);\r\n }\r\n\r\n private validateFrontImageOnErrors(errors: string[]): void {\r\n errors.forEach(error => {\r\n if (error === 'image') {\r\n this.frontImageError = true;\r\n }\r\n });\r\n }\r\n\r\n private validateMultimediaTypeCount(): void {\r\n this.multimediaCount.images = 0;\r\n this.multimediaCount.images360 = 0;\r\n this.multimediaCount.videos = 0;\r\n this._allMultimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.multimediaCount.images++;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.multimediaCount.images360++;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.multimediaCount.videos++;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private parseDataByComponents(): void {\r\n this.completeProperty.property = this._editorInstance.getProperty();\r\n this.completeProperty.property.propertyInfo.owner = this._ownerInstance.getOwner();\r\n const documentsResponse = this._documentsInstance.getDocuments();\r\n this.completeProperty.files = documentsResponse.documents;\r\n this._newMedia = this._newMedia.concat(documentsResponse.newMedia);\r\n this.completeProperty.images = this.getMultimediaByType(PFileTypeEnum.IMAGE);\r\n this.completeProperty.spherics = this.getMultimediaByType(PFileTypeEnum.SPHERIC);\r\n this.completeProperty.videos = this.getMultimediaByType(PFileTypeEnum.VIDEO);\r\n }\r\n\r\n private initCompleteProperty(): void {\r\n const complete = new NewCompleteProperty();\r\n complete.property = new NewProperty();\r\n complete.property.propertyInfo = new PropertyInfo();\r\n this.completeProperty = complete;\r\n }\r\n}\r\n","import {FormGroup} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport class PropertyEditorValidators {\r\n static validator(form: FormGroup): void {\r\n // Min price rule\r\n let control = form.get('minPrice');\r\n let condition = Number(control.value) > Number(form.get('price').value);\r\n if (condition) {\r\n control.setErrors({\r\n minPriceInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'minPriceInvalid');\r\n }\r\n // Commission rule\r\n control = form.get('commission');\r\n condition = control.value && (!form.get('price').value || Number(form.get('price').value) === 0);\r\n if (condition) {\r\n control.setErrors({\r\n commissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'commissionInvalid');\r\n }\r\n // Consumer reporting rule\r\n control = form.get('consumerReportingOption');\r\n condition = form.get('consumerReporting').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Lease transfer rule\r\n control = form.get('transferPrice');\r\n condition = form.get('transfer').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Condominium fee rule\r\n control = form.get('maintenancePrice');\r\n condition = form.get('maintenance').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule\r\n control = form.get('sharedCommission');\r\n condition = form.get('mlm').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule 2\r\n condition = form.get('mlm').value && !form.get('commission').value;\r\n control = form.get('sharedCommission');\r\n if (condition) {\r\n control.setErrors({\r\n sharedCommissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'sharedCommissionInvalid');\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, ValidatorFn, Validators} from '@angular/forms';\r\nimport {\r\n Address,\r\n Amenities,\r\n AppUtil,\r\n AreaUnitEnum,\r\n CER,\r\n Features,\r\n GeoPt,\r\n LandUseEnum,\r\n NewProperty,\r\n OfferingTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum\r\n} from '@maplander/types';\r\nimport {Subscription} from 'rxjs';\r\nimport {DialogService} from '@maplander/shared';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport * as momentImported from 'moment';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyEditorValidators} from '../../validators/property-editor-validators';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {Utils} from '../../../../utils';\r\nconst moment = momentImported;\r\n\r\nconst MY_FORMATS = {\r\n parse: {\r\n dateInput: 'L',\r\n },\r\n display: {\r\n dateInput: 'L',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'L',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n providers: [\r\n {provide: MAT_DATE_LOCALE, useValue: 'es-MX'},\r\n {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]},\r\n {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}\r\n ]\r\n})\r\nexport class EditorComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n @ViewChild('btnSubmit', {static: true, read: ElementRef}) private _btnSubmitRef: ElementRef;\r\n @Input() utils: AppUtil;\r\n @Input() address: Address;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Output() editorInstance: EventEmitter<EditorComponent>;\r\n @Output() selectAddress: EventEmitter<void>;\r\n /**\r\n * REGEX_ONLY_INTEGERS\r\n * Regex pattern to only accept integer and positive numbers\r\n * */\r\n private readonly REGEX_ONLY_INTEGERS = new RegExp(/^[0-9]\\d*$/);\r\n private readonly REGEX_MIDDLE_NUMBER = new RegExp(/^[0-9]*(\\.[5])?$/);\r\n private readonly REGEX_WEBSITE = new RegExp(/(http|https):\\/\\/(\\w+:?\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@\\-\\/]))?/);\r\n private readonly REGEX_ALPHA_NUMBER = new RegExp(/[A-Za-z0-9_]/);\r\n private readonly _subscription: Subscription;\r\n private readonly _validators: {\r\n bedrooms: ValidatorFn[],\r\n bathrooms: ValidatorFn[],\r\n parkingSpaces: ValidatorFn[],\r\n mainArea: ValidatorFn[],\r\n secondaryArea: ValidatorFn[],\r\n externalLink: ValidatorFn[],\r\n sku: ValidatorFn[]\r\n };\r\n private _property: NewProperty;\r\n private _propertyTypeItem: PropertyTypeItem;\r\n private _errorFields: string[];\r\n public propertyForm: FormGroup;\r\n public offeringTypeList: { name: string, value: OfferingTypeEnum }[];\r\n public currencyList: CER[];\r\n public roiList: number[];\r\n public landUseList: { name: string, value: LandUseEnum }[];\r\n public amenitiesList: AmenityItem[];\r\n public featuresList: AmenityItem[];\r\n public commissionList: number[];\r\n public sharedCommissionList: number[];\r\n public durationList: number[];\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder,\r\n private _dialog: DialogService,\r\n private _adapter: DateAdapter<any>\r\n ) {\r\n this.editorInstance = new EventEmitter<EditorComponent>();\r\n this.selectAddress = new EventEmitter<void>();\r\n this._subscription = new Subscription();\r\n this.offeringTypeList = ConstantsComponents.OfferingTypeList.map(doc => ({...doc}));\r\n this.landUseList = ConstantsComponents.LandUseList.map(doc => ({...doc}));\r\n this.commissionList = ConstantsComponents.CommissionList[OfferingTypeEnum.SALE];\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.durationList = Object.assign([], ConstantsComponents.DurationList);\r\n this.sharedCommissionList = Object.assign([], ConstantsComponents.SharedCommissionList);\r\n this._adapter.setLocale('es');\r\n this._errorFields = [];\r\n this._validators = {\r\n bedrooms: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n bathrooms: [Validators.pattern(this.REGEX_MIDDLE_NUMBER)],\r\n parkingSpaces: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n mainArea: [],\r\n secondaryArea: [],\r\n externalLink: [Validators.pattern(this.REGEX_WEBSITE)],\r\n sku: [Validators.pattern(this.REGEX_ALPHA_NUMBER)]\r\n };\r\n this.propertyForm = this._formBuilder.group({\r\n offering: [OfferingTypeEnum.SALE],\r\n sku: [null, this._validators.sku],\r\n consumerReporting: [],\r\n consumerReportingOption: [1],\r\n currency: ['MXN'],\r\n minPrice: [],\r\n price: [],\r\n maintenance: [],\r\n maintenancePrice: [],\r\n transfer: [],\r\n transferPrice: [],\r\n bedrooms: [null, this._validators.bedrooms],\r\n bathrooms: [null, this._validators.bathrooms],\r\n parkingSpaces: [null, this._validators.parkingSpaces],\r\n mainArea: [null, this._validators.mainArea],\r\n secondaryArea: [null, this._validators.secondaryArea],\r\n unit: [AreaUnitEnum.M2],\r\n buildIn: [],\r\n landUse: [],\r\n exclusivity: [],\r\n mlm: [],\r\n sharedCommission: [],\r\n agreementDate: [{value: null, disabled: true}],\r\n duration: [],\r\n commission: [],\r\n roi: [],\r\n description: [],\r\n externalLink: [null, this._validators.externalLink],\r\n notes: [],\r\n address: this._formBuilder.group({\r\n country: [],\r\n postalCode: [],\r\n state: [],\r\n city: [],\r\n township: [],\r\n colony: [],\r\n street: [],\r\n extNumber: [],\r\n intNumber: [],\r\n mz: [],\r\n lt: [],\r\n visible: [true],\r\n }),\r\n }, {\r\n validators: PropertyEditorValidators.validator\r\n });\r\n }\r\n\r\n private static geoPtGenerator(geoPt: GeoPt, minDistance: number, maxDistance: number): GeoPt {\r\n const EARTH_RADIUS_METERS = 6371010.0;\r\n const l = Math.random() * (maxDistance - minDistance) + minDistance;\r\n const alpha = Math.random() * Math.PI / 2;\r\n const sx = (Math.random() < 0.5) ? l * Math.cos(alpha) : -l * Math.cos(alpha);\r\n const sy = (Math.random() < 0.5) ? l * Math.sin(alpha) : -l * Math.sin(alpha);\r\n const deltaLat = sy / EARTH_RADIUS_METERS * 180 / Math.PI;\r\n const lat = geoPt.latitude + deltaLat;\r\n const deltaLong = sx / EARTH_RADIUS_METERS / Math.cos(lat * Math.PI / 180) * 180 / Math.PI;\r\n return {\r\n latitude: lat,\r\n longitude: geoPt.longitude + deltaLong\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n this.currencyList = changes['utils'].currentValue.cers;\r\n }\r\n if (changes['propertyType'] && changes['propertyType'].currentValue) {\r\n this.propertyType = changes['propertyType'].currentValue;\r\n this.searchAmenitiesByPropertyType();\r\n }\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.createProperty(changes['property'].currentValue);\r\n }\r\n if (changes['address'] && changes['address'].currentValue) {\r\n this.updateAddressForm(changes['address'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.editorInstance.emit(this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n getProperty(): NewProperty {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n this.updatePropertyByForm(this.propertyForm.getRawValue());\r\n return this._property;\r\n }\r\n\r\n validateFormInvalid(): boolean {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n return this.propertyForm.invalid;\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n amenity.checked = !amenity.checked;\r\n this._property.amenities[amenity.value] = amenity.checked;\r\n }\r\n\r\n goToSelectAddress(): void {\r\n this.selectAddress.emit();\r\n }\r\n\r\n setErrorsOnFields(errors: string[]): void {\r\n this._errorFields = errors;\r\n this.setValidatorOnFields(this._errorFields);\r\n this._btnSubmitRef.nativeElement.click();\r\n }\r\n\r\n private updateAddressForm(address: Address): void {\r\n this.propertyForm.patchValue({\r\n address: {\r\n country: address.country,\r\n state: address.state,\r\n city: address.city,\r\n township: address.township,\r\n colony: address.colony,\r\n street: address.street,\r\n postalCode: address.postalCode,\r\n extNumber: address.outdoorNumber\r\n }\r\n });\r\n }\r\n\r\n private assignAmenities(): void {\r\n this.amenitiesList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignLocationFeatures(): void {\r\n this.featuresList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignCommission(): void {\r\n this.commissionList = ConstantsComponents.CommissionList[this._property.offering];\r\n }\r\n\r\n private assignBusinessRules(): void {\r\n switch (this.propertyType) {\r\n case PropertyTypeEnum.ROOM:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.RENT\r\n });\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.SALE\r\n });\r\n break;\r\n }\r\n if (this._property.status === StatusTypeEnum.ANNOUNCED) {\r\n const errors = Utils.listErrorsByPropertyTypeForPublish(this._property.type);\r\n this.setValidatorOnFields(errors);\r\n }\r\n }\r\n\r\n private updateFormByProperty(): void {\r\n this.propertyForm.patchValue({\r\n offering: this._property.offering,\r\n sku: this._property.sku,\r\n consumerReporting: this._property.propertyInfo.consumerReporting && this._property.propertyInfo.consumerReporting !== 0,\r\n consumerReportingOption: this._property.propertyInfo.consumerReporting,\r\n currency: this._property.currency,\r\n minPrice: this._property.propertyInfo.lowestPrice,\r\n price: this._property.price,\r\n maintenance: this._property.features.condominiumFeePrice && this._property.features.condominiumFeePrice !== 0,\r\n maintenancePrice: this._property.features.condominiumFeePrice,\r\n transfer: this._property.propertyInfo.leaseTransferPrice && this._property.propertyInfo.leaseTransferPrice !== 0,\r\n transferPrice: this._property.propertyInfo.leaseTransferPrice,\r\n bedrooms: this._property.features.bedrooms,\r\n bathrooms: this._property.features.bathrooms,\r\n parkingSpaces: this._property.features.parkingSpaces,\r\n mainArea: this._property.features.mainArea,\r\n secondaryArea: this._property.features.secondaryArea,\r\n unit: this._property.features.areaUnit,\r\n buildIn: this._property.features.builtIn ? new Date(this._property.features.builtIn, 1, 1) : null,\r\n landUse: this._property.features.landUse,\r\n exclusivity: this._property.propertyInfo.exclusivity,\r\n mlm: this._property.propertyInfo.mls,\r\n sharedCommission: this._property.propertyInfo.sharedCommission,\r\n agreementDate: this._property.propertyInfo.listingAgreementStartDate ?\r\n moment(new MDate(this._property.propertyInfo.listingAgreementStartDate).toDate()) : null,\r\n duration: this._property.propertyInfo.listingAgreementTime,\r\n commission: this._property.propertyInfo.commission,\r\n roi: this._property.features.roi,\r\n description: this._property.description,\r\n externalLink: this._property.externalLink,\r\n notes: this._property.propertyInfo.notes,\r\n address: {\r\n country: this._property.address.country,\r\n state: this._property.address.state,\r\n city: this._property.address.city,\r\n township: this._property.address.township,\r\n colony: this._property.address.colony,\r\n postalCode: this._property.address.postalCode,\r\n street: this._property.address.street,\r\n extNumber: this._property.address.outdoorNumber,\r\n intNumber: this._property.address.interiorNumber,\r\n mz: this._property.address.mz,\r\n lt: this._property.address.lt,\r\n visible: this._property.address.visible || false,\r\n }\r\n });\r\n }\r\n\r\n private updatePropertyByForm(data: any): void {\r\n this._property.type = this.propertyType;\r\n this._property.offering = data.offering;\r\n this._property.sku = data.sku;\r\n this._property.propertyInfo.consumerReporting = data.consumerReporting ? data.consumerReportingOption : null;\r\n this._property.currency = data.currency;\r\n this._property.propertyInfo.lowestPrice = data.minPrice ? Number(data.minPrice) : null;\r\n this._property.price = data.price ? Number(data.price) : null;\r\n this._property.features.condominiumFeePrice = data.maintenance ? Number(data.maintenancePrice) : null;\r\n this._property.propertyInfo.leaseTransferPrice = data.transfer ? Number(data.transferPrice) : null;\r\n this._property.features.bedrooms = data.bedrooms ? Number(data.bedrooms) : null;\r\n this._property.features.bathrooms = data.bathrooms ? Number(data.bathrooms) : null;\r\n this._property.features.parkingSpaces = data.parkingSpaces ? Number(data.parkingSpaces) : null;\r\n this._property.features.mainArea = data.mainArea ? Number(data.mainArea) : null;\r\n this._property.features.secondaryArea = data.secondaryArea ? Number(data.secondaryArea) : null;\r\n this._property.features.areaUnit = data.unit;\r\n this._property.features.builtIn = data.buildIn ? data.buildIn.getFullYear() : null;\r\n this._property.features.landUse = data.landUse;\r\n this._property.propertyInfo.exclusivity = data.exclusivity;\r\n this._property.propertyInfo.mls = data.mlm;\r\n this._property.propertyInfo.sharedCommission = data.mlm ? Number(data.sharedCommission) : null;\r\n this._property.propertyInfo.listingAgreementStartDate =\r\n data.agreementDate ? MDate.getTimestamp(data.agreementDate.toDate()) : null;\r\n this._property.propertyInfo.listingAgreementTime = data.duration;\r\n this._property.propertyInfo.commission = data.commission;\r\n this._property.features.roi = data.roi;\r\n this._property.description = data.description;\r\n this._property.externalLink = data.externalLink;\r\n this._property.propertyInfo.notes = data.notes;\r\n this._property.address.country = data.address.country;\r\n this._property.address.state = data.address.state;\r\n this._property.address.city = data.address.city;\r\n this._property.address.township = data.address.township;\r\n this._property.address.colony = data.address.colony;\r\n this._property.address.postalCode = data.address.postalCode;\r\n this._property.address.street = data.address.street;\r\n this._property.address.outdoorNumber = data.address.extNumber;\r\n this._property.address.interiorNumber = data.address.intNumber;\r\n this._property.address.mz = data.address.mz;\r\n this._property.address.lt = data.address.lt;\r\n this._property.address.location = this.address.location;\r\n this._property.address.publicLocation = !data.address.visible ?\r\n EditorComponent.geoPtGenerator(this.address.location, 200, 400) : this.address.location;\r\n this._property.address.visible = data.address.visible;\r\n }\r\n\r\n private searchAmenitiesByPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === this.propertyType) {\r\n this._propertyTypeItem = type;\r\n this.amenitiesList = type.amenities.map(item => ({...item}));\r\n this.featuresList = type.features.map(item => ({...item}));\r\n }\r\n });\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.propertyForm.controls['offering'].valueChanges.subscribe((value) => {\r\n this.commissionList = ConstantsComponents.CommissionList[value];\r\n this.propertyForm.patchValue({\r\n minPrice: null,\r\n maxPrice: null\r\n });\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['price'].valueChanges.subscribe((value) => {\r\n if (value && Number(value) === 0) {\r\n this.propertyForm.patchValue({\r\n minPrice: null\r\n });\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['mlm'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['sharedCommission'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['maintenance'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['maintenancePrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['transfer'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['transferPrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['consumerReporting'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['consumerReportingOption'].setValue(1);\r\n })\r\n );\r\n }\r\n\r\n private createProperty(property?: NewProperty): void {\r\n this._property = new NewProperty(property || null);\r\n this._property.type = this.propertyType;\r\n this._property.propertyInfo = new PropertyInfo(property ? property.propertyInfo : null);\r\n this._property.features = new Features(property ? property.features : null);\r\n this._property.address = new Address(property ? property.address : null);\r\n this._property.amenities = new Amenities(property ? property.amenities : null);\r\n this.assignBusinessRules();\r\n if (property && property.id) {\r\n this.updateFormByProperty();\r\n this.assignAmenities();\r\n this.assignLocationFeatures();\r\n this.assignCommission();\r\n }\r\n }\r\n\r\n private setValidatorOnFields(errors: string[], remove?: boolean): void {\r\n if (errors.length === 0) {\r\n return;\r\n }\r\n errors.forEach(error => {\r\n if (!this.propertyForm.controls[error]) {\r\n return;\r\n }\r\n if (remove) {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(this._validators[error] ? this._validators[error] : []);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n } else {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(\r\n this._validators[error] ? this._validators[error].concat(Validators.required) : [Validators.required]);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import {AbstractControl, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport function phoneFieldsValidator(controlName: string): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: boolean } | null => {\r\n if (control.parent) {\r\n const peerControl = control.parent.controls[controlName] as AbstractControl;\r\n if (!control.value && !peerControl.value) {\r\n removeError(peerControl, 'phoneFieldsError');\r\n return null;\r\n }\r\n if (control.value !== '' && (!peerControl.value || peerControl.value === '')) {\r\n peerControl.setErrors({\r\n phoneFieldsError: true\r\n });\r\n }\r\n if ((peerControl.value && peerControl.value !== '') && (!control.value || control.value === '')) {\r\n return {\r\n phoneFieldsError: true\r\n };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {CountryCode, Owner} from '@maplander/types';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {phoneFieldsValidator} from '../../validators/phone-fields-validator';\r\n\r\n@Component({\r\n selector: 'lib-property-owner-info',\r\n templateUrl: './owner-info.component.html',\r\n styleUrls: ['./owner-info.component.scss']\r\n})\r\nexport class OwnerInfoComponent implements OnChanges, AfterViewInit {\r\n @Input() owner: Owner;\r\n @Input() disabled: boolean;\r\n @Output() ownerInstance: EventEmitter<OwnerInfoComponent>;\r\n public ownerForm: FormGroup;\r\n private _owner: Owner;\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder\r\n ) {\r\n this.ownerInstance = new EventEmitter<OwnerInfoComponent>();\r\n this.ownerForm = this._formBuilder.group({\r\n name: [],\r\n lastName: [],\r\n email: ['', [Validators.email]],\r\n code: ['', [phoneFieldsValidator('phone')]],\r\n phone: ['', [\r\n phoneFieldsValidator('code'),\r\n Validators.maxLength(13),\r\n Validators.minLength(8),\r\n Validators.pattern(new RegExp(/^[0-9]\\d*$/))]\r\n ],\r\n address: []\r\n });\r\n this.createOwner();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['disabled']) {\r\n this.ownerForm.disable();\r\n }\r\n if (changes['owner'] && changes['owner'].currentValue) {\r\n this.createOwner(changes['owner'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.ownerInstance.emit(this);\r\n }\r\n\r\n onCodePhoneChanged(ev: CountryCode): void {\r\n this.ownerForm.controls['code'].setValue(ev ? ev.code : '');\r\n }\r\n\r\n getOwner(): Owner {\r\n this.updateOwnerByForm(this.ownerForm.value);\r\n return this._owner;\r\n }\r\n\r\n private updateOwnerByForm(data: any): void {\r\n this._owner.name = data.name;\r\n this._owner.lastName = data.lastName;\r\n this._owner.email = data.email;\r\n this._owner.phone = data.phone;\r\n this._owner.codePhone = data.code ? data.code.replace('+', '') : '';\r\n this._owner.address = data.address;\r\n }\r\n\r\n private updateFormByOwner(): void {\r\n this.ownerForm.patchValue({\r\n name: this._owner.name,\r\n lastName: this._owner.lastName,\r\n email: this._owner.email,\r\n phone: this._owner.phone,\r\n code: (this._owner.codePhone) ? `+${this._owner.codePhone}` : '',\r\n address: this._owner.address,\r\n });\r\n }\r\n\r\n private createOwner(owner?: Owner): void {\r\n this._owner = new Owner(owner || null);\r\n if (owner) {\r\n this.updateFormByOwner();\r\n }\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {Observable} from 'rxjs';\r\nimport {map} from 'rxjs/operators';\r\nimport {HttpClient} from '@angular/common/http';\r\n\r\n@Component({\r\n selector: 'lib-property-documents',\r\n templateUrl: './documents.component.html',\r\n styleUrls: ['./documents.component.scss']\r\n})\r\nexport class DocumentsComponent implements AfterViewInit, OnChanges {\r\n @Input() files: PFile[];\r\n @Input() disabled: boolean;\r\n @Output() documentsInstance: EventEmitter<DocumentsComponent>;\r\n public documents: { name: string, value: PFileTypeEnum, loaded: boolean }[];\r\n private _files: PFile[];\r\n private readonly _newMedia: UserMedia[];\r\n\r\n constructor(\r\n private _visor: DocumentVisorService,\r\n private _snackBar: SnackBarService,\r\n private _http: HttpClient\r\n ) {\r\n this.documentsInstance = new EventEmitter<DocumentsComponent>();\r\n this.documents = ConstantsComponents.DocumentsList.map(doc => ({...doc}));\r\n this._newMedia = [];\r\n this._files = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.documentsInstance.emit(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['files'] && changes['files'].currentValue) {\r\n this._files = changes['files'].currentValue || [];\r\n this.validateDocumentsLoaded();\r\n }\r\n }\r\n\r\n getDocuments(): { documents: PFile[], newMedia: UserMedia[] } {\r\n return {documents: this._files, newMedia: this._newMedia};\r\n }\r\n\r\n openFile(type: PFileTypeEnum): void {\r\n const doc = this.getPFileByType(type);\r\n const media = this.getUserMediaByType(type);\r\n if (media) {\r\n this._visor.open(media.url);\r\n return;\r\n }\r\n if (doc) {\r\n this.openBlobFile(doc.fileCS.thumbnail);\r\n return;\r\n }\r\n if (!doc && !media) {\r\n this._snackBar.setMessage('Este documento no ha sido añadido', 'OK', 2500, 'left');\r\n }\r\n }\r\n\r\n onUploadFile(ev: UserMedia, doc: { name: string, value: PFileTypeEnum, loaded: boolean }): void {\r\n const name = doc.value.toString().toLowerCase();\r\n if (doc.loaded) {\r\n this.updateDocument(name);\r\n }\r\n doc.loaded = true;\r\n const file = new PFile();\r\n file.type = doc.value;\r\n ev.type = doc.value;\r\n file.media = false;\r\n const fileName = `${name}_${new Date().getTime()}.pdf`;\r\n file.name = fileName;\r\n ev.name = fileName;\r\n file.fileCS = {\r\n thumbnail: ev.url,\r\n blobName: null\r\n };\r\n this._files.push(file);\r\n this._newMedia.push(ev);\r\n }\r\n\r\n private openBlobFile(url: string): void {\r\n this.downloadFile(url)\r\n .subscribe((response) => {\r\n this._visor.open(response);\r\n });\r\n }\r\n\r\n private updateDocument(name: string): void {\r\n let i = -1, file: PFile = null;\r\n this._files.forEach((item, index) => {\r\n if (item.name === name) {\r\n file = item;\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._files.splice(i, 1);\r\n }\r\n if (file) {\r\n i = -1;\r\n this._newMedia.forEach((item, index) => {\r\n if (item.name === file.name) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n private validateDocumentsLoaded(): void {\r\n if (!this._files || this._files.length === 0) {\r\n return;\r\n }\r\n this._files.forEach((file) => this.documents.forEach(doc => {\r\n if (doc.value === file.type) {\r\n doc.loaded = true;\r\n }\r\n }));\r\n }\r\n\r\n private getPFileByType(type: PFileTypeEnum): PFile {\r\n let result = null;\r\n if (!this.files || this.files.length === 0) {\r\n return result;\r\n }\r\n this.files.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private getUserMediaByType(type: PFileTypeEnum): UserMedia {\r\n let result = null;\r\n if (!this._newMedia || this._newMedia.length === 0) {\r\n return result;\r\n }\r\n this._newMedia.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private downloadFile(url: string): Observable<string> {\r\n return this._http.get(url, {\r\n responseType: 'arraybuffer'\r\n }).pipe(map((payload) => {\r\n const blob = new Blob([payload], {\r\n type: 'application/pdf'\r\n });\r\n return URL.createObjectURL(blob);\r\n }));\r\n }\r\n}\r\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport {NewProperty} from '@maplander/types';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n selector: 'lib-property-details',\r\n templateUrl: './details.component.html',\r\n styleUrls: ['./details.component.scss']\r\n})\r\nexport class DetailsComponent implements OnInit, OnChanges {\r\n @Input() record: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Input() visibleTour: boolean;\r\n public amenities: AmenityItem[];\r\n public features: AmenityItem[];\r\n public propertyType: PropertyTypeItem;\r\n public agreementEndDate: number;\r\n\r\n constructor(\r\n private _sanitizer: DomSanitizer\r\n ) {\r\n this.amenities = [];\r\n this.features = [];\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.property = changes['property'].currentValue;\r\n this.searchPropertyType();\r\n this.createAmenities();\r\n this.createFeatures();\r\n this.validateAgreement();\r\n }\r\n }\r\n\r\n getTourUrl(): SafeResourceUrl {\r\n return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink);\r\n }\r\n\r\n private validateAgreement(): void {\r\n if (this.property.propertyInfo.listingAgreementStartDate && this.property.propertyInfo.listingAgreementTime) {\r\n const startDate = new MDate(this.property.propertyInfo.listingAgreementStartDate).toDate();\r\n startDate.setDate(startDate.getDate() + this.property.propertyInfo.listingAgreementTime);\r\n this.agreementEndDate = MDate.getTimestamp(startDate);\r\n }\r\n }\r\n\r\n private searchPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (this.property.type === type.value) {\r\n this.propertyType = type;\r\n }\r\n });\r\n }\r\n\r\n private createAmenities(): void {\r\n this.amenities = [];\r\n let amenities: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n amenities = type.amenities;\r\n }\r\n });\r\n if (amenities.length > 0) {\r\n amenities.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.amenities.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private createFeatures(): void {\r\n this.features = [];\r\n let features: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n features = type.features;\r\n }\r\n });\r\n if (features.length > 0) {\r\n features.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.features.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component, ContentChild,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n SimpleChanges, TemplateRef,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {PFile} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-property-slide-show',\r\n templateUrl: './slide-show.component.html',\r\n styleUrls: ['./slide-show.component.scss']\r\n})\r\nexport class SlideShowComponent implements OnChanges, AfterViewInit {\r\n\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() customActions: TemplateRef<any>;\r\n @ViewChild('slider', {static: true}) private _slider: ElementRef;\r\n @Input() multimedia: PFile[];\r\n @Input() selectIndex: number;\r\n @Input() initialIndex: number;\r\n @Output() currentIndex: EventEmitter<number>;\r\n public count: number;\r\n public index: number;\r\n\r\n constructor(\r\n private _render: Renderer2\r\n ) {\r\n this.currentIndex = new EventEmitter<number>();\r\n this.index = this.initialIndex || 0;\r\n this.multimedia = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.currentIndex.emit(this.index);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectIndex'] && (changes['selectIndex'].currentValue !== undefined && changes['selectIndex'].currentValue !== null)) {\r\n this.moveImageByIndex(changes['selectIndex'].currentValue);\r\n }\r\n if (changes['multimedia'] && changes['multimedia'].currentValue) {\r\n this.multimedia = changes['multimedia'].currentValue || [];\r\n if (this.multimedia.length > 0) {\r\n this.count = this.multimedia.length;\r\n this.moveImageByIndex(this.initialIndex || 0);\r\n this.validateHTTPS();\r\n }\r\n }\r\n }\r\n\r\n moveImage(next?: boolean): void {\r\n this.index = next ? this.index + 1 : this.index - 1;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n moveImageByIndex(index: number): void {\r\n this.index = index;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n private validateHTTPS(): void {\r\n this.multimedia.forEach(item => {\r\n if (item.fileCS.thumbnail.indexOf('https') === -1) {\r\n item.fileCS.thumbnail = item.fileCS.thumbnail.replace('http', 'https');\r\n }\r\n });\r\n }\r\n}\r\n","import {NativeDateAdapter} from '@angular/material/core';\r\n\r\nexport class CustomDateAdapter extends NativeDateAdapter {\r\n format(date: Date, displayFormat: Object): string {\r\n return date.getFullYear().toString();\r\n }\r\n}\r\n","import {ChangeDetectorRef, Component, Inject, OnDestroy} from '@angular/core';\r\nimport {MatCalendar} from '@angular/material/datepicker';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {Subject} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker-header',\r\n templateUrl: './custom-datepicker-header.component.html',\r\n styleUrls: ['./custom-datepicker-header.component.scss']\r\n})\r\nexport class CustomDatepickerHeaderComponent<D> implements OnDestroy {\r\n\r\n private _destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private _calendar: MatCalendar<D>, private _dateAdapter: DateAdapter<D>,\r\n @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats, cdr: ChangeDetectorRef) {\r\n _calendar.stateChanges\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => cdr.markForCheck());\r\n }\r\n\r\n ngOnDestroy() {\r\n this._destroyed.next();\r\n this._destroyed.complete();\r\n }\r\n\r\n get periodLabel(): string {\r\n const currentDate = this._dateAdapter\r\n .format(this._calendar.activeDate, 'YYYY');\r\n return `${Number(currentDate) - 23} - ${currentDate}`;\r\n }\r\n\r\n previousClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, -23);\r\n }\r\n\r\n nextClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, 23);\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, forwardRef, Injector} from '@angular/core';\r\nimport {MatDatepicker} from '@angular/material/datepicker';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\nimport {CustomDateAdapter} from '../date-adapter';\r\nimport {CustomDatepickerHeaderComponent} from '../custom-datepicker-header/custom-datepicker-header.component';\r\n\r\nconst MY_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'LL'\r\n },\r\n display: {\r\n dateInput: 'YYYY',\r\n monthYearLabel: 'YYYY',\r\n dateA11yLabel: 'YYYY',\r\n monthYearA11yLabel: 'YYYY'\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker',\r\n templateUrl: './custom-datepicker.component.html',\r\n styleUrls: ['./custom-datepicker.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomDatepickerComponent),\r\n multi: true\r\n },\r\n {\r\n provide: MAT_DATE_FORMATS,\r\n useValue: MY_DATE_FORMATS\r\n },\r\n {\r\n provide: DateAdapter,\r\n useClass: CustomDateAdapter\r\n }\r\n ]\r\n})\r\nexport class CustomDatepickerComponent implements ControlValueAccessor, AfterViewInit {\r\n\r\n public currentYear: Date;\r\n public year: string;\r\n public customHeader = CustomDatepickerHeaderComponent;\r\n private _control: NgControl;\r\n\r\n constructor(\r\n private _injector: Injector\r\n ) {\r\n this.currentYear = new Date();\r\n this.year = '';\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._control = this._injector.get(NgControl);\r\n this._control.valueAccessor = this;\r\n }\r\n\r\n onYearSelected(ev: any, datepicker: MatDatepicker<Date>) {\r\n datepicker.close();\r\n this.year = ev;\r\n this._control.control.patchValue(ev);\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (value !== undefined) {\r\n this.year = value;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CustomDatepickerComponent } from './custom-datepicker/custom-datepicker.component';\r\nimport {CustomDatepickerHeaderComponent} from './custom-datepicker-header/custom-datepicker-header.component';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\n\r\nconst MATERIAL = [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatDatepickerModule,\r\n MatButtonModule,\r\n MatIconModule\r\n];\r\n\r\nconst COMPONENTS = [\r\n CustomDatepickerComponent,\r\n CustomDatepickerHeaderComponent\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL\r\n ],\r\n declarations: [\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n CustomDatepickerHeaderComponent\r\n ],\r\n exports: [\r\n CustomDatepickerComponent\r\n ]\r\n})\r\nexport class CustomDatepickerModule { }\r\n","import {AfterViewInit, Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild} from '@angular/core';\r\nimport {CdkDrag, CdkDragMove, CdkDropList, CdkDropListGroup, moveItemInArray} from '@angular/cdk/drag-drop';\r\nimport {ViewportRuler} from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: 'lib-custom-drag-and-drop',\r\n templateUrl: './custom-drag-and-drop.component.html',\r\n styleUrls: ['./custom-drag-and-drop.component.scss']\r\n})\r\nexport class CustomDragAndDropComponent implements OnInit, AfterViewInit {\r\n @ViewChild(CdkDropListGroup, {static: true}) listGroup: CdkDropListGroup<CdkDropList>;\r\n @ViewChild(CdkDropList, {static: true}) placeholder: CdkDropList;\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() content: TemplateRef<any>;\r\n @Input() items: any[];\r\n @Output() itemsChanged: EventEmitter<any[]>;\r\n public target: CdkDropList;\r\n public targetIndex: number;\r\n public source: CdkDropList;\r\n public sourceIndex: number;\r\n public activeContainer;\r\n public dropListEnterPredicate: Function;\r\n\r\n constructor(private _viewportRuler: ViewportRuler) {\r\n this.itemsChanged = new EventEmitter<any[]>();\r\n this.target = null;\r\n this.source = null;\r\n this.dropListEnterPredicate = (drag: CdkDrag, drop: CdkDropList) => {\r\n if (drop === this.placeholder) {\r\n return true;\r\n }\r\n if (drop !== this.activeContainer) {\r\n return false;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const sourceElement = drag.dropContainer.element.nativeElement;\r\n const dropElement = drop.element.nativeElement;\r\n const dragIndex = __indexOf(dropElement.parentElement.children, (this.source ? phElement : sourceElement));\r\n const dropIndex = __indexOf(dropElement.parentElement.children, dropElement);\r\n if (!this.source) {\r\n this.sourceIndex = dragIndex;\r\n this.source = drag.dropContainer;\r\n phElement.style.width = sourceElement.clientWidth + 'px';\r\n phElement.style.height = sourceElement.clientHeight + 'px';\r\n sourceElement.parentElement.removeChild(sourceElement);\r\n }\r\n this.targetIndex = dropIndex;\r\n this.target = drop;\r\n phElement.style.display = '';\r\n dropElement.parentElement.insertBefore(phElement, (dropIndex > dragIndex\r\n ? dropElement.nextSibling : dropElement));\r\n this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);\r\n return false;\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const phElement = this.placeholder.element.nativeElement;\r\n phElement.style.display = 'none';\r\n phElement.parentElement.removeChild(phElement);\r\n }\r\n\r\n dragMoved(e: CdkDragMove) {\r\n const point = this.getPointerPositionOnPage(e.event);\r\n this.listGroup._items.forEach(dropList => {\r\n if (__isInsideDropListClientRect(dropList, point.x, point.y)) {\r\n this.activeContainer = dropList;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n dropListDropped(): void {\r\n if (!this.target) {\r\n return;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const parent = phElement.parentElement;\r\n phElement.style.display = 'none';\r\n parent.removeChild(phElement);\r\n parent.appendChild(phElement);\r\n parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);\r\n this.target = null;\r\n this.source = null;\r\n if (this.sourceIndex !== this.targetIndex) {\r\n moveItemInArray(this.items, this.sourceIndex, this.targetIndex);\r\n this.itemsChanged.emit(this.items);\r\n }\r\n }\r\n\r\n /** Determines the point of the page that was touched by the user. */\r\n getPointerPositionOnPage(event: MouseEvent | TouchEvent): any {\r\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\r\n const point = __isTouchEvent(event) ? (event.touches[0] || event.changedTouches[0]) : event;\r\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\r\n return {\r\n x: point.pageX - scrollPosition.left,\r\n y: point.pageY - scrollPosition.top\r\n };\r\n }\r\n}\r\n\r\nfunction __indexOf(collection, node) {\r\n return Array.prototype.indexOf.call(collection, node);\r\n}\r\n\r\n/** Determines whether an event is a touch event. */\r\nfunction __isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\r\n return event.type.startsWith('touch');\r\n}\r\n\r\nfunction __isInsideDropListClientRect(dropList: CdkDropList, x: number, y: number) {\r\n const {top, bottom, left, right} = dropList.element.nativeElement.getBoundingClientRect();\r\n return y >= top && y <= bottom && x >= left && x <= right;\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {EditorComponent} from './components/editor/editor.component';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {OwnerInfoComponent} from './components/owner-info/owner-info.component';\r\nimport {DocumentsComponent} from './components/documents/documents.component';\r\nimport {\r\n CountryCodeModule,\r\n DialogModule,\r\n LocationModule,\r\n SafeUrlModule, ShareModule,\r\n StringManipulationModule,\r\n UploadFileModule\r\n} from '@maplander/shared';\r\nimport {SnackBarModule} from '@maplander/core';\r\nimport {PropertyComponent} from './components/property/property.component';\r\nimport {DetailsComponent} from './components/details/details.component';\r\nimport {SlideShowComponent} from './components/slideshow/slide-show.component';\r\nimport {MultimediaUploaderComponent} from './components/multimedia-uploader/multimedia-uploader.component';\r\nimport {AnnounceConfirmComponent} from './components/announce-confirm/announce-confirm.component';\r\nimport {MultimediaUploaderService} from './components/multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from './components/announce-confirm/announce-confirm.service';\r\nimport {CustomDatepickerModule} from './components/editor/components/custom-datepicker/custom-datepicker.module';\r\nimport {DocumentVisorModule} from '../document-visor/document-visor.module';\r\nimport {PanoramaVisorModule} from '../panorama-visor/panorama-visor.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from '../../pipes/property-type/property-type.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatCheckboxModule} from '@angular/material/checkbox';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatRadioModule} from '@angular/material/radio';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatSidenavModule} from '@angular/material/sidenav';\r\nimport {MatTabsModule} from '@angular/material/tabs';\r\nimport {MatToolbarModule} from '@angular/material/toolbar';\r\nimport {MatNativeDateModule, MatRippleModule} from '@angular/material/core';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {EcoFabSpeedDialModule} from '@ecodev/fab-speed-dial';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\nimport {DragDropModule} from '@angular/cdk/drag-drop';\r\nimport { CustomDragAndDropComponent } from './components/custom-drag-and-drop/custom-drag-and-drop.component';\r\nimport {GalleryComponent} from './components/gallery/gallery.component';\r\nimport {GalleryService} from './components/gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from './token';\r\nimport { StatsComponent } from './components/stats/stats.component';\r\nimport {StatsService} from './components/stats/stats.service';\r\n\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatIconModule,\r\n MatButtonToggleModule,\r\n MatRadioModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatTabsModule,\r\n MatDatepickerModule,\r\n MatTooltipModule,\r\n MatRippleModule,\r\n MatNativeDateModule,\r\n DragDropModule\r\n];\r\n\r\nconst PAGES = [\r\n PropertyComponent\r\n];\r\n\r\nconst COMPONENTS = [\r\n DetailsComponent,\r\n EditorComponent,\r\n OwnerInfoComponent,\r\n SlideShowComponent,\r\n DocumentsComponent,\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n CustomDragAndDropComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n MultimediaUploaderService,\r\n AnnounceConfirmService,\r\n CurrencyPipe,\r\n GalleryService,\r\n StatsService\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL,\r\n EcoFabSpeedDialModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n UploadFileModule,\r\n DocumentVisorModule.forChild(),\r\n OfferingTypeModule.forChild(),\r\n PropertyTypeModule.forChild(),\r\n SafeUrlModule.forChild(),\r\n StringManipulationModule.forChild(),\r\n FormatDateModule.forChild(),\r\n FormatPriceModule.forChild(),\r\n ShareModule.forChild(),\r\n PanoramaVisorModule,\r\n CountryCodeModule,\r\n LocationModule,\r\n DialogModule,\r\n CustomDatepickerModule,\r\n SnackBarModule.forRoot()\r\n ],\r\n declarations: [\r\n PAGES,\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n ENTRY_COMPONENTS\r\n ],\r\n exports: [\r\n PropertyComponent\r\n ],\r\n providers: [\r\n PROVIDERS\r\n ]\r\n})\r\nexport class PropertyModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_CARD_CONFIG_MODULE = new InjectionToken<boolean>('PROPERTY CARD CONFIG MODULE');\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, Optional, Output, SimpleChanges, OnInit} from '@angular/core';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\n\r\n@Component({\r\n selector: 'lib-property-card',\r\n templateUrl: './property-card.component.html',\r\n styleUrls: ['./property-card.component.scss']\r\n})\r\nexport class PropertyCardComponent implements OnChanges, OnInit {\r\n @Input() marker: Marker;\r\n @Input() href: string;\r\n @Input() target: string;\r\n @Input() queryParams: {\r\n [k: string]: any;\r\n };\r\n @Input() state: {\r\n [k: string]: any;\r\n };\r\n @Input() showAlert: boolean;\r\n @Input() positionLatLng: any;\r\n @Input() isFavorite: boolean;\r\n @Input() currency: string;\r\n @Input() showDiscard: boolean;\r\n @Input() mode: 'full' | 'summary' = 'full';\r\n @Output() markerChanged: EventEmitter<Marker>;\r\n @Output() favoriteChanged: EventEmitter<string>;\r\n @Output() propertyDiscarded: EventEmitter<string>;\r\n public info: PropertyCardInfo;\r\n public distance: any;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_CARD_CONFIG_MODULE) public isOPI: boolean,\r\n ) {\r\n this.currency = null;\r\n this.markerChanged = new EventEmitter<Marker>();\r\n this.favoriteChanged = new EventEmitter<string>();\r\n this.propertyDiscarded = new EventEmitter<string>();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.positionLatLng) {\r\n this.latLng(this.positionLatLng.latitude, this.positionLatLng.longitude);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n this.currency = changes['currency'].currentValue !== 'MXN' ? changes['currency'].currentValue : null;\r\n }\r\n if (changes['marker'] && changes['marker'].currentValue) {\r\n this.info = changes['marker'].currentValue.info;\r\n }\r\n }\r\n\r\n onFrontImageOver(): void {\r\n this.marker.hover = true;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n onFrontImageLeave(): void {\r\n this.marker.hover = false;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n favorite(): void {\r\n this.favoriteChanged.emit(this.info.propertyId);\r\n }\r\n\r\n discard(): void {\r\n this.propertyDiscarded.emit(this.info.propertyId);\r\n }\r\n\r\n private deg2rad(deg): any {\r\n return deg * (Math.PI / 180 );\r\n }\r\n\r\n private latLng(lat: any, lng: any): void {\r\n const lat1 = lat;\r\n const lon1 = lng;\r\n const lat2 = this.marker.location.latitude;\r\n const lon2 = this.marker.location.longitude;\r\n const R = 6371; // Radius of the earth in km\r\n const dLat = this.deg2rad(lat2 - lat1 ); // deg2rad below\r\n const dLon = this.deg2rad(lon2 - lon1 );\r\n const a =\r\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2)\r\n ;\r\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n let d = R * c; // Distance in km\r\n if (Math.trunc(d) < 1) {\r\n d = d * 1000;\r\n d = Math.trunc(d);\r\n if (d < 10) {\r\n this.distance = 10 + ' m de su búsqueda';\r\n } else {\r\n d = d - (d % 10);\r\n this.distance = d + ' m de su búsqueda';\r\n }\r\n } else {\r\n this.distance = d.toFixed(2) + ' km de su búsqueda';\r\n }\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {PropertyCardComponent} from './property-card.component';\r\nimport {RouterModule} from '@angular/router';\r\nimport {OfferingTypeModule} from './../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from './../../pipes/property-type/property-type.module';\r\nimport {ImageErrorModule} from './../../directives/image-error/image-error.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n PropertyTypeModule,\r\n OfferingTypeModule,\r\n ImageErrorModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n FormatDateModule\r\n ],\r\n declarations: [\r\n PropertyCardComponent\r\n ],\r\n exports: [\r\n PropertyCardComponent\r\n ]\r\n})\r\nexport class PropertyCardModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyCardModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_CARD_CONFIG_MODULE,\r\n useValue: isOPI\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {\r\n Address,\r\n CER,\r\n Currency,\r\n GeoPt,\r\n NewPropertyLite,\r\n NewPropertyLiteSuggest,\r\n OfferingTypeEnum,\r\n PropertyTypeEnum\r\n} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\nimport {PropertyTypeItem} from '../../utils/models/property-type-item';\r\nimport {OfferingTypePipe} from '../../pipes/offering-type/offering-type.pipe';\r\nimport {PropertyTypePipe} from '../../pipes/property-type/property-type.pipe';\r\nimport {Utils} from '../../utils';\r\nimport {CurrencyConverterService} from '../currency-converter/currency-converter.service';\r\n\r\ndeclare var google: any;\r\n\r\n@Injectable()\r\nexport class MarkersService {\r\n\r\n constructor(\r\n private _propertyTypePipe: PropertyTypePipe,\r\n private _offeringTypePipe: OfferingTypePipe,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n }\r\n\r\n private static getPropertyTypeItemByType(type: PropertyTypeEnum): PropertyTypeItem {\r\n let item: PropertyTypeItem = null;\r\n ConstantsComponents.PropertyTypeList.forEach((element) => {\r\n if (element.value === type) {\r\n item = element;\r\n }\r\n });\r\n return item;\r\n }\r\n\r\n private static validatePropertyInFavorites(propertyId: string, favorites: NewPropertyLite[]): boolean {\r\n let result = false;\r\n for (let i = 0; i < favorites.length; i++) {\r\n if (propertyId === favorites[i].id) {\r\n result = true;\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private static calculateLocationFrom(location: GeoPt, bearingInRadians: number, distanceInMetres: number): GeoPt {\r\n const coordinateLatitudeInRadians = location.latitude * Math.PI / 180;\r\n const coordinateLongitudeInRadians = location.longitude * Math.PI / 180;\r\n const distanceComparedToEarth = distanceInMetres / 6378100.0;\r\n const resultLatitudeInRadians = Math.asin(Math.sin(coordinateLatitudeInRadians) * Math.cos(distanceComparedToEarth) +\r\n Math.cos(coordinateLatitudeInRadians) * Math.sin(distanceComparedToEarth) * Math.cos(bearingInRadians));\r\n const resultLongitudeInRadians = coordinateLongitudeInRadians + Math.atan2(Math.sin(bearingInRadians) *\r\n Math.sin(distanceComparedToEarth) * Math.cos(coordinateLatitudeInRadians), Math.cos(distanceComparedToEarth) -\r\n Math.sin(coordinateLatitudeInRadians) * Math.sin(resultLatitudeInRadians));\r\n const newCoordinates: any = {};\r\n newCoordinates.latitude = resultLatitudeInRadians * 180 / Math.PI;\r\n newCoordinates.longitude = resultLongitudeInRadians * 180 / Math.PI;\r\n return newCoordinates;\r\n }\r\n\r\n buildURL(config: {\r\n propertyId: string,\r\n offering: OfferingTypeEnum,\r\n propertyType: PropertyTypeEnum,\r\n address: Address\r\n }): string {\r\n let url = 'property/';\r\n url += `${this._propertyTypePipe.transform(config.propertyType, true)}-`;\r\n url += `${this._offeringTypePipe.transform(config.offering, ' ').replace(/ /g, '')}-`;\r\n url += config.address.colony ? `${config.address.colony}-` : '';\r\n url += config.address.city ? `${config.address.city}-` : '';\r\n url += config.propertyId;\r\n url = Utils.removeDiacritics(url).replace(/ /g, '-').toLowerCase();\r\n return url;\r\n }\r\n\r\n validatePropertiesInPoly(properties: Marker[], paths: any[]): Marker[] {\r\n const polygon = new google.maps.Polygon({paths: paths});\r\n if (properties && properties.length > 0) {\r\n properties.map((el: Marker) => {\r\n el.extras['showInPolygon'] = false;\r\n const customLatLng = new google.maps.LatLng(el.location.latitude, el.location.longitude);\r\n if (google.maps.geometry.poly.containsLocation(customLatLng, polygon)) {\r\n el.extras['showInPolygon'] = true;\r\n return el;\r\n } else {\r\n el.extras['showInPolygon'] = false;\r\n return el;\r\n }\r\n });\r\n properties = properties.filter((e) => {\r\n if (e.extras['showInPolygon']) {\r\n return e;\r\n }\r\n });\r\n return properties;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n markersToCurrency(markers: Marker[], toCurrency: Currency, currencies: CER[]): Marker[] {\r\n markers = markers.map<Marker>(item => {\r\n if (Currency[item.info.currency] !== toCurrency) {\r\n item.info.price = this._converter.number(item.info.price, currencies, Currency[item.info.currency], toCurrency);\r\n item.info.currency = toCurrency.toString();\r\n }\r\n return item;\r\n });\r\n return markers;\r\n }\r\n\r\n buildMarkers(entities: NewPropertyLite[] | NewPropertyLiteSuggest[], favorites?: NewPropertyLite[]): Marker[] {\r\n const markers: Marker[] = [];\r\n entities.forEach((entity) => {\r\n const m: Marker = {\r\n location: entity.address.location,\r\n hover: false,\r\n visited: false,\r\n type: MarkersService.getPropertyTypeItemByType(entity.type),\r\n info: this.createPropertyInfoCard(entity),\r\n isFavorite: false,\r\n extras: {}\r\n };\r\n if (entity instanceof NewPropertyLite) {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.id, favorites) : false;\r\n } else {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.propertyId, favorites) : false;\r\n }\r\n markers.push(m);\r\n });\r\n return markers;\r\n }\r\n\r\n buildSpider(list: Marker[]): { markers: Marker[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n list.map((el) => {\r\n el.extras['repeat'] = false;\r\n const size = list.filter(item => {\r\n return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;\r\n });\r\n const distance = 12 * size.length / 2.0;\r\n const radiansBetweenAnnotations = (Math.PI * 2) / size.length;\r\n if (!el.extras['repeat'] && size.length > 1) {\r\n const locationShare: any = Object.assign({}, el.location);\r\n for (let i = 0; i < size.length; i++) {\r\n const heading = radiansBetweenAnnotations * i;\r\n size[i]['repeat'] = true;\r\n const newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);\r\n response.polyLines.push({\r\n path: [\r\n {\r\n latitude: Number(locationShare.latitude),\r\n longitude: Number(locationShare.longitude)\r\n },\r\n {\r\n latitude: Number(newLocation.latitude),\r\n longitude: Number(newLocation.longitude)\r\n }]\r\n });\r\n size[i].location = newLocation;\r\n }\r\n }\r\n return el;\r\n });\r\n response.markers = list;\r\n return response;\r\n }\r\n\r\n private createPropertyInfoCard(entity: NewPropertyLite | NewPropertyLiteSuggest): PropertyCardInfo {\r\n return {\r\n address: new Address(entity.address || null),\r\n authUsers: (entity instanceof NewPropertyLite) ? entity.authUsers : '',\r\n currency: entity.currency,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId,\r\n image: entity.image,\r\n offering: entity.offering,\r\n price: entity.price,\r\n type: entity.type,\r\n url: this.buildURL({\r\n address: entity.address,\r\n offering: entity.offering,\r\n propertyType: entity.type,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId\r\n }),\r\n status: (entity instanceof NewPropertyLite) ? entity.status : null,\r\n features: (entity instanceof NewPropertyLite) ? entity.features : null,\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MarkersService} from './markers.service';\r\nimport {CurrencyConverterModule} from '../currency-converter/currency-converter.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CurrencyConverterModule.forChild()\r\n ]\r\n})\r\nexport class MarkersModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkersModule,\r\n providers: [\r\n MarkersService\r\n ]\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@maplander/components/lib/pipes/address/address-format.pipe.ts","ng://@maplander/components/lib/pipes/address/address-format.module.ts","ng://@maplander/components/lib/utils/classes/filters-wrapper.ts","ng://@maplander/components/lib/utils/classes/mDate.ts","ng://@maplander/components/lib/pipes/format-date/format-date.pipe.ts","ng://@maplander/components/lib/pipes/format-date/format-date.module.ts","ng://@maplander/components/lib/utils/enums/amenity-name.ts","ng://@maplander/components/lib/constantsComponents.ts","ng://@maplander/components/lib/utils.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.pipe.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.module.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.pipe.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.module.ts","ng://@maplander/components/lib/pipes/property-type/property-type.pipe.ts","ng://@maplander/components/lib/pipes/property-type/property-type.module.ts","ng://@maplander/components/lib/directives/format-price/format-price.directive.ts","ng://@maplander/components/lib/directives/format-price/format-price.module.ts","ng://@maplander/components/lib/directives/image-error/image-error.directive.ts","ng://@maplander/components/lib/directives/image-error/image-error.module.ts","ng://@maplander/components/lib/components/document-visor/document-visor.component.ts","ng://@maplander/components/lib/components/document-visor/document-visor.service.ts","ng://@maplander/components/lib/components/document-visor/document-visor.module.ts","ng://@maplander/components/lib/utils/enums/filter-chip-type.ts","ng://@maplander/components/lib/utils/enums/filters-change-type.ts","ng://@maplander/components/lib/components/filters/token.ts","ng://@maplander/components/lib/components/filters/filters.service.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.component.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.module.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.service.ts","ng://@maplander/components/lib/utils/classes/mUtils.ts","ng://@maplander/components/lib/components/property/validators/remove-error.ts","ng://@maplander/components/lib/components/filters/filters.component.ts","ng://@maplander/components/lib/components/property/validators/currency-filter-validator.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.module.ts","ng://@maplander/components/lib/components/filters/filters.module.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.component.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.module.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.component.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.service.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.component.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.service.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.component.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.service.ts","ng://@maplander/components/lib/components/property/token.ts","ng://@maplander/components/lib/components/property/components/stats/stats.component.ts","ng://@maplander/components/lib/components/property/components/stats/stats.service.ts","ng://@maplander/components/lib/components/property/components/property/property.component.ts","ng://@maplander/components/lib/components/property/validators/property-editor-validators.ts","ng://@maplander/components/lib/components/property/components/editor/editor.component.ts","ng://@maplander/components/lib/components/property/validators/phone-fields-validator.ts","ng://@maplander/components/lib/components/property/components/owner-info/owner-info.component.ts","ng://@maplander/components/lib/components/property/components/documents/documents.component.ts","ng://@maplander/components/lib/components/property/components/details/details.component.ts","ng://@maplander/components/lib/components/property/components/slideshow/slide-show.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/date-adapter.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker-header/custom-datepicker-header.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker/custom-datepicker.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker.module.ts","ng://@maplander/components/lib/components/property/components/custom-drag-and-drop/custom-drag-and-drop.component.ts","ng://@maplander/components/lib/components/property/property.module.ts","ng://@maplander/components/lib/components/property-card/token.ts","ng://@maplander/components/lib/components/property-card/property-card.component.ts","ng://@maplander/components/lib/components/property-card/property-card.module.ts","ng://@maplander/components/lib/services/markers/markers.service.ts","ng://@maplander/components/lib/services/markers/markers.module.ts"],"names":["extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","AddressFormatPipe","transform","value","long","country","result","language","street","colony","postalCode","city","state","Pipe","args","name","AddressFormatModule","forChild","ngModule","providers","NgModule","imports","CommonModule","declarations","exports","FiltersWrapper","component","this","_component","open","close","MDate","date","_timestamp","toString","getTimestamp","time","timestamp","getHours","getMinutes","getSeconds","Number","getFullYear","getMonth","getDate","slice","getWeekDayName","day","toLowerCase","getMonthName","month","toDate","cDate","getYear","getMoth","getDay","cTime","Date","getFormat","format","_a","_b","_c","_d","_e","format12Hours","FormatDatePipe","mDate","FormatDateModule","AdjacentCommerce","AdjacentGym","AdjacentPicnic","AirConditioner","Balcony","CustomerParking","DiningRoom","DoubleHeight","DressingRooms","FacingStreet","Finishings","Furnished","Garden","Gym","HighResistanceFloors","HighSpeedInternet","InCommercialArea","InIndustrialPark","InShoppingCenter","Jacuzzi","KitchenServices","MaidsBathroom","ManeuverArea","MeetingRoom","Mezzanine","MixedBuilding","NaturalLighting","Offices","OpenSpace","Platforms","Playground","Playroom","Pool","RailSpur","RailYard","Reception","SecurityGuard","Storage","VisitorParking","NearPublicTransportation","NearShops","OnBusyRoad","CountrySide","Downtown","GoodReachableTraffic","NearFitnessCentre","NearHighway","NearHospital","NearPark","NearSchools","OnQuietRoad","RoofGarden","PetFriendly","DifferentAbilities","ConstantsComponents","Amenities","roofGarden","checked","iconName","AmenityName","petFriendly","differentAbilities","adjacentCommerce","adjacentGym","adjacentPicnic","airConditioner","balcony","customerParking","diningRoom","doubleHeight","dressingRooms","facingStreet","finishings","furnished","garden","gym","highResistanceFloors","highSpeedInternet","inCommercialArea","inIndustrialPark","inShoppingCenter","jacuzzi","kitchenServices","maidsBathroom","maneuverArea","meetingRoom","mezzanine","mixedBuilding","naturalLighting","offices","openSpace","platforms","playground","playroom","pool","railSpur","railyard","reception","securityGuard","storage","visitorParking","features","DurationList","CommissionList","SALE","RENT","SharedCommissionList","LandUseList","LandUseEnum","SINGLE_FAMILY_HOUSING","MULTI_FAMILY_HOUSING","HOUSING_WITH_COMMERCE","HOUSING_WITH_OFFICE","MIXED_HOUSING","COMMERCE","OFFICE","SERVICES","INDUSTRY","AGRICULTURAL","OTHER","AnnounceCheckList","DocumentsList","PFileTypeEnum","DEED","loaded","OWNER_ID","WATER_BILL","ELECTRICITY_BILL","PROPERTY_BILL","CONSTANCY_OF_NO_DEBT","EXEMPTION_TAX","BUILDING_LICENSE","COMPLETION_OF_CONSTRUCTION","ALIGNMENT_AND_OFFICIAL_NUMBER","MORTGAGE","BedroomList","BathroomList","ParkingSpacesList","SurfaceList","ROIList","PropertyTypeList","PropertyTypeEnum","HOUSE","shortName","amenities","RESIDENTIAL","APARTMENT","ROOM","RETAIL","WAREHOUSE","LAND","INVESTMENT","NONE","OfferingTypeList","OfferingTypeEnum","LocateList","USD","locate","currency","MXN","GBP","EUR","BRL","CNY","PropertyStatusList","icon","StatusTypeEnum","ANNOUNCED","EXPIRED","HIDDEN","READY","DRAFT","Utils","round","precision","multiplier","Math","pow","getFilterByPropertyType","filter","type","offering","distance","location","latitude","longitude","upLimitPrice","downLimitPrice","bathrooms","exclusivity","bedrooms","parkingPlaces","extras","mainArea","roi","mls","getInitialFilter","isOPI","listErrorsByPropertyTypeForPublish","errorField","concat","getErrorsForPublish","property","price","description","image","secondaryArea","removeDiacritics","str","diacriticsMap","A","AA","AE","AO","AU","AV","AY","B","C","D","DZ","Dz","E","F","G","H","I","J","K","L","LJ","Lj","M","N","NJ","Nj","O","OI","OO","OU","P","Q","R","S","T","TZ","U","V","VY","W","X","Y","Z","a","aa","ae","ao","au","av","ay","c","dz","e","f","g","h","hv","j","k","l","lj","m","nj","o","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","Symbol","iterator","next","done","tslib_1.__values","keys","replace","MarkerPricePipe","outputPrice","toLocaleString","style","toFixed","MarkerPriceModule","OfferingTypePipe","prefix","response","forEach","OfferingTypeModule","PropertyTypePipe","PropertyTypeModule","FormatPriceDirective","_elRef","_currency","_subscription","Subscription","_el","nativeElement","removeError","control","error","err","errors","setErrors","ngOnChanges","changes","_this","currentValue","_value","validateFormatPrice","add","valueChanges","subscribe","ngAfterViewInit","addEventListener","onFocus","bind","onBlur","formatPrice","ngOnDestroy","unsubscribe","removeEventListener","event","target","isNaN","Directive","selector","ElementRef","CurrencyPipe","Input","FormatPriceModule","ImageErrorDirective","_ref","CDN_URL","constructor","HTMLImageElement","Error","_onError","updateUrl","typeImage","src","ImageErrorModule","DocumentVisorComponent","_data","_dialog","isBase64","btoa","atob","isURL","url","RegExp","test","ngOnInit","URL","revokeObjectURL","Component","template","Inject","MAT_DIALOG_DATA","MatDialogRef","DocumentVisorService","document","data","disableClose","panelClass","Injectable","MatDialog","MATERIAL","MatButtonModule","MatDialogModule","MatIconModule","DocumentVisorModule","SafeUrlModule","entryComponents","OFFERING","PROPERTY_TYPE","PRICE","BEDROOMS","BATHROOMS","PARKING_PLACES","SURFACE","AMENITIES","LISTING","APPLY","INIT","AREA","SAVE","LIST_TYPE","FILTERS_TOKEN","InjectionToken","FiltersService","_config","_startComponent","Subject","_notifier","BehaviorSubject","FiltersChangeType","ft","removeFiltersSaved","LocalStorageService","removeItem","FILTERS_SAVED_KEY","getFiltersSaved","getItem","saveFilters","config","setItem","filters","isSharedProperties","setChange","change","getChanges","asObservable","startComponent","wrapper","onStartComponent","Optional","FabFiltersComponent","_offeringPipe","_filtersService","METERS_TO_SQ","chips","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","sharedProperties","_filter","listingType","offeringType","propertyType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","FabFiltersModule","MatChipsModule","CurrencyConverterService","list","prices","currencies","from","to","valueFrom","getValueByCurrency","valueTo","map","number","MUtils","linSpaceExp","start","stop","phi","log","length_1","log10","FiltersComponent","_render","_service","_formBuilder","_converter","changeFilter","EventEmitter","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","changePropertyType","index","resetFilters","locationType","municipality","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","emit","payload","changeOffering","ev","get","markAsTouched","changeCurrency","changeState","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","getFilterByForm","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","controlName","controlName2","group","Validators","required","minPrice","pattern","maxPrice","surfaceUnit","validator","peerControl","peerControl2","patchValue","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","Output","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatFormFieldModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","MatInputModule","PanoramaVisorComponent","_lazy","checkTouchSupported","window","navigator","msMaxTouchPoints","undefined","load","then","setTimeout","showPanorama","catch","_panorama","dispose","_viewer","destroy","fullscreen","toggleFullscreen","changeControl","enableControl","PANOLENS","CONTROLS","ORBIT","requestPermissions","DEVICEORIENTATION","confirm","href","alert","changeMode","mode","disableEffect","enableEffect","MODES","CARDBOARD","STEREO","isTouch","ImagePanorama","Viewer","container","_container","controlBar","controlButtons","onWindowResize","offsetWidth","offsetHeight","doc","docEl","requestFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","cancelFullScreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullScreen","success","of","failed","DeviceMotionEvent","requestPermission","fromPromise","DeviceOrientationEvent","pipe","mergeMap","response2","LazyLoadService","ViewChild","static","PanoramaVisorModule","MatMenuModule","LazyLoaderModule","MultimediaUploaderComponent","currentType","IMAGE","fileType","currentIndex","SPHERIC","VIDEO","images","images360","videos","_newMedia","getYouTubeID","arr","split","parseMultimedia","onUploadImage","isArray","createImagePFile","createImage360PFile","onTabChanged","tab","onListChanged","position","removeMedia","id","fileCS","thumbnail","onYouTubeInputTextChanged","input","file","PFile","media","getTime","blobName","accept","multimedia","joinMultimediaTypes","newMedia","fileName","now","random","blob","MultimediaUploaderService","AnnounceConfirmComponent","_dialogRef","code","DialogResponseType","CANCEL","ACCEPT","AnnounceConfirmService","GalleryComponent","_breakpointObserver","getPFilesByType","sideOpened","indexSelected","typeSelected","count","sphere","video","observe","_mobileVersion","matches","assignCountByType","assignMultimediaByType","updateSideNav","selectPFile","onIndexSelectedChange","changePFileType","pFileType","BreakpointObserver","GalleryService","PROPERTY_TOKEN","StatsComponent","LeadInfo","decorators","StatsService","leadInfo","CREATE","UPDATE","ANNOUNCE","HIDE","SHOW","ADDRESS","OFFER","FAVORITE","REQUEST_INFO","SHARE","ARCHIVE","REAL_ESTATE_EXCHANGE","SHARE_COMMISSION","BROCHURE","POSTER","CLIENTS","BACK","SHOW_AGENTS","TARPS","PropertyComponent","_uploaderService","_announceService","_snackBar","_share","_gallery","_documentService","_statsService","sharedProperty","isShared","ownerAvailable","initCompleteProperty","modeChange","disableShareCommission","disableConfirmAnnounce","_allMultimedia","multimediaCount","completeProperty","NewCompleteProperty","validateMultimediaTypeCount","saveData","restoreFrontImageError","_editorInstance","validateFormInvalid","setMessage","parseDataByComponents","PropertyEventType","agentActions","shareProperty","urlUser","userUrl","openGallery","goToStats","goToEditProperty","goToBack","goToClients","goToUpdateVisibility","status","goToPublish","validateFrontImageOnErrors","setErrorsOnFields","afterClosed","onMultimediaIndexChanged","changeMultimediaType","openUploaderMultimedia","assignFrontImage","onEditorInstance","onOwnerInstance","_ownerInstance","onDocumentsInstance","_documentsInstance","onSelectAddress","frontImageError","spherics","getMultimediaByType","getProperty","propertyInfo","owner","getOwner","documentsResponse","getDocuments","files","documents","complete","NewProperty","PropertyInfo","SnackBarService","ShareService","PropertyEditorValidators","form","condition","minPriceInvalid","commissionInvalid","sharedCommissionInvalid","moment","momentImported","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","EditorComponent","_adapter","REGEX_ONLY_INTEGERS","REGEX_MIDDLE_NUMBER","REGEX_WEBSITE","REGEX_ALPHA_NUMBER","editorInstance","selectAddress","offeringTypeList","landUseList","commissionList","durationList","sharedCommissionList","setLocale","_errorFields","_validators","parkingSpaces","externalLink","sku","propertyForm","consumerReporting","consumerReportingOption","maintenance","maintenancePrice","transfer","transferPrice","unit","AreaUnitEnum","M2","buildIn","landUse","mlm","sharedCommission","agreementDate","disabled","duration","commission","notes","address","township","extNumber","intNumber","mz","lt","visible","validators","geoPtGenerator","geoPt","minDistance","maxDistance","alpha","PI","sx","cos","deltaLat","sin","lat","deltaLong","searchAmenitiesByPropertyType","createProperty","updateAddressForm","setValidatorOnFields","updatePropertyByForm","getRawValue","_property","invalid","goToSelectAddress","_btnSubmitRef","click","outdoorNumber","assignAmenities","amenitiesList","assignLocationFeatures","featuresList","assignCommission","assignBusinessRules","updateFormByProperty","lowestPrice","condominiumFeePrice","leaseTransferPrice","areaUnit","builtIn","listingAgreementStartDate","listingAgreementTime","interiorNumber","publicLocation","_propertyTypeItem","Features","Address","remove","clearValidators","setValidators","updateValueAndValidity","MAT_DATE_LOCALE","DateAdapter","useClass","MomentDateAdapter","deps","MAT_MOMENT_DATE_ADAPTER_OPTIONS","MAT_DATE_FORMATS","ɵ0","DialogService","read","phoneFieldsValidator","parent","phoneFieldsError","OwnerInfoComponent","ownerInstance","ownerForm","lastName","email","phone","maxLength","minLength","createOwner","disable","onCodePhoneChanged","updateOwnerByForm","_owner","codePhone","updateFormByOwner","Owner","DocumentsComponent","_visor","_http","documentsInstance","_files","validateDocumentsLoaded","openFile","getPFileByType","getUserMediaByType","openBlobFile","onUploadFile","updateDocument","downloadFile","responseType","Blob","createObjectURL","HttpClient","DetailsComponent","_sanitizer","searchPropertyType","createAmenities","createFeatures","validateAgreement","getTourUrl","bypassSecurityTrustResourceUrl","startDate","setDate","agreementEndDate","DomSanitizer","SlideShowComponent","initialIndex","moveImageByIndex","validateHTTPS","moveImage","_slider","ContentChild","TemplateRef","CustomDateAdapter","__","create","tslib_1.__extends","displayFormat","NativeDateAdapter","CustomDatepickerHeaderComponent","_calendar","_dateAdapter","_dateFormats","cdr","_destroyed","stateChanges","takeUntil","markForCheck","defineProperty","currentDate","activeDate","previousClicked","addCalendarYears","nextClicked","MatCalendar","ChangeDetectorRef","CustomDatepickerComponent","_injector","customHeader","currentYear","year","_control","NgControl","valueAccessor","onYearSelected","datepicker","registerOnChange","fn","registerOnTouched","writeValue","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","ɵ0$1","Injector","MatDatepickerModule","COMPONENTS","CustomDatepickerModule","CustomDragAndDropComponent","_viewportRuler","itemsChanged","source","dropListEnterPredicate","drag","drop","placeholder","activeContainer","phElement","element","sourceElement","dropContainer","dropElement","dragIndex","__indexOf","parentElement","children","dropIndex","sourceIndex","width","clientWidth","height","clientHeight","removeChild","targetIndex","insertBefore","nextSibling","enter","offsetLeft","offsetTop","dragMoved","point","getPointerPositionOnPage","listGroup","_items","dropList","getBoundingClientRect","top","bottom","left","right","__isInsideDropListClientRect","dropListDropped","appendChild","moveItemInArray","items","startsWith","__isTouchEvent","touches","changedTouches","scrollPosition","getViewportScrollPosition","pageX","pageY","ViewportRuler","CdkDropListGroup","CdkDropList","collection","node","MatCheckboxModule","MatRadioModule","MatSidenavModule","MatToolbarModule","MatTabsModule","MatTooltipModule","MatNativeDateModule","DragDropModule","PAGES","ENTRY_COMPONENTS","PROVIDERS","PropertyModule","EcoFabSpeedDialModule","UploadFileModule","StringManipulationModule","ShareModule","CountryCodeModule","LocationModule","DialogModule","SnackBarModule","forRoot","PROPERTY_CARD_CONFIG_MODULE","PropertyCardComponent","markerChanged","favoriteChanged","propertyDiscarded","positionLatLng","latLng","info","onFrontImageOver","marker","hover","onFrontImageLeave","favorite","propertyId","discard","deg2rad","deg","lng","lat1","lon1","lat2","lon2","dLat","dLon","atan2","sqrt","trunc","PropertyCardModule","RouterModule","MarkersService","_propertyTypePipe","_offeringTypePipe","getPropertyTypeItemByType","validatePropertyInFavorites","favorites","calculateLocationFrom","bearingInRadians","distanceInMetres","coordinateLatitudeInRadians","coordinateLongitudeInRadians","distanceComparedToEarth","resultLatitudeInRadians","asin","resultLongitudeInRadians","newCoordinates","buildURL","validatePropertiesInPoly","properties","paths","polygon","google","maps","Polygon","el","customLatLng","LatLng","geometry","poly","containsLocation","markersToCurrency","markers","toCurrency","buildMarkers","entities","entity","visited","createPropertyInfoCard","isFavorite","NewPropertyLite","buildSpider","polyLines","size","radiansBetweenAnnotations","locationShare","heading","newLocation","path","authUsers","MarkersModule"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgBC,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIC,KAAKD,EAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,KAQlE,IAAIE,EAAWR,OAAOS,QAAU,SAAkBC,GACrD,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOZ,OAAOgB,UAAUT,eAAeU,KAAKN,EAAGL,KAAII,EAAEJ,GAAKK,EAAEL,IAE9E,OAAOI,oBC5BX,SAAAQ,KAoCA,OA/BEA,EAAAF,UAAAG,UAAA,SAAUC,EAAgBC,EAAgBC,OACpCC,EAAS,GACPC,EAAWF,GAAW,KAE5B,OADAC,GAAUH,EAAMK,OACRD,GACN,IAAK,KACCH,GACFE,GAAU,MAAKH,EAAMM,QAAU,IAC/BH,GAAU,MAAKH,EAAMO,YAAc,IACnCJ,GAAU,MAAKH,EAAMQ,MAAQ,IAC7BL,GAAU,MAAKH,EAAMS,OAAS,IAC9BN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/B,YAElC,CACED,SAAUpN,OAAO0sC,EAAYt/B,UAC7BC,UAAWrN,OAAO0sC,EAAYr/B,eAGpCi/B,EAAKpvC,GAAGiQ,SAAWu/B,EAGvB,OAAOtB,KAETz2B,EAASg3B,QAAU/sB,EACZjK,GAGDi1B,EAAAtsC,UAAA2uC,uBAAR,SAA+BF,GAC7B,MAAQ,CACNxT,QAAS,IAAIkD,EAAAA,QAAQsQ,EAAOxT,SAAW,MACvCqU,UAAYb,aAAkBI,EAAAA,gBAAmBJ,EAAOa,UAAY,GACpElhC,SAAUqgC,EAAOrgC,SACjBk9B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOvf,GAAKuf,EAAOnD,WACrEn6B,MAAOs9B,EAAOt9B,MACdxB,SAAU8+B,EAAO9+B,SACjBsB,MAAOw9B,EAAOx9B,MACdvB,KAAM++B,EAAO/+B,KACb0L,IAAKxZ,KAAK0rC,SAAS,CACjBrS,QAASwT,EAAOxT,QAChBtrB,SAAU8+B,EAAO9+B,SACjB6Q,aAAciuB,EAAO/+B,KACrB47B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOvf,GAAKuf,EAAOnD,aAEvEvV,OAAS0Y,aAAkBI,EAAAA,gBAAmBJ,EAAO1Y,OAAS,KAC9DprB,SAAW8jC,aAAkBI,EAAAA,gBAAmBJ,EAAO9jC,SAAW,2BA5KvEyR,EAAAA,sDANO5E,SADAL,SAGAkK,MAmLRirB,EArMA,GCAAiD,GAAA,WAKA,SAAAA,KAeA,OARSA,EAAAruC,SAAP,WACE,MAAQ,CACNC,SAAUouC,EACVnuC,UAAW,CACTkrC,0BAXPjrC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACAymB,GAAwB9mB,gBAY5BquC,EApBA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {Address} from '@maplander/types';\r\n\r\n@Pipe({\r\n name: 'addressFormat'\r\n})\r\nexport class AddressFormatPipe implements PipeTransform {\r\n\r\n transform(value: Address, long?: boolean, country?: string): string {\r\n let result = '';\r\n const language = country || 'mx';\r\n result += value.street;\r\n switch (language) {\r\n case 'mx':\r\n if (long) {\r\n result += `, ${value.colony || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.colony || ''}`;\r\n }\r\n break;\r\n case 'usa':\r\n if (long) {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {AddressFormatPipe} from './address-format.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AddressFormatPipe\r\n ],\r\n exports: [\r\n AddressFormatPipe\r\n ]\r\n})\r\nexport class AddressFormatModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: AddressFormatModule,\r\n providers: [\r\n AddressFormatPipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {FiltersComponent} from '../../components/filters/filters.component';\r\n\r\nexport class FiltersWrapper {\r\n private _component: FiltersComponent;\r\n\r\n constructor(component: FiltersComponent) {\r\n this._component = component;\r\n }\r\n\r\n open(): void {\r\n this._component.open();\r\n }\r\n\r\n close(): void {\r\n this._component.close();\r\n }\r\n\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\n/**\r\n *\r\n * @author Alejandro Lopez Arreola\r\n * Custom class for dates compatible with Google Data Store\r\n *\r\n * */\r\n\r\nexport class MDate {\r\n\r\n private _timestamp: string;\r\n\r\n /**\r\n * @param date Timestamp with format YYYYMMDD\r\n * @example 20190812\r\n * */\r\n constructor(date: number) {\r\n this._timestamp = date.toString();\r\n }\r\n\r\n /**\r\n * @param date Date object\r\n * @param time Returns timestamp as time, default is date\r\n * @example Date: Format YYYYMMDD = 20190812, Time: Format HHMMSS = 171401\r\n * @return number\r\n * */\r\n public static getTimestamp(date: Date, time?: boolean): number {\r\n let timestamp = '';\r\n if (time) {\r\n timestamp += `${date.getHours()}`;\r\n timestamp += date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;\r\n timestamp += date.getSeconds() < 10 ? `0${date.getSeconds()}` : `${date.getSeconds()}`;\r\n return Number(timestamp);\r\n } else {\r\n timestamp += `${date.getFullYear().toString()}`;\r\n timestamp += (date.getMonth() + 1) < 10 ? `0${(date.getMonth() + 1)}` : `${date.getMonth() + 1}`;\r\n timestamp += date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate().toString()}`;\r\n return Number(timestamp);\r\n }\r\n }\r\n\r\n private static getHours(time: string): string {\r\n return time.slice(0, 2);\r\n }\r\n\r\n private static getMinutes(time: string): string {\r\n return time.slice(2, 4);\r\n }\r\n\r\n private static getSeconds(time: string): string {\r\n return time.slice(4, time.length);\r\n }\r\n\r\n private static getWeekDayName(day: number, toLowerCase?: boolean): string {\r\n switch (day) {\r\n case 0:\r\n return toLowerCase ? 'lunes' : 'Lunes';\r\n case 1:\r\n return toLowerCase ? 'martes' : 'Martes';\r\n case 2:\r\n return toLowerCase ? 'miercoles' : 'Miercoles';\r\n case 3:\r\n return toLowerCase ? 'jueves' : 'Jueves';\r\n case 4:\r\n return toLowerCase ? 'viernes' : 'Viernes';\r\n case 5:\r\n return toLowerCase ? 'sabado' : 'Sabado';\r\n case 6:\r\n return toLowerCase ? 'domingo' : 'Domingo';\r\n }\r\n }\r\n\r\n private static getMonthName(month: string, toLowerCase?: boolean): string {\r\n switch (month) {\r\n case '01':\r\n return toLowerCase ? 'ene.' : 'Ene.';\r\n case '02':\r\n return toLowerCase ? 'feb.' : 'Feb.';\r\n case '03':\r\n return toLowerCase ? 'mar.' : 'Mar.';\r\n case '04':\r\n return toLowerCase ? 'abr.' : 'Abr.';\r\n case '05':\r\n return toLowerCase ? 'may.' : 'May.';\r\n case '06':\r\n return toLowerCase ? 'jun.' : 'Jun.';\r\n case '07':\r\n return toLowerCase ? 'jul.' : 'Jul.';\r\n case '08':\r\n return toLowerCase ? 'ago.' : 'Ago.';\r\n case '09':\r\n return toLowerCase ? 'sep.' : 'Sep.';\r\n case '10':\r\n return toLowerCase ? 'oct.' : 'Oct.';\r\n case '11':\r\n return toLowerCase ? 'nov.' : 'Nov.';\r\n case '12':\r\n return toLowerCase ? 'dic.' : 'Dic.';\r\n }\r\n }\r\n\r\n /**\r\n * @param time Timestamp with format HHMMSS\r\n * @example 171401\r\n * @return Date\r\n * Converting timestamp with format YYYYMMDD,\r\n * if you not assign the time param, the hours, minutes and seconds is a zero\r\n * */\r\n public toDate(time?: number): Date {\r\n if (time) {\r\n const cDate = `${this.getYear()}-${this.getMoth()}-${this.getDay()}`;\r\n const cTime = `${MDate.getHours(time.toString())}:${MDate.getMinutes(time.toString())}:${MDate.getSeconds(time.toString())}`;\r\n const fullCDate = `${cDate}T${cTime}Z`;\r\n return new Date(fullCDate);\r\n } else {\r\n return new Date(Number(this.getYear()), Number(this.getMoth()) - 1, Number(this.getDay()));\r\n }\r\n }\r\n\r\n /**\r\n * @param format Format date | 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' |'dd MMMMM yyyy HH:mm'\r\n * @param time Timestamp as time with format HHMMSS\r\n * @param toLowerCase Words on lower case\r\n * @param format12Hours 12 hours format on time\r\n * @return string\r\n * Return string with date format\r\n * */\r\n public getFormat(format: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm', {\r\n time = null,\r\n toLowerCase = false,\r\n format12Hours = false\r\n } = {}): string {\r\n let date = '', d: Date = null;\r\n switch (format) {\r\n case 'dd/MM/yyyy':\r\n date = `${this.getDay()}/${this.getMoth()}/${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM yyyy':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n break;\r\n case 'EEEEE HH:mm':\r\n date += `${MDate.getWeekDayName(this.toDate(time).getDay() - 1, toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM yyyy HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n }\r\n return date;\r\n }\r\n\r\n private getYear(): string {\r\n return this._timestamp.slice(0, 4);\r\n }\r\n\r\n private getMoth(): string {\r\n return this._timestamp.slice(4, 6);\r\n }\r\n\r\n private getDay(): string {\r\n return this._timestamp.slice(6, this._timestamp.length);\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {MDate} from '../../utils/classes';\r\n\r\n@Pipe({\r\n name: 'libFormatDate'\r\n})\r\nexport class FormatDatePipe implements PipeTransform {\r\n\r\n transform(value: any, mDate?: boolean, format?: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm'): any {\r\n if (mDate) {\r\n return new MDate(value).getFormat(format, {toLowerCase: true});\r\n } else {\r\n const d = new Date(Number(value));\r\n return `${d.getDate() < 10 ? '0' + d.getDate() : d.getDate()}/${d.getMonth() < 10 ? '0' + d.getMonth() : d.getMonth()}/${d.getFullYear()}`;\r\n }\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FormatDatePipe} from './format-date.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatDatePipe\r\n ],\r\n exports: [\r\n FormatDatePipe\r\n ]\r\n})\r\nexport class FormatDateModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatDateModule,\r\n providers: [\r\n FormatDatePipe\r\n ]\r\n };\r\n }\r\n}\r\n","export enum AmenityName {\r\n AdjacentCommerce = 'adjacentCommerce',\r\n AdjacentGym = 'gym',\r\n AdjacentPicnic = 'adjacentPicnic',\r\n AirConditioner = 'airConditioner',\r\n Balcony = 'balcony',\r\n CustomerParking = 'customerParking',\r\n DiningRoom = 'diningRoom',\r\n DoubleHeight = 'doubleHeight',\r\n DressingRooms = 'dressingRooms',\r\n FacingStreet = 'facingStreet',\r\n Finishings = 'finishings',\r\n Furnished = 'furnished',\r\n Garden = 'garden',\r\n Gym = 'gym',\r\n HighResistanceFloors = 'highResistanceFloors',\r\n HighSpeedInternet = 'highSpeedInternet',\r\n InCommercialArea = 'inCommercialArea',\r\n InIndustrialPark = 'inIndustrialPark',\r\n InShoppingCenter = 'inShoppingCenter',\r\n Jacuzzi = 'jacuzzi',\r\n KitchenServices = 'kitchenServices',\r\n MaidsBathroom = 'maidsBathroom',\r\n ManeuverArea = 'maneuverArea',\r\n MeetingRoom = 'meetingRoom',\r\n Mezzanine = 'mezzanine',\r\n MixedBuilding = 'mixedBuilding',\r\n NaturalLighting = 'naturalLighting',\r\n Offices = 'offices',\r\n OpenSpace = 'openSpace',\r\n Platforms = 'platforms',\r\n Playground = 'playground',\r\n Playroom = 'playroom',\r\n Pool = 'pool',\r\n RailSpur = 'railSpur',\r\n RailYard = 'maneuverArea',\r\n Reception = 'reception',\r\n SecurityGuard = 'securityGuard',\r\n Storage = 'storage',\r\n VisitorParking = 'visitorParking',\r\n NearPublicTransportation = 'nearPublicTransportation',\r\n NearShops = 'nearShops',\r\n OnBusyRoad = 'onBusyRoad',\r\n CountrySide = 'countrySide',\r\n Downtown = 'downtown',\r\n GoodReachableTraffic = 'goodReachableTraffic',\r\n NearFitnessCentre = 'nearFitnessCentre',\r\n NearHighway = 'nearHighway',\r\n NearHospital = 'nearHospital',\r\n NearPark = 'nearPark',\r\n NearSchools = 'nearSchools',\r\n OnQuietRoad = 'onQuietRoad',\r\n RoofGarden = 'roofGarden',\r\n PetFriendly = 'petFriendly',\r\n DifferentAbilities = 'differentAbilities'\r\n}\r\n","import {LandUseEnum, OfferingTypeEnum, PFileTypeEnum, PropertyTypeEnum, StatusTypeEnum} from '@maplander/types';\r\nimport {AmenitiesList} from './utils/models/amenities-list';\r\nimport {AmenityName} from './utils/enums/amenity-name';\r\nimport {PropertyTypeItem} from './utils/models/property-type-item';\r\nimport {PropertyStatusItem} from './utils/models/propertyStatusItem';\r\n\r\nexport class ConstantsComponents {\r\n static Amenities: AmenitiesList = {\r\n roofGarden: {\r\n checked: false,\r\n iconName: AmenityName.RoofGarden,\r\n value: AmenityName.RoofGarden,\r\n name: 'Terraza'\r\n },\r\n petFriendly: {\r\n checked: false,\r\n iconName: AmenityName.PetFriendly,\r\n value: AmenityName.PetFriendly,\r\n name: 'Acepta Mascotas'\r\n },\r\n differentAbilities: {\r\n checked: false,\r\n iconName: AmenityName.DifferentAbilities,\r\n value: AmenityName.DifferentAbilities,\r\n name: 'Con capacidades diferentes'\r\n },\r\n adjacentCommerce: {\r\n checked: false,\r\n iconName: AmenityName.AdjacentCommerce,\r\n value: AmenityName.AdjacentCommerce,\r\n name: 'Comercio adyacente'\r\n },\r\n adjacentGym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.AdjacentGym, name: 'Gym adyacente'},\r\n adjacentPicnic: {checked: false, iconName: AmenityName.AdjacentPicnic, value: AmenityName.AdjacentPicnic, name: 'Merendero adyacente'},\r\n airConditioner: {checked: false, iconName: AmenityName.AirConditioner, value: AmenityName.AirConditioner, name: 'Aire acondicionado'},\r\n balcony: {checked: false, iconName: AmenityName.Balcony, value: AmenityName.Balcony, name: 'Balcón'},\r\n customerParking: {\r\n checked: false,\r\n iconName: AmenityName.CustomerParking,\r\n value: AmenityName.CustomerParking,\r\n name: 'Estacionamiento para clientes'\r\n },\r\n diningRoom: {checked: false, iconName: AmenityName.DiningRoom, value: AmenityName.DiningRoom, name: 'Comedor'},\r\n doubleHeight: {checked: false, iconName: AmenityName.DoubleHeight, value: AmenityName.DoubleHeight, name: 'Doble altura'},\r\n dressingRooms: {checked: false, iconName: AmenityName.DressingRooms, value: AmenityName.DressingRooms, name: 'Con vestidores'},\r\n facingStreet: {checked: false, iconName: AmenityName.FacingStreet, value: AmenityName.FacingStreet, name: 'Frente a calle'},\r\n finishings: {checked: false, iconName: AmenityName.Finishings, value: AmenityName.Finishings, name: 'Con acabados'},\r\n furnished: {checked: false, iconName: AmenityName.Furnished, value: AmenityName.Furnished, name: 'Amueblada'},\r\n garden: {checked: false, iconName: AmenityName.Garden, value: AmenityName.Garden, name: 'Jardín'},\r\n gym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.Gym, name: 'Gym'},\r\n highResistanceFloors: {\r\n checked: false,\r\n iconName: AmenityName.HighResistanceFloors,\r\n value: AmenityName.HighResistanceFloors,\r\n name: 'Pisos de alta resistencia'\r\n },\r\n highSpeedInternet: {\r\n checked: false,\r\n iconName: AmenityName.HighSpeedInternet,\r\n value: AmenityName.HighSpeedInternet,\r\n name: 'Internet de alta velocidad'\r\n },\r\n inCommercialArea: {\r\n checked: false,\r\n iconName: AmenityName.InCommercialArea,\r\n value: AmenityName.InCommercialArea,\r\n name: 'En zona comercial'\r\n },\r\n inIndustrialPark: {\r\n checked: false,\r\n iconName: AmenityName.InIndustrialPark,\r\n value: AmenityName.InIndustrialPark,\r\n name: 'En parque industrial'\r\n },\r\n inShoppingCenter: {\r\n checked: false,\r\n iconName: AmenityName.InShoppingCenter,\r\n value: AmenityName.InShoppingCenter,\r\n name: 'En centro comercial'\r\n },\r\n jacuzzi: {checked: false, iconName: AmenityName.Jacuzzi, value: AmenityName.Jacuzzi, name: 'Jacuzzi'},\r\n kitchenServices: {\r\n checked: false,\r\n iconName: AmenityName.KitchenServices,\r\n value: AmenityName.KitchenServices,\r\n name: 'Servicios para cocina'\r\n },\r\n maidsBathroom: {checked: false, iconName: AmenityName.MaidsBathroom, value: AmenityName.MaidsBathroom, name: 'Cuarto de Servicio'},\r\n maneuverArea: {checked: false, iconName: AmenityName.ManeuverArea, value: AmenityName.ManeuverArea, name: 'Área de maniobras'},\r\n meetingRoom: {checked: false, iconName: AmenityName.MeetingRoom, value: AmenityName.MeetingRoom, name: 'Sala de conferencias'},\r\n mezzanine: {checked: false, iconName: AmenityName.Mezzanine, value: AmenityName.Mezzanine, name: 'Con entrepiso'},\r\n mixedBuilding: {checked: false, iconName: AmenityName.MixedBuilding, value: AmenityName.MixedBuilding, name: 'En edificio mixto'},\r\n naturalLighting: {\r\n checked: false,\r\n iconName: AmenityName.NaturalLighting,\r\n value: AmenityName.NaturalLighting,\r\n name: 'Iluminacion natural'\r\n },\r\n offices: {checked: false, iconName: AmenityName.Offices, value: AmenityName.Offices, name: 'Con oficinas'},\r\n openSpace: {checked: false, iconName: AmenityName.OpenSpace, value: AmenityName.OpenSpace, name: 'Espacio abierto'},\r\n platforms: {checked: false, iconName: AmenityName.Platforms, value: AmenityName.Platforms, name: 'Andenes'},\r\n playground: {checked: false, iconName: AmenityName.Playground, value: AmenityName.Playground, name: 'Juegos infantiles'},\r\n playroom: {checked: false, iconName: AmenityName.Playroom, value: AmenityName.Playroom, name: 'Salón de juegos'},\r\n pool: {checked: false, iconName: AmenityName.Pool, value: AmenityName.Pool, name: 'Alberca'},\r\n railSpur: {checked: false, iconName: AmenityName.RailSpur, value: AmenityName.RailSpur, name: 'Espuela de FF.CC'},\r\n railyard: {checked: false, iconName: AmenityName.RailYard, value: AmenityName.RailYard, name: 'Patio de maniobras'},\r\n reception: {checked: false, iconName: AmenityName.Reception, value: AmenityName.Reception, name: 'Recepción'},\r\n securityGuard: {checked: false, iconName: AmenityName.SecurityGuard, value: AmenityName.SecurityGuard, name: 'Con vigilancia'},\r\n storage: {checked: false, iconName: AmenityName.Storage, value: AmenityName.Storage, name: 'Bodega'},\r\n visitorParking: {\r\n checked: false,\r\n iconName: AmenityName.VisitorParking,\r\n value: AmenityName.VisitorParking,\r\n name: 'Estacionamiento para visitas'\r\n },\r\n features: [\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPublicTransportation,\r\n value: AmenityName.NearPublicTransportation,\r\n name: 'Cerca de estaciones de transporte'\r\n },\r\n {checked: false, iconName: AmenityName.AdjacentCommerce, value: AmenityName.NearShops, name: 'Cerca de comercios'},\r\n {checked: false, iconName: AmenityName.OnBusyRoad, value: AmenityName.OnBusyRoad, name: 'Avenida principal'},\r\n {checked: false, iconName: AmenityName.CountrySide, value: AmenityName.CountrySide, name: 'Suburbio'},\r\n {checked: false, iconName: AmenityName.Downtown, value: AmenityName.Downtown, name: 'Céntrico'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.GoodReachableTraffic,\r\n value: AmenityName.GoodReachableTraffic,\r\n name: 'Se llega sin trafico'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearFitnessCentre,\r\n value: AmenityName.NearFitnessCentre,\r\n name: 'Cerca de centro deportivo'\r\n },\r\n {checked: false, iconName: AmenityName.NearHighway, value: AmenityName.NearHighway, name: 'Cerca de autopista'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearHospital,\r\n value: AmenityName.NearHospital,\r\n name: 'Cerca de centros de salud'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPark,\r\n value: AmenityName.NearPark,\r\n name: 'Cerca de parque'\r\n },\r\n {checked: false, iconName: AmenityName.NearSchools, value: AmenityName.NearSchools, name: 'Cerca de escuelas'},\r\n {checked: false, iconName: AmenityName.OnQuietRoad, value: AmenityName.OnQuietRoad, name: 'En calle tranquila'},\r\n ]\r\n };\r\n static DurationList = [\r\n 30, 60, 90, 180, 365\r\n ];\r\n static CommissionList: {SALE: number[], RENT: number[]} = {\r\n SALE: [0.06, 0.055, 0.05, 0.045, 0.04, 0.035, 0.030, 0.025, 0.020, 0.015, 0.01],\r\n RENT: [2, 1.5, 1, 0.5]\r\n };\r\n static SharedCommissionList: number[] = [\r\n 0.50, 0.40, 0.30, 0.20, 0.10\r\n ];\r\n static LandUseList: {name: string, value: LandUseEnum}[] = [\r\n {\r\n name: 'Habitacional unifamiliar',\r\n value: LandUseEnum.SINGLE_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional plurifamiliar',\r\n value: LandUseEnum.MULTI_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional con comercio',\r\n value: LandUseEnum.HOUSING_WITH_COMMERCE\r\n },\r\n {\r\n name: 'Habitacional con oficina',\r\n value: LandUseEnum.HOUSING_WITH_OFFICE\r\n },\r\n {\r\n name: 'Habitacional mixto',\r\n value: LandUseEnum.MIXED_HOUSING\r\n },\r\n {\r\n name: 'Comercio',\r\n value: LandUseEnum.COMMERCE\r\n },\r\n {\r\n name: 'Oficina',\r\n value: LandUseEnum.OFFICE\r\n },\r\n {\r\n name: 'Servicios',\r\n value: LandUseEnum.SERVICES\r\n },\r\n {\r\n name: 'Industria',\r\n value: LandUseEnum.INDUSTRY\r\n },\r\n {\r\n name: 'Agrícola',\r\n value: LandUseEnum.AGRICULTURAL\r\n }, {\r\n name: 'No especificado',\r\n value: LandUseEnum.OTHER\r\n }\r\n ];\r\n static AnnounceCheckList = [\r\n {\r\n name: 'Las fotos y videos son los correctos',\r\n value: 0,\r\n checked: false\r\n },\r\n {\r\n name: 'La ortografía y gramática es correcta',\r\n value: 1,\r\n checked: false\r\n },\r\n {\r\n name: 'Los datos de contacto son correctos',\r\n value: 2,\r\n checked: false\r\n },\r\n {\r\n name: 'La dirección, email y web están correctos',\r\n value: 3,\r\n checked: false\r\n },\r\n {\r\n name: 'Todo está correcto y apruebo mi anuncio',\r\n value: 4,\r\n checked: false\r\n }\r\n ];\r\n static DocumentsList: {name: string, value: PFileTypeEnum, loaded: boolean}[] = [\r\n {\r\n name: 'Escritura',\r\n value: PFileTypeEnum.DEED,\r\n loaded: false\r\n },\r\n {\r\n name: 'Identificación Propietario',\r\n value: PFileTypeEnum.OWNER_ID,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de agua',\r\n value: PFileTypeEnum.WATER_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de luz',\r\n value: PFileTypeEnum.ELECTRICITY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo predial',\r\n value: PFileTypeEnum.PROPERTY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Constancia de no adeudo',\r\n value: PFileTypeEnum.CONSTANCY_OF_NO_DEBT,\r\n loaded: false\r\n },\r\n {\r\n name: 'Libertad de Gravamen',\r\n value: PFileTypeEnum.EXEMPTION_TAX,\r\n loaded: false\r\n },\r\n {\r\n name: 'Licencia de construcción',\r\n value: PFileTypeEnum.BUILDING_LICENSE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Terminación de obra',\r\n value: PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,\r\n loaded: false\r\n },\r\n {\r\n name: 'Alineación y número oficial',\r\n value: PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,\r\n loaded: false\r\n },\r\n {\r\n name: 'Hipoteca',\r\n value: PFileTypeEnum.MORTGAGE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Otros',\r\n value: PFileTypeEnum.OTHER,\r\n loaded: false\r\n }\r\n ];\r\n static BedroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static BathroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static ParkingSpacesList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static SurfaceList: number[] = [\r\n 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000\r\n ];\r\n static ROIList: number[] = [\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20\r\n ];\r\n static PropertyTypeList: PropertyTypeItem[] = [\r\n {\r\n value: PropertyTypeEnum.HOUSE,\r\n iconName: 'house',\r\n name: 'Casa',\r\n shortName: 'Casa',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RESIDENTIAL,\r\n iconName: 'residential',\r\n name: 'Vivienda',\r\n shortName: 'Vivienda',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.APARTMENT,\r\n iconName: 'apartment',\r\n name: 'Departamento',\r\n shortName: 'Depto',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.ROOM,\r\n iconName: 'room',\r\n name: 'Habitación',\r\n shortName: 'Habitación',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.OFFICE,\r\n iconName: 'office',\r\n name: 'Oficina',\r\n shortName: 'Oficina',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.reception,\r\n ConstantsComponents.Amenities.adjacentPicnic,\r\n ConstantsComponents.Amenities.meetingRoom,\r\n ConstantsComponents.Amenities.adjacentGym,\r\n ConstantsComponents.Amenities.openSpace,\r\n ConstantsComponents.Amenities.airConditioner,\r\n ConstantsComponents.Amenities.adjacentCommerce,\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RETAIL,\r\n iconName: 'retail',\r\n name: 'Comercio',\r\n shortName: 'Comercio',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.facingStreet,\r\n ConstantsComponents.Amenities.maneuverArea,\r\n ConstantsComponents.Amenities.kitchenServices,\r\n ConstantsComponents.Amenities.finishings,\r\n ConstantsComponents.Amenities.mezzanine,\r\n ConstantsComponents.Amenities.inShoppingCenter,\r\n ConstantsComponents.Amenities.inCommercialArea,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.WAREHOUSE,\r\n iconName: 'warehouse',\r\n name: 'Bodega',\r\n shortName: 'Bodega',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.railyard,\r\n ConstantsComponents.Amenities.platforms,\r\n ConstantsComponents.Amenities.highResistanceFloors,\r\n ConstantsComponents.Amenities.offices,\r\n ConstantsComponents.Amenities.dressingRooms,\r\n ConstantsComponents.Amenities.diningRoom,\r\n ConstantsComponents.Amenities.inIndustrialPark,\r\n ConstantsComponents.Amenities.naturalLighting,\r\n ConstantsComponents.Amenities.railSpur,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.LAND,\r\n iconName: 'land',\r\n name: 'Terreno',\r\n shortName: 'Terreno',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.INVESTMENT,\r\n iconName: 'investment',\r\n name: 'Inversión',\r\n shortName: 'Inversión',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: []\r\n },\r\n {\r\n value: PropertyTypeEnum.NONE,\r\n name: 'Todo',\r\n shortName: 'Todo',\r\n iconName: 'all',\r\n features: [],\r\n amenities: []\r\n }\r\n ];\r\n static OfferingTypeList: { value: OfferingTypeEnum, name: string }[] = [\r\n {\r\n value: OfferingTypeEnum.SALE,\r\n name: 'Venta'\r\n },\r\n {\r\n value: OfferingTypeEnum.RENT,\r\n name: 'Renta'\r\n },\r\n ];\r\n static LocateList: any = {\r\n USD: {locate: 'en-US', currency: 'USD'},\r\n MXN: {locate: 'es-MX', currency: 'MXN'},\r\n GBP: {locate: 'en-GB', currency: 'GBP'},\r\n EUR: {locate: 'de-DE', currency: 'EUR'},\r\n BRL: {locate: 'pt-BR', currency: 'BRL'},\r\n CNY: {locate: 'zh-CH', currency: 'CNY'}\r\n };\r\n static PropertyStatusList: PropertyStatusItem[] = [\r\n { icon: 'announce', name: 'Anunciadas', value: StatusTypeEnum.ANNOUNCED },\r\n { icon: 'expired', name: 'Expiradas', value: StatusTypeEnum.EXPIRED },\r\n { icon: 'hidden', name: 'Ocultas', value: StatusTypeEnum.HIDDEN },\r\n { icon: 'ready', name: 'Listas para anunciar', value: StatusTypeEnum.READY },\r\n { icon: 'draft', name: 'Borrador', value: StatusTypeEnum.DRAFT }\r\n ];\r\n}\r\n","import {Filter, NewProperty, OfferingTypeEnum, PropertyTypeEnum} from '@maplander/types';\r\n\r\nexport class Utils {\r\n static round(value: number, precision: number): number {\r\n const multiplier = Math.pow(10, precision || 0);\r\n return Math.round(value * multiplier) / multiplier;\r\n }\r\n static getFilterByPropertyType(filter: Filter): Filter {\r\n return {\r\n type: filter.type,\r\n offering: filter.offering,\r\n distance: filter.distance,\r\n location: {\r\n latitude: filter.location.latitude,\r\n longitude: filter.location.longitude\r\n },\r\n currency: filter.currency,\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter.exclusivity,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter.mls\r\n };\r\n }\r\n static getInitialFilter(isOPI: boolean, filter: Filter = null): Filter {\r\n return {\r\n type: isOPI ? PropertyTypeEnum.NONE : PropertyTypeEnum.RESIDENTIAL,\r\n offering: isOPI ? OfferingTypeEnum.RENT : OfferingTypeEnum.RENT,\r\n distance: filter ? filter.distance : 0,\r\n location: {\r\n latitude: filter ? filter.location.latitude : 0,\r\n longitude: filter ? filter.location.longitude : 0\r\n },\r\n currency: filter ? filter.currency : 'MXN',\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter ? filter.exclusivity : false,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter ? filter.mls : true\r\n };\r\n }\r\n static listErrorsByPropertyTypeForPublish(type: PropertyTypeEnum): string[] {\r\n let errorField = ['price', 'currency', 'description', 'image'];\r\n switch (type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat(['mainArea', 'bedrooms', 'bathrooms']);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n case PropertyTypeEnum.OFFICE:\r\n case PropertyTypeEnum.RETAIL:\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat(['mainArea']);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat(['mainArea', 'secondaryArea']);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat(['roi']);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static getErrorsForPublish(property: NewProperty): string[] {\r\n let errorField = [];\r\n errorField = errorField.concat((!property.price || property.price === 0) ? ['price'] : []);\r\n errorField = errorField.concat((!property.currency || property.currency === '') ? ['currency'] : []);\r\n errorField = errorField.concat((!property.description || property.description === '') ? ['description'] : []);\r\n errorField = errorField.concat((!property.image || property.image === '') ? ['image'] : []);\r\n switch (property.type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bedrooms || property.features.bedrooms === 0)) ? ['bedrooms'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bathrooms || property.features.bathrooms === 0)) ? ['bathrooms'] : []);\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat(\r\n (property.features && (!property.features.secondaryArea || property.features.secondaryArea === 0)) ? ['secondaryArea'] : []);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.roi || property.features.roi === 0)) ? ['roi'] : []);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static removeDiacritics (str): string {\r\n const diacriticsMap = {\r\n A: /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g,\r\n AA: /[\\uA732]/g,\r\n AE: /[\\u00C6\\u01FC\\u01E2]/g,\r\n AO: /[\\uA734]/g,\r\n AU: /[\\uA736]/g,\r\n AV: /[\\uA738\\uA73A]/g,\r\n AY: /[\\uA73C]/g,\r\n B: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g,\r\n C: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g,\r\n D: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g,\r\n DZ: /[\\u01F1\\u01C4]/g,\r\n Dz: /[\\u01F2\\u01C5]/g,\r\n E: /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g,\r\n F: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g,\r\n G: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g,\r\n H: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g,\r\n I: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g,\r\n J: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g,\r\n K: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g,\r\n L: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g,\r\n LJ: /[\\u01C7]/g,\r\n Lj: /[\\u01C8]/g,\r\n M: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g,\r\n N: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g,\r\n NJ: /[\\u01CA]/g,\r\n Nj: /[\\u01CB]/g,\r\n O: /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g,\r\n OI: /[\\u01A2]/g,\r\n OO: /[\\uA74E]/g,\r\n OU: /[\\u0222]/g,\r\n P: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g,\r\n Q: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g,\r\n R: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g,\r\n S: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g,\r\n T: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g,\r\n TZ: /[\\uA728]/g,\r\n U: /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g,\r\n V: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g,\r\n VY: /[\\uA760]/g,\r\n W: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g,\r\n X: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g,\r\n Y: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g,\r\n Z: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g,\r\n a: /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g,\r\n aa: /[\\uA733]/g,\r\n ae: /[\\u00E6\\u01FD\\u01E3]/g,\r\n ao: /[\\uA735]/g,\r\n au: /[\\uA737]/g,\r\n av: /[\\uA739\\uA73B]/g,\r\n ay: /[\\uA73D]/g,\r\n b: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g,\r\n c: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g,\r\n d: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g,\r\n dz: /[\\u01F3\\u01C6]/g,\r\n e: /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g,\r\n f: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g,\r\n g: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g,\r\n h: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g,\r\n hv: /[\\u0195]/g,\r\n i: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g,\r\n j: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g,\r\n k: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g,\r\n l: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g,\r\n lj: /[\\u01C9]/g,\r\n m: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g,\r\n n: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g,\r\n nj: /[\\u01CC]/g,\r\n o: /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g,\r\n oi: /[\\u01A3]/g,\r\n ou: /[\\u0223]/g,\r\n oo: /[\\uA74F]/g,\r\n p: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g,\r\n q: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g,\r\n r: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g,\r\n s: /[\\u0073\\u24E2\\uFF53\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g,\r\n ss: /[\\u00DF]/g,\r\n t: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g,\r\n tz: /[\\uA729]/g,\r\n u: /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g,\r\n v: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g,\r\n vy: /[\\uA761]/g,\r\n w: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g,\r\n x: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g,\r\n y: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g,\r\n z: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\r\n };\r\n for (const x of Object.keys(diacriticsMap)) {\r\n // Iterate through each keys in the above object and perform a replace\r\n str = str.replace(diacriticsMap[x], x);\r\n }\r\n return str;\r\n }\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\nimport {Pipe, PipeTransform} from '@angular/core';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\n\r\n@Pipe({\r\n name: 'markerPrice'\r\n})\r\nexport class MarkerPricePipe implements PipeTransform {\r\n\r\n transform(price: number, currency?: string): string {\r\n const locate: {locate: string, currency: string} = ConstantsComponents.LocateList[currency || 'MXN'];\r\n let outputPrice;\r\n if (((price / 100000.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100000.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'M';\r\n } else if (((price / 100.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'K';\r\n } else {\r\n outputPrice = Number(price).toFixed(2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n }\r\n return '' + outputPrice;\r\n }\r\n\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {MarkerPricePipe} from './marker-price.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n MarkerPricePipe\r\n ],\r\n exports: [\r\n MarkerPricePipe\r\n ]\r\n})\r\nexport class MarkerPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkerPriceModule,\r\n providers: [\r\n MarkerPricePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {OfferingTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'offeringType'\r\n})\r\nexport class OfferingTypePipe implements PipeTransform {\r\n\r\n transform(value: OfferingTypeEnum, prefix?: string): string {\r\n let response = prefix ? prefix : 'en';\r\n ConstantsComponents.OfferingTypeList.forEach(type => {\r\n if (type.value === value) {\r\n response += ` ${type.name.toLowerCase()}`;\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {OfferingTypePipe} from './offering-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n OfferingTypePipe\r\n ],\r\n exports: [\r\n OfferingTypePipe\r\n ]\r\n})\r\nexport class OfferingTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: OfferingTypeModule,\r\n providers: [\r\n OfferingTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'propertyType'\r\n})\r\nexport class PropertyTypePipe implements PipeTransform {\r\n transform(value: PropertyTypeEnum, toLowerCase?: boolean): string {\r\n let result = '';\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === value) {\r\n result = type.name;\r\n }\r\n });\r\n return (toLowerCase) ? result.toLowerCase() : result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PropertyTypePipe} from './property-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n PropertyTypePipe\r\n ],\r\n exports: [\r\n PropertyTypePipe\r\n ]\r\n})\r\nexport class PropertyTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyTypeModule,\r\n providers: [\r\n PropertyTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\r\nimport {CurrencyPipe} from '@angular/common';\r\nimport {AbstractControl} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[libFormatPrice]'\r\n})\r\nexport class FormatPriceDirective implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n @Input() control: AbstractControl;\r\n @Input() currency: string;\r\n private _el: HTMLInputElement;\r\n private _value: any;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n private _elRef: ElementRef,\r\n private _currency: CurrencyPipe\r\n ) {\r\n this._subscription = new Subscription();\r\n this._el = this._elRef.nativeElement;\r\n }\r\n\r\n private static removeError(control: AbstractControl, error: string): void {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n if (this._value) {\r\n this.validateFormatPrice(this._value);\r\n }\r\n }\r\n if (changes['control'] && changes['control'].currentValue) {\r\n this._subscription.add(\r\n this.control.valueChanges.subscribe(response => {\r\n this._value = response;\r\n })\r\n );\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._el.addEventListener('focus', this.onFocus.bind(this));\r\n this._el.addEventListener('blur', this.onBlur.bind(this));\r\n this._value = this._el.value;\r\n this._el.value = this.formatPrice(this._el.value);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n this._el.removeEventListener('focus', this.onFocus.bind(this));\r\n this._el.removeEventListener('blur', this.onBlur.bind(this));\r\n }\r\n\r\n private formatPrice(value: any): any {\r\n return this._currency.transform(value, this.currency && this.currency !== 'MXN' ? this.currency : null, 'symbol', '1.0-0');\r\n }\r\n\r\n private onFocus() {\r\n this._el.value = this._value;\r\n }\r\n\r\n private onBlur(event: any) {\r\n this.validateFormatPrice(event.target.value);\r\n }\r\n\r\n private validateFormatPrice(value: any): void {\r\n if (Number.isNaN(Number(value))) {\r\n this.control.setErrors({\r\n format: true\r\n });\r\n return;\r\n }\r\n FormatPriceDirective.removeError(this.control, 'format');\r\n this._value = value;\r\n this._el.value = this.formatPrice(value);\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {FormatPriceDirective} from './format-price.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatPriceDirective\r\n ],\r\n exports: [\r\n FormatPriceDirective\r\n ]\r\n})\r\nexport class FormatPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatPriceModule,\r\n providers: [\r\n CurrencyPipe,\r\n FormatPriceDirective\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnDestroy} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\n\r\n@Directive({\r\n selector: '[libImageError]'\r\n})\r\nexport class ImageErrorDirective implements AfterViewInit, OnDestroy {\r\n\r\n @Input() typeImage: PropertyTypeEnum;\r\n private _el: HTMLImageElement;\r\n private _onError;\r\n private readonly CDN_URL: string = 'https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock';\r\n\r\n constructor(private _ref: ElementRef) {\r\n this._el = this._ref.nativeElement;\r\n if (this._el.constructor !== HTMLImageElement) {\r\n throw new Error('libImageError directive works only image element');\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._onError = () => {\r\n this.updateUrl();\r\n };\r\n this._el.addEventListener('error', this._onError);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._el.removeEventListener('error', this._onError);\r\n }\r\n\r\n updateUrl() {\r\n switch (this.typeImage) {\r\n case PropertyTypeEnum.HOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n this._el.src = `${this.CDN_URL}/Stock-Office.jpg`;\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n this._el.src = `${this.CDN_URL}/Stock-Retail.jpg`;\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n this._el.src = `${this.CDN_URL}/Stock-Land.jpg`;\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-Warehouse.jpg`;\r\n break;\r\n case PropertyTypeEnum.APARTMENT:\r\n case PropertyTypeEnum.ROOM:\r\n this._el.src = `${this.CDN_URL}/Stock-Apartment.jpg`;\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this._el.src = `${this.CDN_URL}/Stock-Investment.jpg`;\r\n break;\r\n case PropertyTypeEnum.RESIDENTIAL:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n default:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {ImageErrorDirective} from './image-error.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n ImageErrorDirective\r\n ],\r\n exports: [\r\n ImageErrorDirective\r\n ]\r\n})\r\nexport class ImageErrorModule { }\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'lib-document-visor',\r\n templateUrl: './document-visor.component.html',\r\n styleUrls: ['./document-visor.component.scss']\r\n})\r\nexport class DocumentVisorComponent implements OnInit {\r\n\r\n public url: string;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: string,\r\n private _dialog: MatDialogRef<DocumentVisorComponent>\r\n ) {\r\n }\r\n\r\n private static isBase64(str): boolean {\r\n try {\r\n return btoa(atob(str)) === str;\r\n } catch (err) {\r\n return false;\r\n }\r\n }\r\n\r\n private static isURL(url: string): boolean {\r\n const pattern = new RegExp('^(?:(?:(?:https?|ftp):)?\\\\/\\\\/)(?:\\\\S+(?::\\\\S*)?@)?(?:(?!(?:10|127)(?:\\\\.\\\\d{1,3}){3})(?!(?:169\\\\.254|192\\\\.168)(?:\\\\.\\\\d{1,3}){2})(?!172\\\\.(?:1[6-9]|2\\\\d|3[0-1])(?:\\\\.\\\\d{1,3}){2})(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\\\d{2,5})?(?:[/?#]\\\\S*)?$', 'i');\r\n return pattern.test(url);\r\n }\r\n\r\n ngOnInit() {\r\n this.url = this._data;\r\n }\r\n\r\n close(): void {\r\n if (!DocumentVisorComponent.isBase64(this.url) && !DocumentVisorComponent.isURL(this.url)) {\r\n URL.revokeObjectURL(this.url);\r\n }\r\n this._dialog.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\n\r\n@Injectable()\r\nexport class DocumentVisorService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(document: string): MatDialogRef<DocumentVisorComponent> {\r\n return this._dialog.open(DocumentVisorComponent, {\r\n data: document,\r\n disableClose: true,\r\n panelClass: 'document_visor_dialog'\r\n });\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatDialogModule} from '@angular/material/dialog';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\nimport {DocumentVisorService} from './document-visor.service';\r\nimport {SafeUrlModule} from '@maplander/shared';\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SafeUrlModule.forChild(),\r\n MATERIAL\r\n ],\r\n declarations: [\r\n DocumentVisorComponent\r\n ],\r\n exports: [\r\n DocumentVisorComponent\r\n ],\r\n entryComponents: [\r\n DocumentVisorComponent\r\n ]\r\n})\r\nexport class DocumentVisorModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: DocumentVisorModule,\r\n providers: [\r\n DocumentVisorService\r\n ]\r\n };\r\n }\r\n}\r\n","export enum FilterChipType {\r\n OFFERING = 'OFFERING',\r\n PROPERTY_TYPE = 'PROPERTY_TYPE',\r\n PRICE = 'PRICE',\r\n BEDROOMS = 'BEDROOMS',\r\n BATHROOMS = 'BATHROOMS',\r\n PARKING_PLACES = 'PARKING_PLACES',\r\n SURFACE = 'SURFACE',\r\n AMENITIES = 'AMENITIES',\r\n LISTING = 'LISTING'\r\n}\r\n","export enum FiltersChangeType {\r\n APPLY,\r\n INIT,\r\n AREA,\r\n SAVE,\r\n LIST_TYPE\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const FILTERS_TOKEN = new InjectionToken<boolean>('FILTERS MODULE CONFIG');\r\n","import {Inject, Injectable, Optional} from '@angular/core';\r\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\r\nimport {LocalStorageService} from '@maplander/static';\r\nimport {FiltersChangeType} from '../../utils/enums/filters-change-type';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {Utils} from '../../utils';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\nimport {FiltersSaved} from '../../utils/models';\r\n\r\n@Injectable()\r\nexport class FiltersService {\r\n\r\n private static FILTERS_SAVED_KEY = 'FILTERS';\r\n private _notifier: BehaviorSubject<FiltersChange>;\r\n private _startComponent: Subject<FiltersWrapper>;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean\r\n ) {\r\n this._startComponent = new Subject<FiltersWrapper>();\r\n this._notifier = new BehaviorSubject<FiltersChange>({\r\n filter: Utils.getInitialFilter(this._config || false),\r\n type: FiltersChangeType.INIT,\r\n ft: false\r\n });\r\n }\r\n\r\n static removeFiltersSaved(): void {\r\n LocalStorageService.removeItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static getFiltersSaved(): FiltersSaved {\r\n return LocalStorageService.getItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static saveFilters(config: FiltersSaved): void {\r\n LocalStorageService.setItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY, {\r\n filters: config.filters,\r\n ft: config.ft || false,\r\n isSharedProperties: config.isSharedProperties || false\r\n });\r\n }\r\n\r\n setChange(change: FiltersChange): void {\r\n this._notifier.next(change);\r\n }\r\n\r\n getChanges(): Observable<FiltersChange> {\r\n return this._notifier.asObservable();\r\n }\r\n\r\n startComponent(wrapper: FiltersWrapper): void {\r\n this._startComponent.next(wrapper);\r\n }\r\n\r\n onStartComponent(): Observable<FiltersWrapper> {\r\n return this._startComponent.asObservable();\r\n }\r\n}\r\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\r\nimport {Filter, PropertyTypeEnum} from '@maplander/types';\r\nimport {MarkerPricePipe} from './../../pipes/marker-price/marker-price.pipe';\r\nimport {OfferingTypePipe} from './../../pipes/offering-type/offering-type.pipe';\r\nimport {FilterChip} from './../../utils/models/filter-chip';\r\nimport {FilterChipType} from '../../utils/enums/filter-chip-type';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {FiltersService} from './../filters/filters.service';\r\nimport {Subscription} from 'rxjs';\r\nimport {FiltersChange} from '././../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\n\r\n@Component({\r\n selector: 'lib-fab-filters',\r\n templateUrl: './fab-filters.component.html',\r\n styleUrls: ['./fab-filters.component.scss']\r\n})\r\nexport class FabFiltersComponent implements OnInit, OnDestroy {\r\n @Input() isOPI: boolean;\r\n @Input() mlsLabel: string;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _filter: Filter;\r\n private _wrapper: FiltersWrapper;\r\n private _subscription: Subscription;\r\n public chips: FilterChip[];\r\n\r\n constructor(\r\n private _currency: MarkerPricePipe,\r\n private _offeringPipe: OfferingTypePipe,\r\n private _filtersService: FiltersService\r\n ) {\r\n this.chips = [];\r\n this._subscription = new Subscription();\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._filtersService.onStartComponent().subscribe(response => {\r\n this._wrapper = response;\r\n })\r\n );\r\n this._subscription.add(\r\n this._filtersService.getChanges().subscribe((response: FiltersChange) => {\r\n this.init(response.filter, response.ft, response.isSharedProperties);\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n openFilters(): void {\r\n if (!this._wrapper) {\r\n console.warn('[FabFiltersComponent] waiting onStartComponent');\r\n return;\r\n }\r\n this._wrapper.open();\r\n }\r\n\r\n onClickChip(type: FilterChipType): void {\r\n if (type === FilterChipType.PROPERTY_TYPE || type === FilterChipType.OFFERING) {\r\n this.openFilters();\r\n }\r\n }\r\n\r\n private init(filter: Filter, ft: boolean, sharedProperties?: boolean): void {\r\n this.chips = [];\r\n this._filter = filter;\r\n this.listingType(sharedProperties);\r\n this.offeringType();\r\n this.propertyType();\r\n this.price();\r\n this.surface(ft);\r\n this.bedrooms();\r\n this.bathrooms();\r\n this.parkingPlaces();\r\n this.amenities();\r\n }\r\n\r\n private listingType(sharedProperties?: boolean): void {\r\n if (!this.isOPI) {\r\n return;\r\n }\r\n this.chips.push({\r\n type: FilterChipType.LISTING,\r\n text: sharedProperties ? 'Compartidas' : (this._filter.mls ? this.mlsLabel || 'MLS' : 'Mi lista'),\r\n icon: [this._filter.mls ? 'mlm' : 'list']\r\n });\r\n }\r\n\r\n private offeringType(): void {\r\n if (this._filter.offering && this._filter.type !== PropertyTypeEnum.NONE) {\r\n let offering = this._offeringPipe.transform(this._filter.offering, ' ').replace(/ /g, '');\r\n const firstLetter = offering.substr(0, 1);\r\n offering = offering.replace(firstLetter, '');\r\n offering = `${firstLetter.toLocaleUpperCase()}${offering}`;\r\n this.chips.push({\r\n type: FilterChipType.OFFERING,\r\n text: offering,\r\n icon: null\r\n });\r\n }\r\n }\r\n\r\n private propertyType(): void {\r\n if (this._filter.type && this._filter.type !== PropertyTypeEnum.NONE) {\r\n ConstantsComponents.PropertyTypeList.forEach(item => {\r\n if (item.value === this._filter.type) {\r\n this.chips.push({\r\n type: FilterChipType.PROPERTY_TYPE,\r\n text: item.name,\r\n icon: [item.iconName]\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private price(): void {\r\n let min = '', max = '', currency;\r\n if (this._filter.downLimitPrice !== 0) {\r\n min += this._currency.transform(this._filter.downLimitPrice);\r\n }\r\n if (this._filter.upLimitPrice !== 0) {\r\n max += this._currency.transform(this._filter.upLimitPrice);\r\n }\r\n if (min !== '' || max !== '') {\r\n currency = this._filter.currency ? this._filter.currency : '';\r\n this.chips.push({\r\n type: FilterChipType.PRICE,\r\n text: `${min}${min !== '' && max !== '' ? ' - ' : ''}${max} ${currency}`,\r\n icon: ['price']\r\n });\r\n }\r\n }\r\n\r\n private surface(ft: boolean): void {\r\n if (this._filter.mainArea !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.SURFACE,\r\n text: (ft ? (this._filter.mainArea / this.METERS_TO_SQ).toFixed(0).toString() : this._filter.mainArea.toString()) + (ft ? ' sq ft' : ' m2'),\r\n icon: ['surface']\r\n });\r\n }\r\n }\r\n\r\n private bedrooms(): void {\r\n if (this._filter.bedrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BEDROOMS,\r\n text: this._filter.bedrooms.toString(),\r\n icon: ['bedroom']\r\n });\r\n }\r\n }\r\n\r\n private bathrooms(): void {\r\n if (this._filter.bathrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BATHROOMS,\r\n text: this._filter.bathrooms.toString(),\r\n icon: ['bathroom']\r\n });\r\n }\r\n }\r\n\r\n private parkingPlaces(): void {\r\n if (this._filter.parkingPlaces !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.PARKING_PLACES,\r\n text: this._filter.parkingPlaces.toString(),\r\n icon: ['parking']\r\n });\r\n }\r\n }\r\n\r\n private amenities(): void {\r\n if (this._filter.extras && this._filter.extras.length > 0) {\r\n this.chips.push({\r\n type: FilterChipType.AMENITIES,\r\n text: this._filter.extras.length.toString(),\r\n icon: [this._filter.extras[0]]\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {FabFiltersComponent} from './fab-filters.component';\r\nimport {MatChipsModule} from '@angular/material/chips';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n OfferingTypeModule.forChild(),\r\n MarkerPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FabFiltersComponent\r\n ],\r\n exports: [\r\n FabFiltersComponent\r\n ]\r\n})\r\nexport class FabFiltersModule {\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CER, Currency} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class CurrencyConverterService {\r\n\r\n list(prices: number[], currencies: CER[], from: Currency, to: Currency): number[] {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n prices = prices.map(price => {\r\n if (from === to) {\r\n return price;\r\n } else {\r\n return valueTo * (price / valueFrom);\r\n }\r\n });\r\n return prices;\r\n }\r\n\r\n number(price: number, currencies: CER[], from: Currency, to: Currency): number {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n return valueTo * (price / valueFrom);\r\n }\r\n\r\n private getValueByCurrency(currencies: CER[], c: Currency): number {\r\n let value = 0;\r\n currencies.forEach(currency => {\r\n if (currency.type === c.toString()) {\r\n value = currency.value;\r\n }\r\n });\r\n return value;\r\n }\r\n}\r\n","export class MUtils {\r\n static linSpaceExp(start: number, stop: number, n: number): number[] {\r\n const list: number[] = [];\r\n const phi = 1.618033988749895, b = Math.log(stop / start) / ((n - 1) * Math.log(phi));\r\n for (let i = 0; i < n; i++) {\r\n list[i] = start * Math.pow(phi, b * i);\r\n const length = (Math.log10(list[i]) + 1);\r\n if (length > 2) {\r\n list[i] = (Math.round(list[i] / Math.pow(10, length - 2)) * Math.pow(10, length - 2));\r\n }\r\n }\r\n return list;\r\n }\r\n}\r\n","import {AbstractControl} from '@angular/forms';\r\n\r\nexport function removeError(control: AbstractControl, error: string) {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef, EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional, Output,\r\n Renderer2,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\nimport {AppUtil, CER, Currency, Filter, LimitPrice, OfferingTypeEnum, PropertyRange, PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes/filters-wrapper';\r\nimport {PropertyTypeItem} from './../../utils/models/property-type-item';\r\nimport {CurrencyConverterService} from './../../services/currency-converter/currency-converter.service';\r\nimport {Filters} from '../../utils/interfaces/filters';\r\nimport {FiltersService} from './filters.service';\r\nimport {FiltersChangeType} from '../../utils/enums';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {MUtils} from '../../utils/classes/mUtils';\r\nimport {AmenityItem} from '../../utils/models';\r\nimport {CurrencyFilterValidator} from '../property/validators/currency-filter-validator';\r\n\r\n@Component({\r\n selector: 'lib-filters',\r\n templateUrl: './filters.component.html',\r\n styleUrls: ['./filters.component.scss']\r\n})\r\nexport class FiltersComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy, Filters {\r\n @Input() utils: AppUtil;\r\n @Input() newFilters: boolean;\r\n @Input() stateOptions: Array<{name: string, total: number}>;\r\n @Input() propertyTotal: number;\r\n @Output() changeFilter: EventEmitter<{type: 'propertyType' | 'filter' | 'offer', payload: {filter: Filter, value: any}}>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _tmpMinPriceList: number[];\r\n private _tmpMaxPriceList: number[];\r\n private _subscription: Subscription;\r\n private _isSharedProperties: boolean;\r\n public filtersForm: FormGroup;\r\n public propertyTypeList: PropertyTypeItem[];\r\n public bedroomsList: number[];\r\n public bathroomsList: number[];\r\n public parkingPlacesList: number[];\r\n public currencyList: CER[];\r\n public minPriceList: number[];\r\n public maxPriceList: number[];\r\n public surfaceList: number[];\r\n public roiList: number[];\r\n public propertyTypeSelected: PropertyTypeItem;\r\n public filter: Filter;\r\n public isOPI: boolean;\r\n public surfaceUnitSelected: number;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean,\r\n private _render: Renderer2,\r\n private _ref: ElementRef,\r\n private _service: FiltersService,\r\n private _formBuilder: FormBuilder,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n this.changeFilter = new EventEmitter<{type: 'propertyType' | 'filter', payload: {filter: Filter, value: any}}>();\r\n this.isOPI = this._config || false;\r\n this._subscription = new Subscription();\r\n this.propertyTypeList = ConstantsComponents.PropertyTypeList.map(item => ({...item}));\r\n this.bedroomsList = Object.assign([], ConstantsComponents.BedroomList);\r\n this.bathroomsList = Object.assign([], ConstantsComponents.BathroomList);\r\n this.parkingPlacesList = Object.assign([], ConstantsComponents.ParkingSpacesList);\r\n this.surfaceList = Object.assign([], ConstantsComponents.SurfaceList);\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.surfaceUnitSelected = 0;\r\n this.buildForm();\r\n this.initComponentByPropertyType();\r\n this.restoreLastFiltersSaved(true);\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.openComponent(false);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.utils) {\r\n return console.warn('[FiltersComponent] utils param is required');\r\n }\r\n this.initComponent();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n console.log('[FiltersComponent] utils ready');\r\n this.initComponent();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n open(): void {\r\n this.restoreLastFiltersSaved();\r\n this.openComponent(true);\r\n }\r\n\r\n close(): void {\r\n this.openComponent(false);\r\n }\r\n\r\n changePropertyType(index: number): void {\r\n this.resetFilters(index);\r\n this.filter.locationType = 'STATE';\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\r\n this.applyAmenities();\r\n this.filter.type = this.propertyTypeSelected.value;\r\n switch (this.propertyTypeSelected.value) {\r\n case PropertyTypeEnum.ROOM:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.RENT);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.SALE);\r\n break;\r\n }\r\n this.changeFilter.emit({type: 'propertyType', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.locationType = 'STATE';\r\n this.filtersForm.get('state').setValue('');\r\n this.filtersForm.get('state').markAsTouched();\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter.emit({type: 'offer', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeState(ev: string): void {\r\n this.filter.state = ev;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n if (amenity.checked) {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n if (i > -1) {\r\n this.filter.extras.splice(i, 1);\r\n }\r\n } else {\r\n this.filter.extras.push(amenity.value);\r\n }\r\n amenity.checked = !amenity.checked;\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n saveSearchByFilters(): void {\r\n this.applyFilters(FiltersChangeType.SAVE);\r\n }\r\n\r\n applyFilters(type?: FiltersChangeType): void {\r\n this.getFilterByForm();\r\n const filterToSearch = Object.assign({}, this.filter);\r\n if (this.surfaceUnitSelected === 1) {\r\n filterToSearch.mainArea = filterToSearch.mainArea * this.METERS_TO_SQ;\r\n }\r\n this.updateFiltersSaved(filterToSearch);\r\n this._service.setChange({\r\n type: type || FiltersChangeType.APPLY,\r\n filter: filterToSearch,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties\r\n });\r\n this.openComponent(false);\r\n }\r\n\r\n resetFilters(propertyTypeItemIndex?: number): void {\r\n this.filter.currency = !propertyTypeItemIndex ? 'MXN' : this.filter.currency;\r\n this.initComponentByPropertyType(propertyTypeItemIndex);\r\n this.surfaceUnitSelected = 0;\r\n this.filter = propertyTypeItemIndex ? Utils.getFilterByPropertyType(this.filter) : Utils.getInitialFilter(this.isOPI, this.filter);\r\n this.updateFormByFilters();\r\n this.setPrices();\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n state: ['', [Validators.required]],\r\n offering: [],\r\n currency: [],\r\n minPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n maxPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n bedrooms: [],\r\n bathrooms: [],\r\n parkingPlaces: [],\r\n surface: [],\r\n surfaceUnit: [],\r\n roi: []\r\n }, {\r\n validator: CurrencyFilterValidator('minPrice', 'maxPrice')\r\n });\r\n this.filtersForm.valueChanges.subscribe(() => {\r\n this.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n });\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n state: this.filter.state,\r\n offering: this.filter.offering,\r\n currency: this.filter.currency,\r\n minPrice: this.filter.downLimitPrice,\r\n maxPrice: this.filter.upLimitPrice,\r\n bedrooms: this.filter.bedrooms,\r\n bathrooms: this.filter.bathrooms,\r\n parkingPlaces: this.filter.parkingPlaces,\r\n surface: this.filter.mainArea,\r\n surfaceUnit: this.surfaceUnitSelected,\r\n roi: this.filter.roi\r\n });\r\n }\r\n\r\n private getFilterByForm(): void {\r\n const data = this.filtersForm.value;\r\n this.filter.state = data.state;\r\n this.filter.offering = data.offering;\r\n this.filter.currency = data.currency;\r\n this.filter.downLimitPrice = Number(data.minPrice);\r\n this.filter.upLimitPrice = Number(data.maxPrice);\r\n this.filter.bedrooms = Number(data.bedrooms);\r\n this.filter.bathrooms = Number(data.bathrooms);\r\n this.filter.parkingPlaces = Number(data.parkingPlaces);\r\n this.filter.mainArea = Number(data.surface);\r\n this.surfaceUnitSelected = Number(data.surfaceUnit);\r\n this.filter.roi = Number(data.roi);\r\n }\r\n\r\n private initComponent(): void {\r\n this.initUtils();\r\n this._subscription.add(\r\n this._service.getChanges().subscribe((response: FiltersChange) => {\r\n switch (response.type) {\r\n case FiltersChangeType.LIST_TYPE:\r\n this._isSharedProperties = response.isSharedProperties;\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n case FiltersChangeType.AREA:\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n }\r\n })\r\n );\r\n this._service.startComponent(new FiltersWrapper(this));\r\n }\r\n\r\n private initUtils(): void {\r\n this.currencyList = this.utils.cers;\r\n this.setPrices();\r\n }\r\n\r\n private setPrices(to?: Currency): void {\r\n this.filtersForm.controls['minPrice'].reset(0);\r\n this.filtersForm.controls['maxPrice'].reset(0);\r\n const offering = this.filtersForm.controls['offering'].value;\r\n this.minPriceList = this.createPrices(this.utils.limitPrice, this.propertyTypeSelected.value, offering);\r\n this.minPriceList = this._converter.list(this.minPriceList, this.utils.cers, Currency.USD, to || this.filter.currency as Currency);\r\n this.maxPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMinPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMaxPriceList = Object.assign([], this.maxPriceList);\r\n }\r\n\r\n private applyAmenities(): void {\r\n this.propertyTypeSelected.amenities = this.propertyTypeSelected.amenities.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n this.propertyTypeSelected.features = this.propertyTypeSelected.features.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n }\r\n\r\n private createPrices(limitPrice: LimitPrice, propertyType: PropertyTypeEnum, offering: OfferingTypeEnum): number[] {\r\n let list: number[] = [];\r\n limitPrice.propertyRanges.forEach((range: PropertyRange) => {\r\n if (range.offering === offering && range.type === propertyType) {\r\n list = MUtils.linSpaceExp(range.min, range.max, 20);\r\n }\r\n });\r\n return list;\r\n }\r\n\r\n private initComponentByPropertyType(propertyTypeItemIndex: number = null): void {\r\n this.propertyTypeSelected = JSON.parse(\r\n JSON.stringify(ConstantsComponents.PropertyTypeList[propertyTypeItemIndex !== null ? propertyTypeItemIndex : 9]));\r\n }\r\n\r\n private updateFiltersSaved(filters: Filter): void {\r\n this.filter = filters;\r\n FiltersService.saveFilters({\r\n filters: filters,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties || false\r\n });\r\n }\r\n\r\n private restoreLastFiltersSaved(init?: boolean): void {\r\n const filtersSaved = FiltersService.getFiltersSaved() || null;\r\n this.filter = filtersSaved ? filtersSaved.filters : Utils.getInitialFilter(this.isOPI);\r\n if (filtersSaved) {\r\n if (filtersSaved.ft) {\r\n this.filter.mainArea = Number((this.filter.mainArea / this.METERS_TO_SQ).toFixed(0));\r\n this.surfaceUnitSelected = filtersSaved.ft ? 1 : 0;\r\n }\r\n this._isSharedProperties = filtersSaved.isSharedProperties || false;\r\n }\r\n this.propertyTypeSelected = ConstantsComponents.PropertyTypeList.find(item => item.value === this.filter.type);\r\n this.applyAmenities();\r\n this.updateFormByFilters();\r\n if (init) {\r\n this.applyFilters(FiltersChangeType.INIT);\r\n }\r\n }\r\n\r\n private openComponent(open: boolean): void {\r\n if (open) {\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '1');\r\n } else {\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '0');\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'collapse');\r\n }\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.filtersForm.controls['offering'].valueChanges.subscribe(() => {\r\n this.setPrices();\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['currency'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.setPrices(value.toString() as Currency);\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['minPrice'].valueChanges.subscribe((value) => {\r\n if (!value) {\r\n return;\r\n }\r\n this.maxPriceList = Object.assign([], this._tmpMaxPriceList);\r\n const i = this.minPriceList.indexOf(value);\r\n if (i > -1) {\r\n this.maxPriceList.splice(0, i + 1);\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['maxPrice'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.minPriceList = Object.assign([], this._tmpMinPriceList);\r\n const i = this.maxPriceList.indexOf(value);\r\n if (i > -1) {\r\n const difference = this.minPriceList.length - this.maxPriceList.length;\r\n this.minPriceList.splice(i + difference, this.minPriceList.length - 1);\r\n }\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import {AbstractControl, FormGroup, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\n\r\nexport function CurrencyFilterValidator(controlName: string, controlName2: string): ValidatorFn {\r\n return (control: FormGroup): { [key: string]: boolean } | null => {\r\n if (control) {\r\n const peerControl = control.controls[controlName];\r\n const peerControl2 = control.controls[controlName2];\r\n if (peerControl2.value) {\r\n if (peerControl.value >= peerControl2.value) {\r\n peerControl2.setErrors({\r\n currency: true\r\n });\r\n }\r\n if (peerControl.value < peerControl2.value) {\r\n removeError(peerControl2, 'currency');\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {CurrencyConverterService} from './currency-converter.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class CurrencyConverterModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: CurrencyConverterModule,\r\n providers: [\r\n CurrencyConverterService\r\n ]\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FiltersComponent} from './filters.component';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatDividerModule} from '@angular/material/divider';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {CurrencyConverterModule} from './../../services/currency-converter/currency-converter.module';\r\nimport {FiltersService} from './filters.service';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {MatRippleModule} from '@angular/material/core';\r\nimport { MatInputModule } from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MatRippleModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatButtonToggleModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDividerModule,\r\n MatInputModule,\r\n MarkerPriceModule.forChild(),\r\n CurrencyConverterModule.forChild()\r\n ],\r\n declarations: [\r\n FiltersComponent\r\n ],\r\n exports: [\r\n FiltersComponent\r\n ],\r\n providers: [\r\n FiltersService\r\n ]\r\n})\r\nexport class FiltersModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: FiltersModule,\r\n providers: [\r\n FiltersService,\r\n {\r\n provide: FILTERS_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';\r\nimport {LazyLoadService} from '@maplander/shared';\r\nimport {Observable, of} from 'rxjs';\r\nimport {fromPromise} from 'rxjs/internal-compatibility';\r\nimport {map, mergeMap} from 'rxjs/operators';\r\n\r\ndeclare var PANOLENS: any;\r\ndeclare var DeviceOrientationEvent: any;\r\ndeclare var DeviceMotionEvent: any;\r\n\r\n@Component({\r\n selector: 'lib-panorama-visor',\r\n templateUrl: './panorama-visor.component.html',\r\n styleUrls: ['./panorama-visor.component.scss']\r\n})\r\nexport class PanoramaVisorComponent implements AfterViewInit, OnDestroy {\r\n @Input() url: string;\r\n @ViewChild('container', {static: true}) private _container: ElementRef;\r\n private _panorama: any;\r\n private _viewer: any;\r\n public isTouch: boolean;\r\n public showPanorama: boolean;\r\n public isFullScreen: boolean;\r\n\r\n constructor(\r\n private _lazy: LazyLoadService\r\n ) {\r\n }\r\n\r\n private static checkTouchSupported(): boolean {\r\n return window ? (\r\n window.navigator.msMaxTouchPoints !== null &&\r\n window.navigator.msMaxTouchPoints !== undefined)\r\n || 'ontouchstart' in window : false;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.url || this.url === '') {\r\n return;\r\n }\r\n this._lazy.load('https://pchen66.github.io/js/three/three.min.js').then(() => {\r\n return this._lazy.load('https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js');\r\n }).then(() => {\r\n setTimeout(() => {\r\n this.showPanorama = true;\r\n this.init();\r\n }, 500);\r\n }).catch((e) => {\r\n console.log('Failed', e);\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._panorama) {\r\n this._panorama.dispose();\r\n }\r\n if (this._viewer) {\r\n this._viewer.dispose();\r\n this._viewer.destroy();\r\n }\r\n }\r\n\r\n fullscreen(): void {\r\n this.toggleFullscreen();\r\n }\r\n\r\n changeControl(type: 'TOUCH' | 'MOUSE' | 'SENSOR'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (type) {\r\n case 'MOUSE':\r\n case 'TOUCH':\r\n this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);\r\n break;\r\n case 'SENSOR':\r\n this.requestPermissions().subscribe((value) => {\r\n if (value) {\r\n this._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION);\r\n } else {\r\n if (confirm(`No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?`)) {\r\n window.location.href = 'prefs:root=Safari';\r\n } else {\r\n alert('Permisos de movimiento y orientación no otorgados');\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n }\r\n\r\n changeMode(mode: 'NORMAL' | 'CARDBOARD' | 'STEREOSCOPIC'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (mode) {\r\n case 'NORMAL':\r\n this._viewer.disableEffect();\r\n break;\r\n case 'CARDBOARD':\r\n this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);\r\n break;\r\n case 'STEREOSCOPIC':\r\n this._viewer.enableEffect(PANOLENS.MODES.STEREO);\r\n break;\r\n }\r\n }\r\n\r\n private init(): void {\r\n try {\r\n this.isTouch = PanoramaVisorComponent.checkTouchSupported();\r\n this._panorama = new PANOLENS.ImagePanorama(this.url);\r\n this._viewer = new PANOLENS.Viewer({container: this._container.nativeElement, controlBar: true, controlButtons: []});\r\n this._viewer.onWindowResize(this._container.nativeElement.offsetWidth, this._container.nativeElement.offsetHeight);\r\n this._viewer.add(this._panorama);\r\n } catch (e) {\r\n console.log('Failed', e);\r\n }\r\n }\r\n\r\n private toggleFullscreen(): void {\r\n const doc: any = window.document;\r\n const docEl: any = this._container.nativeElement;\r\n const requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen ||\r\n docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;\r\n const cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;\r\n if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {\r\n requestFullScreen.call(docEl);\r\n this.isFullScreen = true;\r\n } else {\r\n cancelFullScreen.call(doc);\r\n this.isFullScreen = false;\r\n }\r\n }\r\n\r\n private requestPermissions(): Observable<boolean> {\r\n const success = of(true), failed = of(false);\r\n if (typeof DeviceMotionEvent.requestPermission === 'function') {\r\n return fromPromise(DeviceOrientationEvent.requestPermission()).pipe(\r\n mergeMap((response) => {\r\n if (response === 'granted') {\r\n return fromPromise(DeviceMotionEvent.requestPermission()).pipe(\r\n map((response2) => {\r\n return response2 === 'granted';\r\n })\r\n );\r\n } else {\r\n return failed;\r\n }\r\n })\r\n );\r\n } else {\r\n return success;\r\n }\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PanoramaVisorComponent} from './panorama-visor.component';\r\nimport {LazyLoaderModule} from '@maplander/shared';\r\nimport {MatButtonModule, MatIconModule, MatMenuModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatMenuModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n LazyLoaderModule.forChild()\r\n ],\r\n declarations: [\r\n PanoramaVisorComponent\r\n ],\r\n exports: [\r\n PanoramaVisorComponent\r\n ]\r\n})\r\nexport class PanoramaVisorModule {\r\n}\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\n\r\ninterface MultimediaUploaderData {\r\n currentType: PFileTypeEnum;\r\n multimedia: PFile[];\r\n newMedia: UserMedia[];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property-multimedia-uploader',\r\n templateUrl: './multimedia-uploader.component.html',\r\n styleUrls: ['./multimedia-uploader.component.scss']\r\n})\r\nexport class MultimediaUploaderComponent implements OnInit {\r\n\r\n public fileType: 'image' | 'image360' | 'document';\r\n public images: PFile[];\r\n public images360: PFile[];\r\n public videos: PFile[];\r\n public currentIndex: number;\r\n private _newMedia: UserMedia[];\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: MultimediaUploaderData,\r\n private _dialog: MatDialogRef<MultimediaUploaderComponent, { multimedia: PFile[], newMedia: UserMedia[] }>\r\n ) {\r\n switch (this._data.currentType) {\r\n case PFileTypeEnum.IMAGE:\r\n this.fileType = 'image';\r\n this.currentIndex = 0;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.fileType = 'image360';\r\n this.currentIndex = 1;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.fileType = 'document';\r\n this.currentIndex = 2;\r\n break;\r\n }\r\n this.images = [];\r\n this.images360 = [];\r\n this.videos = [];\r\n this._newMedia = [];\r\n }\r\n\r\n private static getYouTubeID(text: string): string {\r\n if (text.indexOf('https://youtu.be/') !== -1) {\r\n text = text.replace('https://youtu.be/', '');\r\n return text;\r\n } else if (text.indexOf('https://www.youtube.com/') !== -1) {\r\n text = text.replace('https://www.youtube.com/', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('watch?v=') !== -1) {\r\n text = text.replace('watch?v=', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('&')) {\r\n const arr = text.split('&');\r\n text = arr[0];\r\n }\r\n return text;\r\n }\r\n\r\n ngOnInit() {\r\n this.parseMultimedia();\r\n }\r\n\r\n onUploadImage(ev: UserMedia | UserMedia[]): void {\r\n if (!ev) {\r\n return;\r\n }\r\n switch (this.fileType) {\r\n case 'image':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImagePFile(image);\r\n });\r\n } else {\r\n this.createImagePFile(ev);\r\n }\r\n break;\r\n case 'image360':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImage360PFile(image);\r\n });\r\n } else {\r\n this.createImage360PFile(ev);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n onTabChanged(tab: number): void {\r\n this.currentIndex = tab;\r\n switch (tab) {\r\n case 0:\r\n this.fileType = 'image';\r\n break;\r\n case 1:\r\n this.fileType = 'image360';\r\n break;\r\n }\r\n }\r\n\r\n onListChanged(ev: PFile[]): void {\r\n switch (this.currentIndex) {\r\n case 0:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images = ev;\r\n }\r\n break;\r\n case 1:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images360 = ev;\r\n }\r\n break;\r\n case 2:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.videos = ev;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n removeMedia(ev: PFile): void {\r\n let i = -1;\r\n if (!ev.id) {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n this._newMedia.forEach((item, index) => {\r\n if (item.url === ev.fileCS.thumbnail) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n } else {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n onYouTubeInputTextChanged(input: HTMLInputElement): void {\r\n if (input.value === '') {\r\n return;\r\n }\r\n const id = MultimediaUploaderComponent.getYouTubeID(input.value);\r\n if (!id) {\r\n return;\r\n }\r\n if (id.length >= 11) {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.VIDEO;\r\n file.media = true;\r\n file.name = `video_${new Date().getTime()}`;\r\n file.fileCS = {\r\n thumbnail: id,\r\n blobName: null\r\n };\r\n file.position = this.videos.length === 0 ? 0 : this.videos.length;\r\n this.videos.push(file);\r\n input.value = '';\r\n }\r\n }\r\n\r\n accept(): void {\r\n this._dialog.close({multimedia: this.joinMultimediaTypes(), newMedia: this._newMedia});\r\n }\r\n\r\n close(): void {\r\n this._dialog.close(null);\r\n }\r\n\r\n private createImagePFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.IMAGE;\r\n image.type = PFileTypeEnum.IMAGE;\r\n file.media = true;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n const fileName = `image_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.position = this.images.length === 0 ? 0 : this.images.length;\r\n this._newMedia.push(image);\r\n this.images.push(file);\r\n }\r\n\r\n private createImage360PFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.SPHERIC;\r\n image.type = PFileTypeEnum.SPHERIC;\r\n file.media = true;\r\n const fileName = `spheric_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n file.position = this.images360.length === 0 ? 0 : this.images360.length;\r\n this._newMedia.push(image);\r\n this.images360.push(file);\r\n }\r\n\r\n private parseMultimedia(): void {\r\n if (this._data) {\r\n this._data.multimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.push(item);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.push(item);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.push(item);\r\n break;\r\n }\r\n });\r\n this._newMedia = this._data.newMedia || [];\r\n }\r\n }\r\n\r\n private joinMultimediaTypes(): PFile[] {\r\n let response = [];\r\n response = response.concat(this.images);\r\n response = response.concat(this.images360);\r\n response = response.concat(this.videos);\r\n return response;\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {MultimediaUploaderComponent} from './multimedia-uploader.component';\r\n\r\n@Injectable()\r\nexport class MultimediaUploaderService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[]): MatDialogRef<MultimediaUploaderComponent> {\r\n return this._dialog.open<MultimediaUploaderComponent, {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]},\r\n {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]}>\r\n (MultimediaUploaderComponent, {\r\n data: {currentType: currentType || PFileTypeEnum.IMAGE, multimedia: multimedia || [], newMedia: newMedia || []},\r\n panelClass: 'multimedia-uploader-panel-class',\r\n disableClose: true\r\n });\r\n }\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse, DialogResponseType} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\n\r\n@Component({\r\n selector: 'lib-property-announce-confirm',\r\n templateUrl: './announce-confirm.component.html',\r\n styleUrls: ['./announce-confirm.component.scss']\r\n})\r\nexport class AnnounceConfirmComponent {\r\n\r\n public list: { name: string, value: number, checked: boolean }[];\r\n public errorField: boolean;\r\n constructor(\r\n private _dialogRef: MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>>\r\n ) {\r\n this.list = ConstantsComponents.AnnounceCheckList.map(item => ({...item}));\r\n }\r\n\r\n public close(): void {\r\n this._dialogRef.close({code: DialogResponseType.CANCEL});\r\n }\r\n\r\n public accept(): void {\r\n this.errorField = false;\r\n this.list.forEach(item => {\r\n if (!item.checked) {\r\n this.errorField = true;\r\n }\r\n });\r\n if (this.errorField) {\r\n return;\r\n }\r\n this._dialogRef.close({code: DialogResponseType.ACCEPT});\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse} from '@maplander/types';\r\nimport {AnnounceConfirmComponent} from './announce-confirm.component';\r\n\r\n@Injectable()\r\nexport class AnnounceConfirmService {\r\n\r\n constructor(private _dialog: MatDialog) {\r\n }\r\n\r\n public open():\r\n MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>> {\r\n return this._dialog.open(AnnounceConfirmComponent, {\r\n disableClose: true,\r\n panelClass: 'confirm-announce-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, Inject, OnDestroy, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum} from '@maplander/types';\r\nimport {BreakpointObserver} from '@angular/cdk/layout';\r\nimport {GalleryConfig} from './gallery.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-gallery',\r\n templateUrl: './gallery.component.html',\r\n styleUrls: ['./gallery.component.scss']\r\n})\r\nexport class GalleryComponent implements OnInit, OnDestroy {\r\n\r\n public multimedia: PFile[];\r\n public sideOpened: boolean;\r\n public typeSelected: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n public indexSelected: number;\r\n public count: {\r\n image: number,\r\n video: number,\r\n sphere: number\r\n };\r\n private _mobileVersion: boolean;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: GalleryConfig,\r\n private _ref: MatDialogRef<GalleryComponent>,\r\n private _breakpointObserver: BreakpointObserver\r\n ) {\r\n this._subscription = new Subscription();\r\n this.multimedia = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia || []);\r\n this.sideOpened = true;\r\n this.indexSelected = this._data.indexSelected;\r\n this.typeSelected = 'IMAGE';\r\n this.count = {\r\n image: 0,\r\n sphere: 0,\r\n video: 0\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._breakpointObserver.observe(['(max-width: 1024px)']).subscribe((state) => {\r\n this._mobileVersion = state.matches;\r\n })\r\n );\r\n this.assignCountByType();\r\n this.assignMultimediaByType();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n close(): void {\r\n this._ref.close();\r\n }\r\n\r\n updateSideNav(): void {\r\n this.sideOpened = !this.sideOpened;\r\n }\r\n\r\n selectPFile(index: number): void {\r\n this.indexSelected = index;\r\n if (this._mobileVersion) {\r\n this.updateSideNav();\r\n }\r\n }\r\n\r\n onIndexSelectedChange(ev: number): void {\r\n this.indexSelected = ev;\r\n }\r\n\r\n changePFileType(type: 'IMAGE' | 'VIDEO' | 'SPHERIC'): void {\r\n this.indexSelected = 0;\r\n this.typeSelected = type;\r\n const pFileType = type as PFileTypeEnum;\r\n this.multimedia = this.getPFilesByType(pFileType, this._data.multimedia);\r\n }\r\n\r\n private assignCountByType(): void {\r\n this.count.image = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia).length;\r\n this.count.video = this.getPFilesByType(PFileTypeEnum.VIDEO, this._data.multimedia).length;\r\n this.count.sphere = this.getPFilesByType(PFileTypeEnum.SPHERIC, this._data.multimedia).length;\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n if (this._data.type) {\r\n this.typeSelected = this._data.type;\r\n this.multimedia = this.getPFilesByType(this.typeSelected as PFileTypeEnum, this._data.multimedia);\r\n }\r\n }\r\n\r\n private getPFilesByType(type: PFileTypeEnum, list: PFile[]): PFile[] {\r\n return list.filter(item => {\r\n return (item.type === type);\r\n }) || [];\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile} from '@maplander/types';\r\nimport {GalleryComponent} from './gallery.component';\r\n\r\nexport interface GalleryConfig {\r\n multimedia: PFile[];\r\n indexSelected: number;\r\n type: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n}\r\n\r\n\r\n@Injectable()\r\nexport class GalleryService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(multimedia: PFile[], indexSelected?: number, type?: 'IMAGE' | 'VIDEO' | 'SPHERIC'): MatDialogRef<GalleryComponent> {\r\n return this._dialog.open<GalleryComponent, GalleryConfig>(\r\n GalleryComponent, {\r\n data: {\r\n multimedia: multimedia || [],\r\n indexSelected: indexSelected || 0,\r\n type: type || null\r\n },\r\n disableClose: true,\r\n panelClass: 'gallery_dialog'\r\n });\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_TOKEN = new InjectionToken<boolean>('PROPERTY MODULE CONFIG');\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-stats',\r\n templateUrl: './stats.component.html',\r\n styleUrls: ['./stats.component.scss']\r\n})\r\nexport class StatsComponent implements OnInit {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: LeadInfo,\r\n private _dialogRef: MatDialogRef<StatsComponent>\r\n ) {\r\n this.data = new LeadInfo(this.data || null);\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n close(): void {\r\n this._dialogRef.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog} from '@angular/material';\r\nimport {StatsComponent} from './stats.component';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class StatsService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(leadInfo: LeadInfo): void {\r\n this._dialog.open<void, LeadInfo>(StatsComponent, {\r\n data: leadInfo || null,\r\n panelClass: 'stats-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\r\nimport {\r\n Address,\r\n AppUtil,\r\n DialogResponseType,\r\n NewCompleteProperty,\r\n NewProperty,\r\n PFile,\r\n PFileTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum,\r\n UserMedia\r\n} from '@maplander/types';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {EditorComponent} from '../editor/editor.component';\r\nimport {OwnerInfoComponent} from '../owner-info/owner-info.component';\r\nimport {DocumentsComponent} from '../documents/documents.component';\r\nimport {MultimediaUploaderService} from '../multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from '../announce-confirm/announce-confirm.service';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {Utils} from '../../../../utils';\r\nimport {ShareService} from '@maplander/shared';\r\nimport {GalleryService} from '../gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from '../../token';\r\nimport {StatsService} from '../stats/stats.service';\r\n\r\nexport enum PropertyEventType {\r\n CREATE = 'CREATE',\r\n UPDATE = 'UPDATE',\r\n ANNOUNCE = 'ANNOUNCE',\r\n HIDE = 'HIDE',\r\n SHOW = 'SHOW',\r\n ADDRESS = 'ADDRESS',\r\n OFFER = 'OFFER',\r\n FAVORITE = 'FAVORITE',\r\n REQUEST_INFO = 'REQUEST_INFO',\r\n SHARE = 'SHARE',\r\n ARCHIVE = 'ARCHIVE',\r\n REAL_ESTATE_EXCHANGE = 'REAL_ESTATE_EXCHANGE',\r\n SHARE_COMMISSION = 'SHARE_COMMISSION',\r\n BROCHURE = 'BROCHURE',\r\n POSTER = 'POSTER',\r\n CLIENTS = 'CLIENTS',\r\n BACK = 'BACK',\r\n SHOW_AGENTS = 'SHOW_AGENTS',\r\n TARPS = 'TARPS'\r\n}\r\n\r\nexport interface PropertyEventChange {\r\n type: PropertyEventType;\r\n payload?: any;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property',\r\n templateUrl: './property.component.html',\r\n styleUrls: ['./property.component.scss']\r\n})\r\nexport class PropertyComponent implements OnInit, OnChanges {\r\n @Input() property: NewCompleteProperty;\r\n @Input() utils: AppUtil;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() mode: 'detail' | 'record' | 'add';\r\n @Input() sharedProperty: { isShared: boolean, ownerAvailable: boolean } = {isShared: false, ownerAvailable: true};\r\n @Input() address: Address;\r\n @Input() mlsLabel: string;\r\n @Input() disableShareCommission: boolean;\r\n @Input() isFavorite: boolean;\r\n @Input() disableConfirmAnnounce: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() userUrl: string;\r\n @Output() change: EventEmitter<PropertyEventChange>;\r\n @Output() modeChange: EventEmitter<'detail' | 'record' | 'add'>;\r\n public multimedia: PFile[];\r\n public isOPI: boolean;\r\n public currentIndex: number;\r\n public frontImageError: boolean;\r\n public currentType: PFileTypeEnum;\r\n public multimediaCount: {\r\n images: number,\r\n images360: number,\r\n videos: number\r\n };\r\n public completeProperty: NewCompleteProperty;\r\n private _allMultimedia: PFile[];\r\n private _newMedia: UserMedia[];\r\n private _editorInstance: EditorComponent;\r\n private _ownerInstance: OwnerInfoComponent;\r\n private _documentsInstance: DocumentsComponent;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_TOKEN) private _config: boolean,\r\n private _uploaderService: MultimediaUploaderService,\r\n private _announceService: AnnounceConfirmService,\r\n private _snackBar: SnackBarService,\r\n private _share: ShareService,\r\n private _gallery: GalleryService,\r\n private _documentService: DocumentVisorService,\r\n private _statsService: StatsService\r\n ) {\r\n this.initCompleteProperty();\r\n this.change = new EventEmitter<PropertyEventChange>();\r\n this.modeChange = new EventEmitter<'detail' | 'record' | 'add'>();\r\n this.disableShareCommission = false;\r\n this.disableConfirmAnnounce = false;\r\n this.currentIndex = 0;\r\n this.multimedia = [];\r\n this._allMultimedia = [];\r\n this._newMedia = [];\r\n this.multimediaCount = {\r\n images: 0,\r\n images360: 0,\r\n videos: 0\r\n };\r\n this.isOPI = this._config || false;\r\n this.currentType = PFileTypeEnum.IMAGE;\r\n }\r\n\r\n ngOnInit() {\r\n // this.agentActions('SHOW_AGENTS');\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.completeProperty = new NewCompleteProperty(changes['property'].currentValue || null);\r\n this.parseMultimedia();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n }\r\n\r\n saveData(): void {\r\n this.restoreFrontImageError();\r\n if (this._editorInstance.validateFormInvalid()) {\r\n this._snackBar.setMessage('Verifique todos los campos obligatorios', 'OK', 5000, 'left', 'bottom');\r\n return;\r\n }\r\n this.parseDataByComponents();\r\n this.change.emit({\r\n type: this.completeProperty.property.id ? PropertyEventType.UPDATE : PropertyEventType.CREATE,\r\n payload: {\r\n property: this.completeProperty,\r\n newMedia: this._newMedia\r\n }\r\n });\r\n }\r\n\r\n agentActions(type: any): void {\r\n this.change.emit({\r\n type: type as PropertyEventType,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n shareProperty(): void {\r\n this.agentActions('SHARE');\r\n this._share.open({\r\n url: this.completeProperty.property.url,\r\n urlUser: this.userUrl\r\n });\r\n }\r\n\r\n openGallery(): void {\r\n if (this._allMultimedia.length === 0) {\r\n return;\r\n }\r\n let type = null;\r\n if (this.multimedia.length > 0) {\r\n type = this.multimedia[0].type;\r\n }\r\n this._gallery.open(this._allMultimedia, this.currentIndex, type);\r\n }\r\n\r\n goToStats(): void {\r\n this._statsService.open(this.completeProperty.leadInfo || null);\r\n }\r\n\r\n goToEditProperty(): void {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n }\r\n\r\n goToBack(): void {\r\n this.restoreFrontImageError();\r\n this.change.emit({\r\n type: PropertyEventType.BACK\r\n });\r\n }\r\n\r\n goToClients(): void {\r\n this.change.emit({\r\n type: PropertyEventType.CLIENTS\r\n });\r\n }\r\n\r\n goToUpdateVisibility(): void {\r\n this.change.emit({\r\n type: this.completeProperty.property.status === StatusTypeEnum.ANNOUNCED ? PropertyEventType.HIDE : PropertyEventType.SHOW,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n goToPublish(): void {\r\n if (this.mode === 'add') {\r\n this.parseDataByComponents();\r\n }\r\n const errors = Utils.getErrorsForPublish(this.completeProperty.property);\r\n if (errors.length > 0) {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n setTimeout(() => {\r\n this.validateFrontImageOnErrors(errors);\r\n this._editorInstance.setErrorsOnFields(errors);\r\n }, 200);\r\n this._snackBar.setMessage('Complete los campos faltantes para poder publicar', 'OK', 5000, 'left', 'bottom');\r\n } else {\r\n if (this.disableConfirmAnnounce) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n return;\r\n }\r\n this._announceService.open().afterClosed().subscribe((response) => {\r\n if (response.code === DialogResponseType.ACCEPT) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n onMultimediaIndexChanged(ev: number): void {\r\n this.currentIndex = ev;\r\n }\r\n\r\n changeMultimediaType(type: string): void {\r\n this.currentType = type as PFileTypeEnum;\r\n this.assignMultimediaByType();\r\n }\r\n\r\n openUploaderMultimedia(): void {\r\n this._uploaderService.open(this.currentType, this._allMultimedia, this._newMedia).afterClosed().subscribe((response) => {\r\n if (response) {\r\n this._newMedia = response.newMedia || [];\r\n this._allMultimedia = Object.assign([], response.multimedia || []);\r\n this.assignFrontImage();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n });\r\n }\r\n\r\n onEditorInstance(ev: EditorComponent): void {\r\n this._editorInstance = ev;\r\n }\r\n\r\n onOwnerInstance(ev: OwnerInfoComponent): void {\r\n this._ownerInstance = ev;\r\n }\r\n\r\n onDocumentsInstance(ev: DocumentsComponent): void {\r\n this._documentsInstance = ev;\r\n }\r\n\r\n onSelectAddress(): void {\r\n this.change.emit({\r\n type: PropertyEventType.ADDRESS\r\n });\r\n }\r\n\r\n private restoreFrontImageError(): void {\r\n this.frontImageError = false;\r\n }\r\n\r\n private parseMultimedia(): void {\r\n this._allMultimedia = [];\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.images || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.videos || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.spherics || []);\r\n }\r\n\r\n private getMultimediaByType(type: PFileTypeEnum): PFile[] {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === type) {\r\n response.push(item);\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n private assignFrontImage(): void {\r\n const images: PFile[] = [];\r\n this._allMultimedia.forEach(multimedia => {\r\n if (multimedia.type === PFileTypeEnum.IMAGE) {\r\n images.push(multimedia);\r\n }\r\n });\r\n if (images.length > 0) {\r\n this.completeProperty.property.image = images[0].fileCS.thumbnail;\r\n this.frontImageError = false;\r\n } else {\r\n this.completeProperty.property.image = null;\r\n }\r\n this.completeProperty = new NewCompleteProperty(this.completeProperty);\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === this.currentType) {\r\n response.push(item);\r\n }\r\n });\r\n this.multimedia = Object.assign([], response);\r\n }\r\n\r\n private validateFrontImageOnErrors(errors: string[]): void {\r\n errors.forEach(error => {\r\n if (error === 'image') {\r\n this.frontImageError = true;\r\n }\r\n });\r\n }\r\n\r\n private validateMultimediaTypeCount(): void {\r\n this.multimediaCount.images = 0;\r\n this.multimediaCount.images360 = 0;\r\n this.multimediaCount.videos = 0;\r\n this._allMultimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.multimediaCount.images++;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.multimediaCount.images360++;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.multimediaCount.videos++;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private parseDataByComponents(): void {\r\n this.completeProperty.property = this._editorInstance.getProperty();\r\n this.completeProperty.property.propertyInfo.owner = this._ownerInstance.getOwner();\r\n const documentsResponse = this._documentsInstance.getDocuments();\r\n this.completeProperty.files = documentsResponse.documents;\r\n this._newMedia = this._newMedia.concat(documentsResponse.newMedia);\r\n this.completeProperty.images = this.getMultimediaByType(PFileTypeEnum.IMAGE);\r\n this.completeProperty.spherics = this.getMultimediaByType(PFileTypeEnum.SPHERIC);\r\n this.completeProperty.videos = this.getMultimediaByType(PFileTypeEnum.VIDEO);\r\n }\r\n\r\n private initCompleteProperty(): void {\r\n const complete = new NewCompleteProperty();\r\n complete.property = new NewProperty();\r\n complete.property.propertyInfo = new PropertyInfo();\r\n this.completeProperty = complete;\r\n }\r\n}\r\n","import {FormGroup} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport class PropertyEditorValidators {\r\n static validator(form: FormGroup): void {\r\n // Min price rule\r\n let control = form.get('minPrice');\r\n let condition = Number(control.value) > Number(form.get('price').value);\r\n if (condition) {\r\n control.setErrors({\r\n minPriceInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'minPriceInvalid');\r\n }\r\n // Commission rule\r\n control = form.get('commission');\r\n condition = control.value && (!form.get('price').value || Number(form.get('price').value) === 0);\r\n if (condition) {\r\n control.setErrors({\r\n commissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'commissionInvalid');\r\n }\r\n // Consumer reporting rule\r\n control = form.get('consumerReportingOption');\r\n condition = form.get('consumerReporting').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Lease transfer rule\r\n control = form.get('transferPrice');\r\n condition = form.get('transfer').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Condominium fee rule\r\n control = form.get('maintenancePrice');\r\n condition = form.get('maintenance').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule\r\n control = form.get('sharedCommission');\r\n condition = form.get('mlm').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule 2\r\n condition = form.get('mlm').value && !form.get('commission').value;\r\n control = form.get('sharedCommission');\r\n if (condition) {\r\n control.setErrors({\r\n sharedCommissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'sharedCommissionInvalid');\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, ValidatorFn, Validators} from '@angular/forms';\r\nimport {\r\n Address,\r\n Amenities,\r\n AppUtil,\r\n AreaUnitEnum,\r\n CER,\r\n Features,\r\n GeoPt,\r\n LandUseEnum,\r\n NewProperty,\r\n OfferingTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum\r\n} from '@maplander/types';\r\nimport {Subscription} from 'rxjs';\r\nimport {DialogService} from '@maplander/shared';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport * as momentImported from 'moment';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyEditorValidators} from '../../validators/property-editor-validators';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {Utils} from '../../../../utils';\r\nconst moment = momentImported;\r\n\r\nconst MY_FORMATS = {\r\n parse: {\r\n dateInput: 'L',\r\n },\r\n display: {\r\n dateInput: 'L',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'L',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n providers: [\r\n {provide: MAT_DATE_LOCALE, useValue: 'es-MX'},\r\n {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]},\r\n {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}\r\n ]\r\n})\r\nexport class EditorComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n @ViewChild('btnSubmit', {static: true, read: ElementRef}) private _btnSubmitRef: ElementRef;\r\n @Input() utils: AppUtil;\r\n @Input() address: Address;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Output() editorInstance: EventEmitter<EditorComponent>;\r\n @Output() selectAddress: EventEmitter<void>;\r\n /**\r\n * REGEX_ONLY_INTEGERS\r\n * Regex pattern to only accept integer and positive numbers\r\n * */\r\n private readonly REGEX_ONLY_INTEGERS = new RegExp(/^[0-9]\\d*$/);\r\n private readonly REGEX_MIDDLE_NUMBER = new RegExp(/^[0-9]*(\\.[5])?$/);\r\n private readonly REGEX_WEBSITE = new RegExp(/(http|https):\\/\\/(\\w+:?\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@\\-\\/]))?/);\r\n private readonly REGEX_ALPHA_NUMBER = new RegExp(/[A-Za-z0-9_]/);\r\n private readonly _subscription: Subscription;\r\n private readonly _validators: {\r\n bedrooms: ValidatorFn[],\r\n bathrooms: ValidatorFn[],\r\n parkingSpaces: ValidatorFn[],\r\n mainArea: ValidatorFn[],\r\n secondaryArea: ValidatorFn[],\r\n externalLink: ValidatorFn[],\r\n sku: ValidatorFn[]\r\n };\r\n private _property: NewProperty;\r\n private _propertyTypeItem: PropertyTypeItem;\r\n private _errorFields: string[];\r\n public propertyForm: FormGroup;\r\n public offeringTypeList: { name: string, value: OfferingTypeEnum }[];\r\n public currencyList: CER[];\r\n public roiList: number[];\r\n public landUseList: { name: string, value: LandUseEnum }[];\r\n public amenitiesList: AmenityItem[];\r\n public featuresList: AmenityItem[];\r\n public commissionList: number[];\r\n public sharedCommissionList: number[];\r\n public durationList: number[];\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder,\r\n private _dialog: DialogService,\r\n private _adapter: DateAdapter<any>\r\n ) {\r\n this.editorInstance = new EventEmitter<EditorComponent>();\r\n this.selectAddress = new EventEmitter<void>();\r\n this._subscription = new Subscription();\r\n this.offeringTypeList = ConstantsComponents.OfferingTypeList.map(doc => ({...doc}));\r\n this.landUseList = ConstantsComponents.LandUseList.map(doc => ({...doc}));\r\n this.commissionList = ConstantsComponents.CommissionList[OfferingTypeEnum.SALE];\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.durationList = Object.assign([], ConstantsComponents.DurationList);\r\n this.sharedCommissionList = Object.assign([], ConstantsComponents.SharedCommissionList);\r\n this._adapter.setLocale('es');\r\n this._errorFields = [];\r\n this._validators = {\r\n bedrooms: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n bathrooms: [Validators.pattern(this.REGEX_MIDDLE_NUMBER)],\r\n parkingSpaces: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n mainArea: [],\r\n secondaryArea: [],\r\n externalLink: [Validators.pattern(this.REGEX_WEBSITE)],\r\n sku: [Validators.pattern(this.REGEX_ALPHA_NUMBER)]\r\n };\r\n this.propertyForm = this._formBuilder.group({\r\n offering: [OfferingTypeEnum.SALE],\r\n sku: [null, this._validators.sku],\r\n consumerReporting: [],\r\n consumerReportingOption: [1],\r\n currency: ['MXN'],\r\n minPrice: [],\r\n price: [],\r\n maintenance: [],\r\n maintenancePrice: [],\r\n transfer: [],\r\n transferPrice: [],\r\n bedrooms: [null, this._validators.bedrooms],\r\n bathrooms: [null, this._validators.bathrooms],\r\n parkingSpaces: [null, this._validators.parkingSpaces],\r\n mainArea: [null, this._validators.mainArea],\r\n secondaryArea: [null, this._validators.secondaryArea],\r\n unit: [AreaUnitEnum.M2],\r\n buildIn: [],\r\n landUse: [],\r\n exclusivity: [],\r\n mlm: [],\r\n sharedCommission: [],\r\n agreementDate: [{value: null, disabled: true}],\r\n duration: [],\r\n commission: [],\r\n roi: [],\r\n description: [],\r\n externalLink: [null, this._validators.externalLink],\r\n notes: [],\r\n address: this._formBuilder.group({\r\n country: [],\r\n postalCode: [],\r\n state: [],\r\n city: [],\r\n township: [],\r\n colony: [],\r\n street: [],\r\n extNumber: [],\r\n intNumber: [],\r\n mz: [],\r\n lt: [],\r\n visible: [true],\r\n }),\r\n }, {\r\n validators: PropertyEditorValidators.validator\r\n });\r\n }\r\n\r\n private static geoPtGenerator(geoPt: GeoPt, minDistance: number, maxDistance: number): GeoPt {\r\n const EARTH_RADIUS_METERS = 6371010.0;\r\n const l = Math.random() * (maxDistance - minDistance) + minDistance;\r\n const alpha = Math.random() * Math.PI / 2;\r\n const sx = (Math.random() < 0.5) ? l * Math.cos(alpha) : -l * Math.cos(alpha);\r\n const sy = (Math.random() < 0.5) ? l * Math.sin(alpha) : -l * Math.sin(alpha);\r\n const deltaLat = sy / EARTH_RADIUS_METERS * 180 / Math.PI;\r\n const lat = geoPt.latitude + deltaLat;\r\n const deltaLong = sx / EARTH_RADIUS_METERS / Math.cos(lat * Math.PI / 180) * 180 / Math.PI;\r\n return {\r\n latitude: lat,\r\n longitude: geoPt.longitude + deltaLong\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n this.currencyList = changes['utils'].currentValue.cers;\r\n }\r\n if (changes['propertyType'] && changes['propertyType'].currentValue) {\r\n this.propertyType = changes['propertyType'].currentValue;\r\n this.searchAmenitiesByPropertyType();\r\n }\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.createProperty(changes['property'].currentValue);\r\n }\r\n if (changes['address'] && changes['address'].currentValue) {\r\n this.updateAddressForm(changes['address'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.editorInstance.emit(this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n getProperty(): NewProperty {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n this.updatePropertyByForm(this.propertyForm.getRawValue());\r\n return this._property;\r\n }\r\n\r\n validateFormInvalid(): boolean {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n return this.propertyForm.invalid;\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n amenity.checked = !amenity.checked;\r\n this._property.amenities[amenity.value] = amenity.checked;\r\n }\r\n\r\n goToSelectAddress(): void {\r\n this.selectAddress.emit();\r\n }\r\n\r\n setErrorsOnFields(errors: string[]): void {\r\n this._errorFields = errors;\r\n this.setValidatorOnFields(this._errorFields);\r\n this._btnSubmitRef.nativeElement.click();\r\n }\r\n\r\n private updateAddressForm(address: Address): void {\r\n this.propertyForm.patchValue({\r\n address: {\r\n country: address.country,\r\n state: address.state,\r\n city: address.city,\r\n township: address.township,\r\n colony: address.colony,\r\n street: address.street,\r\n postalCode: address.postalCode,\r\n extNumber: address.outdoorNumber\r\n }\r\n });\r\n }\r\n\r\n private assignAmenities(): void {\r\n this.amenitiesList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignLocationFeatures(): void {\r\n this.featuresList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignCommission(): void {\r\n this.commissionList = ConstantsComponents.CommissionList[this._property.offering];\r\n }\r\n\r\n private assignBusinessRules(): void {\r\n switch (this.propertyType) {\r\n case PropertyTypeEnum.ROOM:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.RENT\r\n });\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.SALE\r\n });\r\n break;\r\n }\r\n if (this._property.status === StatusTypeEnum.ANNOUNCED) {\r\n const errors = Utils.listErrorsByPropertyTypeForPublish(this._property.type);\r\n this.setValidatorOnFields(errors);\r\n }\r\n }\r\n\r\n private updateFormByProperty(): void {\r\n this.propertyForm.patchValue({\r\n offering: this._property.offering,\r\n sku: this._property.sku,\r\n consumerReporting: this._property.propertyInfo.consumerReporting && this._property.propertyInfo.consumerReporting !== 0,\r\n consumerReportingOption: this._property.propertyInfo.consumerReporting,\r\n currency: this._property.currency,\r\n minPrice: this._property.propertyInfo.lowestPrice,\r\n price: this._property.price,\r\n maintenance: this._property.features.condominiumFeePrice && this._property.features.condominiumFeePrice !== 0,\r\n maintenancePrice: this._property.features.condominiumFeePrice,\r\n transfer: this._property.propertyInfo.leaseTransferPrice && this._property.propertyInfo.leaseTransferPrice !== 0,\r\n transferPrice: this._property.propertyInfo.leaseTransferPrice,\r\n bedrooms: this._property.features.bedrooms,\r\n bathrooms: this._property.features.bathrooms,\r\n parkingSpaces: this._property.features.parkingSpaces,\r\n mainArea: this._property.features.mainArea,\r\n secondaryArea: this._property.features.secondaryArea,\r\n unit: this._property.features.areaUnit,\r\n buildIn: this._property.features.builtIn ? new Date(this._property.features.builtIn, 1, 1) : null,\r\n landUse: this._property.features.landUse,\r\n exclusivity: this._property.propertyInfo.exclusivity,\r\n mlm: this._property.propertyInfo.mls,\r\n sharedCommission: this._property.propertyInfo.sharedCommission,\r\n agreementDate: this._property.propertyInfo.listingAgreementStartDate ?\r\n moment(new MDate(this._property.propertyInfo.listingAgreementStartDate).toDate()) : null,\r\n duration: this._property.propertyInfo.listingAgreementTime,\r\n commission: this._property.propertyInfo.commission,\r\n roi: this._property.features.roi,\r\n description: this._property.description,\r\n externalLink: this._property.externalLink,\r\n notes: this._property.propertyInfo.notes,\r\n address: {\r\n country: this._property.address.country,\r\n state: this._property.address.state,\r\n city: this._property.address.city,\r\n township: this._property.address.township,\r\n colony: this._property.address.colony,\r\n postalCode: this._property.address.postalCode,\r\n street: this._property.address.street,\r\n extNumber: this._property.address.outdoorNumber,\r\n intNumber: this._property.address.interiorNumber,\r\n mz: this._property.address.mz,\r\n lt: this._property.address.lt,\r\n visible: this._property.address.visible || false,\r\n }\r\n });\r\n }\r\n\r\n private updatePropertyByForm(data: any): void {\r\n this._property.type = this.propertyType;\r\n this._property.offering = data.offering;\r\n this._property.sku = data.sku;\r\n this._property.propertyInfo.consumerReporting = data.consumerReporting ? data.consumerReportingOption : null;\r\n this._property.currency = data.currency;\r\n this._property.propertyInfo.lowestPrice = data.minPrice ? Number(data.minPrice) : null;\r\n this._property.price = data.price ? Number(data.price) : null;\r\n this._property.features.condominiumFeePrice = data.maintenance ? Number(data.maintenancePrice) : null;\r\n this._property.propertyInfo.leaseTransferPrice = data.transfer ? Number(data.transferPrice) : null;\r\n this._property.features.bedrooms = data.bedrooms ? Number(data.bedrooms) : null;\r\n this._property.features.bathrooms = data.bathrooms ? Number(data.bathrooms) : null;\r\n this._property.features.parkingSpaces = data.parkingSpaces ? Number(data.parkingSpaces) : null;\r\n this._property.features.mainArea = data.mainArea ? Number(data.mainArea) : null;\r\n this._property.features.secondaryArea = data.secondaryArea ? Number(data.secondaryArea) : null;\r\n this._property.features.areaUnit = data.unit;\r\n this._property.features.builtIn = data.buildIn ? data.buildIn.getFullYear() : null;\r\n this._property.features.landUse = data.landUse;\r\n this._property.propertyInfo.exclusivity = data.exclusivity;\r\n this._property.propertyInfo.mls = data.mlm;\r\n this._property.propertyInfo.sharedCommission = data.mlm ? Number(data.sharedCommission) : null;\r\n this._property.propertyInfo.listingAgreementStartDate =\r\n data.agreementDate ? MDate.getTimestamp(data.agreementDate.toDate()) : null;\r\n this._property.propertyInfo.listingAgreementTime = data.duration;\r\n this._property.propertyInfo.commission = data.commission;\r\n this._property.features.roi = data.roi;\r\n this._property.description = data.description;\r\n this._property.externalLink = data.externalLink;\r\n this._property.propertyInfo.notes = data.notes;\r\n this._property.address.country = data.address.country;\r\n this._property.address.state = data.address.state;\r\n this._property.address.city = data.address.city;\r\n this._property.address.township = data.address.township;\r\n this._property.address.colony = data.address.colony;\r\n this._property.address.postalCode = data.address.postalCode;\r\n this._property.address.street = data.address.street;\r\n this._property.address.outdoorNumber = data.address.extNumber;\r\n this._property.address.interiorNumber = data.address.intNumber;\r\n this._property.address.mz = data.address.mz;\r\n this._property.address.lt = data.address.lt;\r\n this._property.address.location = this.address.location;\r\n this._property.address.publicLocation = !data.address.visible ?\r\n EditorComponent.geoPtGenerator(this.address.location, 200, 400) : this.address.location;\r\n this._property.address.visible = data.address.visible;\r\n }\r\n\r\n private searchAmenitiesByPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === this.propertyType) {\r\n this._propertyTypeItem = type;\r\n this.amenitiesList = type.amenities.map(item => ({...item}));\r\n this.featuresList = type.features.map(item => ({...item}));\r\n }\r\n });\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.propertyForm.controls['offering'].valueChanges.subscribe((value) => {\r\n this.commissionList = ConstantsComponents.CommissionList[value];\r\n this.propertyForm.patchValue({\r\n minPrice: null,\r\n maxPrice: null\r\n });\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['price'].valueChanges.subscribe((value) => {\r\n if (value && Number(value) === 0) {\r\n this.propertyForm.patchValue({\r\n minPrice: null\r\n });\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['mlm'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['sharedCommission'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['maintenance'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['maintenancePrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['transfer'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['transferPrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['consumerReporting'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['consumerReportingOption'].setValue(1);\r\n })\r\n );\r\n }\r\n\r\n private createProperty(property?: NewProperty): void {\r\n this._property = new NewProperty(property || null);\r\n this._property.type = this.propertyType;\r\n this._property.propertyInfo = new PropertyInfo(property ? property.propertyInfo : null);\r\n this._property.features = new Features(property ? property.features : null);\r\n this._property.address = new Address(property ? property.address : null);\r\n this._property.amenities = new Amenities(property ? property.amenities : null);\r\n this.assignBusinessRules();\r\n if (property && property.id) {\r\n this.updateFormByProperty();\r\n this.assignAmenities();\r\n this.assignLocationFeatures();\r\n this.assignCommission();\r\n }\r\n }\r\n\r\n private setValidatorOnFields(errors: string[], remove?: boolean): void {\r\n if (errors.length === 0) {\r\n return;\r\n }\r\n errors.forEach(error => {\r\n if (!this.propertyForm.controls[error]) {\r\n return;\r\n }\r\n if (remove) {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(this._validators[error] ? this._validators[error] : []);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n } else {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(\r\n this._validators[error] ? this._validators[error].concat(Validators.required) : [Validators.required]);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import {AbstractControl, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport function phoneFieldsValidator(controlName: string): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: boolean } | null => {\r\n if (control.parent) {\r\n const peerControl = control.parent.controls[controlName] as AbstractControl;\r\n if (!control.value && !peerControl.value) {\r\n removeError(peerControl, 'phoneFieldsError');\r\n return null;\r\n }\r\n if (control.value !== '' && (!peerControl.value || peerControl.value === '')) {\r\n peerControl.setErrors({\r\n phoneFieldsError: true\r\n });\r\n }\r\n if ((peerControl.value && peerControl.value !== '') && (!control.value || control.value === '')) {\r\n return {\r\n phoneFieldsError: true\r\n };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {CountryCode, Owner} from '@maplander/types';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {phoneFieldsValidator} from '../../validators/phone-fields-validator';\r\n\r\n@Component({\r\n selector: 'lib-property-owner-info',\r\n templateUrl: './owner-info.component.html',\r\n styleUrls: ['./owner-info.component.scss']\r\n})\r\nexport class OwnerInfoComponent implements OnChanges, AfterViewInit {\r\n @Input() owner: Owner;\r\n @Input() disabled: boolean;\r\n @Output() ownerInstance: EventEmitter<OwnerInfoComponent>;\r\n public ownerForm: FormGroup;\r\n private _owner: Owner;\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder\r\n ) {\r\n this.ownerInstance = new EventEmitter<OwnerInfoComponent>();\r\n this.ownerForm = this._formBuilder.group({\r\n name: [],\r\n lastName: [],\r\n email: ['', [Validators.email]],\r\n code: ['', [phoneFieldsValidator('phone')]],\r\n phone: ['', [\r\n phoneFieldsValidator('code'),\r\n Validators.maxLength(13),\r\n Validators.minLength(8),\r\n Validators.pattern(new RegExp(/^[0-9]\\d*$/))]\r\n ],\r\n address: []\r\n });\r\n this.createOwner();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['disabled']) {\r\n this.ownerForm.disable();\r\n }\r\n if (changes['owner'] && changes['owner'].currentValue) {\r\n this.createOwner(changes['owner'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.ownerInstance.emit(this);\r\n }\r\n\r\n onCodePhoneChanged(ev: CountryCode): void {\r\n this.ownerForm.controls['code'].setValue(ev ? ev.code : '');\r\n }\r\n\r\n getOwner(): Owner {\r\n this.updateOwnerByForm(this.ownerForm.value);\r\n return this._owner;\r\n }\r\n\r\n private updateOwnerByForm(data: any): void {\r\n this._owner.name = data.name;\r\n this._owner.lastName = data.lastName;\r\n this._owner.email = data.email;\r\n this._owner.phone = data.phone;\r\n this._owner.codePhone = data.code ? data.code.replace('+', '') : '';\r\n this._owner.address = data.address;\r\n }\r\n\r\n private updateFormByOwner(): void {\r\n this.ownerForm.patchValue({\r\n name: this._owner.name,\r\n lastName: this._owner.lastName,\r\n email: this._owner.email,\r\n phone: this._owner.phone,\r\n code: (this._owner.codePhone) ? `+${this._owner.codePhone}` : '',\r\n address: this._owner.address,\r\n });\r\n }\r\n\r\n private createOwner(owner?: Owner): void {\r\n this._owner = new Owner(owner || null);\r\n if (owner) {\r\n this.updateFormByOwner();\r\n }\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {Observable} from 'rxjs';\r\nimport {map} from 'rxjs/operators';\r\nimport {HttpClient} from '@angular/common/http';\r\n\r\n@Component({\r\n selector: 'lib-property-documents',\r\n templateUrl: './documents.component.html',\r\n styleUrls: ['./documents.component.scss']\r\n})\r\nexport class DocumentsComponent implements AfterViewInit, OnChanges {\r\n @Input() files: PFile[];\r\n @Input() disabled: boolean;\r\n @Output() documentsInstance: EventEmitter<DocumentsComponent>;\r\n public documents: { name: string, value: PFileTypeEnum, loaded: boolean }[];\r\n private _files: PFile[];\r\n private readonly _newMedia: UserMedia[];\r\n\r\n constructor(\r\n private _visor: DocumentVisorService,\r\n private _snackBar: SnackBarService,\r\n private _http: HttpClient\r\n ) {\r\n this.documentsInstance = new EventEmitter<DocumentsComponent>();\r\n this.documents = ConstantsComponents.DocumentsList.map(doc => ({...doc}));\r\n this._newMedia = [];\r\n this._files = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.documentsInstance.emit(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['files'] && changes['files'].currentValue) {\r\n this._files = changes['files'].currentValue || [];\r\n this.validateDocumentsLoaded();\r\n }\r\n }\r\n\r\n getDocuments(): { documents: PFile[], newMedia: UserMedia[] } {\r\n return {documents: this._files, newMedia: this._newMedia};\r\n }\r\n\r\n openFile(type: PFileTypeEnum): void {\r\n const doc = this.getPFileByType(type);\r\n const media = this.getUserMediaByType(type);\r\n if (media) {\r\n this._visor.open(media.url);\r\n return;\r\n }\r\n if (doc) {\r\n this.openBlobFile(doc.fileCS.thumbnail);\r\n return;\r\n }\r\n if (!doc && !media) {\r\n this._snackBar.setMessage('Este documento no ha sido añadido', 'OK', 2500, 'left');\r\n }\r\n }\r\n\r\n onUploadFile(ev: UserMedia, doc: { name: string, value: PFileTypeEnum, loaded: boolean }): void {\r\n const name = doc.value.toString().toLowerCase();\r\n if (doc.loaded) {\r\n this.updateDocument(name);\r\n }\r\n doc.loaded = true;\r\n const file = new PFile();\r\n file.type = doc.value;\r\n ev.type = doc.value;\r\n file.media = false;\r\n const fileName = `${name}_${new Date().getTime()}.pdf`;\r\n file.name = fileName;\r\n ev.name = fileName;\r\n file.fileCS = {\r\n thumbnail: ev.url,\r\n blobName: null\r\n };\r\n this._files.push(file);\r\n this._newMedia.push(ev);\r\n }\r\n\r\n private openBlobFile(url: string): void {\r\n this.downloadFile(url)\r\n .subscribe((response) => {\r\n this._visor.open(response);\r\n });\r\n }\r\n\r\n private updateDocument(name: string): void {\r\n let i = -1, file: PFile = null;\r\n this._files.forEach((item, index) => {\r\n if (item.name === name) {\r\n file = item;\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._files.splice(i, 1);\r\n }\r\n if (file) {\r\n i = -1;\r\n this._newMedia.forEach((item, index) => {\r\n if (item.name === file.name) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n private validateDocumentsLoaded(): void {\r\n if (!this._files || this._files.length === 0) {\r\n return;\r\n }\r\n this._files.forEach((file) => this.documents.forEach(doc => {\r\n if (doc.value === file.type) {\r\n doc.loaded = true;\r\n }\r\n }));\r\n }\r\n\r\n private getPFileByType(type: PFileTypeEnum): PFile {\r\n let result = null;\r\n if (!this.files || this.files.length === 0) {\r\n return result;\r\n }\r\n this.files.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private getUserMediaByType(type: PFileTypeEnum): UserMedia {\r\n let result = null;\r\n if (!this._newMedia || this._newMedia.length === 0) {\r\n return result;\r\n }\r\n this._newMedia.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private downloadFile(url: string): Observable<string> {\r\n return this._http.get(url, {\r\n responseType: 'arraybuffer'\r\n }).pipe(map((payload) => {\r\n const blob = new Blob([payload], {\r\n type: 'application/pdf'\r\n });\r\n return URL.createObjectURL(blob);\r\n }));\r\n }\r\n}\r\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport {NewProperty} from '@maplander/types';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n selector: 'lib-property-details',\r\n templateUrl: './details.component.html',\r\n styleUrls: ['./details.component.scss']\r\n})\r\nexport class DetailsComponent implements OnInit, OnChanges {\r\n @Input() record: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Input() visibleTour: boolean;\r\n public amenities: AmenityItem[];\r\n public features: AmenityItem[];\r\n public propertyType: PropertyTypeItem;\r\n public agreementEndDate: number;\r\n\r\n constructor(\r\n private _sanitizer: DomSanitizer\r\n ) {\r\n this.amenities = [];\r\n this.features = [];\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.property = changes['property'].currentValue;\r\n this.searchPropertyType();\r\n this.createAmenities();\r\n this.createFeatures();\r\n this.validateAgreement();\r\n }\r\n }\r\n\r\n getTourUrl(): SafeResourceUrl {\r\n return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink);\r\n }\r\n\r\n private validateAgreement(): void {\r\n if (this.property.propertyInfo.listingAgreementStartDate && this.property.propertyInfo.listingAgreementTime) {\r\n const startDate = new MDate(this.property.propertyInfo.listingAgreementStartDate).toDate();\r\n startDate.setDate(startDate.getDate() + this.property.propertyInfo.listingAgreementTime);\r\n this.agreementEndDate = MDate.getTimestamp(startDate);\r\n }\r\n }\r\n\r\n private searchPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (this.property.type === type.value) {\r\n this.propertyType = type;\r\n }\r\n });\r\n }\r\n\r\n private createAmenities(): void {\r\n this.amenities = [];\r\n let amenities: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n amenities = type.amenities;\r\n }\r\n });\r\n if (amenities.length > 0) {\r\n amenities.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.amenities.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private createFeatures(): void {\r\n this.features = [];\r\n let features: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n features = type.features;\r\n }\r\n });\r\n if (features.length > 0) {\r\n features.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.features.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component, ContentChild,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n SimpleChanges, TemplateRef,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {PFile} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-property-slide-show',\r\n templateUrl: './slide-show.component.html',\r\n styleUrls: ['./slide-show.component.scss']\r\n})\r\nexport class SlideShowComponent implements OnChanges, AfterViewInit {\r\n\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() customActions: TemplateRef<any>;\r\n @ViewChild('slider', {static: true}) private _slider: ElementRef;\r\n @Input() multimedia: PFile[];\r\n @Input() selectIndex: number;\r\n @Input() initialIndex: number;\r\n @Output() currentIndex: EventEmitter<number>;\r\n public count: number;\r\n public index: number;\r\n\r\n constructor(\r\n private _render: Renderer2\r\n ) {\r\n this.currentIndex = new EventEmitter<number>();\r\n this.index = this.initialIndex || 0;\r\n this.multimedia = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.currentIndex.emit(this.index);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectIndex'] && (changes['selectIndex'].currentValue !== undefined && changes['selectIndex'].currentValue !== null)) {\r\n this.moveImageByIndex(changes['selectIndex'].currentValue);\r\n }\r\n if (changes['multimedia'] && changes['multimedia'].currentValue) {\r\n this.multimedia = changes['multimedia'].currentValue || [];\r\n if (this.multimedia.length > 0) {\r\n this.count = this.multimedia.length;\r\n this.moveImageByIndex(this.initialIndex || 0);\r\n this.validateHTTPS();\r\n }\r\n }\r\n }\r\n\r\n moveImage(next?: boolean): void {\r\n this.index = next ? this.index + 1 : this.index - 1;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n moveImageByIndex(index: number): void {\r\n this.index = index;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n private validateHTTPS(): void {\r\n this.multimedia.forEach(item => {\r\n if (item.fileCS.thumbnail.indexOf('https') === -1) {\r\n item.fileCS.thumbnail = item.fileCS.thumbnail.replace('http', 'https');\r\n }\r\n });\r\n }\r\n}\r\n","import {NativeDateAdapter} from '@angular/material/core';\r\n\r\nexport class CustomDateAdapter extends NativeDateAdapter {\r\n format(date: Date, displayFormat: Object): string {\r\n return date.getFullYear().toString();\r\n }\r\n}\r\n","import {ChangeDetectorRef, Component, Inject, OnDestroy} from '@angular/core';\r\nimport {MatCalendar} from '@angular/material/datepicker';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {Subject} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker-header',\r\n templateUrl: './custom-datepicker-header.component.html',\r\n styleUrls: ['./custom-datepicker-header.component.scss']\r\n})\r\nexport class CustomDatepickerHeaderComponent<D> implements OnDestroy {\r\n\r\n private _destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private _calendar: MatCalendar<D>, private _dateAdapter: DateAdapter<D>,\r\n @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats, cdr: ChangeDetectorRef) {\r\n _calendar.stateChanges\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => cdr.markForCheck());\r\n }\r\n\r\n ngOnDestroy() {\r\n this._destroyed.next();\r\n this._destroyed.complete();\r\n }\r\n\r\n get periodLabel(): string {\r\n const currentDate = this._dateAdapter\r\n .format(this._calendar.activeDate, 'YYYY');\r\n return `${Number(currentDate) - 23} - ${currentDate}`;\r\n }\r\n\r\n previousClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, -23);\r\n }\r\n\r\n nextClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, 23);\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, forwardRef, Injector} from '@angular/core';\r\nimport {MatDatepicker} from '@angular/material/datepicker';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\nimport {CustomDateAdapter} from '../date-adapter';\r\nimport {CustomDatepickerHeaderComponent} from '../custom-datepicker-header/custom-datepicker-header.component';\r\n\r\nconst MY_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'LL'\r\n },\r\n display: {\r\n dateInput: 'YYYY',\r\n monthYearLabel: 'YYYY',\r\n dateA11yLabel: 'YYYY',\r\n monthYearA11yLabel: 'YYYY'\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker',\r\n templateUrl: './custom-datepicker.component.html',\r\n styleUrls: ['./custom-datepicker.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomDatepickerComponent),\r\n multi: true\r\n },\r\n {\r\n provide: MAT_DATE_FORMATS,\r\n useValue: MY_DATE_FORMATS\r\n },\r\n {\r\n provide: DateAdapter,\r\n useClass: CustomDateAdapter\r\n }\r\n ]\r\n})\r\nexport class CustomDatepickerComponent implements ControlValueAccessor, AfterViewInit {\r\n\r\n public currentYear: Date;\r\n public year: string;\r\n public customHeader = CustomDatepickerHeaderComponent;\r\n private _control: NgControl;\r\n\r\n constructor(\r\n private _injector: Injector\r\n ) {\r\n this.currentYear = new Date();\r\n this.year = '';\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._control = this._injector.get(NgControl);\r\n this._control.valueAccessor = this;\r\n }\r\n\r\n onYearSelected(ev: any, datepicker: MatDatepicker<Date>) {\r\n datepicker.close();\r\n this.year = ev;\r\n this._control.control.patchValue(ev);\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (value !== undefined) {\r\n this.year = value;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CustomDatepickerComponent } from './custom-datepicker/custom-datepicker.component';\r\nimport {CustomDatepickerHeaderComponent} from './custom-datepicker-header/custom-datepicker-header.component';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\n\r\nconst MATERIAL = [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatDatepickerModule,\r\n MatButtonModule,\r\n MatIconModule\r\n];\r\n\r\nconst COMPONENTS = [\r\n CustomDatepickerComponent,\r\n CustomDatepickerHeaderComponent\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL\r\n ],\r\n declarations: [\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n CustomDatepickerHeaderComponent\r\n ],\r\n exports: [\r\n CustomDatepickerComponent\r\n ]\r\n})\r\nexport class CustomDatepickerModule { }\r\n","import {AfterViewInit, Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild} from '@angular/core';\r\nimport {CdkDrag, CdkDragMove, CdkDropList, CdkDropListGroup, moveItemInArray} from '@angular/cdk/drag-drop';\r\nimport {ViewportRuler} from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: 'lib-custom-drag-and-drop',\r\n templateUrl: './custom-drag-and-drop.component.html',\r\n styleUrls: ['./custom-drag-and-drop.component.scss']\r\n})\r\nexport class CustomDragAndDropComponent implements OnInit, AfterViewInit {\r\n @ViewChild(CdkDropListGroup, {static: true}) listGroup: CdkDropListGroup<CdkDropList>;\r\n @ViewChild(CdkDropList, {static: true}) placeholder: CdkDropList;\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() content: TemplateRef<any>;\r\n @Input() items: any[];\r\n @Output() itemsChanged: EventEmitter<any[]>;\r\n public target: CdkDropList;\r\n public targetIndex: number;\r\n public source: CdkDropList;\r\n public sourceIndex: number;\r\n public activeContainer;\r\n public dropListEnterPredicate: Function;\r\n\r\n constructor(private _viewportRuler: ViewportRuler) {\r\n this.itemsChanged = new EventEmitter<any[]>();\r\n this.target = null;\r\n this.source = null;\r\n this.dropListEnterPredicate = (drag: CdkDrag, drop: CdkDropList) => {\r\n if (drop === this.placeholder) {\r\n return true;\r\n }\r\n if (drop !== this.activeContainer) {\r\n return false;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const sourceElement = drag.dropContainer.element.nativeElement;\r\n const dropElement = drop.element.nativeElement;\r\n const dragIndex = __indexOf(dropElement.parentElement.children, (this.source ? phElement : sourceElement));\r\n const dropIndex = __indexOf(dropElement.parentElement.children, dropElement);\r\n if (!this.source) {\r\n this.sourceIndex = dragIndex;\r\n this.source = drag.dropContainer;\r\n phElement.style.width = sourceElement.clientWidth + 'px';\r\n phElement.style.height = sourceElement.clientHeight + 'px';\r\n sourceElement.parentElement.removeChild(sourceElement);\r\n }\r\n this.targetIndex = dropIndex;\r\n this.target = drop;\r\n phElement.style.display = '';\r\n dropElement.parentElement.insertBefore(phElement, (dropIndex > dragIndex\r\n ? dropElement.nextSibling : dropElement));\r\n this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);\r\n return false;\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const phElement = this.placeholder.element.nativeElement;\r\n phElement.style.display = 'none';\r\n phElement.parentElement.removeChild(phElement);\r\n }\r\n\r\n dragMoved(e: CdkDragMove) {\r\n const point = this.getPointerPositionOnPage(e.event);\r\n this.listGroup._items.forEach(dropList => {\r\n if (__isInsideDropListClientRect(dropList, point.x, point.y)) {\r\n this.activeContainer = dropList;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n dropListDropped(): void {\r\n if (!this.target) {\r\n return;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const parent = phElement.parentElement;\r\n phElement.style.display = 'none';\r\n parent.removeChild(phElement);\r\n parent.appendChild(phElement);\r\n parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);\r\n this.target = null;\r\n this.source = null;\r\n if (this.sourceIndex !== this.targetIndex) {\r\n moveItemInArray(this.items, this.sourceIndex, this.targetIndex);\r\n this.itemsChanged.emit(this.items);\r\n }\r\n }\r\n\r\n /** Determines the point of the page that was touched by the user. */\r\n getPointerPositionOnPage(event: MouseEvent | TouchEvent): any {\r\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\r\n const point = __isTouchEvent(event) ? (event.touches[0] || event.changedTouches[0]) : event;\r\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\r\n return {\r\n x: point.pageX - scrollPosition.left,\r\n y: point.pageY - scrollPosition.top\r\n };\r\n }\r\n}\r\n\r\nfunction __indexOf(collection, node) {\r\n return Array.prototype.indexOf.call(collection, node);\r\n}\r\n\r\n/** Determines whether an event is a touch event. */\r\nfunction __isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\r\n return event.type.startsWith('touch');\r\n}\r\n\r\nfunction __isInsideDropListClientRect(dropList: CdkDropList, x: number, y: number) {\r\n const {top, bottom, left, right} = dropList.element.nativeElement.getBoundingClientRect();\r\n return y >= top && y <= bottom && x >= left && x <= right;\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {EditorComponent} from './components/editor/editor.component';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {OwnerInfoComponent} from './components/owner-info/owner-info.component';\r\nimport {DocumentsComponent} from './components/documents/documents.component';\r\nimport {\r\n CountryCodeModule,\r\n DialogModule,\r\n LocationModule,\r\n SafeUrlModule, ShareModule,\r\n StringManipulationModule,\r\n UploadFileModule\r\n} from '@maplander/shared';\r\nimport {SnackBarModule} from '@maplander/core';\r\nimport {PropertyComponent} from './components/property/property.component';\r\nimport {DetailsComponent} from './components/details/details.component';\r\nimport {SlideShowComponent} from './components/slideshow/slide-show.component';\r\nimport {MultimediaUploaderComponent} from './components/multimedia-uploader/multimedia-uploader.component';\r\nimport {AnnounceConfirmComponent} from './components/announce-confirm/announce-confirm.component';\r\nimport {MultimediaUploaderService} from './components/multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from './components/announce-confirm/announce-confirm.service';\r\nimport {CustomDatepickerModule} from './components/editor/components/custom-datepicker/custom-datepicker.module';\r\nimport {DocumentVisorModule} from '../document-visor/document-visor.module';\r\nimport {PanoramaVisorModule} from '../panorama-visor/panorama-visor.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from '../../pipes/property-type/property-type.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatCheckboxModule} from '@angular/material/checkbox';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatRadioModule} from '@angular/material/radio';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatSidenavModule} from '@angular/material/sidenav';\r\nimport {MatTabsModule} from '@angular/material/tabs';\r\nimport {MatToolbarModule} from '@angular/material/toolbar';\r\nimport {MatNativeDateModule, MatRippleModule} from '@angular/material/core';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {EcoFabSpeedDialModule} from '@ecodev/fab-speed-dial';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\nimport {DragDropModule} from '@angular/cdk/drag-drop';\r\nimport { CustomDragAndDropComponent } from './components/custom-drag-and-drop/custom-drag-and-drop.component';\r\nimport {GalleryComponent} from './components/gallery/gallery.component';\r\nimport {GalleryService} from './components/gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from './token';\r\nimport { StatsComponent } from './components/stats/stats.component';\r\nimport {StatsService} from './components/stats/stats.service';\r\n\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatIconModule,\r\n MatButtonToggleModule,\r\n MatRadioModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatTabsModule,\r\n MatDatepickerModule,\r\n MatTooltipModule,\r\n MatRippleModule,\r\n MatNativeDateModule,\r\n DragDropModule\r\n];\r\n\r\nconst PAGES = [\r\n PropertyComponent\r\n];\r\n\r\nconst COMPONENTS = [\r\n DetailsComponent,\r\n EditorComponent,\r\n OwnerInfoComponent,\r\n SlideShowComponent,\r\n DocumentsComponent,\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n CustomDragAndDropComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n MultimediaUploaderService,\r\n AnnounceConfirmService,\r\n CurrencyPipe,\r\n GalleryService,\r\n StatsService\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL,\r\n EcoFabSpeedDialModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n UploadFileModule,\r\n DocumentVisorModule.forChild(),\r\n OfferingTypeModule.forChild(),\r\n PropertyTypeModule.forChild(),\r\n SafeUrlModule.forChild(),\r\n StringManipulationModule.forChild(),\r\n FormatDateModule.forChild(),\r\n FormatPriceModule.forChild(),\r\n ShareModule.forChild(),\r\n PanoramaVisorModule,\r\n CountryCodeModule,\r\n LocationModule,\r\n DialogModule,\r\n CustomDatepickerModule,\r\n SnackBarModule.forRoot()\r\n ],\r\n declarations: [\r\n PAGES,\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n ENTRY_COMPONENTS\r\n ],\r\n exports: [\r\n PropertyComponent\r\n ],\r\n providers: [\r\n PROVIDERS\r\n ]\r\n})\r\nexport class PropertyModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_CARD_CONFIG_MODULE = new InjectionToken<boolean>('PROPERTY CARD CONFIG MODULE');\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, Optional, Output, SimpleChanges, OnInit} from '@angular/core';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\n\r\n@Component({\r\n selector: 'lib-property-card',\r\n templateUrl: './property-card.component.html',\r\n styleUrls: ['./property-card.component.scss']\r\n})\r\nexport class PropertyCardComponent implements OnChanges, OnInit {\r\n @Input() marker: Marker;\r\n @Input() href: string;\r\n @Input() target: string;\r\n @Input() queryParams: {\r\n [k: string]: any;\r\n };\r\n @Input() state: {\r\n [k: string]: any;\r\n };\r\n @Input() showAlert: boolean;\r\n @Input() positionLatLng: any;\r\n @Input() isFavorite: boolean;\r\n @Input() currency: string;\r\n @Input() showDiscard: boolean;\r\n @Input() mode: 'full' | 'summary' = 'full';\r\n @Output() markerChanged: EventEmitter<Marker>;\r\n @Output() favoriteChanged: EventEmitter<string>;\r\n @Output() propertyDiscarded: EventEmitter<string>;\r\n public info: PropertyCardInfo;\r\n public distance: any;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_CARD_CONFIG_MODULE) public isOPI: boolean,\r\n ) {\r\n this.currency = null;\r\n this.markerChanged = new EventEmitter<Marker>();\r\n this.favoriteChanged = new EventEmitter<string>();\r\n this.propertyDiscarded = new EventEmitter<string>();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.positionLatLng) {\r\n this.latLng(this.positionLatLng.latitude, this.positionLatLng.longitude);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n this.currency = changes['currency'].currentValue !== 'MXN' ? changes['currency'].currentValue : null;\r\n }\r\n if (changes['marker'] && changes['marker'].currentValue) {\r\n this.info = changes['marker'].currentValue.info;\r\n }\r\n }\r\n\r\n onFrontImageOver(): void {\r\n this.marker.hover = true;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n onFrontImageLeave(): void {\r\n this.marker.hover = false;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n favorite(): void {\r\n this.favoriteChanged.emit(this.info.propertyId);\r\n }\r\n\r\n discard(): void {\r\n this.propertyDiscarded.emit(this.info.propertyId);\r\n }\r\n\r\n private deg2rad(deg): any {\r\n return deg * (Math.PI / 180 );\r\n }\r\n\r\n private latLng(lat: any, lng: any): void {\r\n const lat1 = lat;\r\n const lon1 = lng;\r\n const lat2 = this.marker.location.latitude;\r\n const lon2 = this.marker.location.longitude;\r\n const R = 6371; // Radius of the earth in km\r\n const dLat = this.deg2rad(lat2 - lat1 ); // deg2rad below\r\n const dLon = this.deg2rad(lon2 - lon1 );\r\n const a =\r\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2)\r\n ;\r\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n let d = R * c; // Distance in km\r\n if (Math.trunc(d) < 1) {\r\n d = d * 1000;\r\n d = Math.trunc(d);\r\n if (d < 10) {\r\n this.distance = 10 + ' m de su búsqueda';\r\n } else {\r\n d = d - (d % 10);\r\n this.distance = d + ' m de su búsqueda';\r\n }\r\n } else {\r\n this.distance = d.toFixed(2) + ' km de su búsqueda';\r\n }\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {PropertyCardComponent} from './property-card.component';\r\nimport {RouterModule} from '@angular/router';\r\nimport {OfferingTypeModule} from './../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from './../../pipes/property-type/property-type.module';\r\nimport {ImageErrorModule} from './../../directives/image-error/image-error.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n PropertyTypeModule,\r\n OfferingTypeModule,\r\n ImageErrorModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n FormatDateModule\r\n ],\r\n declarations: [\r\n PropertyCardComponent\r\n ],\r\n exports: [\r\n PropertyCardComponent\r\n ]\r\n})\r\nexport class PropertyCardModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyCardModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_CARD_CONFIG_MODULE,\r\n useValue: isOPI\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {\r\n Address,\r\n CER,\r\n Currency,\r\n GeoPt,\r\n NewPropertyLite,\r\n NewPropertyLiteSuggest,\r\n OfferingTypeEnum,\r\n PropertyTypeEnum\r\n} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\nimport {PropertyTypeItem} from '../../utils/models/property-type-item';\r\nimport {OfferingTypePipe} from '../../pipes/offering-type/offering-type.pipe';\r\nimport {PropertyTypePipe} from '../../pipes/property-type/property-type.pipe';\r\nimport {Utils} from '../../utils';\r\nimport {CurrencyConverterService} from '../currency-converter/currency-converter.service';\r\n\r\ndeclare var google: any;\r\n\r\n@Injectable()\r\nexport class MarkersService {\r\n\r\n constructor(\r\n private _propertyTypePipe: PropertyTypePipe,\r\n private _offeringTypePipe: OfferingTypePipe,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n }\r\n\r\n private static getPropertyTypeItemByType(type: PropertyTypeEnum): PropertyTypeItem {\r\n let item: PropertyTypeItem = null;\r\n ConstantsComponents.PropertyTypeList.forEach((element) => {\r\n if (element.value === type) {\r\n item = element;\r\n }\r\n });\r\n return item;\r\n }\r\n\r\n private static validatePropertyInFavorites(propertyId: string, favorites: NewPropertyLite[]): boolean {\r\n let result = false;\r\n for (let i = 0; i < favorites.length; i++) {\r\n if (propertyId === favorites[i].id) {\r\n result = true;\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private static calculateLocationFrom(location: GeoPt, bearingInRadians: number, distanceInMetres: number): GeoPt {\r\n const coordinateLatitudeInRadians = location.latitude * Math.PI / 180;\r\n const coordinateLongitudeInRadians = location.longitude * Math.PI / 180;\r\n const distanceComparedToEarth = distanceInMetres / 6378100.0;\r\n const resultLatitudeInRadians = Math.asin(Math.sin(coordinateLatitudeInRadians) * Math.cos(distanceComparedToEarth) +\r\n Math.cos(coordinateLatitudeInRadians) * Math.sin(distanceComparedToEarth) * Math.cos(bearingInRadians));\r\n const resultLongitudeInRadians = coordinateLongitudeInRadians + Math.atan2(Math.sin(bearingInRadians) *\r\n Math.sin(distanceComparedToEarth) * Math.cos(coordinateLatitudeInRadians), Math.cos(distanceComparedToEarth) -\r\n Math.sin(coordinateLatitudeInRadians) * Math.sin(resultLatitudeInRadians));\r\n const newCoordinates: any = {};\r\n newCoordinates.latitude = resultLatitudeInRadians * 180 / Math.PI;\r\n newCoordinates.longitude = resultLongitudeInRadians * 180 / Math.PI;\r\n return newCoordinates;\r\n }\r\n\r\n buildURL(config: {\r\n propertyId: string,\r\n offering: OfferingTypeEnum,\r\n propertyType: PropertyTypeEnum,\r\n address: Address\r\n }): string {\r\n let url = 'property/';\r\n url += `${this._propertyTypePipe.transform(config.propertyType, true)}-`;\r\n url += `${this._offeringTypePipe.transform(config.offering, ' ').replace(/ /g, '')}-`;\r\n url += config.address.colony ? `${config.address.colony}-` : '';\r\n url += config.address.city ? `${config.address.city}-` : '';\r\n url += config.propertyId;\r\n url = Utils.removeDiacritics(url).replace(/ /g, '-').toLowerCase();\r\n return url;\r\n }\r\n\r\n validatePropertiesInPoly(properties: Marker[], paths: any[]): Marker[] {\r\n const polygon = new google.maps.Polygon({paths: paths});\r\n if (properties && properties.length > 0) {\r\n properties.map((el: Marker) => {\r\n el.extras['showInPolygon'] = false;\r\n const customLatLng = new google.maps.LatLng(el.location.latitude, el.location.longitude);\r\n if (google.maps.geometry.poly.containsLocation(customLatLng, polygon)) {\r\n el.extras['showInPolygon'] = true;\r\n return el;\r\n } else {\r\n el.extras['showInPolygon'] = false;\r\n return el;\r\n }\r\n });\r\n properties = properties.filter((e) => {\r\n if (e.extras['showInPolygon']) {\r\n return e;\r\n }\r\n });\r\n return properties;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n markersToCurrency(markers: Marker[], toCurrency: Currency, currencies: CER[]): Marker[] {\r\n markers = markers.map<Marker>(item => {\r\n if (Currency[item.info.currency] !== toCurrency) {\r\n item.info.price = this._converter.number(item.info.price, currencies, Currency[item.info.currency], toCurrency);\r\n item.info.currency = toCurrency.toString();\r\n }\r\n return item;\r\n });\r\n return markers;\r\n }\r\n\r\n buildMarkers(entities: NewPropertyLite[] | NewPropertyLiteSuggest[], favorites?: NewPropertyLite[]): Marker[] {\r\n const markers: Marker[] = [];\r\n entities.forEach((entity) => {\r\n const m: Marker = {\r\n location: entity.address.location,\r\n hover: false,\r\n visited: false,\r\n type: MarkersService.getPropertyTypeItemByType(entity.type),\r\n info: this.createPropertyInfoCard(entity),\r\n isFavorite: false,\r\n extras: {}\r\n };\r\n if (entity instanceof NewPropertyLite) {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.id, favorites) : false;\r\n } else {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.propertyId, favorites) : false;\r\n }\r\n markers.push(m);\r\n });\r\n return markers;\r\n }\r\n\r\n buildSpider(list: Marker[]): { markers: Marker[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n list.map((el) => {\r\n el.extras['repeat'] = false;\r\n const size = list.filter(item => {\r\n return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;\r\n });\r\n const distance = 12 * size.length / 2.0;\r\n const radiansBetweenAnnotations = (Math.PI * 2) / size.length;\r\n if (!el.extras['repeat'] && size.length > 1) {\r\n const locationShare: any = Object.assign({}, el.location);\r\n for (let i = 0; i < size.length; i++) {\r\n const heading = radiansBetweenAnnotations * i;\r\n size[i]['repeat'] = true;\r\n const newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);\r\n response.polyLines.push({\r\n path: [\r\n {\r\n latitude: Number(locationShare.latitude),\r\n longitude: Number(locationShare.longitude)\r\n },\r\n {\r\n latitude: Number(newLocation.latitude),\r\n longitude: Number(newLocation.longitude)\r\n }]\r\n });\r\n size[i].location = newLocation;\r\n }\r\n }\r\n return el;\r\n });\r\n response.markers = list;\r\n return response;\r\n }\r\n\r\n private createPropertyInfoCard(entity: NewPropertyLite | NewPropertyLiteSuggest): PropertyCardInfo {\r\n return {\r\n address: new Address(entity.address || null),\r\n authUsers: (entity instanceof NewPropertyLite) ? entity.authUsers : '',\r\n currency: entity.currency,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId,\r\n image: entity.image,\r\n offering: entity.offering,\r\n price: entity.price,\r\n type: entity.type,\r\n url: this.buildURL({\r\n address: entity.address,\r\n offering: entity.offering,\r\n propertyType: entity.type,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId\r\n }),\r\n status: (entity instanceof NewPropertyLite) ? entity.status : null,\r\n features: (entity instanceof NewPropertyLite) ? entity.features : null,\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MarkersService} from './markers.service';\r\nimport {CurrencyConverterModule} from '../currency-converter/currency-converter.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CurrencyConverterModule.forChild()\r\n ]\r\n})\r\nexport class MarkersModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkersModule,\r\n providers: [\r\n MarkersService\r\n ]\r\n };\r\n }\r\n}\r\n"]}