{"ast":null,"code":"import { useEffect, useRef } from 'react';\nexport function createElementObject(instance, context, container) {\n return Object.freeze({\n instance,\n context,\n container\n });\n}\nexport function createElementHook(createElement, updateElement) {\n if (updateElement == null) {\n return function useImmutableLeafletElement(props, context) {\n const elementRef = useRef();\n if (!elementRef.current) elementRef.current = createElement(props, context);\n return elementRef;\n };\n }\n return function useMutableLeafletElement(props, context) {\n const elementRef = useRef();\n if (!elementRef.current) elementRef.current = createElement(props, context);\n const propsRef = useRef(props);\n const {\n instance\n } = elementRef.current;\n useEffect(function updateElementProps() {\n if (propsRef.current !== props) {\n updateElement(instance, props, propsRef.current);\n propsRef.current = props;\n }\n }, [instance, props, context]);\n return elementRef;\n };\n}","map":{"version":3,"names":["useEffect","useRef","createElementObject","instance","context","container","Object","freeze","createElementHook","createElement","updateElement","useImmutableLeafletElement","props","elementRef","current","useMutableLeafletElement","propsRef","updateElementProps"],"sources":["/home/m3mo/Desktop/temparea/solarbank/frontend/node_modules/@react-leaflet/core/lib/element.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport function createElementObject(instance, context, container) {\n return Object.freeze({\n instance,\n context,\n container\n });\n}\nexport function createElementHook(createElement, updateElement) {\n if (updateElement == null) {\n return function useImmutableLeafletElement(props, context) {\n const elementRef = useRef();\n if (!elementRef.current) elementRef.current = createElement(props, context);\n return elementRef;\n };\n }\n return function useMutableLeafletElement(props, context) {\n const elementRef = useRef();\n if (!elementRef.current) elementRef.current = createElement(props, context);\n const propsRef = useRef(props);\n const { instance } = elementRef.current;\n useEffect(function updateElementProps() {\n if (propsRef.current !== props) {\n updateElement(instance, props, propsRef.current);\n propsRef.current = props;\n }\n }, [\n instance,\n props,\n context\n ]);\n return elementRef;\n };\n}\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,OAAO,SAASC,mBAAmBA,CAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAE;EAC9D,OAAOC,MAAM,CAACC,MAAM,CA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