1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4353],{4353:(e,r,t)=>{t.d(r,{nk:()=>p.AdvancedSearch,j_:()=>u.BedsFilter,FN:()=>c.Carousel,Wk:()=>c.CarouselContent,ZZ:()=>c.CarouselDots,A7:()=>c.CarouselItem,Oj:()=>c.CarouselNext,Q8:()=>c.CarouselPrevious,$9:()=>s.ControlledDatePicker,x8:()=>n.ControlledInput,OS:()=>i.ControlledOTPInput,Xo:()=>o.ControlledSelect,HA:()=>g,iU:()=>m.PriceFilter,Ne:()=>d.PropertyCardClient,Sx:()=>h.PropertyTypeFilter,bK:()=>x.PurposeFilter,oK:()=>f.SortAndSearch});var a=t(95155);t(22952);var l=t(64749);t(64453),t(12115);var n=t(24383),o=t(31957),s=t(84820),i=t(48711);t(92465),t(28179);var c=t(86247);t(11804);var d=t(95983);t(37255),t(90771);var p=t(33252),u=t(45500),m=t(96071),x=t(35064),h=t(83286),f=t(69734);function g(){return(0,a.jsx)(l.Zp,{className:"bg-white rounded-lg gap-3 shadow-sm p-6 space-y-4",children:(0,a.jsxs)("div",{className:"animate-pulse",children:[(0,a.jsx)("div",{className:"h-12 bg-gray-200 rounded mb-4"}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsx)("div",{className:"h-10 w-24 bg-gray-200 rounded-full"}),(0,a.jsx)("div",{className:"h-10 w-32 bg-gray-200 rounded-full"}),(0,a.jsx)("div",{className:"h-10 w-20 bg-gray-200 rounded-full"}),(0,a.jsx)("div",{className:"h-10 w-28 bg-gray-200 rounded-full"})]})]})})}},11804:(e,r,t)=>{t.d(r,{u:()=>f});var a=t(95155),l=t(39347),n=t(57828),o=t(21873),s=t(16954),i=t(95174),c=t(81042),d=t(15239);t(12115);var p=t(90771),u=t(22952),m=t(22558),x=t(88750),h=t(37255);function f(e){var r,t,f,g,y,v,b,j,w,N,C,k,S,T,M;let{property:R,withCompareBtn:I=!0,translations:A}=e;return(0,a.jsxs)("div",{className:"border border-gray-200 group rounded-lg overflow-hidden flex flex-col h-full",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(u.N_,{href:"/property-details/".concat(R.id,"/").concat(R.slug),children:(0,a.jsx)("div",{className:"relative w-full h-52 bg-gray-300 flex items-center justify-center",children:(0,a.jsx)(d.default,{alt:R.title,src:(null==(r=R.propertyImage)?void 0:r.thumbnailImageName)||"/placeholder.jpg",sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",fill:!0,className:"object-cover transition-transform duration-400 group-hover:scale-110 group-hover:-rotate-1"})})}),R.verified&&(0,a.jsx)("div",{className:"absolute -left-12 top-3 z-10 rotate-[-45deg] bg-teal-500 text-white text-xs font-bold px-12 py-1 shadow-md",children:A.verified}),(0,a.jsxs)("div",{className:"absolute top-3 right-3 flex gap-2",children:[(0,a.jsx)(x.PropertyLikeBtn,{propertyId:R.id,isLiked:R.isLiked}),I&&(0,a.jsx)(h.PropertyCompareBtn,{propertyId:R.id}),(0,a.jsx)("div",{className:"w-8 h-8 bg-white rounded-full flex items-center justify-center shadow-md",children:(0,a.jsx)(p.default,{componentType:"icon",title:R.title,url:"/property-details/".concat(R.id,"/").concat(R.slug)})})]}),(0,a.jsxs)("div",{className:"absolute bottom-3 left-3 right-3 flex flex-wrap gap-2",children:[(0,a.jsxs)("span",{className:"bg-black text-white text-xs font-bold px-3 py-1.5 rounded-full shadow-lg flex items-center gap-1.5 group w-fit",children:[R.priceInJod," ",A.JOD," ",R.propertyOfferingType===m.c.RENT&&"/ ".concat(A.yr)]}),R.isFeatured&&(0,a.jsxs)("div",{className:"bg-teal-500 text-white text-xs font-bold px-3 py-1.5 rounded-full shadow-lg flex items-center gap-1.5 group w-fit",children:[(0,a.jsx)(l.A,{className:"w-3 h-3 fill-current group-hover:animate-pulse"}),(0,a.jsx)("span",{children:A.featured})]}),R.virtualTourUrl&&(0,a.jsxs)("div",{className:"bg-teal-500 text-white text-xs font-bold px-3 py-1.5 rounded-full shadow-lg flex items-center gap-1.5 group w-fit",children:[(0,a.jsx)(n.A,{className:"w-3 h-3 group-hover:animate-pulse"}),(0,a.jsx)("span",{children:A["3D-tour"]})]})]})]}),(0,a.jsxs)("div",{className:"px-4 py-8 flex flex-col h-full",children:[(0,a.jsxs)(u.N_,{href:"/property-details/".concat(R.id,"/").concat(R.slug),className:"flex-grow",children:[(0,a.jsx)("h4",{className:"font-semibold text-gray-900 mb-1 text-sm min-h-[2.5rem] line-clamp-2",children:R.title}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mb-3",children:[(0,a.jsx)(o.A,{className:"w-4 h-4"}),(0,a.jsxs)("p",{className:"text-gray-600 text-xs",children:[(null==R||null==(t=R.village)?void 0:t.village)&&(null==R||null==(f=R.village)?void 0:f.village)+", ",(null==R||null==(g=R.directorate)?void 0:g.directorate)&&(null==R||null==(y=R.directorate)?void 0:y.directorate)+", ",(null==R||null==(v=R.governorate)?void 0:v.governorate)&&(null==R||null==(b=R.governorate)?void 0:b.governorate)]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-600 mb-3",children:[(null==(j=R.propertyDetail)?void 0:j.noOfBedRooms)&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(s.A,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[null==(w=R.propertyDetail)?void 0:w.noOfBedRooms," ",A.bed]})]}),(null==(N=R.propertyDetail)?void 0:N.noOfBathRooms)&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(i.A,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[null==(C=R.propertyDetail)?void 0:C.noOfBathRooms," ",A.bath]})]}),((null==(k=R.propertyDetail)?void 0:k.areaSqm)||(null==(S=R.propertyDetail)?void 0:S.landAreaSqm))&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[(null==(T=R.propertyDetail)?void 0:T.areaSqm)||(null==(M=R.propertyDetail)?void 0:M.landAreaSqm)," ",A.sqm]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100 mt-auto",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("span",{className:"text-sm text-teal-600",children:R.propertyOfferingType===m.c.BUY?"\uD83C\uDFE0 ".concat(A.forSale):"\uD83C\uDFE0 ".concat(A.forRent)})}),(0,a.jsx)("div",{className:"flex justify-end gap-1 w-[65%]",children:(0,a.jsx)(u.N_,{href:"/agency-detail/".concat(R.agencyId,"/").concat(R.agency.slug),className:"text-xs text-gray-500 ",children:R.agency.name})})]})]})]})}},22558:(e,r,t)=>{t.d(r,{c:()=>a});var a=function(e){return e.RENT="RENT",e.BUY="BUY",e}({})},24383:(e,r,t)=>
1{t.r(r),t.d(r,{ControlledInput:()=>m});var a=t(95155),l=t(12115),n=t(6132),o=t(42529),s=t(65229),i=t(70532),c=t(57828),d=t(64749),p=t(64269),u=t(66328);let m=(0,l.forwardRef)((e,r)=>{let{label:t,value:m,onChange:x,error:h,success:f,helperText:g,variant:y="default",size:v="md",leftIcon:b,rightIcon:j,clearable:w=!1,showPasswordToggle:N=!1,loading:C=!1,required:k=!1,fullWidth:S=!1,disabled:T=!1,type:M="text",placeholder:R,className:I="",containerClassName:A="",labelClassName:P="",forceLtr:z=!1,...D}=e,[_,O]=(0,l.useState)(!1),[L,q]=(0,l.useState)(!1),V=(0,l.useId)(),B=(0,u.Ym)();return(0,a.jsxs)("div",{className:"".concat(S?"w-full":""," ").concat(A),dir:z?"ltr":"ar"===B?"rtl":"ltr",children:[t&&(0,a.jsxs)("label",{htmlFor:V,className:(0,p.cn)("block text-sm font-medium mb-2",h?"text-red-700":f?"text-green-700":"text-gray-700",P),children:[t,k&&(0,a.jsx)("span",{className:"text-red-500 ms-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[b&&(0,a.jsx)("div",{className:(0,p.cn)("absolute top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none",z||"en"===B?"left-3":"right-3"),children:b}),(0,a.jsx)(d.pd,{id:V,ref:r,dir:z?"ltr":"ar"===B?"rtl":"ltr",type:"password"===M&&_?"text":M,value:m,onChange:e=>x(e.target.value),onFocus:()=>q(!0),onBlur:()=>q(!1),placeholder:R,disabled:T||C,variant:y,size:v,className:(0,p.cn)("w-full transition-all duration-200 outline-none",{default:h?"border-red-500 focus:border-red-500 focus:ring-red-500/20":f?"border-green-500 focus:border-green-500 focus:ring-green-500/20":"",filled:h?"bg-red-50 focus:ring-red-500/20":f?"bg-green-50 focus:ring-green-500/20":"",outlined:h?"border-red-500 focus:border-red-500":f?"border-green-500 focus:border-green-500":"border-gray-300",underlined:h?"border-red-500 focus:border-red-500":f?"border-green-500 focus:border-green-500":"border-gray-300"}[y],b&&"ps-10",(j||w||N||C||h||f)&&"pe-10",T&&"opacity-50 cursor-not-allowed bg-gray-50",L&&!T&&"shadow-sm",I),...D}),(0,a.jsxs)("div",{className:(0,p.cn)("absolute top-1/2 transform -translate-y-1/2 flex items-center gap-2",z||"en"===B?"right-3":"left-3"),children:[w&&m&&!C&&!T&&(0,a.jsx)("button",{type:"button",onClick:()=>x(""),className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,a.jsx)(s.A,{className:"w-4 h-4"})}),"password"===M&&N&&!C&&(0,a.jsx)("button",{type:"button",onClick:()=>O(e=>!e),className:"text-gray-400 hover:text-gray-600 transition-colors",children:_?(0,a.jsx)(i.A,{className:"w-4 h-4"}):(0,a.jsx)(c.A,{className:"w-4 h-4"})}),C?(0,a.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full"}):h?(0,a.jsx)(n.A,{className:"w-4 h-4 text-red-500"}):f?(0,a.jsx)(o.A,{className:"w-4 h-4 text-green-500"}):null,j&&!C&&(0,a.jsx)("div",{className:"text-gray-400",children:j})]})]}),(g||h||f)&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(h?"text-red-600":f?"text-green-600":"text-gray-600"),children:h||f||g})]})});m.displayName="ControlledInput"},28179:(e,r,t)=>{t.r(r),t.d(r,{default:()=>s});var a=t(95155),l=t(22952),n=t(64269),o=t(75919);let s=()=>{let{shown:e,scrollToTop:r}=(0,o.bs)(200),t=(0,l.a8)();return(0,a.jsx)("button",{"aria-label":"scroll to top",onClick:r,className:(0,n.cn)("w-12 h-12 flex fixed right-5 sm:right-10 rounded-full shadow-lg justify-center items-center cursor-pointer z-40 bottom-10 ".concat(e?"scale-100":"scale-0"," group bg-transparent hover:bg-amaken border border-amaken hover:border-0 text-amaken hover:text-white transition-all duration-300"),t.includes("property-details")?"hidden lg:flex":"flex"),children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5 text-amaken group-hover:text-white",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})})}},31957:(e,r,t)=>{t.r(r),t.d(r,{ControlledSelect:()=>m});var a=t(95155),l=t(12115),n=t(6132),o=t(42529),s=t(45953),i=t(61543),c=t(4738),d=t(64269),p=t(18955),u=t(66328);let m=e=>{let{label:r,value:t,onChange:m,options:x,error:h,success:f,helperText:g,placeholder:y,required:v=!1,disabled:b=!1,loading:j=!1,fullWidth:w=!1,className:N="",containerClassName:C="",labelClassName:k="",size:S="lg",searchable:T=!0,isMulti:M,fetchOnSearch:R=!1,isClearable:I=!0,fetchFunction:A,debounceDelay:P=500,variant:z="outlined"}=e,D=(0,l.useId)(),_=(0,l.useRef)(null),O=(0,p.c3)("common"),L=(0,u.Ym)(),q=y||O("select-an-option"),V=(0,l.useCallback)(e=>(0,a.jsx)(s.c.DropdownIndicator,{...e,children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"m6 9 6 6 6-6"})})}),[]),B=(0,l.useCallback)(e=>new Promise(r=>{_.current&&clearTimeout(_.current),_.current=setTimeout(async()=>
1{if(A)try{let t=await A(e);r(t)}catch(e){console.error("Fetch function error:",e),r([])}else r([])},P)}),[A,P]),F=(0,l.useMemo)(()=>({control:(e,r)=>{let t={...e,minHeight:"sm"===S?"36px":"lg"===S?"48px":"40px",backgroundColor:b?"#f9fafb":"white",opacity:b?.5:1,cursor:b?"not-allowed":"default"};return"outlined"===z&&(t={...t,borderColor:h?"#ef4444":f?"#22c55e":r.isFocused?"#101828":"#d1d5db",borderRadius:".625rem",borderWidth:"1px",boxShadow:r.isFocused?h?"0 0 0 2px rgba(239, 68, 68, 0.2)":f?"0 0 0 2px rgba(34, 197, 94, 0.2)":"0 0 0 2px rgba(37, 99, 235, 0.2)":"none","&:hover":{borderColor:h?"#ef4444":f?"#22c55e":"#9ca3af"}}),"borderless"===z&&(t={...t,border:"none",boxShadow:"none",borderRadius:0}),t},valueContainer:e=>({...e,padding:"sm"===S?"2px 8px":"lg"===S?"8px 12px":"4px 12px",fontSize:"sm"===S?"14px":"lg"===S?"16px":"14px"}),input:e=>({...e,margin:"0px",fontSize:"sm"===S?"14px":"lg"===S?"16px":"14px"}),placeholder:e=>({...e,color:"#9ca3af",fontSize:"sm"===S?"14px":"lg"===S?"16px":"14px"}),singleValue:e=>({...e,color:"#111827",fontSize:"sm"===S?"14px":"lg"===S?"16px":"14px"}),multiValue:e=>({...e,backgroundColor:"#f1f5f9",borderRadius:"4px",border:"1px solid #e2e8f0",fontSize:"sm"===S?"12px":"14px"}),multiValueLabel:e=>({...e,color:"#475569",fontSize:"sm"===S?"12px":"14px",padding:"2px 6px"}),multiValueRemove:e=>({...e,color:"#64748b","&:hover":{backgroundColor:"#e2e8f0",color:"#374151"},borderRadius:"0 4px 4px 0"}),menu:e=>({...e,borderRadius:"6px",border:"1px solid #e5e7eb",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",zIndex:50}),option:(e,r)=>({...e,backgroundColor:r.isSelected?"#2563eb":r.isFocused?"#f8fafc":"white",color:r.isSelected?"white":"#374151",cursor:r.isDisabled?"not-allowed":"pointer",fontSize:"sm"===S?"14px":"lg"===S?"16px":"14px","&:active":{backgroundColor:r.isSelected?"#2563eb":"#f1f5f9"}}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:(e,r)=>({...e,color:"#6b7280","&:hover":{color:"#374151"},transform:r.selectProps.menuIsOpen?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}),loadingIndicator:e=>({...e,color:"#2563eb"})}),[b,h,S,f]),E=R?c.A:i.Ay;return(0,a.jsxs)("div",{className:"".concat(w?"w-full":""," ").concat(C),children:[r&&(0,a.jsxs)("label",{htmlFor:D,className:(0,d.cn)("block text-sm font-medium mb-2",h?"text-destructive":f?"text-green-700":"text-foreground",k),children:[r,v&&(0,a.jsx)("span",{className:"text-destructive ms-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(E,{inputId:D,instanceId:D,value:t,onChange:e=>{m(e)},options:R?void 0:x,isDisabled:b||j,isLoading:j,isSearchable:T,isMulti:M,placeholder:q,noOptionsMessage:e=>{let{inputValue:r}=e;return R&&!r?O("Write to search"):r?"No options found":void 0},styles:F,components:{DropdownIndicator:V},className:(0,d.cn)("react-select-container",N),classNamePrefix:"react-select",loadOptions:R&&A?B:void 0,loadingMessage:()=>O("loading"),isClearable:I}),(j||h||f)&&(0,a.jsx)("div",{className:(0,d.cn)("absolute top-1/2 transform -translate-y-1/2 pointer-events-none","en"===L?"right-8":"left-8"),children:j?(0,a.jsx)("div",{className:"animate-spin w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full"}):h?(0,a.jsx)(n.A,{className:"w-4 h-4 text-destructive"}):f?(0,a.jsx)(o.A,{className:"w-4 h-4 text-green-700"}):null})]}),(g||h||f)&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(h?"text-destructive":f?"text-green-700":"text-foreground"),children:h||f||g})]})};m.displayName="ControlledSelect"},33252:(e,r,t)=>{t.r(r),t.d(r,{AdvancedSearch:()=>f});var a=t(95155),l=t(4353),n=t(64749),o=t(8531),s=t(66630),i=t(22544),c=t(22952),d=t(18955),p=t(66328),u=t(12115),m=t(75919),x=t(51432),h=t(74701);function f(e){var r,t,f,g,y,v,b,j,w,N,C;let{open:k,setOpen:S,onSubmit:T,onReset:M,values:R,navigateType:I,navigateTo:A}=e,P=(0,d.c3)("filter"),z=(0,p.Ym)(),{filterData:D}=(0,o.PI)(),{getParam:_}=(0,m.DI)(),O=(0,c.rd)(),L=(null==D?void 0:D.propertyTypes)||[],q=(null==D?void 0:D.propertyCategory)||[],V=(null==D?void 0:D.governorates)||[],B=(null==D?void 0:D.OfferingType)||[],F=(null==D?void 0:D.bedrooms)||[],E=(null==D?void 0:D.bathrooms)||[],U=(null==D?void 0:D.amenityGroups)||[],Z=(null==D?void 0:D.priceRange)||{min:0,max:1e6},$=(0,u.useMemo)(()=>({searchKeyword:"",offeringType:"",propertyCategory:"",priceRange:null,propertyType:null,governorate:null,bedrooms:null,bathrooms:null,
1sqMeterMin:"",sqMeterMax:"",amakenRef:"",have3DTour:!1,agency:null,amenities:[]}),[]),{watch:K,setValue:Y,reset:J,handleSubmit:W,formState:{errors:H}}=(0,i.mN)({defaultValues:R||$}),G=K(),X=(0,u.useCallback)(e=>{var r,t,a,l,n,s;let i=(null==(r=e.propertyType)?void 0:r.map(e=>e.label).join(","))||"",c=(null==(t=e.governorate)?void 0:t.label)||"",d=(0,x.pr)({offeringType:e.offeringType||null,propertyCategory:e.propertyCategory||null,propertyType:i||null,governorate:c||null}),p="/".concat(A).concat(d.length>0?"/"+d.join("/"):""),u=new URLSearchParams(new URL(window.location.href).search);e.searchKeyword?(u.set("searchKeyword",e.searchKeyword),(0,o.zc)({filter_type:"searchKeyword",filter_value:e.searchKeyword,platform:"web"})):u.delete("searchKeyword"),e.priceRange&&(u.set("priceMin",e.priceRange.min.toString()),u.set("priceMax",e.priceRange.max.toString()),(0,o.zc)({filter_type:"priceRange",filter_value:e.priceRange.min.toString(),platform:"web"})),e.bedrooms?(u.set("bedrooms",e.bedrooms),(0,o.zc)({filter_type:"bedrooms",filter_value:e.bedrooms||"",platform:"web"})):u.delete("bedrooms"),e.bathrooms?(u.set("bathrooms",e.bathrooms),(0,o.zc)({filter_type:"bathrooms",filter_value:e.bathrooms||"",platform:"web"})):u.delete("bathrooms"),e.sqMeterMin?(u.set("sqMeterMin",e.sqMeterMin),(0,o.zc)({filter_type:"sqMeterMin",filter_value:e.sqMeterMin||"",platform:"web"})):u.delete("sqMeterMin"),e.sqMeterMax?(u.set("sqMeterMax",e.sqMeterMax),(0,o.zc)({filter_type:"sqMeterMax",filter_value:e.sqMeterMax||"",platform:"web"})):u.delete("sqMeterMax"),e.amakenRef?(u.set("amakenRef",e.amakenRef),(0,o.zc)({filter_type:"amakenRef",filter_value:e.amakenRef||"",platform:"web"})):u.delete("amakenRef"),e.have3DTour?(u.set("have3DTour","true"),(0,o.zc)({filter_type:"have3DTour",filter_value:"true",platform:"web"})):u.delete("have3DTour"),e.agency?(u.set("agencyValue",e.agency.value.toString()),u.set("agencyLabel",e.agency.label.toString()),(0,o.zc)({filter_type:"agency",filter_value:e.agency.value.toString(),platform:"web"})):(u.delete("agencyValue"),u.delete("agencyLabel")),e.amenities.length>0?(u.set("amenities",e.amenities.join(",")),(0,o.zc)({filter_type:"amenities",filter_value:e.amenities.join(","),platform:"web"})):u.delete("amenities"),u.set("page","1"),(0,h.B0)(e)||u.set("save","true");let m=u.toString()?"".concat(p,"?").concat(u.toString()):p;(0,o.AR)({location:null==(a=e.governorate)?void 0:a.label,property_type:null==(l=e.propertyType)?void 0:l.map(e=>e.label).join(","),price_min:null==(n=e.priceRange)?void 0:n.min,price_max:null==(s=e.priceRange)?void 0:s.max,bedrooms:e.bedrooms?parseInt(e.bedrooms):void 0,platform:"web"}),"push"===I?O.push(m):O.replace(m),null==T||T(e)},[I,A,T,O]),Q=(e,r)=>{Y(e,r)},ee=(e,r)=>{let t=e?Number.parseInt(e):0;Y("priceRange",{...G.priceRange||{min:Z.min,max:Z.max},[r]:t})},er=()=>{let e=G.priceRange;if(e){if(0===e.min)return void Y("priceRange",{min:Z.min,max:e.max});if(0===e.max)return void Y("priceRange",{min:e.min,max:Z.max});if(e.min>e.max)return void Y("priceRange",{min:Z.min,max:Z.max});(e.min<Z.min||e.max>Z.max)&&Y("priceRange",{min:Z.min,max:Z.max})}},et=(e,r)=>{"min"===r?Y("sqMeterMin",e):Y("sqMeterMax",e)},ea=()=>{let e=G.sqMeterMin,r=G.sqMeterMax;if(e&&r&&Number.parseInt(e)>Number.parseInt(r)){Y("sqMeterMin",""),Y("sqMeterMax","");return}e&&0>Number.parseInt(e)&&Y("sqMeterMin",""),r&&0>Number.parseInt(r)&&Y("sqMeterMax","")},el=async e=>(await o.Sc.getAgencyAgentSearch({search:e})).map(e=>({value:e.entityId,label:e.name}));return(0,a.jsx)(n.lG,{open:k,onOpenChange:S,children:(0,a.jsxs)(n.Cf,{className:"min-w-fit md:min-w-3xl max-h-[95svh] overflow-y-auto",children:[(0,a.jsx)(n.c7,{className:"flex flex-row items-center justify-between space-y-0 pb-4 border-b",children:(0,a.jsx)(n.L3,{className:"text-xl font-semibold",children:P("advanced-search")})}),(0,a.jsxs)("form",{onSubmit:W(X),className:"space-y-8",children:[(0,a.jsx)("div",{children:(0,a.jsx)(l.x8,{label:P("search-keyword"),labelClassName:"text-base font-bold",placeholder:P("search"),value:G.searchKeyword,onChange:e=>Y("searchKeyword",e),error:null==(r=H.searchKeyword)?void 0:r.message,clearable:!0})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block text-gray-900",children:P("offering-type")}),(0,a.jsx)(n.z6,{value:G.offeringType,onValueChange:e=>Y("offeringType",e),children:B.map(e=>{let{value:r,label:t}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex items-center gap-2 justify-start ","ar"===z&&"flex-row-reverse"),children:[(0,a.jsx)(n.CU,{value:r.toString(),id:r.toString()}),(0,a.jsx)("label",{htmlFor:r.toString(),className:"cursor-pointer",children:t})]},r)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block text-gray-900",children:P("property-category")}),(0,a.jsx)(n.z6,{value:G.propertyCategory,onValueChange:e=>Y("propertyCategory",e),children:q.map(e=>{let{value:r,label:t}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex items-center gap-2 justify-start ","ar"===z&&"flex-row-reverse"),children:[(0,a.jsx)(n.CU,{value:r.toString(),id:r.toString()}),(0,a.jsx)("label",{htmlFor:r.toString(),children:t})]},r)})})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:P("price-range")}),(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)(n.Ap,{value:G.priceRange?[G.priceRange.min,G.priceRange.max]:void 0,onValueChange:e=>Y("priceRange",{min:e[0],max:e[1]}),defaultValue:[Z.min,Z.max],max:Z.max,min:Z.min,step:500,className:"mb-7",dir:"ar"===z?"rtl":"ltr"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsx)(l.x8,{value:(null==G||null==(f=G.priceRange)||null==(t=f.min)?void 0:t.toString())||Z.min,onChange:e=>{ee(e,"min")},onBlur:er,containerClassName:"flex-1",type:"number"}),(0,a.jsx)("span",{className:"text-gray-500",children:"â"}),(0,a.jsx)(l.x8,{value:(null==G||null==(y=G.priceRange)||null==(g=y.max)?void 0:g.toString())||Z.max,onChange:e=>{ee(e,"max")},onBlur:er,containerClassName:"flex-1",type:"number"})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsx)(l.Xo,{label:P("property-type"),labelClassName:"text-base font-bold",value:G.propertyType,onCh
1ange:e=>Y("propertyType",e),options:L,error:null==(v=H.propertyType)?void 0:v.message,isMulti:!0}),(0,a.jsx)(l.Xo,{label:P("governorate"),labelClassName:"text-base font-bold",value:G.governorate,onChange:e=>Y("governorate",e),options:V,error:null==(b=H.governorate)?void 0:b.message})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:P("bedrooms")}),(0,a.jsx)("div",{className:"flex gap-2",children:[{value:null,label:P("any")},...F].map(e=>(0,a.jsx)(n.$n,{type:"button",variant:G.bedrooms===e.value?"default":"outline",size:"sm",onClick:()=>Q("bedrooms",e.value),className:"flex-1",children:e.label},e.value))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:P("bathrooms")}),(0,a.jsx)("div",{className:"flex gap-2",children:[{value:null,label:P("any")},...E].map(e=>(0,a.jsx)(n.$n,{type:"button",variant:G.bathrooms===e.value?"default":"outline",size:"sm",onClick:()=>Q("bathrooms",e.value),className:"flex-1",children:e.label},e.value))})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:P("sq-meter")}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(l.x8,{placeholder:P("min"),value:G.sqMeterMin,onChange:e=>et(e,"min"),onBlur:ea,error:null==(j=H.sqMeterMin)?void 0:j.message,containerClassName:"flex-1",type:"number"}),(0,a.jsx)("span",{className:"text-gray-500",children:"â"}),(0,a.jsx)(l.x8,{placeholder:P("max"),value:G.sqMeterMax,onChange:e=>et(e,"max"),onBlur:ea,error:null==(w=H.sqMeterMax)?void 0:w.message,containerClassName:"flex-1",type:"number"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsx)(l.x8,{label:P("amaken-ref"),placeholder:P("amaken-ref"),labelClassName:"text-base font-bold mb-4",value:G.amakenRef,onChange:e=>Y("amakenRef",e),error:null==(N=H.amakenRef)?void 0:N.message}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:P("have-3D-tour")}),(0,a.jsx)("div",{className:"flex items-center space-x-2 mt-3",children:(0,a.jsx)(n.dO,{checked:G.have3DTour,onCheckedChange:e=>Y("have3DTour",e)})})]})]}),(0,a.jsx)(l.Xo,{label:P("agency-agent"),labelClassName:"text-base font-bold mb-4",value:G.agency,onChange:e=>Y("agency",e),searchable:!0,error:null==(C=H.agency)?void 0:C.message,fetchOnSearch:!0,fetchFunction:el}),(0,a.jsxs)(n.Nt,{children:[(0,a.jsx)(n.R6,{asChild:!0,children:(0,a.jsxs)(n.$n,{type:"button",variant:"ghost",className:"w-full justify-start p-0 h-8 cursor-pointer",children:[(0,a.jsx)(s.A,{className:"mr-2 h-4 w-4"}),(0,a.jsx)("span",{className:"text-base font-bold",children:P("other-features")})]})}),(0,a.jsx)(n.Ke,{className:"mt-3",children:(0,a.jsx)("div",{className:"space-y-6",children:U.map(e=>{var r,t;let l=(null==(t=e.otherValues)||null==(r=t.amenities)?void 0:r.value)||[],o=l.map(e=>e.value.toString()),s=o.length>0&&o.every(e=>G.amenities.includes(e));return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between py-2",children:[(0,a.jsx)("h4",{className:"text-sm font-bold text-gray-700 ps-2 border-s-2 border-orange-500",children:e.label[z]}),(0,a.jsx)(n.$n,{type:"button",variant:"ghost",size:"sm",onClick:()=>(e=>{let r=e.map(e=>e.value.toString());r.every(e=>G.amenities.includes(e))?Y("amenities",G.amenities.filter(e=>!r.includes(e))):Y("amenities",[...G.amenities.filter(e=>!r.includes(e)),...r])})(l),className:"text-xs text-orange-500 hover:text-orange-600 hover:bg-orange-50 h-7 px-2 cursor-pointer",children:s?P("deselect-all"):P("select-all")})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:l.map(e=>{let{value:r,label:t}=e;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(n.Sc,{id:r.toString(),checked:G.amenities.includes(r.toString()),onCheckedChange:e=>{var t;t=r.toString(),e?Y("amenities",[...G.amenities,t]):Y("amenities",G.amenities.filter(e=>e!==t))}}),(0,a.jsx)("label",{htmlFor:r.toString(),className:"cursor-pointer",children:t[z]})]},r)})})]},e.value)})})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t",children:[(0,a.jsxs)(n.$n,{type:"button",variant:"ghost",size:"lg",onClick:()=>
1{if(J(),"search-by-amaken-map"===A){let e=_("mapBounds");O.replace("/".concat(A,"?mapBounds=").concat(e))}else O.replace("/".concat(A));null==M||M()},className:"text-gray-600 hover:text-gray-800 cursor-pointer",children:[(0,a.jsx)("span",{className:"mr-2",children:"â»"}),P("reset-all-filters")]}),(0,a.jsx)(n.$n,{type:"submit",size:"lg",className:"bg-orange-500 hover:bg-orange-600 text-white px-8 cursor-pointer",children:P("apply-filters")})]})]})]})})}},35064:(e,r,t)=>{t.r(r),t.d(r,{PurposeFilter:()=>p});var a=t(95155),l=t(12115),n=t(64749),o=t(8531),s=t(18955),i=t(66328),c=t(22952),d=t(51432);function p(e){let{offeringType:r,onClose:t}=e,p=(0,s.c3)("filter"),u=(0,i.Ym)(),m=(0,c.rd)(),x=(0,c.a8)(),{filterData:h}=(0,o.PI)(),[f,g]=(0,l.useState)(r),y=(null==h?void 0:h.OfferingType)||[],v=(0,l.useCallback)(()=>{let e=new URLSearchParams(window.location.search),r=x.split("/").filter(Boolean);r=(0,d.oZ)(r,f||"","offeringType",h);let a="/".concat(r.length>0?"/"+r.join("/"):"");e.set("page","1");let l=a+"?".concat(e.toString());m.replace(l),(0,o.zc)({filter_type:"offeringType",filter_value:f||"",platform:"web"}),null==t||t()},[x,m,f,h]);return(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block text-gray-900",children:p("offering-type")}),(0,a.jsx)(n.z6,{value:f,onValueChange:e=>g(e),children:y.map(e=>{let{value:r,label:t}=e;return(0,a.jsxs)("div",{className:(0,o.cn)("flex items-center gap-2 justify-start ","ar"===u&&"flex-row-reverse"),children:[(0,a.jsx)(n.CU,{value:r.toString(),id:r.toString()}),(0,a.jsx)("label",{htmlFor:r.toString(),className:"cursor-pointer",children:t})]},r)})}),(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsx)(n.$n,{onClick:v,className:"w-full bg-orange-500 hover:bg-orange-600 text-white rounded-lg cursor-pointer",children:p("done")})})]})}},35786:(e,r,t)=>{function a(e){return e.map(e=>e.startsWith("ot-")?e.replace("ot-",""):e.startsWith("pc-")?e.replace("pc-",""):e.startsWith("pt-")?e.replace("pt-",""):e.startsWith("gov-")?e.replace("gov-",""):e)}function l(e,r){let t={};return e&&0!==e.length&&r&&a(e).forEach(e=>{try{let a=decodeURIComponent(e),l=r[a.split(",")[0]];if(l)if("offeringType"===l)t.offeringType=a;else if("propertyCategory"===l)t.propertyCategory=a;else if("propertyType"===l){t.propertyType||(t.propertyType=[]);let e=a.split(",");t.propertyType.push(...e)}else"governorate"===l&&(t.governorate=a)}catch(l){let a=r[e.split(",")[0]];if(a)if("offeringType"===a)t.offeringType=e;else if("propertyCategory"===a)t.propertyCategory=e;else if("propertyType"===a){t.propertyType||(t.propertyType=[]);let r=e.split(",");t.propertyType.push(...r)}else"governorate"===a&&(t.governorate=e)}}),t}t.d(r,{cl:()=>l,o9:()=>a})},37255:(e,r,t)=>{t.r(r),t.d(r,{PropertyCompareBtn:()=>c});var a=t(95155),l=t(64749),n=t(8531),o=t(64269),s=t(85843),i=t(18955);function c(e){let{propertyId:r}=e,t=(0,i.c3)("property.compare"),{compareList:c,toggleCompare:d}=(0,n.IB)(),p=c.includes(r);return(0,a.jsxs)(l.m_,{children:[(0,a.jsx)(l.k$,{asChild:!0,children:(0,a.jsx)("button",{onClick:()=>d(r),className:(0,o.cn)("w-8 h-8 rounded-full flex items-center justify-center shadow-md transition-colors cursor-pointer",p?"bg-teal-500 text-white":"bg-white text-gray-700"),children:(0,a.jsx)(s.A,{className:"w-4 h-4"})})}),(0,a.jsx)(l.ZI,{children:(0,a.jsx)("p",{children:t("buttonCompare")})})]})}},39471:(e,r,t)=>{t.d(r,{f:()=>s});var a=t(35786),l=t(51432),n=t(58408);async function o(e,r,t){if(!e||0===e.length||r===t)return e||[];try{let r=await (0,n.AC)(),o={};r.offeringTypes.forEach(e=>{o[e.ar]="offeringType",o[e.en]="offeringType"}),r.propertyCategories.forEach(e=>{o[e.ar]="propertyCategory",o[e.en]="propertyCategory"}),r.propertyTypes.forEach(e=>{o[e.ar]="propertyType",o[e.en]="propertyType"}),r.governorates.forEach(e=>{o[e.ar]="governorate",o[e.en]="governorate"});let s=(0,a.cl)(e,o),i={};if(s.offeringType){let e=r.offeringTypes.get(s.offeringType);i.offeringType=e?e[t]:s.offeringType}if(s.propertyCategory){let e=r.propertyCategories.get(s.propertyCategory);i.propertyCategory=e?e[t]:s.propertyCategory}if(s.propertyType&&s.propertyType.length>0&&(i.propertyType=s.propertyType.map(e=>{let a=r.propertyTypes.get(e);return a?a[t]:e})),s.governorate){let e=r.governorates.get(s.governorate);i.governorate=e?e[t]:s.governorate}return(0,l.pr)({offeringType:i.offeringType,propertyCategory:i.propertyCategory,propertyType:i.propertyType,governorate:i.governorate})}catch(r){return console.error("Error translating filter segments:",r),e||[]}}async function s(e,r,t){let a,l,n=e.match(/^\/properties(?:\/(.+))?$/),s=e.match(/^\/search-by-amaken-map(?:\/(.+))?$/);if(n)a="/properties",l=n[1];else{if(!s)return e;a="/search-by-amaken-map",l=s[1]}if(!l)return e;
1let i=l.split("/").filter(Boolean),c=await o(i,r,t);return c.length>0?"".concat(a,"/").concat(c.join("/")):a}},45500:(e,r,t)=>{t.r(r),t.d(r,{BedsFilter:()=>c});var a=t(95155),l=t(12115),n=t(64749),o=t(18955),s=t(75919),i=t(8531);function c(e){let{bedrooms:r,bathrooms:t,onClose:c}=e,d=(0,o.c3)("filter"),{setParams:p}=(0,s.DI)(),{filterData:u}=(0,i.PI)(),[m,x]=(0,l.useState)(r||null),[h,f]=(0,l.useState)(t||null),g=(null==u?void 0:u.bedrooms)||[],y=(null==u?void 0:u.bathrooms)||[],v=(e,r)=>{"bedrooms"===e?x(r):f(r)},b=(0,l.useCallback)(()=>{p({bedrooms:m,bathrooms:h,page:"1"}),(0,i.zc)({filter_type:"bedrooms",filter_value:m||"",platform:"web"}),(0,i.zc)({filter_type:"bathrooms",filter_value:h||"",platform:"web"}),null==c||c()},[h,m,p]);return(0,a.jsxs)("div",{className:"p-4 space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:d("bedrooms")}),(0,a.jsx)("div",{className:"flex gap-2",children:[{value:null,label:d("any")},...g].map(e=>(0,a.jsx)(n.$n,{type:"button",variant:m===e.value?"default":"outline",size:"sm",onClick:()=>v("bedrooms",e.value),className:"flex-1",children:e.label},e.value))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:d("bathrooms")}),(0,a.jsx)("div",{className:"flex gap-2",children:[{value:null,label:d("any")},...y].map(e=>(0,a.jsx)(n.$n,{type:"button",variant:h===e.value?"default":"outline",size:"sm",onClick:()=>v("bathrooms",e.value),className:"flex-1",children:e.label},e.value))})]})]}),(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsx)(n.$n,{onClick:b,className:"w-full bg-orange-500 hover:bg-orange-600 text-white rounded-lg cursor-pointer",children:d("done")})})]})}},48711:(e,r,t)=>{t.r(r),t.d(r,{ControlledOTPInput:()=>p});var a=t(95155),l=t(12115),n=t(6132),o=t(42529),s=t(64269),i=t(66328),c=t(71753),d=t(64749);let p=e=>{let{value:r,onChange:t,length:p=6,label:u,error:m,success:x,helperText:h,required:f=!1,disabled:g=!1,fullWidth:y=!0,className:v="",containerClassName:b="",labelClassName:j="",autoFocus:w=!1,...
1N}=e,C=(0,l.useId)(),k=(0,i.Ym)(),S=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(w&&S.current){let e=setTimeout(()=>{var e;let r=null==(e=S.current)?void 0:e.querySelector("input");r&&r.focus()},100);return()=>clearTimeout(e)}},[w]);let T=()=>m?(0,a.jsx)(n.A,{className:"w-4 h-4 text-red-500"}):x?(0,a.jsx)(o.A,{className:"w-4 h-4 text-green-500"}):null;return(0,a.jsxs)("div",{className:(0,s.cn)(y?"w-full":"",b),children:[u&&(0,a.jsxs)("label",{htmlFor:C,className:(0,s.cn)("block text-sm font-medium mb-2",m?"text-red-700":x?"text-green-700":"text-gray-700",j),children:[u,f&&(0,a.jsx)("span",{className:"text-red-500 ms-1",children:"*"})]}),(0,a.jsxs)("div",{ref:S,className:"relative w-full",children:[(0,a.jsx)(d.UV,{id:C,className:(0,s.cn)("w-full",g&&"opacity-50 cursor-not-allowed",v),value:r,onChange:t,maxLength:p,pattern:c.UO,disabled:g,...N,children:(0,a.jsx)(d.NV,{className:"w-full gap-2 sm:gap-3",children:Array.from({length:p}).map((e,r)=>(0,a.jsx)(d.sF,{index:r,className:(0,s.cn)("flex-1",m&&"border-red-500 focus:border-red-500 focus:ring-red-200")},r))})}),T()&&(0,a.jsx)("div",{className:(0,s.cn)("absolute top-1/2 -translate-y-1/2","en"===k?"right-2":"left-2"),children:T()})]}),(h||m||x)&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(m?"text-red-600":x?"text-green-600":"text-gray-600"),children:m||x||h})]})};p.displayName="ControlledOTPInput"},51432:(e,r,t)=>{t.d(r,{VZ:()=>l,oZ:()=>o,pr:()=>n});var a=t(35786);
1function l(e){return e.trim().replace(/\s+/g,"-").replace(/[^\u0621-\u064A\u0660-\u0669a-zA-Z0-9\-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function n(e){let r=[];if(e.offeringType&&r.push(encodeURIComponent(e.offeringType)),e.propertyCategory&&r.push(encodeURIComponent(e.propertyCategory)),e.propertyType){let t=Array.isArray(e.propertyType)?e.propertyType.join(","):e.propertyType;t&&r.push(encodeURIComponent(t).replace(/%2C/g,","))}if(e.governorate&&r.push(encodeURIComponent(e.governorate)),e.shortName){let t=l(e.shortName);t&&r.push(t)}return r}function o(e,r,t,l){if(!(null==l?void 0:l.filterValueToTypeMap))return e;let n=(0,a.o9)(e).filter(e=>{try{let r=decodeURIComponent(e);return l.filterValueToTypeMap[r.split(",")[0]]!==t}catch(r){return l.filterValueToTypeMap[e.split(",")[0]]!==t}});return r&&n.push(encodeURIComponent(r).replace(/%2C/g,",")),n}},58408:(e,r,t)=>{t.d(r,{AC:()=>o});var a=t(80650);let l=null;async function n(){let[e,r,t,l,n]=await Promise.all([a.Sc.getPropertyInfo("ar"),a.Sc.getPropertyInfo("en"),a.Sc.getGovernorateList("ar"),a.Sc.getGovernorateList("en"),a.Sc.getPropertyTypeList()]),o=new Map;n.forEach(e=>{let r={ar:e.title.ar,en:e.title.en,id:e.id};o.set(e.title.ar,r),o.set(e.title.en,r)});let s=new Map,i=new Map(t.map(e=>[e.id,e.capital])),c=new Map(l.map(e=>[e.id,e.capital]));t.forEach(e=>{let r=i.get(e.id)||e.capital,t=c.get(e.id)||e.capital,a={ar:r,en:t,id:e.id};s.set(r,a),s.set(t,a)});let d=new Map;Object.entries(e.propertyOfferingType).forEach(e=>{let[t,a]=e,l=r.propertyOfferingType[t],n={ar:a,en:l};d.set(a,n),d.set(l,n)});let p=new Map;return Object.entries(e.propertyCategory).forEach(e=>{let[t,a]=e,l=r.propertyCategory[t],n={ar:a,en:l};p.set(a,n),p.set(l,n)}),{propertyTypes:o,governorates:s,offeringTypes:d,propertyCategories:p,timestamp:Date.now()}}async function o(){var e;return(e=l)&&Date.now()-e.timestamp<36e5?l:l=await n()}},69734:(e,r,t)=>{t.r(r),t.d(r,{SortAndSearch:()=>u});var a=t(95155),l=t(4353),n=t(75919),o=t(12115),s=t(21873),i=t(18955),c=t(8531),d=t(22952),p=t(74701);function u(e){let{formattedAddress:r,sort:t}=e,u=(0,i.c3)("filter"),m=(0,d.rd)(),x=(0,d.a8)(),{filterData:h}=(0,c.PI)(),{setParams:f}=(0,n.DI)(),g=[{value:"listingDate,DESC",label:u("sort.newest")},{value:"priceInJod,ASC",label:u("sort.priceLowToHigh")},{value:"priceInJod,DESC",label:u("sort.priceHighToLow")}],[y,v]=(0,o.useState)(r||""),[b,j]=(0,o.useState)(g.find(e=>e.value===t)||null),{inputRef:w,error:N,isLoading:C}=(0,n.Mj)({onPlaceSelect:e=>{let{formattedAddress:r,geometry:t,placeId:a,shortName:l,governorate:n}=e,o=new URLSearchParams(window.location.search),s=x.split("/").filter(Boolean);if(s=(0,p.oZ)(s,n||"","governorate",h),(null==h?void 0:h.filterValueToTypeMap)&&(s=s.filter(e=>{try{let r=decodeURIComponent(e);return void 0!==h.filterValueToTypeMap[r]||"properties"===e||"search-by-amaken-map"===r}catch(r){return void 0!==h.filterValueToTypeMap[e]||"properties"===e||"search-by-amaken-map"===e}})),l){let e=(0,p.VZ)(l);e&&s.push(e)}let i="/".concat(s.length>0?"/"+s.join("/"):"");r&&o.set("formattedAddress",r),l&&o.set("shortName",l),t&&o.set("geometry",(0,p.fb)(t)),a&&o.set("placeId",a),o.set("page","1");let c=o.toString()?"".concat(i,"?").concat(o.toString()):i;v(r),m.replace(c),m.refresh()}});return(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 w-full",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(l.x8,{ref:w,leftIcon:(0,a.jsx)(s.A,{className:"w-5 h-5 text-gray-400 me-3"}),placeholder:u("search-address-placeholder"),value:y,onChange:e=>(e=>{if(v(e),!e){let e=new URLSearchParams(window.location.search);["formattedAddress","geometry","placeId","shortName"].forEach(r=>{e.delete(r)});let r=(0,p.oZ)(x.split("/").filter(Boolean),"","governorate",h);(null==h?void 0:h.filterValueToTypeMap)&&(r=r.filter(e=>{try{let r=decodeURIComponent(e);return void 0!==h.filterValueToTypeMap[r]||"properties"===r||"search-by-amaken-map"===r}catch(r){return void 0!==h.filterValueToTypeMap[e]||"properties"===e||"search-by-amaken-map"===e}}));let t="/".concat(r.length>0?"/"+r.join("/"):"");m.replace("".concat(t,"?").concat(e.toString())),m.refresh()}})(e),clearable:!0,className:"h-12 text-base",error:N,disabled:C})}),(0,a.jsx)("div",{className:"w-full md:w-48",children:(0,a.jsx)(l.Xo,{value:b,onChange:e=>{j(e),f({sort:(null==e?void 0:e.value)||null,page:"1"}),(0,c.zc)({filter_type:"sort",filter_value:(null==e?void 0:e.value)||"",platform:"web"})},options:g,className:"h-12",searchable:!1})})]})}},74701:(e,r,t)=>{t.d(r,{oZ:()=>i.oZ,pr:()=>i.pr,VZ:()=>i.VZ,fb:()=>p,aB:()=>u,IV:()=>o,B0:()=>a,cl:()=>s.cl}),t(52909),t(80650),t(22558),t(88158);let a=e=>Object.values(e).every(e=>null==e||""===e||!1===e||0===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length);
1var l=t(58408);async function n(){let e=await (0,l.AC)(),r={};return e.offeringTypes.forEach(e=>{r[e.ar]="offeringType",r[e.en]="offeringType"}),e.propertyCategories.forEach(e=>{r[e.ar]="propertyCategory",r[e.en]="propertyCategory"}),e.propertyTypes.forEach(e=>{r[e.ar]="propertyType",r[e.en]="propertyType"}),e.governorates.forEach(e=>{r[e.ar]="governorate",r[e.en]="governorate"}),r}async function o(){try{return{filterValueToTypeMap:await n()}}catch(e){return console.error("Failed to build filter dictionary:",e),null}}var s=t(35786),i=t(51432);t(39471);var c=t(96758),d=t.n(c);function p(e){let r=JSON.stringify(e);return d().compressToEncodedURIComponent(r)}function u(e){try{let r=d().decompressFromEncodedURIComponent(e);if(!r)return JSON.parse(e);return JSON.parse(r)}catch(r){try{return JSON.parse(e)}catch(e){return console.error("Failed to decompress geometry:",r),null}}}},83286:(e,r,t)=>{t.r(r),t.d(r,{PropertyTypeFilter:()=>d});var a=t(95155),l=t(12115),n=t(64749),o=t(66328),s=t(8531),i=t(22952),c=t(74701);function d(e){let{propertyType:r,onClose:t}=e,d=(0,o.c3)("filter"),p=(0,i.rd)(),{filterData:u}=(0,s.PI)(),[m,x]=(0,l.useState)(r||[]),h=(0,i.a8)(),f=(null==u?void 0:u.propertyTypes)||[],g=(0,l.useCallback)(()=>{let e=new URLSearchParams(window.location.search),r=(null==m?void 0:m.map(e=>e.label).join(","))||"",a=h.split("/").filter(Boolean);a=(0,c.oZ)(a,r||"","propertyType",u);let l="/".concat(a.length>0?"/"+a.join("/"):"");e.set("page","1");let n=l+"?".concat(e.toString());p.replace(n),(0,s.zc)({filter_type:"propertyType",filter_value:r,platform:"web"}),null==t||t()},[h,p,m,u]);return(0,a.jsxs)("div",{className:"p-4 space-y-4",children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block text-gray-900",children:d("property-type")}),(0,a.jsx)("div",{className:"space-y-3",children:f.map(e=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(n.Sc,{id:e.value.toString(),checked:!!m.find(r=>r.value===e.value),onCheckedChange:r=>{r?x([...m,e]):x(r=>r.filter(r=>r.value!==e.value))}}),(0,a.jsx)("label",{htmlFor:e.value.toString(),className:"cursor-pointer ",children:e.label})]},e.value))}),(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsx)(n.$n,{onClick:g,className:"w-full bg-orange-500 hover:bg-orange-600 text-white rounded-lg cursor-pointer",children:d("done")})})]})}},84820:(e,r,t)=>{t.r(r),t.d(r,{ControlledDatePicker:()=>m});var a=t(95155),l=t(12115),n=t(6132),o=t(42529),s=t(16485),i=t(71163),c=t(64749),d=t(64269),p=t(66328),u=t(18955);let m=(0,l.forwardRef)((e,r)=>{let{value:t,onChange:m,label:x,error:h,success:f,helperText:g,required:y=!1,disabled:v=!1,fullWidth:b=!1,placeholder:j,className:w="",containerClassName:N="",labelClassName:C="",minDate:k=new Date}=e,S=(0,l.useId)(),[T,M]=(0,l.useState)(!1),R=(0,p.Ym)(),I=(0,u.c3)("common"),A=j||I("Pick a date");return(0,a.jsxs)("div",{className:(0,d.cn)(b?"w-full":"",N),children:[x&&(0,a.jsxs)("label",{htmlFor:S,className:(0,d.cn)("block text-sm font-medium mb-2",h?"text-red-700":f?"text-green-700":"text-gray-700",C),children:[x,y&&(0,a.jsx)("span",{className:"text-red-500 ms-1",children:"*"})]}),(0,a.jsxs)("div",{ref:r,className:"relative",children:[(0,a.jsxs)(c.AM,{modal:!0,open:T,onOpenChange:M,children:[(0,a.jsx)(c.Wv,{asChild:!0,children:(0,a.jsxs)(c.$n,{variant:"outline",disabled:v,"data-empty":!t,className:(0,d.cn)("w-full justify-start text-left font-normal py-3","data-[empty=true]:text-muted-foreground",v&&"opacity-50 cursor-not-allowed",w),children:[(0,a.jsx)(s.A,{className:"mr-2 h-4 w-4"}),t?(0,i.GP)(t,"PPP"):(0,a.jsx)("span",{children:A})]})}),(0,a.jsx)(c.hl,{className:"w-auto p-0",children:(0,a.jsx)(c.Vv,{mode:"single",selected:t,onSelect:e=>{m(e),M(!1)},disabled:e=>e<=new Date,startMonth:k})})]}),(0,a.jsx)("div",{className:(0,d.cn)("absolute top-1/2 -translate-y-1/2","ar"===R?"left-3 ":"right-3"),children:h?(0,a.jsx)(n.A,{className:"w-4 h-4 text-red-500"}):f?(0,a.jsx)(o.A,{className:"w-4 h-4 text-green-500"}):null})]}),(g||h||f)&&(0,a.jsx)("p",{className:"mt-2 text-sm ".concat(h?"text-red-600":f?"text-green-600":"text-gray-600"),children:h||f||g})]})});m.displayName="ControlledDatePicker"},86247:(e,r,t)=>{t.r(r),t.d(r,{Carousel:()=>h,CarouselContent:()=>f,CarouselDots:()=>b,CarouselItem:()=>g,CarouselNext:()=>v,CarouselPrevious:()=>y});var a=t(95155),l=t(12115),n=t(68072),o=t(71700),s=t(50194),i=t(90368),c=t(27937),d=t(64269),p=t(64749),u=t(66328);let m=(0,l.createContext)(null);function x(){let e=(0,l.useContext)(m);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let h=(0,l.forwardRef)((e,r)=>{let{orientation:t="horizontal",opts:i,setApi:c,plugins:p,className:u,children:x,autoplay:h=!1,autoplayDelay:f=3e3,autoScroll:g=!1,autoScrollSpeed:y=1,autoScrollDirection:v="forward",autoScrollStopOnInteraction:b=!0,stopOnMouseEnter:j=!1,...w}
1=e,N=[...p||[],...h?[(0,o.A)({delay:f,stopOnInteraction:!1})]:[],...g?[(0,s.A)({speed:y,direction:v,stopOnInteraction:b,stopOnMouseEnter:j,startDelay:500})]:[]],[C,k]=(0,n.A)({...i,axis:"horizontal"===t?"x":"y",loop:(null==i?void 0:i.loop)!==!1},N),[S,T]=(0,l.useState)(!1),[M,R]=(0,l.useState)(!1),I=(0,l.useCallback)(e=>{e&&(T(e.canScrollPrev()),R(e.canScrollNext()))},[]),A=(0,l.useCallback)(()=>{null==k||k.scrollPrev()},[k]),P=(0,l.useCallback)(()=>{null==k||k.scrollNext()},[k]),z=(0,l.useCallback)(e=>{"ArrowLeft"===e.key?(e.preventDefault(),A()):"ArrowRight"===e.key&&(e.preventDefault(),P())},[A,P]);return(0,l.useEffect)(()=>{k&&c&&c(k)},[k,c]),(0,l.useEffect)(()=>{if(k)return I(k),k.on("reInit",I),k.on("select",I),()=>{null==k||k.off("select",I),null==k||k.off("reInit",I)}},[k,I]),(0,a.jsx)(m.Provider,{value:{carouselRef:C,api:k,opts:i,orientation:t||((null==i?void 0:i.axis)==="y"?"vertical":"horizontal"),scrollPrev:A,scrollNext:P,canScrollPrev:S,canScrollNext:M},children:(0,a.jsx)("div",{ref:r,onKeyDownCapture:z,className:(0,d.cn)("relative",u),role:"region","aria-roledescription":"carousel",...w,children:x})})});h.displayName="Carousel";let f=(0,l.forwardRef)((e,r)=>{let{className:t,...l}=e,{carouselRef:n,orientation:o}=x();return(0,a.jsx)("div",{ref:n,className:"overflow-hidden",children:(0,a.jsx)("div",{ref:r,className:(0,d.cn)("flex","horizontal"===o?"-ml-4":"-mt-4 flex-col",t),...l})})});f.displayName="CarouselContent";let g=(0,l.forwardRef)((e,r)=>{let{className:t,...l}=e,{orientation:n}=x();return(0,a.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:(0,d.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===n?"pl-4":"pt-4",t),...l})});g.displayName="CarouselItem";let y=(0,l.forwardRef)((e,r)=>{let{className:t,variant:l="outline",size:n="icon",...o}=e,{orientation:s,scrollPrev:m,canScrollPrev:h}=x(),f=(0,u.Ym)();return(0,a.jsxs)(p.$n,{ref:r,variant:l,size:n,className:(0,d.cn)("absolute h-8 w-8 rounded-full","horizontal"===s?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!h,onClick:m,...o,children:["en"===f?(0,a.jsx)(i.A,{className:"h-5 w-5"}):(0,a.jsx)(c.A,{className:"h-5 w-5"}),(0,a.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});y.displayName="CarouselPrevious";let v=(0,l.forwardRef)((e,r)=>{let{className:t,variant:l="outline",size:n="icon",...o}=e,{orientation:s,scrollNext:m,canScrollNext:h}=x(),f=(0,u.Ym)();return(0,a.jsxs)(p.$n,{ref:r,variant:l,size:n,className:(0,d.cn)("absolute h-8 w-8 rounded-full","horizontal"===s?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!h,onClick:m,...o,children:["en"===f?(0,a.jsx)(c.A,{className:"h-5 w-5"}):(0,a.jsx)(i.A,{className:"h-5 w-5"}),(0,a.jsx)("span",{className:"sr-only",children:"Next slide"})]})});v.displayName="CarouselNext";let b=(0,l.forwardRef)((e,r)=>{let{className:t,...n}=e,{api:o}=x(),[s,i]=(0,l.useState)(0),[c,p]=(0,l.useState)([]),u=(0,l.useCallback)(e=>{o&&o.scrollTo(e)},[o]),m=(0,l.useCallback)(e=>{e&&p(e.scrollSnapList())},[]),h=(0,l.useCallback)(e=>{e&&i(e.selectedScrollSnap())},[]);return(0,l.useEffect)(()=>{if(o)return m(o),h(o),o.on("reInit",m),o.on("reInit",h),o.on("select",h),()=>{null==o||o.off("select",h),null==o||o.off("reInit",m),null==o||o.off("reInit",h)}},[o,m,h]),(0,a.jsx)("div",{ref:r,className:(0,d.cn)("flex justify-center gap-2 mt-4",t),...n,children:c.map((e,r)=>(0,a.jsx)("button",{className:(0,d.cn)("h-2 w-2 rounded-full transition-colors",r===s?"bg-primary":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>u(r),"aria-label":"Go to slide ".concat(r+1)},r))})});b.displayName="CarouselDots"},88158:(e,r,t)=>{t.d(r,{hO:()=>i}),t(95155);var a=t(19408),l=t(87526),n=t(53656),o=t(65993),s=t(29633);a.A,l.A,n.A,o.A,s.A,o.A;let i=e=>(null==e?void 0:e.includes("wheat"))?'<path d="M2 22 16 8"/><path d="M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"/><path d="M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"/><path d="M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"/><path d="M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z"/><path d="M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"/><path d="M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"/><path d="M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"/>':(null==e?void 0:e.includes("trees"))?'<path d="m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z"/><path d="M12 22v-3"/>':(null==e?void 0:e.includes("corporation"))||(null==e?void 0:e.includes("building"))?'<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"/><path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"/><path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"/><path d="M10 6h4"/><path d="M10 10h4"/><path d="M10 14h4"/><path d="M10 18h4"/>':(null==e?void 0:e.includes("office"))||(null==e?void 0:e.includes("chair"))?'<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/><rect width="20" height="14" x="2" y="6" rx="2"/>':(null==e?void 0:e.includes("garden"))||(null==e?void 0:e.includes("home"))?'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>':'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/>'},88750:(e,r,t)=>{t.r(r),t.d(r,{PropertyLikeBtn:()=>u});var a=t(95155),l=t(30926);let n=(0,l.createServerReference)("60d3e4470b1c261f89dfbbce2083d407c6ea77ccd5",l.callServer,void 0,l.findSourceMapURL,"updateDataByPath");var o=t(8531),s=t(83457),i=t(20063),c=t(12115),d=t(18720),p=t(80650);let u=e=>{let{propertyId:r,isLiked:t,className:l}=e,[u,m]=(0,c.useState)(t),{userData:x}=(0,o.nc)(),{setOpenLoginModal:h}=(0,o.Xi)(),f=(0,i.usePathname)(),g=async()=>
1{if(!x)return void h(!0);try{m(e=>!e),await o.Xq.likeProperty(r,!u),f.includes("favorites")&&await n(f),u||(0,p.Tm)({property_id:r,user_id:null==x?void 0:x.id,platform:"web"})}catch(e){console.error("Error liking property:",e),d.oR.error("Failed to like property")}};return(0,a.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,a.jsx)("button",{className:(0,o.cn)("w-8 h-8 hover:bg-red-50 hover:text-red-600 bg-white rounded-full flex items-center justify-center shadow-md cursor-pointer",l),onClick:e=>{e.stopPropagation(),g()},children:(0,a.jsx)(s.A,{className:(0,o.cn)("w-4 h-4",u?"text-red-600":"text-gray-600 hover:text-red-600"),fill:u?"red":"white"})})})}},90771:(e,r,t)=>{t.r(r),t.d(r,{default:()=>p});var a=t(95155),l=t(12115),n=t(17181),o=t(5917),s=t(75426),i=t(64749),c=t(18955),d=t(80650);function p(e){let{title:r,url:t,componentType:p="button",icon:u,propertyId:m}=e,x=(0,c.c3)("share"),[h,f]=(0,l.useState)(!1),g="".concat(window.location.origin).concat(t),y=[{name:x("twitter"),method:"twitter",action:()=>{window.open("https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(r),"&url=").concat(encodeURIComponent(g)),"_blank")}},{name:x("facebook"),method:"facebook",action:()=>{window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(g)),"_blank")}},{name:x("instagram"),method:"instagram",action:()=>{window.open("https://www.instagram.com/sharer/sharer.php?u=".concat(encodeURIComponent(g)),"_blank")}},{name:x("linkedin"),method:"linkedin",action:()=>{window.open("https://www.linkedin.com/sharing/share-offsite/?url=".concat(encodeURIComponent(g)),"_blank")}},{name:x("copy-link"),method:"copy",action:async()=>{try{await navigator.clipboard.writeText(g),f(!0),setTimeout(()=>f(!1),2e3)}catch(e){console.error("Failed to copy link:",e)}}}];return(0,a.jsxs)(i.rI,{children:[(0,a.jsx)(i.ty,{className:"cursor-pointer",onClick:e=>e.stopPropagation(),asChild:!0,children:"icon"===p?u||(0,a.jsx)(n.A,{className:"w-4 h-4 cursor-pointer"}):(0,a.jsxs)(i.$n,{variant:"outline",size:"sm",children:[(0,a.jsx)(n.A,{className:"w-4 h-4 me-2"}),x("share")]})}),(0,a.jsx)(i.SQ,{align:"end",children:y.map(e=>(0,a.jsx)(i._2,{onClick:()=>{var r,t;return r=e.method,t=e.action,void(m&&(0,d.aJ)({property_id:m,method:r,platform:"web"}),t())},className:"cursor-pointer",children:e.name===x("copy-link")&&h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{className:"w-4 h-4 me-2"}),x("copied")]}):e.name===x("copy-link")?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{className:"w-4 h-4 me-2"}),e.name]}):e.name},e.name))})]})}},92465:(e,r,t)=>{t.r(r),t.d(r,{Pagination:()=>c});var a=t(95155),l=t(90368),n=t(27937),o=t(75919),s=t(8531),i=t(66328);let c=e=>{let{currentPage:r,totalPages:t,maxVisiblePages:c=s.w2,className:d=""}=e,{setParam:p}=(0,o.DI)({scroll:!0}),u=(0,i.Ym)(),m=e=>{p("page",e.toString())};if(t<=1)return null;let x=(()=>{let e=[],a=Math.floor(c/2),l=Math.max(1,r-a),n=Math.min(t,r+a);r<=a&&(n=Math.min(t,c)),r+a>=t&&(l=Math.max(1,t-c+1)),l>1&&(e.push(1),l>2&&e.push("..."));for(let r=l;r<=n;r++)e.push(r);return n<t&&(n<t-1&&e.push("..."),e.push(t)),e})();return(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-1 ".concat(d),children:[(0,a.jsx)("button",{onClick:()=>{r>1&&m(r-1)},disabled:1===r,className:"flex items-center justify-center w-8 h-8 rounded-full text-gray-600 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page",children:"en"===u?(0,a.jsx)(l.A,{size:16}):(0,a.jsx)(n.A,{size:16})}),x.map((e,t)=>(0,a.jsx)("button",{onClick:()=>(e=>{"number"==typeof e&&e!==r&&m(e)})(e),disabled:"..."===e||e===r,className:"\n flex items-center justify-center w-9 h-9 rounded-full text-sm font-medium transition-colors\n ".concat(e===r?"bg-amaken text-white":"..."===e?"text-gray-400 cursor-default":"text-gray-700 hover:bg-gray-100 cursor-pointer","\n "),"aria-label":"..."===e?"More pages":"Go to page ".concat(e),"aria-current":e===r?"page":void 0,children:e},t)),(0,a.jsx)("button",{onClick:()=>{r<t&&m(r+1)},disabled:r===t,className:"flex items-center justify-center w-8 h-8 rounded-full text-gray-600 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Next page",children:"en"===u?(0,a.jsx)(n.A,{size:16}):(0,a.jsx)(l.A,{size:16})})]})}},95983:(e,r,t)=>{t.r(r),t.d(r,{PropertyCardClient:()=>o});var a=t(95155),l=t(18955),n=t(11804);function o(e){let{property:r,withCompareBtn:t=!0}=e,o=(0,l.c3)("property"),s=(0,l.c3)("common");return(0,a.jsx)(n.u,{property:r,withCompareBtn:t,translations:{verified:o("verified"),JOD:o("JOD"),bed:o("bed"),bath:o("bath"),sqm:o("sqm"),forSale:o("for-sale"),forRent:o("for-rent"),featured:o("featured"),"3D-tour":o("3D-tour"),yr:s("yr")}})}},96071:(e,r,t)=>{t.r(r),t.d(r,{PriceFilter:()=>p});var a=t(95155),l=t(12115),n=t(64749),o=t(4353),s=t(18955),i=t(66328),c=t(8531),d=t(75919);function p(e){let{price:r,onClose:t}=e,p=(0,s.c3)("filter"),u=(0,i.Ym)(),{setParams:m}=(0,d.DI)(),{filterData:x}=(0,c.PI)(),h=(null==x?void 0:x.priceRange)||{min:0,max:1e6},[f,g]=(0,l.useState)(r||h),y=(e,r)=>{let t=e?Number.parseInt(e):0;g(e=>({...e,[r]:t}))},v=()=>{g(e=>e.min>e.max||e.min<h.min||e.max>h.max?h:e)},b=(0,l.useCallback)(()=>{f&&(m({priceMin:f.min.toString(),priceMax:f.max.toString(),page:"1"}),(0,c.zc)({filter_type:"priceRange",filter_value:f.min.toString(),platform:"web"}),null==t||t())},[f,m]);return(0,a.jsxs)("div",{className:"p-4 space-y-6",children:[(0,a.jsx)("label",{className:"text-base font-bold mb-4 block",children:p("price-range")}),(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)(n.Ap,{value:f?[f.min,f.max]:void 0,onValueChange:e=>g({min:e[0],max:e[1]}),defaultValue:[h.min,h.max],max:h.max,min:h.min,step:500,className:"mb-7",dir:"ar"===u?"rtl":"ltr"}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsx)(o.x8,{value:(null==f?void 0:f.min.toString())||h.min,onChange:e=>{y(e,"min")},onBlur:v,containerClassName:"flex-1"}),(0,a.jsx)("span",{className:"text-gray-500",children:"â"}),(0,a.jsx)(o.x8,{value:(null==f?void 0:f.max.toString())||h.max,onChange:e=>{y(e,"max")},onBlur:v,containerClassName:"flex-1"})]})]}),(0,a.jsx)("div",{className:"pt-4",children:(0,a.jsx)(n.$n,{onClick:b,className:"w-full bg-orange-500 hover:bg-orange-600 text-white rounded-lg cursor-pointer",children:p("done")})})]})}}}]);
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.