{
  "version": 3,
  "sources": ["index.js", "google-maps-overlay.js", "utils.js"],
  "sourcesContent": ["export { default as GoogleMapsOverlay } from \"./google-maps-overlay.js\";\n", "/* global google */\nimport { GL } from '@luma.gl/constants';\nimport { createDeckInstance, destroyDeckInstance, getViewPropsFromOverlay, getViewPropsFromCoordinateTransformer } from \"./utils.js\";\nconst HIDE_ALL_LAYERS = () => false;\nconst GL_STATE = {\n    depthMask: true,\n    depthTest: true,\n    blend: true,\n    blendFunc: [770, 771, 1, 771],\n    blendEquation: 32774\n};\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() { }\nconst defaultProps = {\n    interleaved: true\n};\nexport default class GoogleMapsOverlay {\n    constructor(props) {\n        this.props = {};\n        this._map = null;\n        this._deck = null;\n        this._overlay = null;\n        this.setProps({ ...defaultProps, ...props });\n    }\n    /* Public API */\n    /** Add/remove the overlay from a map. */\n    setMap(map) {\n        if (map === this._map) {\n            return;\n        }\n        const { VECTOR, UNINITIALIZED } = google.maps.RenderingType;\n        if (this._map) {\n            if (!map && this._map.getRenderingType() === VECTOR && this.props.interleaved) {\n                this._overlay.requestRedraw();\n            }\n            this._overlay?.setMap(null);\n            this._map = null;\n        }\n        if (map) {\n            this._map = map;\n            const renderingType = map.getRenderingType();\n            if (renderingType !== UNINITIALIZED) {\n                this._createOverlay(map);\n            }\n            else {\n                map.addListener('renderingtype_changed', () => {\n                    this._createOverlay(map);\n                });\n            }\n        }\n    }\n    /**\n     * Update (partial) props.\n     */\n    setProps(props) {\n        Object.assign(this.props, props);\n        if (this._deck) {\n            const canvas = this._deck.getCanvas();\n            if (props.style && canvas?.parentElement) {\n                const parentStyle = canvas.parentElement.style;\n                Object.assign(parentStyle, props.style);\n                props.style = null;\n            }\n            this._deck.setProps(props);\n        }\n    }\n    /** Equivalent of `deck.pickObject`. */\n    pickObject(params) {\n        return this._deck && this._deck.pickObject(params);\n    }\n    /** Equivalent of `deck.pickObjects`.  */\n    pickMultipleObjects(params) {\n        return this._deck && this._deck.pickMultipleObjects(params);\n    }\n    /** Equivalent of `deck.pickMultipleObjects`. */\n    pickObjects(params) {\n        return this._deck && this._deck.pickObjects(params);\n    }\n    /** Remove the overlay and release all underlying resources. */\n    finalize() {\n        this.setMap(null);\n        if (this._deck) {\n            destroyDeckInstance(this._deck);\n            this._deck = null;\n        }\n    }\n    /* Private API */\n    _createOverlay(map) {\n        const { interleaved } = this.props;\n        const { VECTOR, UNINITIALIZED } = google.maps.RenderingType;\n        const renderingType = map.getRenderingType();\n        if (renderingType === UNINITIALIZED) {\n            return;\n        }\n        const isVectorMap = renderingType === VECTOR && google.maps.WebGLOverlayView;\n        const OverlayView = isVectorMap ? google.maps.WebGLOverlayView : google.maps.OverlayView;\n        const overlay = new OverlayView();\n        if (overlay instanceof google.maps.WebGLOverlayView) {\n            if (interleaved) {\n                overlay.onAdd = noop;\n                overlay.onContextRestored = this._onContextRestored.bind(this);\n                overlay.onDraw = this._onDrawVectorInterleaved.bind(this);\n            }\n            else {\n                overlay.onAdd = this._onAdd.bind(this);\n                overlay.onContextRestored = noop;\n                overlay.onDraw = this._onDrawVectorOverlay.bind(this);\n            }\n            overlay.onContextLost = this._onContextLost.bind(this);\n        }\n        else {\n            overlay.onAdd = this._onAdd.bind(this);\n            overlay.draw = this._onDrawRaster.bind(this);\n        }\n        overlay.onRemove = this._onRemove.bind(this);\n        this._overlay = overlay;\n        this._overlay.setMap(map);\n    }\n    _onAdd() {\n        // @ts-ignore (TS2345) map is defined at this stage\n        this._deck = createDeckInstance(this._map, this._overlay, this._deck, this.props);\n    }\n    _onContextRestored({ gl }) {\n        if (!this._map || !this._overlay) {\n            return;\n        }\n        const _customRender = () => {\n            if (this._overlay) {\n                this._overlay.requestRedraw();\n            }\n        };\n        const deck = createDeckInstance(this._map, this._overlay, this._deck, {\n            gl,\n            _customRender,\n            ...this.props\n        });\n        this._deck = deck;\n        // By default, animationLoop._renderFrame invokes\n        // animationLoop.onRender. We override this to wrap\n        // in withParameters so we don't modify the GL state\n        // @ts-ignore accessing protected member\n        const animationLoop = deck.animationLoop;\n        animationLoop._renderFrame = () => {\n            const ab = gl.getParameter(34964);\n            // @ts-expect-error accessing protected member\n            const device = deck.device;\n            device.withParametersWebGL({}, () => {\n                animationLoop.props.onRender(animationLoop.animationProps);\n            });\n            gl.bindBuffer(34962, ab);\n        };\n    }\n    _onContextLost() {\n        // TODO this isn't working\n        if (this._deck) {\n            destroyDeckInstance(this._deck);\n            this._deck = null;\n        }\n    }\n    _onRemove() {\n        this._deck?.setProps({ layerFilter: HIDE_ALL_LAYERS });\n    }\n    _onDrawRaster() {\n        if (!this._deck || !this._map) {\n            return;\n        }\n        const deck = this._deck;\n        const { width, height, left, top, ...rest } = getViewPropsFromOverlay(this._map, this._overlay);\n        const canvas = deck.getCanvas();\n        const parent = canvas?.parentElement || deck.props.parent;\n        if (parent) {\n            const parentStyle = parent.style;\n            parentStyle.left = `${left}px`;\n            parentStyle.top = `${top}px`;\n        }\n        const altitude = 10000;\n        deck.setProps({\n            width,\n            height,\n            // @ts-expect-error altitude is accepted by WebMercatorViewport but not exposed by type\n            viewState: { altitude, ...rest }\n        });\n        // Deck is initialized\n        deck.redraw();\n    }\n    // Vector code path\n    _onDrawVectorInterleaved({ gl, transformer }) {\n        if (!this._deck || !this._map) {\n            return;\n        }\n        const deck = this._deck;\n        deck.setProps({\n            ...getViewPropsFromCoordinateTransformer(this._map, transformer),\n            // Using external gl context - do not set css size\n            width: null,\n            height: null\n        });\n        if (deck.isInitialized) {\n            // @ts-expect-error\n            const device = deck.device;\n            // As an optimization, some renders are to an separate framebuffer\n            // which we need to pass onto deck\n            const _framebuffer = device.getParametersWebGL(36006);\n            // @ts-expect-error\n            deck.setProps({ _framebuffer });\n            // With external gl context, animation loop doesn't resize webgl-canvas and thus fails to\n            // calculate corrext pixel ratio. Force this manually.\n            device.getCanvasContext().resize();\n            // Camera changed, will trigger a map repaint right after this\n            // Clear any change flag triggered by setting viewState so that deck does not request\n            // a second repaint\n            deck.needsRedraw({ clearRedrawFlags: true });\n            // Workaround for bug in Google maps where viewport state is wrong\n            // TODO remove once fixed\n            device.setParametersWebGL({\n                viewport: [0, 0, gl.canvas.width, gl.canvas.height],\n                scissor: [0, 0, gl.canvas.width, gl.canvas.height],\n                stencilFunc: [519, 0, 255, 519, 0, 255]\n            });\n            device.withParametersWebGL(GL_STATE, () => {\n                deck._drawLayers('google-vector', {\n                    clearCanvas: false\n                });\n            });\n        }\n    }\n    _onDrawVectorOverlay({ transformer }) {\n        if (!this._deck || !this._map) {\n            return;\n        }\n        const deck = this._deck;\n        deck.setProps({\n            ...getViewPropsFromCoordinateTransformer(this._map, transformer)\n        });\n        deck.redraw();\n    }\n}\n", "/* global google, document */\nimport { Deck, MapView } from '@deck.gl/core';\nimport { Matrix4, Vector2 } from '@math.gl/core';\n// https://en.wikipedia.org/wiki/Web_Mercator_projection#Formulas\nconst MAX_LATITUDE = 85.05113;\n/**\n * Get a new deck instance\n * @param map (google.maps.Map) - The parent Map instance\n * @param overlay (google.maps.OverlayView) - A maps Overlay instance\n * @param [deck] (Deck) - a previously created instances\n */\nexport function createDeckInstance(map, overlay, deck, props) {\n    if (deck) {\n        if (deck.userData._googleMap === map) {\n            return deck;\n        }\n        // deck instance was created for a different map\n        destroyDeckInstance(deck);\n    }\n    const eventListeners = {\n        click: null,\n        rightclick: null,\n        dblclick: null,\n        mousemove: null,\n        mouseout: null\n    };\n    const newDeck = new Deck({\n        ...props,\n        useDevicePixels: props.interleaved ? true : props.useDevicePixels,\n        style: props.interleaved ? null : { pointerEvents: 'none' },\n        parent: getContainer(overlay, props.style),\n        views: new MapView({ repeat: true }),\n        initialViewState: {\n            longitude: 0,\n            latitude: 0,\n            zoom: 1\n        },\n        controller: false\n    });\n    // Register event listeners\n    for (const eventType in eventListeners) {\n        eventListeners[eventType] = map.addListener(eventType, evt => handleMouseEvent(newDeck, eventType, evt));\n    }\n    // Attach userData directly to Deck instance\n    newDeck.userData._googleMap = map;\n    newDeck.userData._eventListeners = eventListeners;\n    return newDeck;\n}\n// Create a container that will host the deck canvas and tooltip\nfunction getContainer(overlay, style) {\n    const container = document.createElement('div');\n    container.style.position = 'absolute';\n    Object.assign(container.style, style);\n    // The DOM structure has a different structure depending on whether\n    // the Google map is rendered as vector or raster\n    if ('getPanes' in overlay) {\n        overlay.getPanes()?.overlayLayer.appendChild(container);\n    }\n    else {\n        overlay.getMap()?.getDiv().appendChild(container);\n    }\n    return container;\n}\n/**\n * Safely remove a deck instance\n * @param deck (Deck) - a previously created instances\n */\nexport function destroyDeckInstance(deck) {\n    const { _eventListeners: eventListeners } = deck.userData;\n    // Unregister event listeners\n    for (const eventType in eventListeners) {\n        // Check that event listener was set before trying to remove.\n        if (eventListeners[eventType]) {\n            eventListeners[eventType].remove();\n        }\n    }\n    deck.finalize();\n}\n/* eslint-disable max-statements */\n/**\n * Get the current view state\n * @param map (google.maps.Map) - The parent Map instance\n * @param overlay (google.maps.OverlayView) - A maps Overlay instance\n */\n// eslint-disable-next-line complexity\nexport function getViewPropsFromOverlay(map, overlay) {\n    const { width, height } = getMapSize(map);\n    // Canvas position relative to draggable map's container depends on\n    // overlayView's projection, not the map's. Have to use the center of the\n    // map for this, not the top left, for the same reason as above.\n    const projection = overlay.getProjection();\n    const bounds = map.getBounds();\n    if (!bounds) {\n        return { width, height, left: 0, top: 0 };\n    }\n    const ne = bounds.getNorthEast();\n    const sw = bounds.getSouthWest();\n    const topRight = projection.fromLatLngToDivPixel(ne);\n    const bottomLeft = projection.fromLatLngToDivPixel(sw);\n    // google maps places overlays in a container anchored at the map center.\n    // the container CSS is manipulated during dragging.\n    // We need to update left/top of the deck canvas to match the base map.\n    const centerLngLat = pixelToLngLat(projection, width / 2, height / 2);\n    const centerH = new google.maps.LatLng(0, centerLngLat[0]);\n    const centerContainerPx = projection.fromLatLngToContainerPixel(centerH);\n    const centerDivPx = projection.fromLatLngToDivPixel(centerH);\n    if (!topRight || !bottomLeft || !centerDivPx || !centerContainerPx) {\n        return { width, height, left: 0, top: 0 };\n    }\n    const leftOffset = Math.round(centerDivPx.x - centerContainerPx.x);\n    let topOffset = centerDivPx.y - centerContainerPx.y;\n    const topLngLat = pixelToLngLat(projection, width / 2, 0);\n    const bottomLngLat = pixelToLngLat(projection, width / 2, height);\n    // Compute fractional center.\n    let latitude = centerLngLat[1];\n    const longitude = centerLngLat[0];\n    // Adjust vertical offset - limit latitude\n    if (Math.abs(latitude) > MAX_LATITUDE) {\n        latitude = latitude > 0 ? MAX_LATITUDE : -MAX_LATITUDE;\n        const center = new google.maps.LatLng(latitude, longitude);\n        const centerPx = projection.fromLatLngToContainerPixel(center);\n        // @ts-ignore (TS2531) Object is possibly 'null'\n        topOffset += centerPx.y - height / 2;\n    }\n    topOffset = Math.round(topOffset);\n    // Compute fractional bearing\n    const delta = new Vector2(topLngLat).sub(bottomLngLat);\n    let bearing = (180 * delta.verticalAngle()) / Math.PI;\n    if (bearing < 0)\n        bearing += 360;\n    // Maps sometimes returns undefined instead of 0\n    const heading = map.getHeading() || 0;\n    let zoom = map.getZoom() - 1;\n    let scale;\n    if (bearing === 0) {\n        // At full world view (always unrotated) simply compare height, as diagonal\n        // is incorrect due to multiple world copies\n        scale = height ? (bottomLeft.y - topRight.y) / height : 1;\n    }\n    else if (bearing === heading) {\n        // Fractional zoom calculation only correct when bearing is not animating\n        const viewDiagonal = new Vector2([topRight.x, topRight.y])\n            .sub([bottomLeft.x, bottomLeft.y])\n            .len();\n        const mapDiagonal = new Vector2([width, -height]).len();\n        scale = mapDiagonal ? viewDiagonal / mapDiagonal : 1;\n    }\n    // When resizing aggressively, occasionally ne and sw are the same points\n    // See https://github.com/visgl/deck.gl/issues/4218\n    zoom += Math.log2(scale || 1);\n    return {\n        width,\n        height,\n        left: leftOffset,\n        top: topOffset,\n        zoom,\n        bearing,\n        pitch: map.getTilt(),\n        latitude,\n        longitude\n    };\n}\n/* eslint-enable max-statements */\n/**\n * Get the current view state\n * @param map (google.maps.Map) - The parent Map instance\n * @param transformer (google.maps.CoordinateTransformer) - A CoordinateTransformer instance\n */\nexport function getViewPropsFromCoordinateTransformer(map, transformer) {\n    const { width, height } = getMapSize(map);\n    const { center, heading: bearing, tilt: pitch, zoom } = transformer.getCameraParams();\n    // Match Google projection matrix\n    const fovy = 25;\n    const aspect = height ? width / height : 1;\n    // Match depth range (crucial for correct z-sorting)\n    const near = 0.75;\n    const far = 300000000000000;\n    // const far = Infinity;\n    const projectionMatrix = new Matrix4().perspective({\n        fovy: (fovy * Math.PI) / 180,\n        aspect,\n        near,\n        far\n    });\n    const focalDistance = 0.5 * projectionMatrix[5];\n    return {\n        width,\n        height,\n        viewState: {\n            altitude: focalDistance,\n            bearing,\n            latitude: center.lat(),\n            longitude: center.lng(),\n            pitch,\n            projectionMatrix,\n            repeat: true,\n            zoom: zoom - 1\n        }\n    };\n}\nfunction getMapSize(map) {\n    // The map fills the container div unless it's in fullscreen mode\n    // at which point the first child of the container is promoted\n    const container = map.getDiv().firstChild;\n    return {\n        // @ts-ignore (TS2531) Object is possibly 'null'\n        width: container.offsetWidth,\n        // @ts-ignore (TS2531) Object is possibly 'null'\n        height: container.offsetHeight\n    };\n}\nfunction pixelToLngLat(projection, x, y) {\n    const point = new google.maps.Point(x, y);\n    const latLng = projection.fromContainerPixelToLatLng(point);\n    // @ts-ignore (TS2531) Object is possibly 'null'\n    return [latLng.lng(), latLng.lat()];\n}\nfunction getEventPixel(event, deck) {\n    if (event.pixel) {\n        return event.pixel;\n    }\n    // event.pixel may not exist when clicking on a POI\n    // https://developers.google.com/maps/documentation/javascript/reference/map#MouseEvent\n    const point = deck.getViewports()[0].project([event.latLng.lng(), event.latLng.lat()]);\n    return {\n        x: point[0],\n        y: point[1]\n    };\n}\n// Triggers picking on a mouse event\nfunction handleMouseEvent(deck, type, event) {\n    if (!deck.isInitialized) {\n        return;\n    }\n    const mockEvent = {\n        type,\n        offsetCenter: getEventPixel(event, deck),\n        srcEvent: event\n    };\n    switch (type) {\n        case 'click':\n        case 'rightclick':\n            mockEvent.type = 'click';\n            mockEvent.tapCount = 1;\n            // Hack: because we do not listen to pointer down, perform picking now\n            deck._onPointerDown(mockEvent);\n            deck._onEvent(mockEvent);\n            break;\n        case 'dblclick':\n            mockEvent.type = 'click';\n            mockEvent.tapCount = 2;\n            deck._onEvent(mockEvent);\n            break;\n        case 'mousemove':\n            mockEvent.type = 'pointermove';\n            deck._onPointerMove(mockEvent);\n            break;\n        case 'mouseout':\n            mockEvent.type = 'pointerleave';\n            deck._onPointerMove(mockEvent);\n            break;\n        default:\n            return;\n    }\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,uBAAmB;;;ACAnB,kBAA8B;AAC9B,IAAAA,eAAiC;AAEjC,IAAM,eAAe;AAOd,SAAS,mBAAmB,KAAK,SAAS,MAAM,OAAO;AAC1D,MAAI,MAAM;AACN,QAAI,KAAK,SAAS,eAAe,KAAK;AAClC,aAAO;AAAA,IACX;AAEA,wBAAoB,IAAI;AAAA,EAC5B;AACA,QAAM,iBAAiB;AAAA,IACnB,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,EACd;AACA,QAAM,UAAU,IAAI,iBAAK;AAAA,IACrB,GAAG;AAAA,IACH,iBAAiB,MAAM,cAAc,OAAO,MAAM;AAAA,IAClD,OAAO,MAAM,cAAc,OAAO,EAAE,eAAe,OAAO;AAAA,IAC1D,QAAQ,aAAa,SAAS,MAAM,KAAK;AAAA,IACzC,OAAO,IAAI,oBAAQ,EAAE,QAAQ,KAAK,CAAC;AAAA,IACnC,kBAAkB;AAAA,MACd,WAAW;AAAA,MACX,UAAU;AAAA,MACV,MAAM;AAAA,IACV;AAAA,IACA,YAAY;AAAA,EAChB,CAAC;AAED,aAAW,aAAa,gBAAgB;AACpC,mBAAe,aAAa,IAAI,YAAY,WAAW,SAAO,iBAAiB,SAAS,WAAW,GAAG,CAAC;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