PageSourceSearch

https://www.amaken.jo/_next/static/chunks/app/%5Blocale%5D/search-…/page-19089ec27dff34c3.js

js amaken.jo collected 2026-10-02 00:03:11 UTC 16,201 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3591],{1713:(e,r,n)=>{Promise.resolve().then(n.bind(n,21256)),Promise.resolve().then(n.bind(n,64707)),Promise.resolve().then(n.bind(n,3809)),Promise.resolve().then(n.t.bind(n,81356,23)),Promise.resolve().then(n.bind(n,19613)),Promise.resolve().then(n.bind(n,33587)),Promise.resolve().then(n.bind(n,86247)),Promise.resolve().then(n.bind(n,33252)),Promise.resolve().then(n.bind(n,45500)),Promise.resolve().then(n.bind(n,96071)),Promise.resolve().then(n.bind(n,83286)),Promise.resolve().then(n.bind(n,35064)),Promise.resolve().then(n.bind(n,69734)),Promise.resolve().then(n.bind(n,84820)),Promise.resolve().then(n.bind(n,24383)),Promise.resolve().then(n.bind(n,48711)),Promise.resolve().then(n.bind(n,31957)),Promise.resolve().then(n.bind(n,92465)),Promise.resolve().then(n.bind(n,95983)),Promise.resolve().then(n.bind(n,37255)),Promise.resolve().then(n.bind(n,88750)),Promise.resolve().then(n.bind(n,28179)),Promise.resolve().then(n.bind(n,90771)),Promise.resolve().then(n.bind(n,13496)),Promise.resolve().then(n.bind(n,85897)),Promise.resolve().then(n.bind(n,50276)),Promise.resolve().then(n.bind(n,73457)),Promise.resolve().then(n.bind(n,3730)),Promise.resolve().then(n.bind(n,51834)),Promise.resolve().then(n.bind(n,6259)),Promise.resolve().then(n.bind(n,41052)),Promise.resolve().then(n.bind(n,92698)),Promise.resolve().then(n.bind(n,76444)),Promise.resolve().then(n.bind(n,26333)),Promise.resolve().then(n.bind(n,50909)),Promise.resolve().then(n.bind(n,11186)),Promise.resolve().then(n.bind(n,86259)),Promise.resolve().then(n.bind(n,64581)),Promise.resolve().then(n.bind(n,4249)),Promise.resolve().then(n.bind(n,44846)),Promise.resolve().then(n.bind(n,87270)),Promise.resolve().then(n.bind(n,13406)),Promise.resolve().then(n.bind(n,46767)),Promise.resolve().then(n.bind(n,31732)),Promise.resolve().then(n.bind(n,90854)),Promise.resolve().then(n.bind(n,59334)),Promise.resolve().then(n.bind(n,80155)),Promise.resolve().then(n.bind(n,77674)),Promise.resolve().then(n.bind(n,79011)),Promise.resolve().then(n.bind(n,48477)),Promise.resolve().then(n.bind(n,76020)),Promise.resolve().then(n.bind(n,17747)),Promise.resolve().then(n.bind(n,64023)),Promise.resolve().then(n.bind(n,97265)),Promise.resolve().then(n.bind(n,11889)),Promise.resolve().then(n.bind(n,41088)),Promise.resolve().then(n.bind(n,48749)),Promise.resolve().then(n.bind(n,88030))},19613:(e,r,n)=>{"use strict";n.d(r,{FilterBar:()=>h});var t=n(95155),o=n(12115),l=n(20063),s=n(12108),a=n(24033),i=n(66630),d=n(64749),c=n(8531),m=n(18955),u=n(65427),p=n(74701),v=n(4353);function h(){let{isLoading:e,filterData:r}=(0,c.PI)(),[n,h]=(0,o.useState)(!1),[g,b]=(0,o.useState)(null),y=(0,m.c3)("filter.tab-button"),f=(0,l.useSearchParams)(),x=(0,l.useParams)(),P=(0,o.useMemo)(()=>(null==r?void 0:r.propertyTypes)||[],[null==r?void 0:r.propertyTypes]),w=(0,o.useMemo)(()=>(null==r?void 0:r.governorates)||[],[null==r?void 0:r.governorates]),M=(0,o.useCallback)(()=>{let e={searchKeyword:"",offeringType:"",propertyCategory:"",priceRange:null,propertyType:null,governorate:null,bedrooms:null,bathrooms:null,sqMeterMin:"",sqMeterMax:"",amakenRef:"",have3DTour:!1,agency:null,amenities:[]},n=x.filters,t=(0,p.cl)(n,null==r?void 0:r.filterValueToTypeMap);t.offeringType&&(e.offeringType=t.offeringType),t.propertyCategory&&(e.propertyCategory=t.propertyCategory),t.propertyType&&t.propertyType.length>0&&(e.propertyType=t.propertyType.map(e=>P.find(r=>r.label===e)).filter(Boolean)),t.governorate&&(e.governorate=w.find(e=>e.label===t.governorate)||null),f.get("searchKeyword")&&(e.searchKeyword=f.get("searchKeyword")||"");let o=f.get("priceMin"),l=f.get("priceMax");if(o&&l&&(e.priceRange={min:Number.parseInt(o),max:Number.parseInt(l)}),f.get("bedrooms")&&(e.bedrooms=f.get("bedrooms")),f.get("bathrooms")&&(e.bathrooms=f.get("bathrooms")),f.get("sqMeterMin")&&(e.sqMeterMin=f.get("sqMeterMin")||""),f.get("sqMeterMax")&&(e.sqMeterMax=f.get("sqMeterMax")||""),f.get("amakenRef")&&(e.amakenRef=f.get("amakenRef")||""),f.get("have3DTour")&&(e.have3DTour="true"===f.get("have3DTour")),f.get("agencyValue")&&f.get("agencyLabel")){let r=f.get("agencyValue"),n=f.get("agencyLabel");r&&n&&(e.agency={value:r,label:n})}if(f.get("amenities")){var s;e.amenities=(null==(s=f.get("amenities"))?void 0:s.split(","))||[]}let a=f.get("formattedAddress")||"",i=f.get("sort")||"",{sortValue:d}=(0,u.$)(i);return{formattedAddress:a,sort:d,formData:e}},[null==r?void 0:r.filterValueToTypeMap,w,x.filters,f,P]),{filterDataForm:T,formattedAddress:N,sort:j}=(0,o.useMemo)(()=>{let{formData:e,formattedAddress:r,sort:n}=M();return{filterDataForm:e,formattedAddress:r,sort:n}},[M]),k=(0,o.useCallback)(()=>{b(null)},[]),C=(0,o.useMemo)(()=>[{id:"offeringType",hasDate:!!(null==T?void 0:T.offeringType),label:y("purpose"),content:(0,t.jsx)(v.bK,{offeringType:null==T?void 0:T.offeringType,onClose:k})},{id:"propertyType",hasDate:!!(null==T?void 0:T.propertyType),label:y("property-type"),content:(0,t.jsx)(v.Sx,{propertyType:null==T?void 0:T.propertyType,onClose:k})},{id:"priceRange",hasDate:!!(null==T?void 0:T.priceRange),label:y("price"),content:(0,t.jsx)(v.iU,{price:null==T?void 0:T.priceRange,onClose:k})},{id:"bathrooms/bedrooms",hasDate:!!(null==T?void 0:T.bathrooms)||!!(null==T?void 0:T.bedrooms),label:y("beds/baths"),content:(0,t.jsx)(v.j_,{bathrooms:null==T?void 0:T.bathrooms,bedrooms:null==T?void 0:T.bedrooms,onClose:k})}],[null==T?void 0:T.bathrooms,null==T?void 0:T.bedrooms,null==T?void 0:T.offeringType,null==T?void 0:T.priceRange,null==T?void 0:T.propertyType]);return e?(0,t.jsx)(v.HA,{}):(0,t.jsxs)("div",{className:"px-6 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(v.oK,{formattedAddress:N,sort:j}),C.map((e,r)=>(0,t.jsxs)(d.rI,{open:g===r,onOpenChange:e=>b(e?r:null),children:[(0,t.jsx)(d.ty,{className:"hidden md:inline-flex",asChild:!0,children:(0,t.jsxs)(d.$n,{variant:"outline",className:(0,
1c.cn)(" text-gray-700 hover:bg-orange-200 rounded-full px-6 h-10 cursor-pointer",e.hasDate&&"bg-orange-100 border-orange-200"),children:[e.label,g===r?(0,t.jsx)(s.A,{className:"h-4 w-4 ml-2"}):(0,t.jsx)(a.A,{className:"h-4 w-4 ml-2"})]})}),(0,t.jsx)(d.SQ,{className:"w-72 p-0",children:e.content})]},r)),(0,t.jsxs)(d.$n,{variant:"outline",className:"border-gray-300 text-gray-700 hover:bg-gray-50 rounded-lg  md:rounded-full px-6 h-10 bg-transparent cursor-pointer w-full md:w-auto",onClick:()=>h(!0),children:[(0,t.jsx)(i.A,{className:"h-4 w-4"}),y("advanced")]})]}),n&&(0,t.jsx)(v.nk,{values:T,open:n,setOpen:h,onSubmit:()=>h(!1),onReset:()=>h(!1),navigateType:"replace",navigateTo:"search-by-amaken-map"})]})}},33587:(e,r,n)=>{"use strict";n.d(r,{PropertiesGridMap:()=>y});var t=n(95155),o=n(12115),l=n(18955),s=n(66328),a=n(44035),i=n(64269),d=n(18720),c=n(8531),m=n(22952),u=n(88158);let p={lat:31.605903,lng:36.330817},v=e=>{let{placeId:r,propertyList:n,navigateTo:v="property-details",className:h,isLoadingProperties:g}=e,b=(0,l.c3)("search-by-amaken-map.map"),y=(0,s.Ym)(),f=(0,m.rd)(),x=(0,o.useRef)(null),P=(0,o.useRef)(null),w=(0,o.useRef)([]),[M,T]=(0,o.useState)(!1),N=(0,o.useCallback)(async e=>{try{var r,n;await (0,c.pO)(y);let t={zoom:null!=(r=null==e?void 0:e.zoom)?r:8,minZoom:8,rotateControl:!1,center:null!=(n=null==e?void 0:e.center)?n:p,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,streetViewControl:!1,mapId:"AIzaSyCsfNxQXgyadP6mMA-QfyckGYoMCbh8UNI",scrollwheel:!0,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}]},o=document.getElementById("map_canvas");if(!o)return void console.error("Map canvas element not found");let l=new google.maps.Map(o,t),s=function(e,r){let n;return function(){for(var t=arguments.length,o=Array(t),l=0;l<t;l++)o[l]=arguments[l];clearTimeout(n),n=setTimeout(()=>e(...o),r)}}(()=>{let e=l.getBounds(),r=l.getCenter(),n=l.getZoom();
1if(e&&r){let t=e.getNorthEast(),o=e.getSouthWest(),l={northeast:{lat:t.lat(),lng:t.lng()},southwest:{lat:o.lat(),lng:o.lng()},center:{lat:r.lat(),lng:r.lng()}},s=new URL(window.location.href),a=new URLSearchParams(s.search);a.set("mapBounds",JSON.stringify(l)),(0,c.Rq)({zoom_level:n,bounds:JSON.stringify(l),platform:"web"}),f.replace("?".concat(a.toString()),{scroll:!1})}},500),a=l.addListener("bounds_changed",s);w.current.push(a),x.current=l,T(!0)}catch(e){console.error("Error initializing Google Maps:",e),d.oR.error(b("MAP_LOAD_ERROR"))}},[y]);(0,o.useEffect)(()=>(N(),()=>{w.current.forEach(e=>{google.maps.event.removeListener(e)}),w.current=[],P.current&&P.current.setMap(null)}),[]),(0,o.useEffect)(()=>{x.current&&r&&M&&new google.maps.places.PlacesService(x.current).getDetails({placeId:r},(e,r)=>{var n,t,o;r===google.maps.places.PlacesServiceStatus.OK&&(null==e||null==(n=e.geometry)?void 0:n.location)&&(null==(t=x.current)||t.setCenter(e.geometry.location),null==(o=x.current)||o.setZoom(14.5))})},[r,M]);let j=(0,o.useCallback)(e=>{var r,n,t,o;let l=[null==e||null==(r=e.village)?void 0:r.village,null==e||null==(n=e.directorate)?void 0:n.directorate,null==e||null==(t=e.governorate)?void 0:t.governorate].filter(Boolean).join(", ");return'\n      <div class="bg-white rounded-lg shadow-lg border border-gray-200 overflow-hidden max-w-sm">\n        <div class="flex space-x-3 p-3">\n          <div class="flex-shrink-0">\n            <img \n              src="'.concat((null==e?void 0:e.thumbnailImageName)||"/placeholder-property.jpg",'" \n              alt="').concat((null==e?void 0:e.title)||"Property",'" \n              class="w-16 h-16 rounded-lg object-cover"\n            />\n          </div>\n          <div class="flex-1 min-w-0">\n            <h3 class="text-sm font-semibold text-gray-900 truncate mb-1">\n              <a \n                href="#" \n                id="property-link-').concat(e.id,'"\n                class="hover:text-blue-600 transition-colors"\n              >\n                ').concat((null==e?void 0:e.title)||"Untitled Property",'\n                <span class="inline-block ml-1 text-green-500">✓</span>\n              </a>\n            </h3>\n            <div class="space-y-1">\n              ').concat(l?'\n                <div class="flex items-start text-xs text-gray-600">\n                  <svg class="w-3 h-3 mt-0.5 mr-1 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">\n                    <path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd"/>\n                  </svg>\n                  <span class="truncate">'.concat(l,"</span>\n                </div>\n              "):"","\n              ").concat((null==e||null==(o=e.agent)?void 0:o.mobileNumber)?'\n                <div class="flex items-center text-xs text-gray-600">\n                  <svg class="w-3 h-3 mr-1 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">\n                    <path d="M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"/>\n                  </svg>\n                  <span>'.concat(e.agent.mobileNumber,"</span>\n                </div>\n              "):"","\n            </div>\n          </div>\n        </div>\n      </div>\n    ")},[]);return(0,o.useEffect)(()=>
1{if(!x.current||!(null==n?void 0:n.length)||!M){P.current&&(P.current.setMap(null),P.current=null);return}google.maps.importLibrary("marker").then(e=>{let{AdvancedMarkerElement:r}=e;if(!r)return void console.error("AdvancedMarkerElement is not available.");let t=null;P.current&&P.current.setMap(null);let o=new Map,l=n.map((e,n)=>{var l,s,a;let i={lat:(null==e||null==(l=e.coordinateWgs84)?void 0:l.y)?parseFloat(e.coordinateWgs84.y.toString()):p.lat,lng:(null==e||null==(s=e.coordinateWgs84)?void 0:s.x)?parseFloat(e.coordinateWgs84.x.toString()):p.lng};i=((e,r)=>({lat:e.lat+4e-6*r,lng:e.lng+4e-6*r}))(i,n);let d="".concat(e.id,"-").concat(i.lat.toFixed(6),",").concat(i.lng.toFixed(6));if(!o.has(d)){let n=new google.maps.InfoWindow({content:j(e)}),l=document.createElement("div");l.className="relative flex items-center justify-center w-10 h-10 bg-teal-600 rounded-full shadow-lg border-2 border-white hover:bg-blue-700 transition-colors cursor-pointer";let s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("class","w-5 h-5 text-white"),s.setAttribute("fill","none"),s.setAttribute("stroke","currentColor"),s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("stroke-width","2"),s.innerHTML=(0,u.hO)(null==e||null==(a=e.propertyType)?void 0:a.iconClassName),l.appendChild(s);let c=new r({map:x.current,position:i,content:l});c.addListener("click",()=>{t&&t.close(),n.open({anchor:c,map:x.current}),t=n,setTimeout(()=>{let r=document.getElementById("property-link-".concat(e.id));r&&r.addEventListener("click",r=>{r.preventDefault(),f.push("/".concat(v,"/").concat(e.id,"/").concat(e.slug))})},0)}),o.set(d,c)}return o.get(d)});P.current=new a.w1({markers:l.filter(Boolean),map:x.current})})},[M,n]),(0,t.jsx)("div",{className:(0,i.cn)("flex-1 h-[calc(100vh-162px)] ",h),children:(0,t.jsx)("div",{className:"flex flex-col h-full overflow-hidden relative",children:(0,t.jsx)("div",{className:"flex-1 border-0 rounded-none",children:(0,t.jsxs)("div",{className:"p-0 h-full relative",children:[(0,t.jsx)("div",{id:"map_canvas",className:"w-full h-full min-h-[400px] lg:min-h-[calc(100vh-195px)]"}),g&&(0,t.jsxs)("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 z-30 bg-white/80 backdrop-blur-sm px-4 py-2 rounded-full shadow-md flex items-center space-x-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 bg-amaken rounded-full animate-bounce [animation-delay:-0.3s]"}),(0,t.jsx)("span",{className:"w-2.5 h-2.5 bg-amaken rounded-full animate-bounce [animation-delay:-0.15s]"}),(0,t.jsx)("span",{className:"w-2.5 h-2.5 bg-amaken rounded-full animate-bounce"})]}),!M&&(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-100 flex items-center justify-center z-20",children:(0,t.jsxs)("div",{className:"flex flex-col items-center space-y-2",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-amaken"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:b("LOADING_MAP")})]})})]})})})})};var h=n(74701);async function g(e,r,n){var t;let o=[],l=await (0,h.IV)(),{offeringType:s,propertyCategory:a,propertyType:i=[],governorate:d}=(0,h.cl)(e.filters,null==l?void 0:l.filterValueToTypeMap);(null==(t=r.amenities)?void 0:t.split(","))&&r.amenities.split(",").forEach(e=>o.push(Number(e)));let c=n||(r.mapBounds?JSON.parse(r.mapBounds):void 0);return{isMapView:!0,propertyOfferingTypeLabel:s,propertyTypeNames:i.length?i:void 0,governorateName:d,propertyCategoryLabel:a,keyword:r.searchKeyword,minPrice:r.priceMin,maxPrice:r.priceMax,bedroom:r.bedrooms,bathroom:r.bathrooms,minAreaSqm:r.sqMeterMin,maxAreaSqm:r.sqMeterMax,amakenId:r.amakenRef,have3DTour:r.have3DTour?"true":void 0,entityId:r.agencyValue,amenityIdList:o.length?o:void 0,entityName:r.agencyValue?"Amaken":void 0,...r.geometry?{location:{geometry:(0,h.aB)(r.geometry)||void 0}}:{},...c?{mapbound:c}:{}}}var b=n(65427);function y(e){let{searchParams:r,params:n}=e,[l,s]=(0,o.useState)([]),[a,i]=(0,o.useState)(!0),{sort:d}=r,{orderBy:m,orderDirection:u}=(0,b.$)(d);return(0,o.useEffect)(()=>{(async()=>{try{var e;i(!0);let t=await g(n,r);if(!t.mapbound)return void i(!1);let o=await c.Xq.getPropertyMapList({orderBy:m,orderDirection:u,body:t});s(o),(0,c.Rq)({bounds:t.mapbound,selected_area:t.governorateName,property_type:null==(e=t.propertyTypeNames)?void 0:e.join(","),platform:"web"})}catch(e){console.error("Error fetching property List:",e)}finally{i(!1)}})()},[m,u,JSON.stringify(n),JSON.stringify(r)]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(v,{propertyList:l,placeId:r.placeId,isLoadingProperties:a})})}},65427:(e,r,n)=>{"use strict";function t(e){let[r,n]=(null!=e?e:"").split(",");return{orderBy:r,orderDirection:n,sortValue:"".concat(r,",").concat(n)}}n.d(r,{$:()=>t})}},e=>{e.O(0,[8776,6328,5455,684,9187,7583,1356,1722,5915,4749,7729,4353,8441,1255,7358],()=>e(e.s=1713)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.