PageSourceSearch

https://www.maklarringen.se/_next/static/chunks/7142-3bf55a383494a509.js

js maklarringen.se collected 2026-10-04 00:26:23 UTC 24,953 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7142],{87142:function(e,t,l){l.d(t,{Z:function(){return G}});var a=l(52676),r=l(2808),s=l(75271),n=l(2733);let o=(0,r.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:l,...r}=e;return(0,a.jsx)("div",{className:(0,n.cn)(o({variant:l}),t),...r})}var c=l(52631),u=l(76806),d=l(58513);let m=s.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(c.mY,{ref:t,className:(0,n.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",l),...r})});m.displayName=c.mY.displayName,s.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,a.jsx)(u.Z,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)(c.mY.Input,{ref:t,className:(0,n.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",l),...r})]})}).displayName=c.mY.Input.displayName;let f=s.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(c.mY.List,{ref:t,className:(0,n.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",l),...r})});f.displayName=c.mY.List.displayName,s.forwardRef((e,t)=>(0,a.jsx)(c.mY.Empty,{ref:t,className:"py-6 text-center text-sm",...e})).displayName=c.mY.Empty.displayName,s.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(c.mY.Group,{ref:t,className:(0,n.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",l),...r})}).displayName=c.mY.Group.displayName,s.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(c.mY.Separator,{ref:t,className:(0,n.cn)("-mx-1 h-px bg-border",l),...r})}).displayName=c.mY.Separator.displayName;let p=s.forwardRef((e,t)=>{let{className:l,hidden:r,...s}=e;return(0,a.jsx)(c.mY.Item,{ref:t,className:(0,n.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",l,r&&"hidden"),...s})});p.displayName=c.mY.Item.displayName;var h=l(95651),x=l(50864),g=l(85344),v=l(80940),b=l(65341),j=l(26592),y=l(82527),N=l(37168),w=e=>{let{placeholder:t,choices:l,isSearch:r,filterType:n,searchParam:o}=e,d=(0,y.useTranslations)("components.pages.forSalePage"),w=(0,x.tv)(),S=(0,x.jD)(),C=(0,N.useSearchParams)(),{handleChangeValue:k}=(0,h.Z)({searchParamName:g.jf,shallow:!0}),O=(e,t)=>{var l;let a;let s=JSON.parse(null!==(l=new URLSearchParams(null==C?void 0:C.toString()).get(g.jf))&&void 0!==l?l:"[]");if(a="Referens"===t?"EstateNumber:".concat(e):"ExterntReferens"===t?"ReferenceId:".concat(e):"OBJ"===t?e:isNaN(Number(e))?e:"ReferenceId:".concat(e),s.push(r?a:"".concat(n,":").concat(a)),k(JSON.stringify(s)),""===e)return;let o=document.getElementById("list");o&&o.scrollIntoView({behavior:"smooth"})},R=(0,s.useRef)(null),[P,E]=(0,s.useState)(!1),[J,L]=(0,s.useState)([]),[M,I]=(0,s.useState)("");(0,s.useEffect)(()=>{var e;L(JSON.parse(null!==(e=null==C?void 0:C.get(g.jf))&&void 0!==e?e:"[]").filter(e=>(null==l?void 0:l.find(t=>"".concat(n,":").concat(t.value)===e))||r).map(e=>{let t=e.split(":")[1],l=t||e;return{value:l,label:l,type:t}}))},[l,C]);let V=(0,s.useCallback)(e=>{var t;let l=new URLSearchParams(null==C?void 0:C.toString()),a=JSON.parse(null!==(t=l.get(g.jf))&&void 0!==t?t:"[]");a=a.filter(t=>r?t!==e.value&&t!=="ReferenceId:".concat(e.value)&&t!=="EstateNumber:".concat(e.value):t!=="".concat(o,":").concat(e.value)&&("Country"===o?!/^Province:|^City:|^Area:/.test(t):"Province"===o?!/^City:|^Area:/.test(t):"City"!==o||!/^Area:/.test(t))),L(t=>t.filter(t=>t.value!==e.value)),I(""),a.length?l.set(g.jf,JSON.stringify(a)):l.delete(g.jf),w.replace("".concat(S).concat(l.toString()?"?"+l.toString():""),{scroll:!1})},[C,w,S,o]),D=(0,s.useCallback)(e=>{let t=R.current;if(t){if(r&&"Enter"===e.key){let e=t.value.toUpperCase().trim(),l=e,a=e,r="";/^OBJ\d+_\d+$/.test(e)?(a=l=e.toUpperCase(),r="OBJ"):/^\d{9}$/.test(e)?(l=e,a="Referens: ".concat(e),r="Referens"):/^\d{6}$/.test(e)&&(l=e,a="Externt referensnummer: ".concat(e),r="ExterntReferens"),l&&(L(e=>[...e.filter(e=>e.type!==r),{value:l,label:a,type:r}]),O(l,r),I(""))}"Escape"===e.key&&t.blur()}},[O]),T=(0,s.useMemo)(()=>{let e=null==l?void 0:l.filter(e=>!J.some(t=>t.value===e.value));return M?null==e?void 0:e.filter(e=>e.label.toLowerCase().includes(M.toLowerCase())):e},[M,l]),Y=e=>{if(null==l?void 0:l.find(t=>e.value===t.value)){I(""),L(t=>[...t,e]);let t="";t=e.value.startsWith("OBJ")?"OBJ":/^\d{9}$/.test(e.value)?"Referens":/^\d{6}$/.test(e.value)?"ExterntReferens":"Other",O(e.value,t)}};return(0,a.jsxs)(m,{onKeyDown:D,className:"overflow-visible bg-transparent",children:[(0,a.jsx)("div",{className:"min-w-[208px] group flex border border-input px-3 py-2 h-12 text-sm r
1ing-offset-background rounded-md focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 bg-base-white",children:(0,a.jsxs)("div",{className:"flex gap-1 flex-wrap w-full relative",children:[r&&(0,a.jsx)(u.Z,{className:"text-[#696968]"}),J.slice(0,1).map((e,t)=>r&&e.type===e.value?0===t?(0,a.jsx)(c.mY.Input,{disabled:!0,placeholder:d("clearToSearch"),className:"ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1 min-h-[1.375rem]"}):null:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(v.pn,{children:(0,a.jsxs)(v.u,{children:[(0,a.jsx)(v.aJ,{asChild:!0,children:(0,a.jsx)("span",{className:"z-10 flex",children:(0,a.jsxs)(i,{variant:"secondary",children:[e.label," ",J.length>1?"(+".concat(J.length-1,")"):null,(0,a.jsx)("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:t=>{"Enter"===t.key&&V(e)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>{V(e)},children:(0,a.jsx)(j.Z,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},e.value)})}),(0,a.jsx)(v._v,{children:(0,a.jsx)(b.u,{small:!0,className:"text-[#292827b3] text-black",children:J.map(e=>e.label).join(", ")})})]})})})),(0,a.jsx)(c.mY.Input,{ref:R,value:M,onValueChange:I,onBlur:()=>E(!1),onFocus:()=>E(!0),placeholder:J&&0===J.length?t:"",className:"ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1 min-h-[1.375rem] ".concat(J.length>0?"absolute top-0 right-0 bottom-0 left-0":"")})]})}),(0,a.jsx)("div",{className:"relative",children:P&&T&&T.length>0&&(0,a.jsx)("div",{className:"absolute w-full z-10 top-2 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:(0,a.jsx)(f,{children:T.map(e=>(0,a.jsx)(p,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>Y(e),className:"cursor-pointer",children:e.label},e.value))})})})]})};let S=e=>{let{stroke:t="black"}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,a.jsx)("path",{d:"M2.5 6.66666H12.5M12.5 6.66666C12.5 8.04737 13.6192 9.16666 15 9.16666C16.3807 9.16666 17.5 8.04736 17.5 6.66666C17.5 5.28595 16.3807 4.16666 15 4.16666C13.6192 4.16666 12.5 5.28595 12.5 6.66666ZM7.5 13.3333H17.5M7.5 13.3333C7.5 14.7141 6.38071 15.8333 5 15.8333C3.61929 15.8333 2.5 14.7141 2.5 13.3333C2.5 11.9526 3.61929 10.8333 5 10.8333C6.38071 10.8333 7.5 11.9526 7.5 13.3333Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})};
1var C=l(16462),k=l(82566),O=l(95306),R=l(25165),P=l(96833),E=l(178),J=l(38716),L=l(48975);let M=s.forwardRef((e,t)=>{let{className:l,...r}=e,o=Array.isArray(r.value)?r.value:[r.min,r.max];return(0,a.jsxs)(L.fC,{ref:t,className:(0,n.cn)("relative flex w-full touch-none select-none items-center",l),...r,children:[(0,a.jsx)(L.fQ,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-tertiary",children:(0,a.jsx)(L.e6,{className:"absolute h-full bg-primary"})}),o.map((e,t)=>(0,a.jsx)(s.Fragment,{children:(0,a.jsx)(L.bU,{className:"block h-6 w-6 shadow-sm rounded-full border border-tertiary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})},t))]})});M.displayName=L.fC.displayName;var I=l(81461),V=l(12793),D=l(48179);let T="(min-width: 768px)",Y=e=>{let{children:t,...l}=e,r=(0,C.a)(T)?d.Vq:V.dy;return(0,a.jsx)(r,{...l,children:t})},Z=e=>{let{className:t,children:l,...r}=e,s=(0,C.a)(T)?d.hg:V.Qz;return(0,a.jsx)(s,{className:t,...r,children:l})},A=e=>{let{className:t,children:l,disableFocusOnInputInOpen:r,...s}=e,o=(0,C.a)(T),i=o?d.cZ:V.sc;return(0,a.jsx)(i,{className:(0,n.cn)(o?"rounded-2xl bg-base-white p-0 w-full max-w-[55.25rem]":"h-screen top-0 right-0 left-auto mt-0 w-full rounded-none bg-base-white",t),onOpenAutoFocus:e=>{r&&e.preventDefault()},onInteractOutside:e=>e.preventDefault(),...s,children:l})},U=e=>{let{className:t,children:l,...r}=e,s=(0,C.a)(T)?d.fK:V.OX;return(0,a.jsx)(s,{className:t,...r,children:l})},B=e=>{let{className:t,children:l,...r}=e;return(0,C.a)(T)?(0,a.jsx)("div",{className:(0,n.cn)("px-4 md:px-6 py-10 gap-y-10 md:gap-y-14 flex flex-col",t),...r,children:l}):(0,a.jsx)(D.x,{children:(0,a.jsx)("div",{className:(0,n.cn)("px-4 md:px-6 py-10 gap-y-14 flex flex-col",t),...r,children:l})})},$=e=>{let{title:t,maxMinValues:l,defaultValue:r,step:o=1,unit:i="",onValueChange:c}=e,u=(0,s.useMemo)(()=>{let[e,t]=l;return e===t?"".concat((0,n.uf)(e)," ").concat(i):"".concat((0,n.uf)(e)," - ").concat((0,n.uf)(t)," ").concat(i)},[l,i]);return(0,a.jsxs)("div",{className:"col-span-12 md:col-span-6 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)(b.u,{small:!0,strong:!0,children:t}),(0,a.jsx)(b.u,{small:!0,children:u})]}),(0,a.jsx)(M,{defaultValue:r,min:r[0],max:r[1],minStepsBetweenThumbs:0,value:l,step:o,onValueChange:c})]})};var z=e=>{var t,l,r,o,i,c,d,m,f;let{isAbroad:p}=e,x=(0,y.useTranslations)("components.drawers"),v=(0,y.useTranslations)("common.buttons"),w=(0,y.useTranslations)("components.cards"),L=(0,N.useSearchParams)(),M=null!==(t=null==L?void 0:L.get(g.$E))&&void 0!==t?t:"",V=(0,C.a)("(min-width: 768px)"),D=[0,1e7],T=[0,p?8:6],z=[0,300],[_,F]=(0,s.useState)(M);s.useEffect(()=>{F(M)},[M]);let{handleChangeValue:W}=(0,h.Z)({shallow:!0}
1),[H,Q]=(0,s.useState)(!1),[K,X]=(0,s.useState)(!1),[G,q]=(0,s.useState)([Number(null!==(l=null==L?void 0:L.get(g.OR))&&void 0!==l?l:D[0]),Number(null!==(r=null==L?void 0:L.get(g.sU))&&void 0!==r?r:D[1])]),[ee,et]=(0,s.useState)([Number(null!==(o=null==L?void 0:L.get(g.Q$))&&void 0!==o?o:T[0]),Number(null!==(i=null==L?void 0:L.get(g.Xm))&&void 0!==i?i:T[1])]),[el,ea]=(0,s.useState)([Number(null!==(c=null==L?void 0:L.get(g.um))&&void 0!==c?c:z[0]),Number(null!==(d=null==L?void 0:L.get(g.RM))&&void 0!==d?d:z[1])]),[er,es]=(0,s.useState)(JSON.parse(null!==(m=null==L?void 0:L.get(g.bk))&&void 0!==m?m:"[]")),[en,eo]=(0,s.useState)(JSON.parse(null!==(f=null==L?void 0:L.get(g.aJ))&&void 0!==f?f:"[]")),ei=(()=>{if(p)return k.ay.map(e=>({value:e,title:(0,n.zj)(e)}));let e=[...k.d7].slice(0,7).map(e=>({value:e,title:(0,n.zj)(e)})),t=k.d7.map(e=>({value:e,title:(0,n.zj)(e)}));return K?t:e})(),ec=p?k.k$:[];return(0,a.jsxs)(Y,{open:H,onOpenChange:Q,children:[(0,a.jsx)(Z,{asChild:!0,children:(0,a.jsxs)(E.z,{className:"flex gap-2 w-full md:w-fit h-12",children:[(0,a.jsx)(S,{stroke:"white"}),(0,a.jsx)(b.u,{small:!0,strong:!0,children:v("filter")})]})}),(0,a.jsxs)(A,{disableFocusOnInputInOpen:!0,children:[(0,a.jsx)(U,{className:"flex flex-row items-center justify-between border-b py-3 px-4",children:(0,a.jsx)(b.u,{strong:!0,className:"w-full text-center font-semibold text-lg",children:x("filter")})}),!V&&(0,a.jsxs)(P.d.Close,{className:"absolute right-2 top-1 rounded-full opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground p-2 hover:bg-neutrals-neutral-4",children:[(0,a.jsx)(j.Z,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]}),(0,a.jsxs)(B,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-y-6",children:[(0,a.jsx)(b.u,{strong:!0,small:!0,children:x("estateType")}),(0,a.jsx)(I.t,{type:"multiple",className:"flex flex-wrap justify-start",defaultValue:er,value:er,onValueChange:e=>es(e),children:ei.map(e=>(0,a.jsx)(I.G,{value:e.value,className:"gap-1 rounded-[999px] px-5 border",children:(0,a.jsx)(b.u,{small:!0,className:"font-[450] md:text-sm",children:e.title})},e.value))})]}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-y-6",children:[(0,a.jsx)(b.u,{strong:!0,small:!0,children:x("salesMethod")}),(0,a.jsx)(I.t,{type:"multiple",className:"flex flex-wrap justify-start",value:en,onValueChange:eo,children:ec.map(e=>(0,a.jsx)(I.G,{value:e.value,className:"gap-1 rounded-[999px] px-5 border",children:(0,a.jsx)(b.u,{small:!0,className:"font-[450] md:text-sm",children:w(e.label)})},e.value))})]}),!p&&(0,a.jsxs)("div",{onClick:()=>X(!K),className:"flex gap-2 cursor-pointer -mt-[28px]  text-neutral-6 font-medium text-base",children:[K?(0,a.jsx)(O.Z,{}):(0,a.jsx)(R.Z,{}),x(K?"hideEstates":"showEstates")]}),(0,a.jsxs)("div",{className:"grid grid-cols-12 gap-6",children:[(0,a.jsx)($,{title:x("priceLabel"),maxMinValues:G,defaultValue:D,onValueChange:e=>{q(e)},unit:"".concat(G[1]===D[1]?"+ ":" ","  ").concat(p?"€":"kr"),step:1e5}),(0,a.jsx)($,{title:x("roomsLabel"),maxMinValues:ee,defaultValue:T,onValueChange:e=>{et(e)},unit:"".concat(ee[1]===T[1]?"+ ":" "," ").concat(x("rooms")),step:1}),(0,a.jsx)($,{title:x("livingSpaceLabel"),maxMinValues:el,defaultValue:z,onValueChange:e=>{ea(e)},unit:"".concat(el[1]===z[1]?"+ ":" "," m\xb2"),step:10})]}),(0,a.jsxs)("div",{className:"grid grid-cols-6 gap-y-6",children:[(0,a.jsx)(b.u,{strong:!0,small:!0,className:"col-span-6",children:x("keyword")}),(0,a.jsxs)("div",{className:"flex gap-x-4 items-center w-full h-12 rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 col-span-6 md:col-span-3",children:[(0,a.jsx)(u.Z,{stroke:"black",className:"h-[15px] w-[15px]"}),(0,a.jsx)(J.I,{placeholder:x("keywordPlaceholder"),value:_,defaultValue:_,onChange:e=>F(e.target.value),className:"border-0 ring-0 p-0 max-h-10 focus-visible:!ring-0 selection:text-black selection:bg-neutral-300 focus-visible:!ring-offset-0"})]})]}),(0,a.jsxs)("div",{className:"h-[160px] md:h-auto flex flex-col md:flex-row items-center md:justify-between",children:[(0,a.jsx)(E.z,{type:"button",variant:"ghost",onClick:()=>{es([]),q(D),et(T),ea(z),F(""),eo([])},children:(0,a.jsx)(b.u,{small:!0,strong:!0,children:v("clearAll")})}),(0,a.jsx)(E.z,{onClick:()=>{let e=new URLSearchParams(null==L?void 0:L.toString());0===er.length?e.delete(g.bk):e.set(g.bk,JSON.stringify(er)),G[0]===D[0]&&G[1]===D[1]?(e.delete(g.OR),e.delete(g.sU)):(e.set(g.OR,JSON.stringify(G[0])),G[1]!==D[1]?e.set(g.sU,JSON.stringify(G[1])):e.delete(g.sU)),ee[0]===T[0]&&ee[1]===T[1]?(e.delete(g.Q$),e.delete(g.Xm)):(e.set(g.Q$,JSON.stringify(ee[0])),ee[1]!==T[1]?e.set(g.Xm,JSON.stringify(ee[1])):e.delete(g.Xm)),el[0]===z[0]&&el[1]===z[1]?(e.delete(g.um),e.delete(g.RM)):(e.set(g.um,JSON.stringify(el[0])),el[1]!==z[1]?e.set(g.RM,JSON.stringify(el[1])):e.delete(g.RM)),""!==_?e.set(g.$E,_):e.delete(g.$E),0===en.length?e.delete(g.aJ):e.set(g.aJ,JSON.stringify(en)),W(e.toString()),Q(!1)},children:(0,a.jsx)(b.u,{small:!0,strong:!0,children:v("showResult")})})]})]})]})]})},_=()=>{let e=(0,y.useTranslations)("components.filters"),t=(0,C.a)("(min-width: 1024px)"),l=(0,N.useSearchParams)(),r=Object.fromEntries(new URLSearchParams(null!=l?l:"").entries()),[o,i]=(0,s.useState)({provinces:[],cities:[],countries:[],areas:[]}),c=e=>e.map(e=>({value:e.value.trim(),label:e.label.trim(),type:"filter"})).filter((e,t,l)=>t===l.findIndex(t=>t.value===e.value)).sort((e,t)=>e.label.localeCompare(t.label));return(0,s.useEffect)(()=>{var e,t,a,s,o;let u=JSON.parse(null!==(o=new URLSearchParams(null==l?void 0:l.toString()).get(g.jf))&&void 0!==o?o:"[]"),d=null===(e=u.filter(e=>e.startsWith("Country:")))||void 0===e?void 0:e.map(e=>e.split(":")[1]),m=null===(t=u.filter(e=>e.startsWith("Province:")))||void 0===t?void 0:t.map(e=>e.split(":")[1]),f=null===(a=u.filter(e=>e.startsWith("City:")))||void 0===a?void 0:a.map(e=>e.split(":")[1]);null===(s=u.filter(e=>e.startsWith("Area:")))||void 0===s||s.map(e=>e.split(":")[1]),(0,n.rQ)("/api/search/objects/no-filters/abroad",{...r,[g.Pv]:g.ap}).then(e=>{let t=e.filter(e=>!0),l=c((0,n.gz)(["Country"],t)),a=t.filter(e=>!((null==d?void 0:d.length)>0)||d.includes(e.Country)),r=c((0,n.gz)(["Province"],a)),s=a.filter(e=>!((null==m?void 0:m.length)>0)||m.includes(e.Province)),o=c((0,n.gz)(["City"],s)),u=s.filter(e=>!((null==f?void 0:f.length)>0)||f.includes(e.City));i({countries:l,provinces:r,cities:o,areas:c((0,n.gz)(["AreaName"],u))})})},[l]),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row gap-2 justify-center",children:[(0,a.jsx)(w,{choices:null==o?void 0:o.countries,placeholder:e("country"),filterType:"Country",searchParam:"Country"}),(0,a.jsx)(w,{choices:null==o?void 0:o.provinces,placeholder:e("province"),filterType:"Province",searchParam:"Province"}),(0,a.jsx)(w,{choices:null==o?void 0:o.cities,placeholder:e("city"),filterType:"City",searchParam:"City"}),(0,a.jsx)(w,{choices:null==o?void 0:o.areas,placeholder:e("area"),filterType:"AreaName",searchParam:"Area"}),t&&(0,a.jsx)(z,{isAbroad:!0})]}),(0,a.jsx)("div",{className:"flex gap-2 justify-center lg:max-w-[400px] w-full mx-auto mt-2  lg:mt-4 mb-2",children:(0,a.jsx)(w,{isSearch:!0,placeholder:"OBJ01234_0123456789"})}),!t&&(0,a.jsx)(z,{isAbroad:!0})]})}
1,F=l(73270),W=l(74436),H=function(e,t){let[l,a]=(0,s.useState)(e);return(0,s.useEffect)(()=>{if("string"==typeof e&&0===e.trim().length){a(e);return}let l=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(l)}},[e,t]),{debouncedValue:l}},Q=l(97395),K=e=>{let{placeholder:t,choices:l,searchMode:r=F.N.Includes,shallow:o=!1,sortMode:u="natural"}=e,{handleChangeValue:d}=(0,h.Z)({searchParamName:g.jf,shallow:o}),x=(0,N.useSearchParams)(),[v,b]=(0,s.useState)(l),[y,w]=(0,s.useState)(""),{debouncedValue:S}=H(y,50),C=Object.fromEntries(new URLSearchParams(null!=x?x:"").entries());(0,s.useEffect)(()=>{v||(0,n.rQ)("/api/search/objects/no-filters",{...C,[g.Pv]:g.t2}).then(e=>{b(e)})},[]);let k=(0,s.useRef)(null),[O,R]=(0,s.useState)(!1),P=(0,s.useMemo)(()=>{let e=null==x?void 0:x.get(g.jf);return e?JSON.parse(e).map(e=>({value:e,label:e})):[]},[x]),E=(0,s.useCallback)(e=>{let t=P.filter(t=>t.value!==e.value);d(t.length>0?JSON.stringify(t.map(e=>e.value)):"")},[P]),J=(0,s.useCallback)(e=>{let t=e(P);d(t.length>0?JSON.stringify(t.map(e=>e.value)):"")},[P]);(0,s.useEffect)(()=>{if(!P.length||new URLSearchParams(window.location.search).has("numberOfResults"))return;let e=document.getElementById("list");e&&e.scrollIntoView({behavior:"smooth"})},[P]);let L=(0,s.useCallback)(e=>{let t=k.current;if(t){if("Enter"===e.key){let e=t.value.toUpperCase().trim();/^OBJ\d+_\d+$/.test(e)&&(J(t=>[...t.filter(e=>!e.value.startsWith("OBJ")),{value:e,label:e}]),w(""))}("Delete"===e.key||"Backspace"===e.key)&&""===t.value&&J(e=>{let t=[...e];return t.pop(),t}),"Escape"===e.key&&t.blur()}},[]),M=(0,s.useMemo)(()=>{let e=null==v?void 0:v.filter(e=>!P.some(t=>t.value===e.value));if(!S)return e;let t=S.toLowerCase();if("natural"===u)return null==e?void 0:e.filter(e=>e.label.toLowerCase()[r](t));if("prefixFirst"===u){let l=null==e?void 0:e.filter(e=>e.label.toLowerCase().includes(t));return null==l?void 0:l.sort((e,l)=>{let a=e.label.toLowerCase(),r=l.label.toLowerCase(),s=a.indexOf(t),n=r.indexOf(t);return s!==n?s-n:a.localeCompare(r)})}return e},[S,v,P,u,r]);return(0,a.jsxs)(m,{onKeyDown:L,className:"overflow-visible bg-transparent",children:[(0,a.jsx)("div",{className:"group flex border border-input px-3 py-2 h-12 text-sm r
1ing-offset-background rounded-md focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 bg-base-white",children:(0,a.jsxs)("div",{className:"flex gap-1 flex-wrap w-full",children:[P.map(e=>(0,a.jsxs)(i,{variant:"secondary",children:[e.label,(0,a.jsx)("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:t=>{"Enter"===t.key&&E(e)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>{E(e),R(!0)},children:(0,a.jsx)(j.Z,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},"selected-badge-".concat((0,Q.l)(e.label)))),(0,a.jsx)(c.mY.Input,{ref:k,value:y,onValueChange:w,onBlur:()=>R(!1),onFocus:()=>R(!0),placeholder:P.length>0?"":t,disabled:P.length>0,className:"ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1 min-h-[1.375rem]"})]})}),(0,a.jsx)("div",{className:"relative",children:O&&S&&M&&(null==M?void 0:M.length)>0&&(0,a.jsx)("div",{className:"absolute w-full z-10 top-2 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:(0,a.jsx)(f,{children:M.map(e=>(0,a.jsx)(p,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{w(""),R(!1),J(t=>[...t,e])},className:"cursor-pointer",children:(e.value.toLowerCase()[r](y.toLowerCase()),e.label)},"command-item-".concat((0,Q.l)(e.value),"-").concat(e.label)))})})})]})},X=l(58945),G=e=>{let{heading:t,subHeading:l,comboSearchItems:r,searchPlaceholder:s,showFilter:n,isAbroad:o,showAbroadFilter:i,searchMode:c=F.N.Includes,shallowSearch:u=!1,sortMode:d="natural"}=e;return(0,a.jsx)("div",{className:"wrap-px bg-neutrals-neutral-3",children:(0,a.jsxs)(X.M,{className:"justify-center h-full items-center text-center pt-[7rem] pb-[2.5rem] md:pb-[7.5rem]",children:[(0,a.jsx)(X.o,{className:"gap-12 md:col-start-4 lg:col-start-5 md:col-span-6 lg:col-span-4",start:"5",span:"4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(W.Z,{as:"h1",children:t}),l&&(0,a.jsx)(b.u,{className:"text-center select-text",children:l})]})}),(0,a.jsxs)(X.o,{start:"4",span:"6",children:[i&&(0,a.jsx)("div",{className:"flex flex-col md:flex-row gap-4 items-center",children:(0,a.jsx)("div",{className:"relative w-full",children:(0,a.jsx)(_,{})})}),!i&&(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 items-center",children:[(0,a.jsx)("div",{className:"relative w-full",children:(0,a.jsx)(K,{searchMode:c,choices:r,placeholder:s,shallow:u,sortMode:d})}),n&&(0,a.jsx)(z,{isAbroad:o})]})]})]})})}},16462:function(e,t,l){l.d(t,{a:function(){return r}});var a=l(75271);function r(e){let[t,l]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{function t(e){l(e.matches)}let a=matchMedia(e);return a.addEventListener("change",t),l(a.matches),()=>a.removeEventListener("change",t)},[e]),t}},95651:function(e,t,l){var a=l(50864),r=l(82527),s=l(37168),n=l(66994),o=l(25379);t.Z=e=>{let{searchParamName:t,scroll:l=!1,valueToDelete:i,shallow:c=!1}=e,u=(0,n.useRouter)(),d=(0,a.tv)(),m=(0,a.jD)(),f=(0,r.useLocale)(),p=(0,s.useSearchParams)(),h=(0,a.RO)({locale:f,href:m});return{handleChangeValue:e=>{let a=new URLSearchParams(t?null==p?void 0:p.toString():e);t&&(e&&e!==i?a.set(t,e):a.delete(t));let r="".concat(h,"?").concat(a.toString()).replace(/\?$/,"");c?null==u||u.replace({query:{locale:f,...Object.fromEntries(a.entries())}},"".concat(f===o.al?"":"/".concat(f)).concat(r),{shallow:!0,scroll:l}):d.replace(r,{scroll:l})}}}},82566:function(e,t,l){l.d(t,{ay:function(){return r},d7:function(){return a},k$:function(){return s}});let a=["OneFamilyDetachedHouse","TwinHouse","TerraceHouse","Townhouse","Apartment","Cottage","Plot","TwoFamilyDetachedHouse","Farm","Condominium","ResidentialProperty","IndustrialProperty","Project","Other"],r=["OneFamilyDetachedHouse","Townhouse","Apartment","Plot"],s=[{value:"Ensamr\xe4tt (g\xe4ller endast f\xf6r utland)",label:"exclusiveRight"}]},73270:function(e,t,l){var a,r;l.d(t,{N:function(){return a}}),(r=a||(a={})).Includes="includes",r.StartsWith="startsWith"}}]);

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.