1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9762ec58-ed33-4238-91ba-a1c635f4a4aa",e._sentryDebugIdIdentifier="sentry-dbid-9762ec58-ed33-4238-91ba-a1c635f4a4aa")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7097],{91301:(e,t,r)=>{r.r(t),r.d(t,{appendBoxToStreet:()=>u,default:()=>m,extractBoxFromAddressInput:()=>n,formatSelectedAddressDisplay:()=>c,parseGeocodeAddress:()=>d});var a=r(95155),l=r(22704),s=r(78285),o=r(12115);let i=/\s+(b\d+[a-z]?|bus\s+\S+|box\s+\S+|bte\s+\S+|bo[iî]te\s+\S+)\s*$/i;function n(e){let t=e.trim(),r=t.match(i);return(null==r?void 0:r[1])?{query:t.slice(0,r.index).trim(),box:r[1].trim()}:{query:t,box:""}}function u(e,t){return e?t?`${e} ${t}`.trim():e:t}function d(e){let t=(null==e?void 0:e.address)||{},r=t.road||t.street||t.pedestrian||t.footway||t.square||t.protected_area||(null==e?void 0:e.name)||"",a=t.house_number||"",l=r&&a?`${r} ${a}`.trim():[r,a].filter(Boolean).join(" ").trim(),s=t.postcode||"";return{street:l,zip:s,city:t.city||t.town||t.village||t.municipality||t.city_district||"",box:t.unit||t.flats||t.apartment||t.box||""}}function c(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=r||e.box,l=u(e.street,a);if(l){let t=[e.zip,e.city].filter(Boolean).join(" ");return t?`${l}, ${t}`:l}return t}let m=e=>{let{dictionary:t,onSelected:i,settings:m,labelText:p,placeholder:f,showMap:b=!0,name:y,required:g=!1}=e,[h,x]=(0,o.useState)({GoogleX:50.84716,GoogleY:4.351998,markerImage:"",markerColor:""}),[v,w]=(0,o.useState)(""),[j,S]=(0,o.useState)(""),[_,k]=(0,o.useState)(""),[C,$]=(0,o.useState)(""),[D,N]=(0,o.useState)([]),I=(0,o.useRef)(null),T=(0,o.useRef)(0),z=(0,o.useRef)(""),A=(0,o.useMemo)(()=>[h],[h]),G=async e=>{let t=e.trim();if(!t)return void N([]);let a=++T.current,{OpenStreetMapProvider:l}=await Promise.all([r.e(1761),r.e(469)]).then(r.bind(r,70469)),s=new l({params:{countrycodes:"be",addressdetails:1}}),o=await s.search({query:t});a===T.current&&N(o)};return(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(s.A,{name:`${y}-display`,placeholder:f??t.ADDRESS,labelText:p,id:y,required:g,className:"rounded-md",onChange:e=>{let t=e.target.value,{query:r,box:a}=n(t);w(t),S(t),z.current=a,k(""),$(""),null==i||i(t),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{G(r||t)},300)},value:v,autoComplete:"off"}),(0,a.jsx)("input",{type:"hidden",name:y,value:j,autoComplete:"off"}),(0,a.jsx)("input",{type:"hidden",name:`${y}Zip`,value:_,autoComplete:"off"}),(0,a.jsx)("input",{type:"hidden",name:`${y}City`,value:C,autoComplete:"off"}),D&&D.length>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"absolute z-10 left-0 right-0 mt-4 py-2 bg-white shadow-md max-h-80 overflow-y-auto rounded-md",children:D&&D.map(e=>(0,a.jsx)("div",{className:"px-4 py-2 text-left cursor-pointer hover:bg-gray-100",onMouseDown:e=>e.preventDefault(),onClick:()=>{let t,r,a,l,s;return T.current+=1,I.current&&(clearTimeout(I.current),I.current=null),N([]),t=d(e.raw),r=z.current||t.box,a=u(t.street,r),l=c(t,e.label,r),s=a||l,void(x({GoogleX:e.y,GoogleY:e.x,markerImage:"",markerColor:""}),w(l),S(s),k(t.zip),$(t.city),null==i||i(s))},children:e.label},e.raw.place_id))})})]})}),b&&(0,a.jsx)("div",{className:"bg-gray-100 min-h-96 z-0",children:(0,a.jsx)(l.default,{markers:A,dictionary:t,settings:m})})]})}}}]);
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.