{"version":3,"sources":["pages/preview/GuestApply/GuestApply.tsx","assets/property-sample1.png","pages/preview/PreviewContainer.tsx","assets/property-sample2.png"],"names":["inject","UNIT_STORE","observer","props","unitStore","history","useHistory","unitId","useParams","referralCode","URLSearchParams","location","search","get","phaInviteId","unit","unitItem","item","useEffect","a","fetchGuestApplyUnit","message","notification","error","duration","replace","WebRoutes","auth","login","fetchUnit","isHaloOrg","isOrgHalo","isHPAOrg","isOrgHPA","isHaloTypeOrg","isOrgHaloType","isMcEnearneyOrg","isOrgMcEnearney","isMatrixOrgUnit","isMatrixOrg","className","heading","organisation_id","PATRIOT_ORG","application_fee","variant","onClick","push","pathname","register","state","redirect_to","app","upload","onboarding","_search","actionButtons","module","exports","children","useState","nav1","setnav1","nav2","setnav2","slider1","setslider1","slider2","setslider2","isLoading","loading","isLoaded","loaded","data","urls","unit_images","items","forEach","unitImage","url","building","building_images","buildingImage","length","imageUrls","slice","map","id","imageUrl","name","building_name","address","unit_full_address","tags","title","Image1","Image2","isOrgMatrix","cx","width","height","viewBox","fill","xmlns","x1","y1","x2","y2","stroke","clipPath","d","asNavFor","ref","slider","property","key","src","alt","slidesToShow","swipeToSlide","focusOnSelect","index","HaloLandingBgImage"],"mappings":"wOAsWeA,sBAAOC,IAAPD,CAAmBE,aA/UE,SAACC,GAAkB,IAAD,EAC5CC,EAAcD,EAAdC,UAEFC,EAAUC,cAGRC,EAFOC,cAEPD,OACFE,EAAe,IAAIC,gBAAJ,OAAoBP,QAApB,IAAoBA,OAApB,EAAoBA,EAAOQ,SAASC,QAAQC,IAAI,OAC/DC,EAAc,IAAIJ,gBAAJ,OAAoBP,QAApB,IAAoBA,OAApB,EAAoBA,EAAOQ,SAASC,QAAQC,IAC9D,iBAGIE,EAAI,OAAGX,QAAH,IAAGA,GAAH,UAAGA,EAAWY,gBAAd,aAAG,EAAqBC,KAElCC,qBAAU,YACO,uCAAG,8BAAAC,EAAA,+EAERf,EAAUgB,qBAAqBb,GAFvB,8DAQNc,EARM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DACV2E,IAAKD,EAAS3B,IACd,yBACE4B,IAAKD,EAAS3B,GACd6B,IAAKF,EAAS1B,SACd6B,IAAI,WACJ7E,UAAU,uBAMlB,yBACEA,UAAW0D,IAAG,CACZ,YAA+B,IAAlBzB,IAAOU,UAEtB,kBAAC,IAAD,CACE4B,SAAUlD,EACVmD,IAAK,SAACC,GAAD,OAAiB7C,EAAW6C,IACjCK,aAAc,GACdC,cAAY,EACZC,eAAa,GACZ/C,IAAOa,KAAI,SAAC4B,EAAUO,GACrB,OACE,yBACEN,IAAKD,EAAS3B,GACd/C,UAAU,mCACV,yBACE2E,IAAKD,EAAS3B,GACd6B,IAAKF,EAAS1B,SACd6B,IAAI,WACJ7E,UAAU,yBAqJnBN,GACC,yBAAKM,UAAU,4DACb,yBAAKA,UAAU,aACb,yBACEA,UAAU,kEACV4E,IAAKM,IACLL,IAAI,0B,oBCtepB5D,EAAOC,QAAU,IAA0B,8C","file":"static/js/77.b9882aa4.chunk.js","sourcesContent":["import { notification } from 'antd';\nimport { PATRIOT_ORG } from 'constants/constants';\nimport { UNIT_STORE } from 'constants/stores';\nimport { inject, observer } from 'mobx-react';\nimport React, { useEffect } from 'react';\nimport { RouteComponentProps, useHistory, useParams } from 'react-router-dom';\nimport WebRoutes from 'routes/web/WebRoutes';\nimport HeadingText from 'shared/components/HeadingText/HeadingText';\nimport MTButton from 'shared/components/MTButton/MTButton';\nimport { UnitStore } from 'stores/UnitStore';\nimport {\n isMatrixOrg,\n isOrgHalo,\n isOrgHaloType,\n isOrgHPA,\n isOrgMcEnearney,\n} from 'utils/helpers';\nimport PreviewContainer from '../PreviewContainer';\n\ninterface Props extends RouteComponentProps {\n [UNIT_STORE]?: UnitStore;\n}\n\nconst GuestApply: React.FC = (props: Props) => {\n const { unitStore } = props;\n\n const history = useHistory();\n const params = useParams<{ unitId: string }>();\n\n const { unitId } = params;\n const referralCode = new URLSearchParams(props?.location.search).get('ref');\n const phaInviteId = new URLSearchParams(props?.location.search).get(\n 'pha_invite_id',\n );\n\n const unit = unitStore?.unitItem?.item;\n\n useEffect(() => {\n const fetchUnit = async () => {\n try {\n await unitStore.fetchGuestApplyUnit(+unitId);\n // if (isMatrixOrg(unit) && REACT_APP_ENV === ENVIRONMENT.PRODUCTION) {\n // window.location.replace('https://mymatrixrent.com');\n // return;\n // }\n } catch (e) {\n const { message } = e as any;\n notification.error({ message, duration: 2 });\n history.replace(WebRoutes.auth.login);\n }\n };\n\n fetchUnit();\n }, [unitId, unit, unitStore, history]);\n\n const isHaloOrg = isOrgHalo(unit);\n const isHPAOrg = isOrgHPA(unit);\n const isHaloTypeOrg = isOrgHaloType(unit);\n const isMcEnearneyOrg = isOrgMcEnearney(unit);\n const isMatrixOrgUnit = isMatrixOrg(unit);\n\n const unitDescription = () => {\n if (unit?.organisation_id === PATRIOT_ORG) {\n return (\n <>\n

\n To qualify for an apartment, we do require: Two years of good\n references; Proof of Sufficient Income (combined gross income is at\n least three (3) times the monthly rent amount); Good credit; No\n criminal history; No records of eviction.\n

\n

\n In addition to this rental application, you will also be required to\n provide a copy of a valid form of identification and proof of\n income. You can defer and bring in the additional documentation to\n the office, but this will delay the processing of your application.\n

\n

\n Each resident over the age of 18 must submit a separate rental\n application.\n

\n \n );\n }\n\n if (isHaloOrg) {\n return (\n
\n

\n Americans don’t dream of renting a home.\n

\n

\n They dream of owning one.\n

\n
\n );\n }\n\n if (isHPAOrg) {\n return (\n
\n

\n Rent or own, the choice is yours.\n

\n

\n Choose a home for sale and rent it! We give you the exclusive right\n to buy it and you decide if it’s right for you.\n

\n
\n );\n }\n\n if (isMcEnearneyOrg) {\n return (\n
\n {/*

*/}\n {/* Rent or own, the choice is yours. */}\n {/*

*/}\n
\n Before you begin:\n
\n \n
\n );\n }\n\n return (\n <>\n

\n Please be prepared to pay the application fee as outlined in the\n property listing. In addition to this rental application, you will\n also be required to provide a copy of a valid form of identification\n and proof of income.\n

\n

\n Each resident over the age of 18 must submit a separate rental\n application.\n

\n {!isMatrixOrgUnit && (\n \n Application fee: ${unit?.application_fee}\n \n )}\n \n );\n };\n\n const actionButtons = () => {\n if (isHaloTypeOrg) {\n return (\n
\n {\n history.push({\n pathname: WebRoutes.auth.register,\n search: `?apply_for_unit=${unitId}`,\n state: {\n redirect_to: WebRoutes.app.upload.onboarding.replace(\n ':unitId',\n unitId,\n ),\n },\n });\n }}\n className=\"bg-haloBtnBg\">\n {isHaloOrg ? 'Upload Documents' : 'Start Application'}\n \n
\n );\n }\n\n let _search = `?apply_for_unit=${unitId}`;\n\n if (referralCode) {\n _search = `${_search}&ref=${referralCode}`;\n }\n\n if (phaInviteId) {\n _search = `${_search}&pha_invite_id=${phaInviteId}`;\n }\n return (\n
\n {\n history.push({\n pathname: WebRoutes.auth.register,\n search: _search,\n state: {\n redirect_to: WebRoutes.app.upload.onboarding.replace(\n ':unitId',\n unitId,\n ),\n },\n });\n }}\n className=\"m-2\">\n Continue to Apply\n \n {\n history.push({\n pathname: WebRoutes.auth.login,\n search: _search,\n });\n }}\n className=\"m-2\">\n SIGN IN\n \n
\n );\n };\n\n const getHeading = () => {\n if (isHPAOrg) {\n return 'Ready to Start';\n }\n\n if (isMcEnearneyOrg) {\n return 'Rental Application';\n }\n\n return 'Want to rent this Property?';\n };\n\n return (\n <>\n {/* {isMatrixOrg(unit) && (\n \n )} */}\n \n
\n {getHeading()}\n \n {isHaloOrg\n ? 'Create an account, or Sign in'\n : 'Create an account, or Sign in to rent this property!'}\n \n
\n {unitDescription()}\n
\n\n {actionButtons()}\n
\n
\n \n );\n};\n\nexport default inject(UNIT_STORE)(observer(GuestApply));\n","module.exports = __webpack_public_path__ + \"static/media/property-sample1.afda5747.png\";","import { UNIT_STORE } from 'constants/stores';\nimport React, { useEffect, useState } from 'react';\nimport { inject, observer } from 'mobx-react';\nimport Loader from 'shared/components/Loader/Loader';\nimport { UnitStore } from 'stores/UnitStore';\nimport Image1 from 'assets/property-sample1.png';\nimport Image2 from 'assets/property-sample2.png';\nimport HeadingText from 'shared/components/HeadingText/HeadingText';\nimport Logo from 'components/Logo/Logo';\nimport Slider from 'react-slick';\nimport 'slick-carousel/slick/slick.css';\nimport 'slick-carousel/slick/slick-theme.css';\nimport './PropertyPreview.scss';\nimport {\n isOrgHalo,\n isOrgHaloType,\n isOrgHPA,\n isOrgMatrix,\n isOrgMcEnearney,\n} from 'utils/helpers';\nimport './PreviewContainer.style.scss';\nimport { HaloLandingBgImage } from 'constants/constants';\nimport cx from 'classnames';\n\ninterface Props {\n children: React.ReactNode;\n [UNIT_STORE]?: UnitStore;\n}\n\nconst PreviewContainer: React.FC = (props: Props) => {\n const { unitStore, children } = props;\n\n const [nav1, setnav1] = useState(null);\n const [nav2, setnav2] = useState(null);\n const [slider1, setslider1] = useState(nav1);\n const [slider2, setslider2] = useState(nav2);\n\n useEffect(() => {\n setnav1(slider1);\n setnav2(slider2);\n }, [slider1, slider2]);\n\n const unit = unitStore?.unitItem?.item;\n const isLoading = unitStore?.unitItem?.loading;\n const isLoaded = unitStore?.unitItem?.loaded;\n\n const data = () => {\n const urls: string[] = [];\n unit.unit_images.items.forEach((unitImage) => urls.push(unitImage.url));\n unit.building.item.building_images.items.forEach((buildingImage) =>\n urls.push(buildingImage.url),\n );\n\n if (urls.length > 0) {\n let imageUrls: string[] = urls;\n if (urls.length > 10) {\n imageUrls = urls.slice(0, 10);\n }\n return imageUrls.map((url) => ({\n id: unit.id,\n imageUrl: url,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n }));\n }\n\n return [\n {\n id: unit.id,\n imageUrl: Image1,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image1,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image1,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n {\n id: unit.id,\n imageUrl: Image2,\n name: unit.name,\n building_name: unit.building?.item.name,\n address: unit.unit_full_address,\n tags: [\n {\n id: '1',\n title: '1450 sq. feet',\n },\n {\n id: '2',\n title: '2 bedroom apartment',\n },\n {\n id: '3',\n title: '2 bathroom',\n },\n ],\n },\n ];\n };\n\n const PropertyImageSlider = () => (\n
\n setslider1(slider)}>\n {data().map((property) => (\n \n \n
\n ))}\n \n\n \n setslider2(slider)}\n slidesToShow={10}\n swipeToSlide\n focusOnSelect>\n {data().map((property, index) => {\n return (\n \n \n \n );\n })}\n \n \n \n );\n\n if (isLoading || !isLoaded) {\n return ;\n }\n\n if (!unit) {\n return null;\n }\n\n const isHaloOrg = isOrgHalo(unit);\n const isHPAOrg = isOrgHPA(unit);\n const isHaloTypeOrg = isOrgHaloType(unit);\n const isMatrixOrg = isOrgMatrix(unit);\n const isMcEnearneyOrg = isOrgMcEnearney(unit);\n\n const headerText = () => {\n if (isHaloOrg) {\n return 'Halo Program';\n }\n if (isHPAOrg) {\n return 'Home Partners of America';\n }\n if (isMcEnearneyOrg) {\n return 'McEnearney Associates,';\n }\n return 'Matrix Rental Solutions';\n };\n\n const subHeaderText = () => {\n if (isMcEnearneyOrg) {\n return 'REALTORS';\n }\n return '';\n };\n\n return (\n
\n \n {children}\n
\n \n
\n \n \n \n \n \n \n

\n {headerText()}\n
\n {subHeaderText()}\n

\n
\n {!isHaloTypeOrg && (\n
\n \n {data()[0].name}\n \n \n \n \n \n \n \n {data()[0].name !== data()[0].building_name &&\n data()[0].building_name}\n {isMcEnearneyOrg && <>Application Fee: $50}\n \n
\n {!isMatrixOrg && !isMcEnearneyOrg && (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {data()[0].address}\n \n )}\n
\n )}\n\n {!isHaloTypeOrg && PropertyImageSlider()}\n\n {isHaloTypeOrg && (\n
\n
\n \n
\n
\n )}\n \n \n );\n};\n\nexport default inject(UNIT_STORE)(observer(PreviewContainer));\n","module.exports = __webpack_public_path__ + \"static/media/property-sample2.6e5011f9.png\";"],"sourceRoot":""}