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ygBC,EAAsC,mwtBAA+wtBC,EAAsC,0FAA4FC,EAAsC,6FAA+FC,EAAsC,yFAA2FC,GAAsC,0FAA4FC,GAAsC,4FAA8FC,GAAsC,qGAAuGC,GAAsC,2HAA6HX,EAAqC,iIAAmIC,EAAqC,+HAAiIC,EAAqC,qIAAuIC,EAAsC,4EAA8ES,GAAsC,qIAAuIC,GAAsC,0FAA4FC,GAAsC,6FAA+FC,GAAsC,yFAA2FnB,EAAqC,0FAA4FoB,GAAsC,4FAA8FC,GAAsC,qGAAuGC,GAAsC,+CAAiDC,GAAsC,8lBAAgmBC,GAAsC,k/BAAo/BC,GAAsC,6HAA+HD,GAAsC,+2BAAg3B,KAEhg5C,SAAe5B,EAAwBztB","sources":["webpack://frontend-setup/./src/components/atoms/loading-state/hooks/use-loading-state.ts","webpack://frontend-setup/./src/utilities/constants/index.ts","webpack://frontend-setup/./src/components/molecules/apartments-view/utilities/transform-data.ts","webpack://frontend-setup/./src/components/molecules/apartments-view/apartments-view.tsx","webpack://frontend-setup/./src/components/molecules/apartments-view/utilities/constants.ts","webpack://frontend-setup/./src/features/area-map/utilities/get-map-card-title.ts","webpack://frontend-setup/./src/features/compare/components/compare-open-button/compare-open-button.tsx","webpack://frontend-setup/./src/features/properties/store/store.ts","webpack://frontend-setup/./src/features/properties/utilities/bounding-box.ts","webpack://frontend-setup/./src/features/properties/routes/apartment-view.ts","webpack://frontend-setup/./src/utilities/partition.ts","webpack://frontend-setup/./src/features/properties/utilities/sold-project-phase-data.ts","webpack://frontend-setup/./src/features/properties/routes/construction-number.ts","webpack://frontend-setup/./src/utilities/hooks/use-routing/use-routing.ts","webpack://frontend-setup/./src/features/properties/hooks/use-properties-routing/use-properties-routing.ts","webpack://frontend-setup/./src/features/properties/routes/property-type.ts","webpack://frontend-setup/./src/features/properties/utilities/data.ts","webpack://frontend-setup/./src/features/properties/utilities/extend-map-theme.tsx","webpack://frontend-setup/./src/store/filters/utilities/transform-filters.ts","webpack://frontend-setup/./src/store/filters/store.ts","webpack://frontend-setup/./src/store/filters/utilities/transform-payload.ts","webpack://frontend-setup/./src/features/properties/components/house-selector-card/house-selector-card.tsx","webpack://frontend-setup/./src/features/properties/components/properties-view/hooks/use-content-interaction.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/constants/events.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/canvas-styles.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/convert-percentage-to-pixel.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/render-pointer.tsx","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/use-canvas-repaint.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/house-selector.tsx","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/draw-polygon.ts","webpack://frontend-setup/./src/features/properties/components/house-selector/utilities/house-selector-data.ts","webpack://frontend-setup/./src/features/properties/components/properties-view/hooks/use-visual-interaction.ts","webpack://frontend-setup/./src/features/properties/components/properties-view/utilities/sorting.ts","webpack://frontend-setup/./src/components/atoms/lazy-render/lazy-render.tsx","webpack://frontend-setup/./src/features/properties/components/properties-view/utilities/tiles.tsx","webpack://frontend-setup/./src/features/properties/components/properties-view/properties-view.tsx","webpack://frontend-setup/./src/features/properties/components/property-filter/utilities/generate-inputs.tsx","webpack://frontend-setup/./src/features/properties/components/property-filter/utilities/filter-names.ts","webpack://frontend-setup/./src/features/properties/components/property-filter/utilities/filter-order.ts","webpack://frontend-setup/./src/features/properties/components/property-filter/utilities/transform-filter-label.ts","webpack://frontend-setup/./src/features/properties/components/tag-list/utilities/transform-tag-label.ts","webpack://frontend-setup/./src/features/properties/components/property-filter/property-filter.tsx","webpack://frontend-setup/./src/features/properties/components/tag-list/tag-list.tsx","webpack://frontend-setup/./src/utilities/filters/urls.ts","webpack://frontend-setup/./src/utilities/filters/is-range-in-range.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/utilities/generate-steps.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/living-area.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/plot-area.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/price.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/property-types.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/rooms.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/status.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/construct-filters.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/apartments.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/districts.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/rental.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/project-phases.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/filters/sun-direction.ts","webpack://frontend-setup/./src/features/properties/components/properties-filters/properties-filters.tsx","webpack://frontend-setup/./src/features/properties/components/properties-breadcrumbs/properties-breadcrumbs.tsx","webpack://frontend-setup/./src/features/properties/properties.tsx","webpack://frontend-setup/./src/utilities/api-utilities/is-nhg.ts","webpack://frontend-setup/./src/utilities/map/provider.ts","webpack://frontend-setup/./src/utilities/map/config/theme.tsx","webpack://frontend-setup/./src/utilities/map/service.ts","webpack://frontend-setup/./src/features/properties/properties.scss"],"sourcesContent":["const LOADED_CLASS = 'is--loaded';\n\nconst useLoadingState = (element: Element) => {\n const loadingState = element.querySelector('[js-hook-loading-state]');\n\n return {\n setLoaded: () => {\n element.classList.add(LOADED_CLASS);\n\n loadingState?.addEventListener('animationend', () => {\n loadingState?.remove();\n });\n },\n };\n};\n\nexport default useLoadingState;\n","export const DESIGN_SYSTEM = 'Design System';\nexport const ATOMS = `${DESIGN_SYSTEM}/Atoms`;\nexport const MOLECULES = `${DESIGN_SYSTEM}/Molecules`;\nexport const ORGANISMS = `${DESIGN_SYSTEM}/Organisms`;\n\nexport const FEATURES = 'Features';\nexport const TEMPLATES = 'Templates';\n\nexport const DOCUMENTATION = 'Documentation';\nexport const BRAND_GUIDE = `${DOCUMENTATION}/Brand Guide`;\nexport const TECHNICAL = `${DOCUMENTATION}/Technical`;\n\nexport const IMAGE_PLACEHOLDER =\n 'https://www.hoefenhaag.nl/media/ydyjxqnz/nieuwbouw-vianen-hoefenhaag-home-dorpshart.jpg';\n","import {\n ApartmentBuildingView,\n ApartmentBuildingViewPointer,\n ExtendedApartmentBuilding,\n getApartmentBuildingView,\n} from '@bpd-library/utilities';\nimport { VirtualTourMinimap, VirtualTourPointer, VirtualView } from '@features/virtual-tour/types';\nimport { formatConstructionNumberStatus, formatDetailPageUrl } from '@utilities/api-formatters';\nimport { IMAGE_PLACEHOLDER } from '@utilities/constants';\nimport { getPrefixedUrl } from '@utilities/get-prefixed-url';\nimport { useAreaData, useAreaDataUnsafe } from '@utilities/hooks';\n\nexport const getApartmentBuilding = async (options: {\n constructionNumberId?: string | null;\n viewId?: string | null;\n}) => {\n let apartmentBuilding: ExtendedApartmentBuilding | undefined;\n\n const { constructionNumbers } = await useAreaData();\n\n if (options.constructionNumberId) {\n const constructionNumber = constructionNumbers.find(\n (c) => c.id === options.constructionNumberId,\n );\n apartmentBuilding = constructionNumber?.apartmentBuilding;\n } else if (options.viewId) {\n apartmentBuilding = getApartmentBuildingByViewId(options.viewId);\n }\n\n return apartmentBuilding;\n};\n\nexport const getViewIdByConstructionNumberId = async (constructionNumberId: string) => {\n const { constructionNumbers } = await useAreaData();\n\n const constructionNumber = constructionNumbers.find((c) => c.id === constructionNumberId);\n return (constructionNumber && getApartmentBuildingView(constructionNumber)?.id) || null;\n};\n\nexport const transformApartmentBuildingViews = (apartmentBuilding?: ExtendedApartmentBuilding) => {\n const minimap = transformMinimap(apartmentBuilding?.views?.find((v) => v.type === 'minimap'));\n const views = (\n minimap\n ? apartmentBuilding?.views?.filter((v) => v.type !== 'minimap')\n : apartmentBuilding?.views\n )?.map(mapViewFor(apartmentBuilding));\n return { minimap, views };\n};\n\nconst transformMinimap = (minimapView?: ApartmentBuildingView): VirtualTourMinimap | undefined => {\n return (\n minimapView && {\n id: minimapView.id!,\n source: minimapView.imageUrl!,\n pointers: minimapView.pointers!.filter(isPointerDataClean).map(mapPointer),\n }\n );\n};\n\nfunction mapViewFor(apartmentBuilding?: ExtendedApartmentBuilding) {\n return (abView: ApartmentBuildingView): VirtualView => {\n if (abView.imageUrl) {\n return {\n type: '2d',\n id: abView.id!,\n source: getPrefixedUrl(abView.imageUrl) || IMAGE_PLACEHOLDER,\n pointers: abView.pointers!.filter(isPointerDataClean).map(mapPointer),\n ...(apartmentBuilding && { apartmentBuildingId: apartmentBuilding.id }),\n };\n } else {\n return {\n type: '3d',\n id: abView.id!,\n source: abView.sourceUrl!,\n ...(apartmentBuilding && { apartmentBuildingId: apartmentBuilding.id }),\n };\n }\n };\n}\n\nfunction isPointerDataClean(pointer: ApartmentBuildingViewPointer): boolean {\n const { constructionNumbers } = useAreaDataUnsafe() ?? {};\n\n if (pointer.constructionNumberId) {\n const constructionNumber = constructionNumbers?.find(\n (cn) => cn.id === pointer.constructionNumberId,\n );\n\n if (!constructionNumber) return false;\n }\n\n return true;\n}\n\nfunction mapPointer(pointer: ApartmentBuildingViewPointer): VirtualTourPointer {\n const { coordinates, compassDirection, label, type, constructionNumberId, linkToViewId } =\n pointer;\n if (!coordinates) {\n console.warn('[virtual-tour]: rendering pointer without coordinates: >>> ', pointer);\n return {} as VirtualTourPointer;\n }\n\n const { constructionNumbers } = useAreaDataUnsafe() ?? {};\n\n if (type === 'label') {\n const constructionNumber = constructionNumbers?.find(\n (cn) => cn.id === constructionNumberId,\n );\n\n return {\n type: 'label',\n position: [coordinates[0], coordinates[1]],\n constructionNumber: {\n id: constructionNumberId,\n identifier: label,\n status: formatConstructionNumberStatus(constructionNumber!),\n url: getPrefixedUrl(\n formatDetailPageUrl({ constructionNumber: constructionNumber! }) || '',\n ),\n },\n };\n } else if (type === 'text') {\n return {\n type: 'text',\n position: [coordinates[0], coordinates[1]],\n label,\n };\n } else if (type === 'pointer') {\n const linkedView = getApartmentBuildingByViewId(linkToViewId)?.views?.find(\n (v) => v.id === linkToViewId,\n );\n const amount = linkedView?.pointers?.filter((p) => p.constructionNumberId).length || 0;\n return {\n type: amount ? 'number' : 'generic',\n position: [coordinates[0], coordinates[1]],\n sceneId: linkToViewId,\n amount,\n label,\n };\n } else {\n return {\n type: pointerTypeTransform(type),\n position: [coordinates[0], coordinates[1]],\n eyeDirection: compassDirection,\n sceneId: linkToViewId,\n label,\n };\n }\n}\n\nfunction pointerTypeTransform(type?: string | null, compassDirection?: string | null) {\n switch (type) {\n case 'compass':\n return `eye-${compassDirection}`;\n default:\n return type || 'generic';\n }\n}\n\nfunction getApartmentBuildingByViewId(\n viewId?: string | null,\n): ExtendedApartmentBuilding | undefined {\n const { apartmentBuildings } = useAreaDataUnsafe() || {};\n\n if (!apartmentBuildings || !viewId) return;\n return apartmentBuildings?.find((apartmentBuilding) =>\n apartmentBuilding.views?.find((view) => view.id === viewId),\n );\n}\n","import '@features/virtual-tour';\n\nimport {\n defineElement,\n FC,\n onDidLoad,\n useElement,\n useEvent,\n useListen,\n useProp,\n} from '@atomify/hooks';\nimport { h } from '@atomify/jsx';\nimport { useStore } from '@atomify/kit';\nimport { ExtendedApartmentBuilding } from '@bpd-library/utilities';\nimport { virtualView2dPointerEvents } from '@features/virtual-tour/constants';\nimport {\n findPointerInCurrentView,\n findView,\n pushView,\n setData,\n VirtualTourState,\n virtualTourStore,\n} from '@features/virtual-tour/store';\nimport {\n VirtualTourImageView,\n VirtualTourPointer,\n VirtualView,\n VRTourPointerFilter,\n} from '@features/virtual-tour/types';\nimport { VirtualTourElement } from '@features/virtual-tour/virtual-tour';\n\nimport { apartmentsViewEvents } from './utilities/constants';\nimport {\n getApartmentBuilding,\n getViewIdByConstructionNumberId,\n transformApartmentBuildingViews,\n} from './utilities/transform-data';\n\ninterface ApartmentsViewElement {\n constructionNumberId: string | null;\n expanded: boolean;\n}\n\nexport const ApartmentsView: FC = () => {\n const [expanded] = useProp('expanded', false);\n const [vrTourId] = useProp('vrTourId');\n const [onClose] = useProp('onClose', null);\n const [currConstructionNumberId, setConstructionNumberId, watchConstructionNumberId] = useProp<\n string | null\n >('constructionNumberId', null);\n\n const vrTourContainer = useElement('virtual-tour');\n\n const [, subscribe] = useStore(virtualTourStore);\n\n let apartmentBuilding: ExtendedApartmentBuilding | undefined;\n\n const setViewData = async (options: {\n constructionNumberId?: string | null;\n linkToViewId?: string | null;\n triggerEvent?: boolean;\n }) => {\n const { constructionNumberId, linkToViewId } = options;\n const constructionNumberViewId =\n constructionNumberId && (await getViewIdByConstructionNumberId(constructionNumberId));\n\n const viewId = linkToViewId || constructionNumberViewId;\n if (!viewId) return;\n\n apartmentBuilding = await getApartmentBuilding({ viewId });\n options.triggerEvent && handleApartmentBuildingChange();\n\n const { views, minimap } = await transformApartmentBuildingViews(apartmentBuilding);\n views && setData(vrTourId, { views, firstViewId: viewId, minimap });\n };\n\n useListen(document, apartmentsViewEvents.ALIAS_CHANGED, (e) => {\n const { constructionNumberId } = e.detail;\n setViewData({ constructionNumberId });\n });\n\n useListen(document, virtualView2dPointerEvents.LABEL_FOCUS, ({ detail }) => {\n setConstructionNumberId(detail.active ? detail.id : null);\n });\n\n watchConstructionNumberId((id) => {\n if (!id) {\n vrTourContainer.current?.focusPointer(() => false);\n return;\n }\n\n const pointerFilter: VRTourPointerFilter = (p) => p.constructionNumber?.id === id;\n\n const pointer = findPointerInCurrentView(vrTourId, pointerFilter);\n\n if (!pointer) {\n const view = findView(vrTourId, (v: VirtualView) => {\n if (v.type !== '2d') return false;\n else v = v as VirtualTourImageView;\n\n if (v.pointers.find(pointerFilter)) return true;\n return false;\n });\n\n if (!view) return;\n\n pushView(vrTourId, view.id);\n }\n setTimeout(() => {\n vrTourContainer.current?.focusPointer(pointerFilter);\n }, 50);\n });\n\n onDidLoad(() => {\n setViewData({ constructionNumberId: currConstructionNumberId });\n });\n\n subscribe(\n async ({ [vrTourId]: vrState }) => {\n const { apartmentBuildingId, id: viewId } = vrState.currentView!;\n if (apartmentBuildingId && apartmentBuildingId !== apartmentBuilding?.id) {\n apartmentBuilding = await getApartmentBuilding({ viewId });\n handleApartmentBuildingChange();\n\n const { minimap } = await transformApartmentBuildingViews(apartmentBuilding);\n minimap && vrTourContainer.current?.setMinimap(minimap, vrState.currentView!);\n }\n },\n [vrTourId],\n );\n\n const apartmentBuildingChangeEvent = useEvent({ eventName: apartmentsViewEvents.UPDATE_ALIAS });\n function handleApartmentBuildingChange() {\n apartmentBuildingChangeEvent.emit({\n apartmentBuildingId: apartmentBuilding?.id,\n });\n }\n\n return (\n
\n {\n setViewData({ linkToViewId: viewId, triggerEvent: true });\n }}\n {...(currConstructionNumberId && {\n pointerHighlighted: (p: VirtualTourPointer) =>\n p.constructionNumber?.id === currConstructionNumberId,\n })}\n />\n
\n );\n};\n\nApartmentsView.props = {\n expanded: {\n type: Boolean,\n },\n constructionNumberId: {\n type: String,\n },\n vrTourId: {\n type: String,\n required: true,\n },\n onClose: {\n type: Function,\n },\n};\n\ndefineElement('apartments-view', ApartmentsView);\n","export const apartmentsViewEvents = {\n UPDATE_ALIAS: 'apartments-view::updateAlias',\n ALIAS_CHANGED: 'apartments-view::aliasChanged',\n};\n","import { ExtendedApiObject } from '@bpd-library/utilities';\nimport { translateItem } from '@utilities/hooks';\n\nconst getMapCardTitle = async (apiObject: ExtendedApiObject) => {\n switch (apiObject.objectType) {\n case 'constructionNumber':\n const houseTypeTranslationKey = `PropertyTypeName-${apiObject.propertyType?.houseType?.toLowerCase()}`;\n const houseTypeTranslated = await translateItem(houseTypeTranslationKey);\n return `${houseTypeTranslated} ${apiObject.identifier}`;\n case 'propertyType':\n return `${apiObject.name} ${apiObject.projectPhaseName || ''}`;\n case 'apartmentBuilding':\n return apiObject.displayName || '';\n case 'projectPhase':\n return apiObject.name || '';\n case 'district':\n return apiObject.name || '';\n case 'areaProject':\n return apiObject.name || '';\n }\n};\n\nexport { getMapCardTitle };\n","import { defineElement, FC, onDidLoad } from '@atomify/hooks';\nimport { h } from '@atomify/jsx';\nimport { useStore } from '@atomify/kit';\nimport { ButtonA } from '@source/components/atoms/button/button';\nimport { CompareState, compareStore, getCompareState } from '@source/store/compare';\nimport { useTranslate } from '@source/utilities/hooks';\n\nexport const CompareOpenButton: FC = ({ element }) => {\n const [, subscribe] = useStore(compareStore);\n\n onDidLoad(render);\n subscribe(render);\n\n function render() {\n const { constructionNumberIds } = getCompareState();\n const total = constructionNumberIds.length;\n\n element.innerHTML = '';\n\n if (total) {\n element.append(\n
\n \n {useTranslate('Compare.CompareHouses')}\n\n {total ? total : ''}\n \n
,\n );\n }\n }\n};\n\ndefineElement('compare-open-button', CompareOpenButton);\n","import {\n ExtendedApartmentBuilding,\n ExtendedAreaModels,\n ExtendedConstructionNumber,\n ExtendedProjectPhase,\n ExtendedPropertyType,\n} from '@bpd-library/utilities';\nimport { HouseSelectorModel } from '@features/properties/components/house-selector/utilities/types';\nimport createStore from '@utilities/store';\n\ninterface ViewConstructor {\n expandedMap?: boolean;\n type: Type;\n data: ViewData;\n dataType?: 'default' | 'recommended' | 'soldConstructionNumbers' | 'soldProjects';\n slug?: string;\n name?: string | null;\n viewId?: string | null;\n onCardClick?: (event: MouseEvent, item: DataItem, cardType: ViewCardTypes) => void;\n onReturn?: () => void;\n}\n\ntype ViewGrid = ViewConstructor<\n 'propertyType' | 'apartmentPropertyType',\n ExtendedPropertyType | ExtendedApartmentBuilding | ExtendedProjectPhase\n>;\ntype ViewList = ViewConstructor<\n 'apartmentConstructionNumber' | 'constructionNumber',\n ExtendedConstructionNumber\n>;\n\nexport type View = ViewList | ViewGrid;\nexport type ViewType =\n | 'propertyType'\n | 'apartmentPropertyType'\n | 'apartmentConstructionNumber'\n | 'constructionNumber';\n\nexport type ViewCardObject =\n | ExtendedConstructionNumber\n | ExtendedPropertyType\n | ExtendedApartmentBuilding\n | ExtendedProjectPhase;\n\nexport type ViewCardTypes = ViewCardObject['objectType'];\n\nexport type ViewData = ViewCardObject[];\n\nexport interface PropertiesState {\n view?: View;\n viewData?: ViewData;\n filteredData?: ExtendedAreaModels;\n soldProjectsData?: ExtendedAreaModels;\n allProjectsSold?: boolean;\n houseSelectorData?: HouseSelectorModel;\n}\n\nconst UPDATE_VIEW = 'updateView';\nconst UPDATE_FILTER_DATA = 'updateFilterData';\nconst UPDATE_VIEW_DATA = 'updateViewData';\nconst UPDATE_SOLD_PROJECTS_DATA = 'updateSoldProjectsData';\nconst UPDATE_HOUSE_SELECTOR_DATA = 'updateHouseSelectorData';\nconst SET_ALL_PROJECTS_SOLD = 'setAllProjectsSold';\n\nconst initialState: PropertiesState = {};\n\nconst actions = {\n [UPDATE_FILTER_DATA]: (state: PropertiesState, filteredData: ExtendedAreaModels) => {\n state.filteredData = filteredData;\n return state;\n },\n [UPDATE_SOLD_PROJECTS_DATA]: (state: PropertiesState, soldProjectsData: ExtendedAreaModels) => {\n state.soldProjectsData = soldProjectsData;\n return state;\n },\n [UPDATE_VIEW]: (state: PropertiesState, view: View) => {\n state.view = view;\n return state;\n },\n [UPDATE_VIEW_DATA]: (state: PropertiesState, viewData: ViewData) => {\n state.viewData = viewData;\n return state;\n },\n [UPDATE_HOUSE_SELECTOR_DATA]: (state: PropertiesState, selectorData: HouseSelectorModel) => {\n state.houseSelectorData = selectorData;\n return state;\n },\n [SET_ALL_PROJECTS_SOLD]: (state: PropertiesState, allProjectsSold: boolean) => {\n state.allProjectsSold = allProjectsSold;\n return state;\n },\n};\n\nexport const propertiesStore = createStore({\n initialState,\n actions,\n});\n\nexport const updateFilteredData = (data: ExtendedAreaModels) => {\n propertiesStore.dispatch(UPDATE_FILTER_DATA, data);\n};\n\nexport const updateSoldProjectsData = (data: ExtendedAreaModels) => {\n propertiesStore.dispatch(UPDATE_SOLD_PROJECTS_DATA, data);\n};\n\nexport const updateView = (view: View) => {\n propertiesStore.dispatch(UPDATE_VIEW, view);\n};\n\nexport const updateViewData = (viewData: ViewData) => {\n propertiesStore.dispatch(UPDATE_VIEW_DATA, viewData);\n};\n\nexport const updateHouseSelectorData = (houseSelectorData: HouseSelectorModel) => {\n propertiesStore.dispatch(UPDATE_HOUSE_SELECTOR_DATA, houseSelectorData);\n};\n\nexport const setAllProjectsSold = (allProjectsSold: boolean) => {\n propertiesStore.dispatch(SET_ALL_PROJECTS_SOLD, allProjectsSold);\n};\n\nexport const getCurrentView = () => propertiesStore.getState().view;\n\nexport const getFilteredData = () => propertiesStore.getState().filteredData;\n\nexport const getSoldProjectsData = () => propertiesStore.getState().soldProjectsData;\n\nexport const getHouseSelectorData = () => propertiesStore.getState().houseSelectorData;\n\nexport const getHouseSelectorView = (viewId: string) => {\n const data = propertiesStore.getState().houseSelectorData;\n return data?.views?.find(({ id }) => id === viewId);\n};\n\nexport const getHouseSelectorViewByObjectId = (id: string) => {\n const data = propertiesStore.getState().houseSelectorData;\n return data?.views?.find(({ polygons }) => {\n return polygons?.find(({ objectId }) => objectId === id);\n });\n};\n","import { getMapInstance } from '@bpd-library/components';\nimport { BoundingBox, Coordinates, MapDataItem } from '@bpd-library/types';\nimport {\n calculateBoundingBox,\n calculateMapDataBoundingBox,\n expandBoundingBox,\n ExtendedAreaModels,\n getApiObjectCenter,\n getApiObjectCoordinates,\n} from '@bpd-library/utilities';\nimport { isGermany } from '@utilities/is-germany';\n\nfunction getBoundingBox(\n data: ExtendedAreaModels,\n mapData?: MapDataItem[],\n): BoundingBox | undefined {\n let boundingBox: BoundingBox | undefined;\n\n if (isGermany()) {\n // If the environment is germany, base it on area and project polygons\n boundingBox = getGermanyBoundingBox(data);\n } else {\n // If the environment is not germany, base it on the mapdata\n if (mapData?.length) {\n boundingBox = calculateMapDataBoundingBox(mapData);\n boundingBox = expandBoundingBox(boundingBox, 0.075);\n }\n }\n\n if (!boundingBox) {\n // If there's no mapdata, use the center of the areaProject\n const center = getApiObjectCenter(data.areaProject);\n\n if (center) {\n boundingBox = calculateBoundingBox(center);\n boundingBox = expandBoundingBox(boundingBox, 0.4);\n }\n }\n\n return boundingBox;\n}\n\nfunction setPropertiesMapBounds(data: ExtendedAreaModels, mapData: MapDataItem[]) {\n const mapInstance = getMapInstance();\n\n // Set map boundingbox delayed, for visual effect\n setTimeout(() => {\n const boundingBox = getBoundingBox(data, mapData);\n\n if (boundingBox) mapInstance?.fitBounds(boundingBox, { duration: 1200 });\n }, 600);\n}\n\nfunction getGermanyBoundingBox(data: ExtendedAreaModels): BoundingBox | undefined {\n /*\n Germany doesn't have any construction number / property type polygons yet.\n Instead, use the areaProject and projectPhases to calculate the boundingbox.\n */\n const areaProjectCoordinates = getApiObjectCoordinates(data.areaProject) || [];\n const projectPhaseCoordinates = data.projectPhases.reduce(\n (projectPhaseCoordinates, projectPhase) => {\n const coordinates = getApiObjectCoordinates(projectPhase);\n\n return coordinates\n ? [...projectPhaseCoordinates, ...coordinates]\n : projectPhaseCoordinates;\n },\n [],\n );\n\n let boundingBox: BoundingBox | undefined;\n\n if (areaProjectCoordinates.length || projectPhaseCoordinates.length) {\n boundingBox = calculateBoundingBox([...areaProjectCoordinates, ...projectPhaseCoordinates]);\n }\n\n return boundingBox;\n}\n\nexport { getBoundingBox, setPropertiesMapBounds };\n","import { updateMapData } from '@bpd-library/components';\nimport {\n ExtendedAreaModels,\n ExtendedConstructionNumber,\n findApartmentBuilding,\n} from '@bpd-library/utilities';\nimport { getFilteredData, getSoldProjectsData, updateView } from '@features/properties/store';\nimport { apartmentsViewEvents } from '@molecules/apartments-view/utilities/constants';\nimport { hasConsent } from '@store/service-consent';\nimport getExtendedAreaMapData from '@utilities/api-utilities/get-extended-area-map-data';\nimport { useAreaData } from '@utilities/hooks';\nimport { Route, RouteHandler } from '@utilities/hooks/use-routing';\n\nimport { usePropertiesRouting } from '../hooks/use-properties-routing';\nimport { setPropertiesMapBounds } from '../utilities/bounding-box';\n\nconst getApartmentBuildingById = (data?: ExtendedAreaModels, apartmentBuildingId?: string) => {\n if (!data?.apartmentBuildings.length || !apartmentBuildingId) return;\n return data.apartmentBuildings.find(({ id }) => apartmentBuildingId === id);\n};\n\nconst apartmentViewRoute: RouteHandler = async (route) => {\n const { slug: apartmentBuildingId = '' } = route;\n let buildingName: string | null | undefined;\n let constructionNumbers: ExtendedConstructionNumber[] | undefined;\n\n const filteredData = getFilteredData();\n const filteredAB = getApartmentBuildingById(filteredData, apartmentBuildingId);\n\n buildingName = filteredAB?.displayName;\n constructionNumbers = filteredAB?.constructionNumbers?.filter(({ id }) =>\n filteredData?.constructionNumbers.find(({ id: filteredId }) => filteredId === id),\n );\n\n if (constructionNumbers?.length) {\n setApartmentConstructionNumberView(route, constructionNumbers, buildingName);\n return;\n }\n\n const soldData = getSoldProjectsData();\n const soldAB = getApartmentBuildingById(soldData, apartmentBuildingId);\n\n buildingName = soldAB?.displayName;\n constructionNumbers = soldAB?.constructionNumbers;\n\n if (constructionNumbers?.length) {\n setApartmentConstructionNumberView(route, constructionNumbers, buildingName);\n return;\n }\n\n const nonFilteredData = await useAreaData();\n const nonFilteredAB = getApartmentBuildingById(nonFilteredData, apartmentBuildingId);\n\n buildingName = nonFilteredAB?.displayName;\n constructionNumbers = nonFilteredAB?.constructionNumbers;\n\n if (\n (nonFilteredAB?.status === 'Sold' || nonFilteredAB?.status === 'UnderConstruction') &&\n constructionNumbers?.length\n ) {\n setApartmentConstructionNumberView(route, constructionNumbers, buildingName);\n return;\n }\n\n setApartmentPropertyTypeView(route, filteredData, apartmentBuildingId, buildingName);\n};\n\n/**\n * @description Sets the properties view to an apartment view with construction numbers\n * @param {ExtendedConstructionNumber[]} constructionNumbers\n */\nfunction setApartmentConstructionNumberView(\n { slug, viewId }: Route,\n constructionNumbers: ExtendedConstructionNumber[],\n buildingName?: string | null,\n) {\n const { setRoute } = usePropertiesRouting();\n\n updateView({\n type: 'apartmentConstructionNumber',\n data: constructionNumbers,\n slug,\n viewId,\n name: buildingName,\n onReturn: () => {\n setRoute({\n to: 'propertyType',\n });\n },\n });\n\n document.dispatchEvent(\n new CustomEvent(apartmentsViewEvents.ALIAS_CHANGED, {\n detail: {\n constructionNumberId: constructionNumbers[0].id,\n },\n }),\n );\n}\n\n/**\n * @description Sets the properties view to apartment view with property types\n * @param {ExtendedAreaModels} data\n * @param {string} [apartmentBuildingId]\n */\nfunction setApartmentPropertyTypeView(\n { slug, viewId }: Route,\n data?: ExtendedAreaModels,\n apartmentBuildingId?: string,\n buildingName?: string | null,\n) {\n const { setRoute } = usePropertiesRouting();\n\n if (!data) return;\n\n const apartmentBuilding = findApartmentBuilding(data.apartmentBuildings, {\n id: apartmentBuildingId,\n });\n\n const propertyTypes = data.propertyTypes?.filter((s) =>\n s.apartmentBuildings?.find(\n (apartmentBuilding) => apartmentBuilding.id === apartmentBuildingId,\n ),\n );\n\n updateView({\n type: 'propertyType',\n data: propertyTypes,\n slug,\n viewId,\n name: buildingName,\n onReturn: () => {\n setRoute({\n to: 'propertyType',\n });\n },\n });\n\n if (hasConsent('mapbox')) {\n const mapData = getExtendedAreaMapData({\n propertyTypes,\n apartmentBuildings: apartmentBuilding ? [apartmentBuilding] : [],\n });\n\n updateMapData(mapData);\n setPropertiesMapBounds(data, mapData);\n }\n}\n\nexport { apartmentViewRoute };\n","const partition = (\n data: Item[] | undefined,\n filter: (item: Item) => boolean,\n): [ItemPass[] | undefined, ItemFail[] | undefined] => {\n return (\n data?.reduce<[ItemPass[], ItemFail[]]>(\n (acc, item) => {\n if (filter(item)) acc[0].push(item as ItemPass);\n else acc[1].push(item as ItemFail);\n return acc;\n },\n [[], []],\n ) ?? [undefined, undefined]\n );\n};\n\nexport { partition };\n","import { MapDataItem } from '@bpd-library/types';\nimport { ExtendedAreaModels, ExtendedProjectPhase, findProjectPhase } from '@bpd-library/utilities';\nimport { getSoldProjectsData } from '@features/properties/store';\nimport { createConstructionNumberMapData } from '@utilities/map/service';\nimport { partition } from '@utilities/partition';\n\nexport const filterSoldProjectPhasesData = (data: ExtendedAreaModels): ExtendedAreaModels => {\n const [soldProjects = [], notSoldProjects = []] = partition(\n data.projectPhases,\n ({ status }) => status === 'Sold',\n );\n const [soldPropertyTypes = [], notSoldPropertyTypes = []] = partition(\n data.propertyTypes,\n ({ projectPhase }) => projectPhase?.status === 'Sold',\n );\n const [soldConstructionNumbers = [], notSoldConstructionNumbers = []] = partition(\n data.constructionNumbers,\n ({ projectPhase }) => projectPhase?.status === 'Sold',\n );\n const [soldApartmentBuildings = [], notSoldApartmentBuildings = []] = partition(\n data.apartmentBuildings,\n ({ projectPhase }) => projectPhase?.status === 'Sold',\n );\n\n data.projectPhases = notSoldProjects;\n data.propertyTypes = notSoldPropertyTypes;\n data.constructionNumbers = notSoldConstructionNumbers;\n data.apartmentBuildings = notSoldApartmentBuildings;\n\n return {\n ...data,\n projectPhases: soldProjects,\n propertyTypes: soldPropertyTypes,\n constructionNumbers: soldConstructionNumbers,\n apartmentBuildings: soldApartmentBuildings,\n };\n};\n\nexport const getSoldProjectPhase = (id: string) => {\n const { projectPhases: soldProjects = [] } = getSoldProjectsData() ?? {};\n return findProjectPhase(soldProjects, { id });\n};\n\nexport const getSoldProjectPhaseMapData = (): MapDataItem[] => {\n const mapData: MapDataItem[] = [];\n\n const { projectPhases: soldProjects = [] } = getSoldProjectsData() ?? {};\n\n soldProjects\n .filter(({ mapDataItems }) => !!mapDataItems?.length)\n .map(({ mapDataItems }) => mapDataItems!)\n .forEach((items) => mapData.push(...items));\n\n return mapData;\n};\n\nexport const toggleSoldProjectPhaseConstructionNumberPolygons = (\n projectPhase: ExtendedProjectPhase,\n visible: boolean,\n) => {\n if (projectPhase.status !== 'Sold') return;\n projectPhase.constructionNumbers?.forEach((constructionNumber) => {\n constructionNumber.mapDataItems = createConstructionNumberMapData(constructionNumber, {\n showSold: visible,\n });\n });\n};\n\nexport const shouldToggleSoldProjectPolygon = (projectPhase?: ExtendedProjectPhase): boolean => {\n if (!projectPhase || projectPhase.status !== 'Sold') return false;\n\n // toggle project polygon only if there is no available polygons for every nested construction number\n return !!projectPhase.constructionNumbers?.every(({ mapDataItems }) => !mapDataItems?.length);\n};\n","import { updateMapData } from '@bpd-library/components';\nimport {\n ExtendedConstructionNumber,\n findProjectPhase,\n findPropertyType,\n} from '@bpd-library/utilities';\nimport { getFilteredData, getSoldProjectsData, updateView, View } from '@features/properties/store';\nimport { hasConsent } from '@store/service-consent';\nimport getExtendedAreaMapData from '@utilities/api-utilities/get-extended-area-map-data';\nimport { RouteHandler } from '@utilities/hooks/use-routing';\n\nimport { usePropertiesRouting } from '../hooks/use-properties-routing';\nimport { setPropertiesMapBounds } from '../utilities/bounding-box';\nimport {\n shouldToggleSoldProjectPolygon,\n toggleSoldProjectPhaseConstructionNumberPolygons,\n} from '../utilities/sold-project-phase-data';\n\nconst constructionNumberRoute: RouteHandler = ({ slug, viewId }) => {\n const { setRoute } = usePropertiesRouting();\n let dataType: View['dataType'] = 'default';\n let parentViewApiObject:\n | { constructionNumbers?: ExtendedConstructionNumber[]; name?: string | null }\n | undefined;\n\n const data = getFilteredData();\n const propertyType = findPropertyType(data?.propertyTypes ?? [], { id: slug });\n\n const soldData = getSoldProjectsData();\n const soldProjectPhase = findProjectPhase(soldData?.projectPhases ?? [], { id: slug });\n\n parentViewApiObject = soldProjectPhase ?? propertyType;\n const viewName = parentViewApiObject?.name;\n\n if (!parentViewApiObject) {\n if (!data) return;\n parentViewApiObject = data;\n dataType = 'recommended';\n }\n\n let constructionNumbers = parentViewApiObject.constructionNumbers;\n\n if (soldProjectPhase) {\n toggleSoldProjectPhaseConstructionNumberPolygons(soldProjectPhase, true);\n dataType = 'soldConstructionNumbers';\n } else {\n constructionNumbers = constructionNumbers?.filter((cn) =>\n data?.constructionNumbers.includes(cn),\n );\n }\n\n updateView({\n type: 'constructionNumber',\n data: constructionNumbers || [],\n dataType,\n slug,\n viewId,\n name: viewName,\n onReturn: () => {\n if (soldProjectPhase) {\n toggleSoldProjectPhaseConstructionNumberPolygons(soldProjectPhase, false);\n }\n setRoute({\n to: 'propertyType',\n });\n },\n });\n\n if (hasConsent('mapbox')) {\n const mapData = getExtendedAreaMapData({\n constructionNumbers,\n propertyTypes: propertyType && [propertyType],\n ...(shouldToggleSoldProjectPolygon(soldProjectPhase) && {\n projectPhases: [soldProjectPhase!],\n }),\n });\n\n updateMapData(mapData);\n setPropertiesMapBounds(data ?? soldData!, mapData);\n }\n};\n\nexport { constructionNumberRoute };\n","interface Route {\n to: string;\n slug?: string;\n viewId?: string | null;\n}\n\nexport type RouteHandler = (route: Route) => void | Promise;\n\ninterface Routes {\n [key: string]: RouteHandler;\n}\n\nconst ROUTE_TO_PARAM = 'route';\nconst ROUTE_SLUG_PARAM = 'slug';\nconst ROUTE_LINKED_VIEW_PARAM = 'viewId';\n\n/**\n * @description Creates a hook, with which you can handle client side routing\n * @param {{ routes: Routes; defaultRoute: Route }} { routes, defaultRoute }\n * @return {*}\n */\nconst createRoutingHook = ({ routes, defaultRoute }: { routes: Routes; defaultRoute: Route }) => {\n let currentRoute: Route | undefined;\n\n init();\n\n function init() {\n window.addEventListener('popstate', (e) => {\n const urlParamRoute = parseUrlParams();\n\n if (urlParamRoute) {\n setRoute(urlParamRoute, false);\n }\n\n e.preventDefault();\n });\n }\n\n /**\n * @description Set's the current route to passed route. When pushState is false, the url & history won't be updated.\n * @param {Route} route\n * @param {boolean} [pushState=true]\n */\n function setRoute(route: Route, pushState: boolean = true) {\n currentRoute = route;\n\n const url = appendUrlParams(route);\n\n routes[route.to](route);\n\n if (pushState) history.pushState(currentRoute, '', url);\n }\n\n /**\n * @description Will call the current route again, optionally without updating the url & history\n */\n function updateCurrentRoute(options?: Partial & { updateHistory?: boolean }) {\n if (currentRoute) {\n const { updateHistory, ...route } = options || {};\n setRoute({ ...currentRoute, ...route }, updateHistory ?? true);\n }\n }\n\n function parseUrlParams(): Route | void {\n const url = new URL(document.location.href);\n\n const to = url.searchParams.get(ROUTE_TO_PARAM);\n const slug = url.searchParams.get(ROUTE_SLUG_PARAM);\n const viewId = url.searchParams.get(ROUTE_LINKED_VIEW_PARAM);\n\n if (to) {\n return {\n to: to as Route['to'],\n slug: slug ?? undefined,\n viewId: viewId ?? undefined,\n };\n }\n }\n\n function appendUrlParams(route: Route): string {\n const url = new URL(document.location.href);\n\n url.searchParams.set(ROUTE_TO_PARAM, route.to);\n\n if (route.slug) {\n url.searchParams.set(ROUTE_SLUG_PARAM, route.slug);\n } else {\n url.searchParams.delete(ROUTE_SLUG_PARAM);\n }\n\n if (route.viewId) {\n url.searchParams.set(ROUTE_LINKED_VIEW_PARAM, route.viewId);\n } else {\n url.searchParams.delete(ROUTE_LINKED_VIEW_PARAM);\n }\n\n return url.toString();\n }\n\n /**\n * @description Call setInitialRoute() when the component is ready to initialise the first route\n */\n function setInitialRoute() {\n const urlParamRoute = parseUrlParams();\n\n setRoute(urlParamRoute || defaultRoute);\n }\n\n return () => {\n return {\n setInitialRoute,\n setRoute,\n updateCurrentRoute,\n };\n };\n};\n\nexport { createRoutingHook, Route, Routes };\n","import { useUrlParams } from '@bpd-library/utilities';\nimport { apartmentViewRoute } from '@features/properties/routes/apartment-view';\nimport { constructionNumberRoute } from '@features/properties/routes/construction-number';\nimport { propertyTypeRoute } from '@features/properties/routes/property-type';\nimport { createRoutingHook, Route, Routes } from '@utilities/hooks/use-routing';\n\nconst PROPERTIES_ROUTES: Routes = {\n apartmentView: apartmentViewRoute,\n constructionNumber: constructionNumberRoute,\n propertyType: propertyTypeRoute,\n allConstructionNumbers: constructionNumberRoute,\n};\n\nfunction getInitialRoute(): Route {\n const { get: getUrlParam } = useUrlParams();\n\n const viewMode = getUrlParam('view-mode') as string | undefined;\n const propertyTypeId = getUrlParam('propertytypeId') as string | undefined;\n const apartmentBuildingId = getUrlParam('apartmentBuildingId') as string | undefined;\n\n if (viewMode) {\n switch (viewMode) {\n case 'construction-numbers':\n return {\n to: 'allConstructionNumbers',\n };\n }\n } else if (propertyTypeId) {\n return {\n to: 'constructionNumber',\n slug: propertyTypeId,\n };\n } else if (apartmentBuildingId) {\n return {\n to: 'apartmentView',\n slug: apartmentBuildingId,\n };\n }\n\n return {\n to: 'propertyType',\n };\n}\n\nexport const usePropertiesRouting = createRoutingHook({\n routes: PROPERTIES_ROUTES,\n defaultRoute: getInitialRoute(),\n});\n","import { updateMapData } from '@bpd-library/components';\nimport {\n getFilteredData,\n getSoldProjectsData,\n updateView,\n ViewData,\n} from '@features/properties/store';\nimport { hasConsent } from '@store/service-consent';\nimport getExtendedAreaMapData from '@utilities/api-utilities/get-extended-area-map-data';\nimport { RouteHandler } from '@utilities/hooks/use-routing';\n\nimport { usePropertiesRouting } from '../hooks/use-properties-routing';\nimport { setPropertiesMapBounds } from '../utilities/bounding-box';\nimport { getSoldProjectPhaseMapData } from '../utilities/sold-project-phase-data';\n\nconst propertyTypeRoute: RouteHandler = ({ slug, viewId }) => {\n const { setRoute } = usePropertiesRouting();\n const viewData: ViewData = [];\n\n let data = getFilteredData();\n const isSoldData = data?.projectPhases.every((project) => project.status === 'Sold');\n\n if (data && data.projectPhases.length && !isSoldData) {\n viewData.push(\n ...data.propertyTypes.filter(({ apartmentBuildings }) => !apartmentBuildings?.length),\n ...data.apartmentBuildings,\n );\n } else {\n data = getSoldProjectsData();\n if (!data || !data.projectPhases.length) return;\n viewData.push(...data.projectPhases.filter(({ mainImage }) => !!mainImage?.url));\n }\n\n updateView({\n type: 'propertyType',\n data: viewData,\n dataType: isSoldData ? 'soldProjects' : 'default',\n viewId,\n slug,\n onCardClick(e, item, cardType) {\n if (item.constructionNumbers?.length) {\n e.preventDefault();\n e.stopPropagation();\n\n if (cardType === 'apartmentBuilding') {\n setRoute({\n to: 'apartmentView',\n slug: item.id,\n });\n }\n if (cardType === 'propertyType' || cardType === 'projectPhase') {\n setRoute({\n to: 'constructionNumber',\n slug: item.id,\n });\n }\n\n return;\n }\n\n if (cardType === 'apartmentBuilding') {\n setRoute({\n to: 'apartmentView',\n slug: item.id,\n });\n }\n },\n });\n\n if (hasConsent('mapbox')) {\n const mapData = getExtendedAreaMapData(data);\n const soldProjectPolygons = getSoldProjectPhaseMapData();\n\n updateMapData([...mapData, ...soldProjectPolygons]);\n setPropertiesMapBounds(data, mapData);\n }\n};\n\nexport { propertyTypeRoute };\n","import {\n ExtendedApiObject,\n ExtendedAreaModels,\n filterConstructionNumbers,\n filterDistricts,\n filterProjectPhases,\n filterPropertyTypes,\n findExtendedObjectById,\n} from '@bpd-library/utilities';\nimport { FilterInput, FilterState, SelectedFilter } from '@source/store/filters';\n\nimport {\n HouseSelectorModel,\n HouseSelectorObject,\n HouseSelectorObjectTypeOrder,\n HouseSelectorPolygon,\n} from '../components/house-selector/utilities/types';\nimport { getFilteredData, getSoldProjectsData, propertiesStore, View, ViewType } from '../store';\n\nconst FIRST_POLYGON_ORDER = 0;\nconst LAST_POLYGON_ORDER = 6;\n\nconst PROPERTY_TYPE_VIEW_POLYGON_ORDER: HouseSelectorObjectTypeOrder = {\n viewLink: FIRST_POLYGON_ORDER,\n propertyType: FIRST_POLYGON_ORDER,\n apartmentBuilding: FIRST_POLYGON_ORDER,\n projectPhase: FIRST_POLYGON_ORDER + 1,\n district: FIRST_POLYGON_ORDER + 2,\n areaProject: FIRST_POLYGON_ORDER + 3,\n constructionNumber: FIRST_POLYGON_ORDER + 4,\n};\n\nconst CONSTRUCTION_NUMBER_VIEW_POLYGON_ORDER: HouseSelectorObjectTypeOrder = {\n viewLink: FIRST_POLYGON_ORDER,\n constructionNumber: FIRST_POLYGON_ORDER,\n propertyType: FIRST_POLYGON_ORDER + 1,\n apartmentBuilding: FIRST_POLYGON_ORDER + 1,\n projectPhase: FIRST_POLYGON_ORDER + 2,\n district: FIRST_POLYGON_ORDER + 3,\n areaProject: FIRST_POLYGON_ORDER + 4,\n};\n\nconst SOLD_DATA_POLYGON_ORDER: HouseSelectorObjectTypeOrder = {\n viewLink: FIRST_POLYGON_ORDER,\n constructionNumber: LAST_POLYGON_ORDER,\n propertyType: LAST_POLYGON_ORDER - 1,\n apartmentBuilding: LAST_POLYGON_ORDER - 1,\n projectPhase: LAST_POLYGON_ORDER - 2,\n district: LAST_POLYGON_ORDER - 3,\n areaProject: LAST_POLYGON_ORDER - 3,\n};\n\nfunction filterDataByDistrict(data: ExtendedAreaModels) {\n const stagedData: ExtendedAreaModels = { ...data };\n const { districtId } = window.__ENVIRONMENT_DETAILS__;\n const isDistrictPage = !!districtId;\n\n if (isDistrictPage) {\n stagedData.constructionNumbers = filterConstructionNumbers(data.constructionNumbers, {\n districtId,\n });\n stagedData.propertyTypes = filterPropertyTypes(data.propertyTypes, {\n districtId,\n });\n stagedData.projectPhases = filterProjectPhases(data.projectPhases, {\n districtId,\n });\n stagedData.apartmentBuildings = data.apartmentBuildings.filter(\n ({ constructionNumbers = [], propertyTypes = [] }) => {\n return (\n !!filterConstructionNumbers(constructionNumbers, { districtId }).length ||\n !!filterConstructionNumbers(propertyTypes, { districtId }).length\n );\n },\n );\n stagedData.districts = filterDistricts(data.districts, { id: districtId });\n }\n\n return stagedData;\n}\n\nfunction filterHouseSelectorData(\n houseSelectorData: HouseSelectorModel,\n areaData: ExtendedAreaModels,\n) {\n houseSelectorData.views?.forEach((view) => {\n view.polygons = view.polygons?.filter(({ objectType, objectId }) => {\n if (objectType === 'viewLink' || !objectId) return true;\n else return findExtendedObjectById(areaData, objectId);\n });\n });\n}\n\nfunction groupFilter(filter: SelectedFilter) {\n const { inputs } = filter!;\n\n const inputsPerFilter: {\n [key: string]: FilterInput[];\n } = {};\n\n inputs.forEach((input) => {\n if (!input.checked || !input.name) return;\n\n if (!inputsPerFilter[input.name]) {\n inputsPerFilter[input.name] = [];\n }\n\n inputsPerFilter[input.name].push(input);\n });\n\n return inputsPerFilter;\n}\n\nfunction filterData(data: ExtendedAreaModels, filters: FilterState) {\n const includedIds: { [id: string]: boolean } = {};\n\n let filteredData: ExtendedAreaModels = { ...data };\n\n const hasIncludedObject = (objects: { id: string }[]): boolean =>\n !!objects.find(({ id }) => includedIds[id]);\n\n const objectIsIncluded = (object: { id: string }): boolean => includedIds[object.id];\n\n Object.keys(filters).forEach((filterName) => {\n const { filterFunctions, filterLogic } = filters[filterName]!;\n const inputsPerFilter = groupFilter(filters[filterName]!);\n\n Object.keys(inputsPerFilter).forEach((key) => {\n const inputs = inputsPerFilter[key];\n\n filteredData.constructionNumbers.forEach((constructionNumber) => {\n let isIncluded: boolean;\n\n if (filterLogic !== '&&') {\n isIncluded = !!inputs.find((input) =>\n filterFunctions.constructionNumber(constructionNumber, input),\n );\n } else {\n isIncluded = !!inputs.every((input) =>\n filterFunctions.constructionNumber(constructionNumber, input),\n );\n }\n\n includedIds[constructionNumber.id] = isIncluded;\n });\n\n filteredData.propertyTypes.forEach((propertyType) => {\n const { id, constructionNumbers } = propertyType;\n\n const hasConstructionNumbers = !!constructionNumbers?.length;\n\n if (!hasConstructionNumbers) {\n // If there are no construction numbers, filter based on propertyType data\n let isIncluded: boolean;\n\n if (filterLogic !== '&&') {\n isIncluded = !!inputs.find((input) =>\n filterFunctions.propertyType(propertyType, input),\n );\n } else {\n isIncluded = !!inputs.every((input) =>\n filterFunctions.propertyType(propertyType, input),\n );\n }\n\n includedIds[id] = isIncluded;\n } else {\n // If there are construction numbers, filter based on construction number data\n includedIds[id] = hasIncludedObject(constructionNumbers!);\n }\n });\n\n filteredData.apartmentBuildings.forEach((apartmentBuilding) => {\n const { id, constructionNumbers, propertyTypes } = apartmentBuilding;\n\n const hasConstructionNumbers = !!constructionNumbers?.length;\n const hasPropertyTypes = !!propertyTypes?.length;\n\n if (hasConstructionNumbers) {\n includedIds[id] = hasIncludedObject(constructionNumbers!);\n } else if (hasPropertyTypes) {\n includedIds[id] = hasIncludedObject(propertyTypes!);\n } else {\n includedIds[id] = false;\n }\n });\n\n filteredData = {\n ...data,\n constructionNumbers: data.constructionNumbers.filter(objectIsIncluded),\n propertyTypes: data.propertyTypes.filter(objectIsIncluded),\n apartmentBuildings: data.apartmentBuildings.filter(objectIsIncluded),\n projectPhases: data.projectPhases.filter((projectPhase) => {\n return !!inputs.find((input) =>\n filterFunctions.projectPhase(projectPhase, input),\n );\n }),\n };\n });\n });\n\n return filteredData;\n}\n\nconst getViewTypePolygonOrder = (viewType?: ViewType): HouseSelectorObjectTypeOrder => {\n switch (viewType) {\n case 'propertyType':\n case 'apartmentPropertyType': {\n return PROPERTY_TYPE_VIEW_POLYGON_ORDER;\n }\n default: {\n return CONSTRUCTION_NUMBER_VIEW_POLYGON_ORDER;\n }\n }\n};\n\nfunction sortHouseSelectorData(houseSelectorData: HouseSelectorModel) {\n houseSelectorData.views?.forEach(\n (view) =>\n view.polygons?.length &&\n view.polygons.sort(\n ({ order: orderA = LAST_POLYGON_ORDER }, { order: orderB = LAST_POLYGON_ORDER }) =>\n orderB - orderA,\n ),\n );\n}\n\nconst findInPropertiesDataById = (\n id: string,\n): { object?: ExtendedApiObject; isSoldProjectData?: boolean } => {\n let object: ExtendedApiObject | undefined;\n\n const filteredData = getFilteredData();\n if (filteredData) {\n object = findExtendedObjectById(filteredData, id);\n if (object) {\n return { object, isSoldProjectData: propertiesStore.getState().allProjectsSold };\n }\n }\n\n const soldProjectsData = getSoldProjectsData();\n if (soldProjectsData) {\n object = findExtendedObjectById(soldProjectsData, id);\n if (object) return { object, isSoldProjectData: true };\n }\n\n return {};\n};\n\nconst setPolygonDrawingOptions = (polygon: HouseSelectorPolygon, currentView: View) => {\n const { objectId, objectType, linkToViewId } = polygon;\n const { type, slug } = currentView;\n\n polygon.variant = 'white';\n polygon.canHover = true;\n polygon.hidden = false;\n polygon.order = getViewTypePolygonOrder(type)[objectType];\n\n if (objectType === 'viewLink' && !!linkToViewId) {\n polygon.variant = 'link';\n return;\n }\n\n if (!objectId) {\n return;\n }\n\n const { object, isSoldProjectData } = findInPropertiesDataById(objectId);\n\n switch (object?.status) {\n case 'InPreparation':\n case 'AmountAvailable':\n case 'SaleSoon': {\n polygon.variant = 'white';\n break;\n }\n case 'UnderConstruction': {\n polygon.variant = 'purple';\n break;\n }\n case 'InOption':\n case 'AssigningOn':\n case 'Reserved': {\n polygon.variant = 'orange';\n break;\n }\n case 'SaleStarted':\n case 'OnSale':\n case 'Available':\n case 'ForRent': {\n polygon.variant = 'green';\n break;\n }\n case 'Sold':\n case 'Rented':\n case 'NotActive': {\n polygon.variant = 'red';\n break;\n }\n default: {\n break;\n }\n }\n\n const isHighLevelPolygon = ['areaProject', 'district', 'projectPhase'].includes(objectType);\n\n if (isHighLevelPolygon) {\n polygon.variant = 'white';\n if (!linkToViewId) {\n polygon.canHover = false;\n }\n }\n\n if (!object) {\n polygon.canHover = false;\n polygon.variant = 'striped';\n polygon.order = LAST_POLYGON_ORDER;\n }\n\n if (isSoldProjectData) {\n polygon.variant = 'red';\n polygon.order = SOLD_DATA_POLYGON_ORDER[objectType];\n }\n\n if (slug) {\n const { object: slugObject } = findInPropertiesDataById(slug);\n let polygonCorrelates = false;\n if (!slugObject) return;\n\n switch (slugObject.objectType) {\n case 'apartmentBuilding': {\n polygonCorrelates =\n slugObject.id === objectId ||\n !!slugObject.constructionNumbers?.find((cn) => cn.id === objectId) ||\n !!slugObject.propertyTypes?.find((cn) => cn.id === objectId);\n\n break;\n }\n case 'projectPhase': {\n polygonCorrelates =\n slugObject.id === objectId ||\n !!slugObject.constructionNumbers?.find((cn) => cn.id === objectId) ||\n !!slugObject.propertyTypes?.find((cn) => cn.id === objectId);\n\n break;\n }\n case 'propertyType': {\n polygonCorrelates =\n slugObject.id === objectId ||\n !!slugObject.constructionNumbers?.find((cn) => cn.id === objectId);\n\n break;\n }\n }\n\n if (isHighLevelPolygon || !polygonCorrelates) {\n polygon.canHover = false;\n polygon.variant = 'striped';\n polygon.order = LAST_POLYGON_ORDER;\n }\n }\n\n return;\n};\n\nconst getHouseSelectorHelperData = ({\n objectType,\n objectId,\n linkToViewId,\n}: HouseSelectorObject) => {\n let additionalData: Object | undefined;\n\n if (objectType !== 'viewLink' && objectId) {\n const { object, isSoldProjectData } = findInPropertiesDataById(objectId);\n if (object) {\n const { status } = object;\n additionalData = { status, isSoldProjectData };\n }\n }\n\n const helperObject = {\n objectId,\n objectType,\n linkToViewId,\n ...(additionalData && additionalData),\n };\n\n return JSON.stringify(helperObject, null, 2);\n};\n\nexport {\n filterData,\n filterDataByDistrict,\n filterHouseSelectorData,\n findInPropertiesDataById,\n getHouseSelectorHelperData,\n setPolygonDrawingOptions,\n sortHouseSelectorData,\n};\n","import { h } from '@atomify/jsx';\nimport { MapLabel } from '@atoms/map-label';\nimport { extendMapTheme, GREY_DARK, HOVER, MapThemeExtension, RED, THEME } from '@utilities/map';\n\nexport const PROPERTIES_THEME: MapThemeExtension = extendMapTheme(THEME, {\n polygon: {\n settings: [\n {\n variant: `projectPhaseSold`,\n normal: {\n fill: [...RED, 0.5],\n stroke: [...GREY_DARK, 1],\n },\n hover: HOVER,\n },\n {\n variant: `hidden`,\n visibility: 'none',\n normal: {},\n },\n ],\n },\n pointer: {\n settings: [\n {\n variant: 'projectPhaseSoldPointer',\n disablePointerEvents: true,\n createElement: (item) => ,\n },\n ],\n },\n});\n","import { FilterState } from '../store';\n\ninterface TransformFiltersProps {\n filterName: string; // key that is displayed within the url\n minValue: number | null;\n maxValue: number | null;\n stringValues: Array | null;\n}\n\nexport const transformFilters = (items: FilterState) => {\n const transformedFilters: TransformFiltersProps[] = [];\n\n Object.keys(items).forEach(key => {\n const filterName = key as keyof typeof items;\n const { hasRangeValues, inputs } = items[filterName];\n const filterInputs = inputs.filter(input => input.checked);\n\n if (hasRangeValues) {\n transformedFilters.push({\n filterName: filterName as string,\n stringValues: null,\n minValue: filterInputs.length > 0 ? parseInt(filterInputs[0].value) : null,\n maxValue: filterInputs.length > 1 ? parseInt(filterInputs[1].value) : null,\n });\n } else {\n transformedFilters.push({\n filterName: filterName as string,\n stringValues: filterInputs.map(input => input.value),\n minValue: null,\n maxValue: null,\n });\n }\n });\n\n return transformedFilters.filter(transformFiltersHasValues);\n};\n\n/**\n * Check if the a transformed value has any values otherwise we do not sent it.\n * @param {TransformFiltersProps} item\n * @returns { boolean }\n */\nfunction transformFiltersHasValues(item: TransformFiltersProps) {\n return (item.stringValues && item.stringValues.length > 0) || item.minValue || item.maxValue;\n}\n","import {\n ExtendedConstructionNumber,\n ExtendedProjectPhase,\n ExtendedPropertyType,\n} from '@bpd-library/utilities';\nimport { Filters } from '@features/properties/components/properties-filters/filters';\nimport createStore from '@utilities/store';\n\nimport { transformFilters } from './utilities/transform-filters';\nimport { transformPayload } from './utilities/transform-payload';\n\n// Saved within the store\nexport interface FilterInput {\n value: string;\n name: string;\n checked: boolean;\n id: string;\n label: string;\n type: string;\n}\n\nexport interface PropertiesFilterFunctions {\n constructionNumber: (\n constructionNumber: ExtendedConstructionNumber,\n filterInput: FilterInput,\n ) => boolean;\n propertyType: (propertyType: ExtendedPropertyType, filterInput: FilterInput) => boolean;\n projectPhase: (projectPhase: ExtendedProjectPhase, filterInput: FilterInput) => boolean;\n}\n\nexport interface SelectedFilter {\n hasRangeValues: boolean;\n filterFunctions: PropertiesFilterFunctions;\n filterLogic?: FilterLogic;\n inputs: FilterInput[];\n}\n\nexport interface FilterState {\n [key: string]: SelectedFilter;\n}\n\nexport type FilterLogic = '&&' | '||';\n\nexport interface Filter {\n name: string;\n id: string;\n checked: boolean;\n value: string;\n type: string;\n hasRangeValues: boolean;\n filterLogic?: FilterLogic;\n}\n\ninterface State {\n filters: FilterState;\n isLoading: boolean;\n currentFilterChange: string;\n isOpen: boolean;\n}\n\nconst initialState: State = {\n filters: {},\n isLoading: true,\n currentFilterChange: '',\n isOpen: false,\n};\n\nconst ADD_FILTERS = 'addFilters';\nconst UPDATE_FILTERS = 'updateFilters';\nconst OPEN_FILTERS = 'openFilters';\nconst RESET_FILTERS = 'resetFiltes';\n\nconst actions = {\n [ADD_FILTERS]: (state: State, payload: Filters) => {\n state.filters = transformPayload(payload);\n state.isLoading = false;\n return state;\n },\n [UPDATE_FILTERS]: (state: State, payload: Filter) => {\n const currentFilter = state.filters[payload.name];\n const { filterLogic } = currentFilter;\n\n state.currentFilterChange = payload.name;\n\n state.filters = {\n ...state.filters,\n [payload.name]: {\n ...currentFilter,\n inputs: currentFilter.inputs.map((input) => {\n // if filters has range values and is a radio set all checked radio falseexcept the current id\n if (payload.type === 'radio' && payload.hasRangeValues) {\n input.checked = payload.id === input.id ? payload.checked : false;\n }\n\n // If type is checkbox or radio and not a range value update only the checked status when the id of the input is the same as the input of the payload\n if (\n (payload.type === 'checkbox' || payload.type === 'radio') &&\n !payload.hasRangeValues &&\n input.id === payload.id\n ) {\n input.checked = payload.checked;\n }\n\n if (filterLogic === '&&' && payload.id === input.id) {\n currentFilter.inputs.map((input) => (input.checked = payload.checked));\n input.value = payload.value;\n }\n\n return input;\n }),\n },\n };\n\n return state;\n },\n\n [OPEN_FILTERS]: (state: State, payload: boolean) => {\n state.isOpen = payload;\n return state;\n },\n [RESET_FILTERS]: (state: State, payload: boolean) => {\n if (payload) {\n const newFilters: FilterState = {};\n\n Object.keys(state.filters).forEach((filterName) => {\n const filter = state.filters[filterName];\n\n newFilters[filterName] = {\n ...filter,\n inputs: filter.inputs.map((input) => ({ ...input, checked: false })),\n };\n });\n state.currentFilterChange = 'all';\n state.filters = { ...newFilters };\n }\n\n return state;\n },\n};\n\nexport const filterStore = createStore({\n initialState,\n actions,\n});\n\nexport const addFilters = (payload: Filters) => {\n filterStore.dispatch(ADD_FILTERS, payload);\n};\n\nexport const getSelectedFilters = () => {\n const { filters } = filterStore.getState();\n\n return transformFilters(filters);\n};\n\nexport const getSelectedFiltersByType = (type: string) => {\n const { filters } = filterStore.getState();\n const selectedFilters = transformFilters(filters);\n return selectedFilters.find((filter) => filter.filterName === type);\n};\n\nexport const getAllFilters = () => {\n return filterStore.getState().filters;\n};\n\nexport const getFilterInputByValue = (name: string, value: string) => {\n const { filters } = filterStore.getState();\n\n const filter = filters[name];\n\n return filter.inputs.find((input) => input.value === value) as FilterInput;\n};\n\nexport const updateFilter = (payload: Filter) => {\n filterStore.dispatch(UPDATE_FILTERS, payload);\n};\n\nexport const getFilterByType = (type: string) => {\n const { filters } = filterStore.getState();\n return filters[type];\n};\n\nexport const toggleFilters = (state: boolean) => {\n filterStore.dispatch(OPEN_FILTERS, state);\n};\n\nexport const resetFilters = (state: boolean) => filterStore.dispatch(RESET_FILTERS, state);\n","import { Filters } from '@features/properties/components/properties-filters/filters';\n\nimport { FilterState } from '../store';\n\nexport const transformPayload = (items: Filters): FilterState => {\n const constructedFilters: FilterState = {};\n\n Object.keys(items).forEach((key) => {\n const filterName = key as keyof typeof items;\n const { hasRangeValues, filterFunctions, filterLogic, filters } = items[filterName];\n\n constructedFilters[filterName] = {\n hasRangeValues,\n filterFunctions,\n filterLogic,\n inputs: filters.components.map(({ label, id, name, checked, value, type }) => ({\n label,\n id,\n name,\n checked,\n value,\n type,\n })),\n };\n });\n return constructedFilters;\n};\n","import { h } from '@atomify/jsx';\nimport { Button, ButtonA } from '@source/components/atoms/button/button';\nimport { Image } from '@source/components/atoms/image';\nimport { COLOR_CLASSES, FormattedPrice, FormattedStatus } from '@source/utilities/api-formatters';\n\ninterface HouseSelectorCardProps {\n title: string;\n image?: string | null;\n description?: string | null;\n identifier?: string | null;\n status?: FormattedStatus | null;\n price?: FormattedPrice | null;\n specs?:\n | {\n title: string | Text;\n subtitle: string | Text;\n }[]\n | null;\n buttonLabel?: string | Text | null;\n buttonUrl?: string | null;\n onButtonClick?: (event: MouseEvent) => void;\n onClose?: Function | null;\n isNhg?: boolean;\n}\n\nconst HouseSelectorCard = ({\n image,\n title,\n description,\n identifier,\n status,\n price,\n specs,\n isNhg,\n buttonLabel,\n buttonUrl,\n onButtonClick,\n onClose,\n}: HouseSelectorCardProps) => {\n return (\n
\n {image && (\n
\n \n
\n )}\n\n {identifier && (\n #{identifier}\n )}\n\n {onClose && (\n \n )}\n\n
\n \n {status && (\n \n {status.label}\n \n )}\n\n

{title}

\n\n {price && (\n \n {price.prefix && (\n \n {price.prefix}\n \n )}\n {price.amount && price.amount}\n {price.suffix && (\n \n {price.suffix}\n \n )}\n {isNhg && (\n NHG\n )}\n \n )}\n\n {description &&

{description}

}\n
\n\n {specs && (\n
\n {specs.map((spec) => (\n
\n

{spec.title}

\n {spec.subtitle}\n
\n ))}\n
\n )}\n\n {buttonLabel && buttonUrl && (\n \n )}\n\n {buttonLabel && !buttonUrl && onButtonClick && (\n \n )}\n
\n \n );\n};\n\nexport { HouseSelectorCard };\n","import { clearFocus, setFocus } from '@bpd-library/components';\nimport { ExtendedConstructionNumber, ExtendedPropertyType } from '@bpd-library/utilities';\nimport { HouseSelectorElement } from '@features/properties/components/house-selector';\nimport { getCurrentView, getHouseSelectorViewByObjectId } from '@features/properties/store';\nimport { virtualView2dPointerEvents } from '@features/virtual-tour/constants';\n\nimport { HouseSelectorView } from '../../house-selector/utilities/types';\n\nconst useContentInteraction = (options: {\n houseSelectorElement?: { current: HouseSelectorElement | null };\n}) => {\n function onMouseenter(_: MouseEvent, item: ExtendedConstructionNumber | ExtendedPropertyType) {\n const { type } = getCurrentView() || {};\n\n switch (type) {\n case 'constructionNumber':\n setFocus([item.id], { static: true });\n houseSelectorPolygonFocus([item.id], true);\n break;\n case 'apartmentConstructionNumber':\n houseSelectorPolygonFocus([item.id], true);\n virtualTourLabelFocus(item as ExtendedConstructionNumber, true);\n break;\n case 'propertyType':\n item = item as ExtendedPropertyType;\n const constructionNumberIds = item.constructionNumbers?.map(({ id }) => id) || [];\n const apartmentBuildingIds = item.apartmentBuildings?.map(({ id }) => id) || [];\n const focusIds = [item.id, ...constructionNumberIds, ...apartmentBuildingIds];\n\n /*\n * In some cases the propertyType polygon is drawn instead of constructionNumbers.\n * Add both constructionNumber and item id to be sure.\n */\n\n houseSelectorPolygonFocus(focusIds, true);\n setFocus(focusIds);\n\n break;\n }\n }\n\n function onMouseleave(_: MouseEvent, item: ExtendedConstructionNumber | ExtendedPropertyType) {\n const { type } = getCurrentView() || {};\n\n houseSelectorPolygonFocus([item.id], false);\n\n if (type !== 'apartmentConstructionNumber') clearFocus();\n else virtualTourLabelFocus(item as ExtendedConstructionNumber, false);\n }\n\n function virtualTourLabelFocus(item: ExtendedConstructionNumber, active: boolean) {\n const event = new CustomEvent(virtualView2dPointerEvents.LABEL_FOCUS, {\n detail: {\n active,\n id: item.id,\n },\n });\n\n return document.dispatchEvent(event);\n }\n\n async function houseSelectorPolygonFocus(apiObjectIds: string[], active: boolean) {\n const houseSelector = options?.houseSelectorElement?.current;\n if (!houseSelector) return;\n\n if (active) {\n houseSelector.hoverDisabled = true;\n let focusPolygons = houseSelector.currentView?.polygons?.filter(\n ({ objectId }) => objectId && apiObjectIds.includes(objectId),\n );\n\n if (!focusPolygons?.length) {\n let polygonView: HouseSelectorView | undefined;\n\n apiObjectIds.find((id) => {\n polygonView = getHouseSelectorViewByObjectId(id);\n return !!polygonView;\n });\n\n polygonView && (await houseSelector.setView(polygonView));\n\n focusPolygons = houseSelector.currentView?.polygons?.filter(\n ({ objectId }) => objectId && apiObjectIds.includes(objectId),\n );\n if (!focusPolygons?.length) return;\n }\n\n houseSelector.highlightedPolygons = focusPolygons ?? null;\n } else {\n houseSelector.hoverDisabled = false;\n houseSelector.highlightedPolygons = null;\n }\n }\n\n return [onMouseenter, onMouseleave];\n};\n\nexport { useContentInteraction };\n","const houseSelectorEvents = {\n POLYGON_HOVER: 'house-selector::polygonHovered',\n POLYGON_FOCUS: 'house-selector::focusPolygon',\n};\n\nexport { houseSelectorEvents };\n","import { RGBA } from '@bpd-library/types';\nimport { getAssetsFolder } from '@utilities/get-assets-folder';\nimport {\n BLUE,\n BLUE_ALPHA,\n BLUE_ALPHA_LIGHT,\n GREEN,\n GREEN_ALPHA,\n GREY_DARK,\n ORANGE,\n ORANGE_ALPHA,\n PURPLE,\n PURPLE_ALPHA_LIGHT,\n RED,\n RED_ALPHA,\n RGB,\n WHITE,\n WHITE_ALPHA,\n} from '@utilities/map';\nimport { nextEvent } from '@utilities/next-event';\n\nimport { CanvasStyle, CanvasStyleItem } from './types';\n\nconst STRIPED_IMAGE_URL = '/images/no-filter-found-pattern.png';\nlet stripedImage: HTMLImageElement;\n\nconst BASE_ITEM_STYLE: Partial = {\n lineJoin: 'round',\n lineWidth: 2,\n lineCap: 'round',\n setLineDash: () => [],\n};\n\nconst createColoredStyle = (strokeColor: RGB, fillColor: RGBA) => {\n return {\n ...BASE_ITEM_STYLE,\n strokeStyle: `rgb(${strokeColor.join(',')})`,\n fillStyle: `rgba(${fillColor.join(',')})`,\n };\n};\n\nconst createStripedStyle = (context: CanvasRenderingContext2D): Partial => {\n return {\n ...BASE_ITEM_STYLE,\n strokeStyle: `rgb(${GREY_DARK.join(',')})`,\n fillStyle: context.createPattern(stripedImage, 'repeat')!,\n };\n};\n\nconst initCanvasStyles = async (context: CanvasRenderingContext2D): Promise => {\n await loadStripedImage();\n return {\n polygons: {\n blue: createColoredStyle(BLUE, BLUE_ALPHA),\n green: createColoredStyle(GREEN, GREEN_ALPHA),\n orange: createColoredStyle(ORANGE, ORANGE_ALPHA),\n red: createColoredStyle(RED, RED_ALPHA),\n white: createColoredStyle(WHITE, WHITE_ALPHA),\n purple: createColoredStyle(PURPLE, PURPLE_ALPHA_LIGHT),\n link: createColoredStyle(BLUE, BLUE_ALPHA_LIGHT),\n highlighted: createColoredStyle(BLUE, BLUE_ALPHA),\n striped: createStripedStyle(context),\n },\n };\n};\n\nconst applyStyle = (context: any, style: CanvasStyleItem) => {\n if (!context || !style) return;\n\n const entries = Object.entries(style as any);\n\n entries.forEach(([key, value]) => {\n if (typeof value === 'function') {\n context[key](value());\n } else {\n context[key] = value;\n }\n });\n};\n\nasync function loadStripedImage() {\n stripedImage = new Image();\n stripedImage.src = getAssetsFolder(STRIPED_IMAGE_URL);\n\n await nextEvent(stripedImage, 'load');\n}\n\nexport { initCanvasStyles, applyStyle };\n","import { Point } from '@bpd-library/utilities';\nimport { Dimensions } from '@features/virtual-tour/types';\n\nimport { HouseSelectorPolygon } from './types';\n\nexport const convertPercentageGeometryToPixels = (\n { width, height }: Dimensions,\n objects: HouseSelectorPolygon[],\n) => {\n const updatePolygonPoints = (object: HouseSelectorPolygon) => {\n if (!object.polygon) return;\n if (!object.polygonPx) object.polygonPx = [];\n\n const percentageToPixels = ({ x, y }: Point, index: number) => {\n const xPx = Math.floor(width * x!);\n const yPx = Math.floor(height * y!);\n\n if (object.polygonPx?.[index]) {\n object.polygonPx[index].x = xPx;\n object.polygonPx[index].y = yPx;\n } else {\n object.polygonPx?.push({ x: xPx, y: yPx });\n }\n };\n\n object.polygon?.forEach(percentageToPixels);\n };\n\n objects.forEach(updatePolygonPoints);\n};\n","import { h } from '@atomify/jsx';\nimport { Label } from '@atoms/label/label';\nimport { Marker, MarkerProps } from '@atoms/marker/marker';\n\nimport { HouseSelectorObjectHandler, HouseSelectorPointer } from './types';\n\nexport const renderPointer = (\n pointer: HouseSelectorPointer,\n pointerProps?: { onPointerClick: HouseSelectorObjectHandler },\n): Element => {\n if (!pointer.iconName) {\n return (\n \n