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ACRzB,KAAMA,GAAQ,EACdZ,YAAa,GACb8F,gBAAiB,GACjBC,QAAS,EACTC,QAAS,GACT3C,gBAAiBA,EACjB4C,UAAW,CACV,CAAC,GAAI,IAAI,CACT,CAAC,GAAI,KAAK,CACV,CAAC,IAAK,KAAK,CACX,CAAC,IAAK,IAAI,CACV,CACDC,MAAO,CACNC,OAAQ,OACRC,MAAO,OACP1F,SAAUkD,GAAY,CAACJ,EAAmB,QAAU,SACpD6C,IAAK,CACN,YACC/C,EACD,GAAAZ,EAAAC,GAAA,EAAC2D,EAAAA,CAASA,CAAAA,CACTN,QAAS,GACTO,YAAY,yEACZC,IAAK,oCAAwDC,MAAAA,CA/MtD,YA+MmD,KAAgEA,MAAAA,CA7MhH,4BA6MuE,2CAA6DpH,MAAA,CA3MjJ,kGA6MGqE,EACA,GAAAhB,EAAAC,GAAA,EAAC+D,EAAAA,CAAkBA,CAAAA,CAElBC,oBAAqB,GACrBC,mBAAoB1I,WACnB4G,IAGFA,EAEAnB,EACA,GAAAjB,EAAAC,GAAA,EAACrD,EAAAA,CACAW,kBAAmBA,EACnBV,cAAeA,EACfC,MAAOA,EACPC,mBAAoBA,EACpBC,WAAYA,EACZC,YAAaA,EACbC,YAAaA,EACbC,UAAWA,EACXC,YAAaA,EACbC,UAAWA,EACXC,YAAaA,EACbE,gBAAiBA,IAEf,SAIR,oBCtQA2G,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/./src/hooks/useDebounce.js","webpack://_N_E/./src/components/organism/LeafletMap.jsx","webpack://_N_E/./src/components/organism/LeafletMapStyles.module.scss"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nconst useDebounce = (value, timeout) => {\n const [state, setState] = useState(value);\n \n useEffect(() => {\n const handler = setTimeout(() => setState(value), timeout);\n return () => clearTimeout(handler);\n }, [value, timeout]);\n \n return state;\n};\n\nexport default useDebounce;\n","\"use client\";\n\nimport { useEffect, useMemo, useState } from \"react\";\nimport L, { Browser } from \"leaflet\";\nimport {\n\tMapContainer,\n\tMarker,\n\tTileLayer,\n\tTooltip,\n\tuseMap,\n\tuseMapEvents,\n} from \"react-leaflet\";\nimport useDebounce from \"@/hooks/useDebounce\";\nimport { trackStepOnMapClick } from \"@/utils/mixpanel\";\nimport MarkerClusterGroup from \"react-leaflet-markercluster\";\nimport classNames from \"classnames\";\n\nimport \"leaflet/dist/leaflet.css\";\nimport styles from \"./LeafletMapStyles.module.scss\";\nimport { GlutenFreeIcons } from \"@/constants/gluten-free\";\n\nlet isStepClicked = false;\nlet allowClick = true;\n\nconst Config = {\n\tuser_name: \"stepsprod\",\n\tstyle_id: \"ckncu0enk1tdx17n0ruk0rz5k\",\n\tnew_style_id: \"clluv246y00d601qy1uf3guav\",\n\taccess_token:\n\t\t\"pk.eyJ1Ijoic3RlcHNwcm9kIiwiYSI6ImNrbW5va2Y0bTB5eGEycXJ6aTVnYnh2aXMifQ.ybxcnXuaQ4WB00KuJdvuWg\",\n};\n\nexport const stepIcon = {\n\tselectedStep: {\n\t\tkey: \"selectedStepIcon\",\n\t\tsrc: \"/images/MarkerSelected.svg\",\n\t\tsize: [36, 36],\n\t},\n\tghostStep: {\n\t\tkey: \"ghostStepIcon\",\n\t\tsrc: \"/images/top-ten/ghost-step-marker.svg\",\n\t},\n\tstep: {\n\t\tkey: \"stepIcon\",\n\t\tsrc: \"/images/Marker.svg\",\n\t\tsize: [36, 36],\n\t},\n\tarchived: {\n\t\tkey: \"archivedStepIcon\",\n\t\tsrc: \"/images/top-ten/archived-step-marker.svg\",\n\t},\n\tselectedArchivedStep: {\n\t\tkey: \"selectedArchivedStepIcon\",\n\t\tsrc: \"/images/top-ten/selected-archived-step-marker.svg\",\n\t},\n};\n\nconst createClusterCustomIcon = function (cluster) {\n\tconst markers = cluster.getAllChildMarkers();\n\tlet markerWithMostRecs = {\n\t\ttotal_recommendations: 0,\n\t};\n\n\tmarkers.forEach((item) => {\n\t\tif (\n\t\t\titem.options.place.total_recommendations >\n\t\t\tmarkerWithMostRecs.total_recommendations\n\t\t) {\n\t\t\tmarkerWithMostRecs = item.options.place;\n\t\t}\n\t});\n\n\tconst iconUrl = markerWithMostRecs.matchedMarker.getSrc(\n\t\tmarkerWithMostRecs.icon,\n\t\tmarkerWithMostRecs.total_recommendations || 0\n\t);\n\n\tconst icon = L.divIcon({\n\t\tclassName: \"custom-cluster-icon\",\n\t\thtml: `\n