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A,EAAI+S,MAAM,SAAS9L,QAAO3S,GAAKA,EAAEI,OAAS,GAAW,MAANJ,IAAWI,MACnE,qDCrBA,SAASg2E,EAAYjzE,GACnB,OAAOA,GAAOA,EAAIkc,MAAQA,KAAOlc,OAAM9B,CACzC,qCAGA,MAAMg1E,EACkB,iBAAdC,YAA0BF,EAAYE,aAE5B,iBAAVpqE,QAAsBkqE,EAAYlqE,SAC1B,iBAARqqE,MAAoBH,EAAYG,OACtB,iBAAV,EAAAplE,GAAsBilE,EAAY,EAAAjlE,IAC1C,WACE,OAAOzR,IACR,CAFD,IAGA,CAAC,EAKH,SAAS82E,IACP,OAAOH,CACT,CAaA,SAASI,EAAmB/0E,EAAMg1E,EAASvzE,GACzC,MAAMmvE,EAAOnvE,GAAOkzE,EACd5qB,EAAc6mB,EAAI7mB,WAAa6mB,EAAI7mB,YAAc,CAAC,EAExD,OADkBA,EAAW/pD,KAAU+pD,EAAW/pD,GAAQg1E,IAE5D","sources":["webpack://my-vehicles/./node_modules/@react-google-maps/api/dist/esm.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/browser.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/types.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getNavigationEntry.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getActivationStart.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/observe.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getCLS.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getFID.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/polyfills/interactionCountPolyfill.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getINP.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getLCP.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/onTTFB.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/instrument.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/span.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/metrics/index.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/supports.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/fetch.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/xhr.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/request.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/string.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/common/fetch.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/vendor/supportsHistory.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/history.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/browsertracing.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/router.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/dsn.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/envelope.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/browser/backgroundtab.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/measurement.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/common/debug-build.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/extensions.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/apollo.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/express.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/requestdata.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/graphql.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/mongo.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/mysql.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/postgres.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/prisma.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/esm/node/integrations/utils/node-utils.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/constants.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/debug-build.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/exports.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/syncpromise.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/eventProcessors.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/session.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/scope.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/version.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/hub.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/metrics/metric-summary.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/semanticAttributes.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/globalError.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/errors.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/hubextensions.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/idletransaction.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/sampling.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/span.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/spanstatus.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/trace.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/utils/handleCallbackErrors.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/transaction.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/tracing/utils.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/utils/getRootSpan.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/utils/hasTracingEnabled.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/core/esm/utils/spanUtils.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/baggage.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/debug-build.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/instrument/_handlers.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/is.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/logger.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/misc.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/node.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/env.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/object.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/stacktrace.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/time.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/tracing.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/url.js","webpack://my-vehicles/./node_modules/@sentry-internal/tracing/node_modules/@sentry/utils/esm/worldwide.js"],"sourcesContent":["import { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { createContext, useContext, memo, useState, useRef, useEffect, PureComponent, createRef, useMemo, Children, isValidElement, cloneElement } from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createPortal } from 'react-dom';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest$1(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter$1(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = process.env.NODE_ENV;\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nvar invariant_1 = invariant;\n\nvar invariant$1 = /*@__PURE__*/getDefaultExportFromCjs(invariant_1);\n\nvar MapContext = createContext(null);\nfunction useGoogleMap() {\n invariant$1(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+');\n var map = useContext(MapContext);\n invariant$1(!!map, 'useGoogleMap needs a GoogleMap available up in the tree');\n return map;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction reduce(obj, fn, acc) {\n return Object.keys(obj).reduce(function reducer(newAcc, key) {\n return fn(newAcc, obj[key], key);\n }, acc);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction forEach(obj, fn) {\n Object.keys(obj).forEach(function (key) {\n return fn(obj[key], key);\n });\n}\n\n/* global google */\nfunction applyUpdaterToNextProps(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nupdaterMap, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprevProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nnextProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var map = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var iter = function (fn, key) {\n var nextValue = nextProps[key];\n if (nextValue !== prevProps[key]) {\n map[key] = nextValue;\n fn(instance, nextValue);\n }\n };\n forEach(updaterMap, iter);\n return map;\n}\nfunction registerEvents(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance, eventMap) {\n var registeredList = reduce(eventMap, function reducer(acc, googleEventName, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onEventName) {\n if (typeof props[onEventName] === 'function') {\n acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName]));\n }\n return acc;\n }, []);\n return registeredList;\n}\nfunction unregisterEvent(registered) {\n google.maps.event.removeListener(registered);\n}\nfunction unregisterEvents(events) {\n if (events === void 0) { events = []; }\n events.forEach(unregisterEvent);\n}\nfunction applyUpdatersToPropsAndRegisterEvents(_a) {\n var updaterMap = _a.updaterMap, eventMap = _a.eventMap, prevProps = _a.prevProps, nextProps = _a.nextProps, instance = _a.instance;\n var registeredEvents = registerEvents(nextProps, instance, eventMap);\n applyUpdaterToNextProps(updaterMap, prevProps, nextProps, instance);\n return registeredEvents;\n}\n\nvar eventMap$i = {\n onDblClick: 'dblclick',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onTilesLoaded: 'tilesloaded',\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDrag: 'drag',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onProjectionChanged: 'projection_changed',\n onResize: 'resize',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed',\n};\nvar updaterMap$i = {\n extraMapTypes: function (map, extra) {\n extra.forEach(function forEachExtra(it, i) {\n map.mapTypes.set(String(i), it);\n });\n },\n center: function (map, center) {\n map.setCenter(center);\n },\n clickableIcons: function (map, clickable) {\n map.setClickableIcons(clickable);\n },\n heading: function (map, heading) {\n map.setHeading(heading);\n },\n mapTypeId: function (map, mapTypeId) {\n map.setMapTypeId(mapTypeId);\n },\n options: function (map, options) {\n map.setOptions(options);\n },\n streetView: function (map, streetView) {\n map.setStreetView(streetView);\n },\n tilt: function (map, tilt) {\n map.setTilt(tilt);\n },\n zoom: function (map, zoom) {\n map.setZoom(zoom);\n },\n};\n// TODO: unfinished!\nfunction GoogleMapFunctional(_a) {\n var children = _a.children, options = _a.options, id = _a.id, mapContainerStyle = _a.mapContainerStyle, mapContainerClassName = _a.mapContainerClassName, center = _a.center, \n // clickableIcons,\n // extraMapTypes,\n // heading,\n // mapTypeId,\n onClick = _a.onClick, onDblClick = _a.onDblClick, onDrag = _a.onDrag, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseDown = _a.onMouseDown, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, \n // onMapTypeIdChanged,\n // onTilesLoaded,\n // onBoundsChanged,\n onCenterChanged = _a.onCenterChanged, \n // onHeadingChanged,\n // onIdle,\n // onProjectionChanged,\n // onResize,\n // onTiltChanged,\n // onZoomChanged,\n onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var _b = useState(null), map = _b[0], setMap = _b[1];\n var ref = useRef(null);\n // const [extraMapTypesListener, setExtraMapTypesListener] = useState(null)\n var _c = useState(null), centerChangedListener = _c[0], setCenterChangedListener = _c[1];\n var _d = useState(null), dblclickListener = _d[0], setDblclickListener = _d[1];\n var _e = useState(null), dragendListener = _e[0], setDragendListener = _e[1];\n var _f = useState(null), dragstartListener = _f[0], setDragstartListener = _f[1];\n var _g = useState(null), mousedownListener = _g[0], setMousedownListener = _g[1];\n var _h = useState(null), mousemoveListener = _h[0], setMousemoveListener = _h[1];\n var _j = useState(null), mouseoutListener = _j[0], setMouseoutListener = _j[1];\n var _k = useState(null), mouseoverListener = _k[0], setMouseoverListener = _k[1];\n var _l = useState(null), mouseupListener = _l[0], setMouseupListener = _l[1];\n var _m = useState(null), rightclickListener = _m[0], setRightclickListener = _m[1];\n var _o = useState(null), clickListener = _o[0], setClickListener = _o[1];\n var _p = useState(null), dragListener = _p[0], setDragListener = _p[1];\n // Order does matter\n useEffect(function () {\n if (options && map !== null) {\n map.setOptions(options);\n }\n }, [map, options]);\n useEffect(function () {\n if (map !== null && typeof center !== 'undefined') {\n map.setCenter(center);\n }\n }, [map, center]);\n useEffect(function () {\n if (map && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(map, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (map && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(map, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (map && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(map, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (map && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(map, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (map && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(map, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (map && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(map, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (map && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(map, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (map && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(map, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (map && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(map, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (map && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(map, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (map && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(map, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (map && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(map, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(function () {\n var map = ref.current === null\n ? null\n : new google.maps.Map(ref.current, options);\n setMap(map);\n if (map !== null && onLoad) {\n onLoad(map);\n }\n return function () {\n if (map !== null) {\n if (onUnmount) {\n onUnmount(map);\n }\n }\n };\n }, []);\n return (jsx(\"div\", { id: id, ref: ref, style: mapContainerStyle, className: mapContainerClassName, children: jsx(MapContext.Provider, { value: map, children: map !== null ? children : null }) }));\n}\nmemo(GoogleMapFunctional);\nvar GoogleMap = /** @class */ (function (_super) {\n __extends(GoogleMap, _super);\n function GoogleMap() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n map: null,\n };\n _this.registeredEvents = [];\n _this.mapRef = null;\n _this.getInstance = function () {\n if (_this.mapRef === null) {\n return null;\n }\n return new google.maps.Map(_this.mapRef, _this.props.options);\n };\n _this.panTo = function (latLng) {\n var map = _this.getInstance();\n if (map) {\n map.panTo(latLng);\n }\n };\n _this.setMapCallback = function () {\n if (_this.state.map !== null) {\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.map);\n }\n }\n };\n _this.getRef = function (ref) {\n _this.mapRef = ref;\n };\n return _this;\n }\n GoogleMap.prototype.componentDidMount = function () {\n var map = this.getInstance();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: {},\n nextProps: this.props,\n instance: map,\n });\n this.setState(function setMap() {\n return {\n map: map,\n };\n }, this.setMapCallback);\n };\n GoogleMap.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.map !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.map,\n });\n }\n };\n GoogleMap.prototype.componentWillUnmount = function () {\n if (this.state.map !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.map);\n }\n unregisterEvents(this.registeredEvents);\n }\n };\n GoogleMap.prototype.render = function () {\n return (jsx(\"div\", { id: this.props.id, ref: this.getRef, style: this.props.mapContainerStyle, className: this.props.mapContainerClassName, children: jsx(MapContext.Provider, { value: this.state.map, children: this.state.map !== null ? this.props.children : null }) }));\n };\n return GoogleMap;\n}(PureComponent));\n\nvar isBrowser = typeof document !== 'undefined';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction injectScript(_a) {\n var url = _a.url, id = _a.id, nonce = _a.nonce;\n if (!isBrowser) {\n return Promise.reject(new Error('document is undefined'));\n }\n return new Promise(function injectScriptCallback(resolve, reject) {\n var existingScript = document.getElementById(id);\n var windowWithGoogleMap = window;\n if (existingScript) {\n // Same script id/url: keep same script\n var dataStateAttribute = existingScript.getAttribute('data-state');\n if (existingScript.src === url && dataStateAttribute !== 'error') {\n if (dataStateAttribute === 'ready') {\n return resolve(id);\n }\n else {\n var originalInitMap_1 = windowWithGoogleMap.initMap;\n var originalErrorCallback_1 = existingScript.onerror;\n windowWithGoogleMap.initMap = function initMap() {\n if (originalInitMap_1) {\n originalInitMap_1();\n }\n resolve(id);\n };\n existingScript.onerror = function (err) {\n if (originalErrorCallback_1) {\n originalErrorCallback_1(err);\n }\n reject(err);\n };\n return;\n }\n }\n // Same script id, but either\n // 1. requested URL is different\n // 2. script failed to load\n else {\n existingScript.remove();\n }\n }\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n script.id = id;\n script.async = true;\n script.nonce = nonce || '';\n script.onerror = function onerror(err) {\n script.setAttribute('data-state', 'error');\n reject(err);\n };\n windowWithGoogleMap.initMap = function onload() {\n script.setAttribute('data-state', 'ready');\n resolve(id);\n };\n document.head.appendChild(script);\n }).catch(function (err) {\n console.error('injectScript error: ', err);\n throw err;\n });\n}\n\nfunction isGoogleFontStyle(element) {\n // 'Roboto' or 'Google Sans Text' font download\n var href = element.href;\n if (href && (href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === 0 ||\n href.indexOf('https://fonts.googleapis.com/css?family=Google+Sans+Text') === 0)) {\n return true;\n }\n // font style elements\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText = '';\n return true;\n }\n // font style elements for other browsers\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML = '';\n return true;\n }\n // when google tries to add empty style\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n !element.styleSheet &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n !element.innerHTML) {\n return true;\n }\n return false;\n}\n// Preventing the Google Maps library from downloading an extra font\nfunction preventGoogleFonts() {\n // we override these methods only for one particular head element\n // default methods for other elements are not affected\n var head = document.getElementsByTagName('head')[0];\n if (head) {\n var trueInsertBefore_1 = head.insertBefore.bind(head);\n // TODO: adding return before reflect solves the TS issue\n head.insertBefore = function insertBefore(newElement, referenceElement) {\n if (!isGoogleFontStyle(newElement)) {\n Reflect.apply(trueInsertBefore_1, head, [newElement, referenceElement]);\n }\n return newElement;\n };\n var trueAppend_1 = head.appendChild.bind(head);\n // TODO: adding return before reflect solves the TS issue\n head.appendChild = function appendChild(textNode) {\n if (!isGoogleFontStyle(textNode)) {\n Reflect.apply(trueAppend_1, head, [textNode]);\n }\n return textNode;\n };\n }\n}\n\nfunction makeLoadScriptUrl(_a) {\n var googleMapsApiKey = _a.googleMapsApiKey, googleMapsClientId = _a.googleMapsClientId, _b = _a.version, version = _b === void 0 ? 'weekly' : _b, language = _a.language, region = _a.region, libraries = _a.libraries, channel = _a.channel, mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var params = [];\n invariant$1((googleMapsApiKey && googleMapsClientId) || !(googleMapsApiKey && googleMapsClientId), 'You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time.');\n if (googleMapsApiKey) {\n params.push(\"key=\".concat(googleMapsApiKey));\n }\n else if (googleMapsClientId) {\n params.push(\"client=\".concat(googleMapsClientId));\n }\n if (version) {\n params.push(\"v=\".concat(version));\n }\n if (language) {\n params.push(\"language=\".concat(language));\n }\n if (region) {\n params.push(\"region=\".concat(region));\n }\n if (libraries && libraries.length) {\n params.push(\"libraries=\".concat(libraries.sort().join(',')));\n }\n if (channel) {\n params.push(\"channel=\".concat(channel));\n }\n if (mapIds && mapIds.length) {\n params.push(\"map_ids=\".concat(mapIds.join(',')));\n }\n if (authReferrerPolicy) {\n params.push(\"auth_referrer_policy=\".concat(authReferrerPolicy));\n }\n params.push('callback=initMap');\n return \"https://maps.googleapis.com/maps/api/js?\".concat(params.join('&'));\n}\n\nvar cleaningUp = false;\nfunction DefaultLoadingElement() {\n return jsx(\"div\", { children: \"Loading...\" });\n}\nvar defaultLoadScriptProps = {\n id: 'script-loader',\n version: 'weekly',\n};\nvar LoadScript = /** @class */ (function (_super) {\n __extends(LoadScript, _super);\n function LoadScript() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.check = createRef();\n _this.state = {\n loaded: false,\n };\n _this.cleanupCallback = function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete window.google.maps;\n _this.injectScript();\n };\n _this.isCleaningUp = function () { return __awaiter$1(_this, void 0, void 0, function () {\n function promiseCallback(resolve) {\n if (!cleaningUp) {\n resolve();\n }\n else {\n if (isBrowser) {\n var timer_1 = window.setInterval(function interval() {\n if (!cleaningUp) {\n window.clearInterval(timer_1);\n resolve();\n }\n }, 1);\n }\n }\n return;\n }\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(promiseCallback)];\n });\n }); };\n _this.cleanup = function () {\n cleaningUp = true;\n var script = document.getElementById(_this.props.id);\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n Array.prototype.slice\n .call(document.getElementsByTagName('script'))\n .filter(function filter(script) {\n return typeof script.src === 'string' && script.src.includes('maps.googleapis');\n })\n .forEach(function forEach(script) {\n if (script.parentNode) {\n script.parentNode.removeChild(script);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('link'))\n .filter(function filter(link) {\n return (link.href === 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans');\n })\n .forEach(function forEach(link) {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('style'))\n .filter(function filter(style) {\n return (style.innerText !== undefined &&\n style.innerText.length > 0 &&\n style.innerText.includes('.gm-'));\n })\n .forEach(function forEach(style) {\n if (style.parentNode) {\n style.parentNode.removeChild(style);\n }\n });\n };\n _this.injectScript = function () {\n if (_this.props.preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n invariant$1(!!_this.props.id, 'LoadScript requires \"id\" prop to be a string: %s', _this.props.id);\n var injectScriptOptions = {\n id: _this.props.id,\n nonce: _this.props.nonce,\n url: makeLoadScriptUrl(_this.props),\n };\n injectScript(injectScriptOptions)\n .then(function () {\n if (_this.props.onLoad) {\n _this.props.onLoad();\n }\n _this.setState(function setLoaded() {\n return {\n loaded: true,\n };\n });\n return;\n })\n .catch(function (err) {\n if (_this.props.onError) {\n _this.props.onError(err);\n }\n console.error(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(_this\n .props.googleMapsApiKey || '-', \") or Client ID (\").concat(_this.props.googleMapsClientId ||\n '-', \") to \\n Otherwise it is a Network issue.\\n \"));\n });\n };\n return _this;\n }\n LoadScript.prototype.componentDidMount = function () {\n if (isBrowser) {\n if (window.google && window.google.maps && !cleaningUp) {\n console.error('google api is already presented');\n return;\n }\n this.isCleaningUp()\n .then(this.injectScript)\n .catch(function error(err) {\n console.error('Error at injecting script after cleaning up: ', err);\n });\n }\n };\n LoadScript.prototype.componentDidUpdate = function (prevProps) {\n if (this.props.libraries !== prevProps.libraries) {\n console.warn('Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables');\n }\n if (isBrowser && prevProps.language !== this.props.language) {\n this.cleanup();\n // TODO: refactor to use gDSFP maybe... wait for hooks refactoring.\n this.setState(function setLoaded() {\n return {\n loaded: false,\n };\n }, this.cleanupCallback);\n }\n };\n LoadScript.prototype.componentWillUnmount = function () {\n var _this = this;\n if (isBrowser) {\n this.cleanup();\n var timeoutCallback = function () {\n if (!_this.check.current) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete window.google;\n cleaningUp = false;\n }\n };\n window.setTimeout(timeoutCallback, 1);\n if (this.props.onUnmount) {\n this.props.onUnmount();\n }\n }\n };\n LoadScript.prototype.render = function () {\n return (jsxs(Fragment, { children: [jsx(\"div\", { ref: this.check }), this.state.loaded\n ? this.props.children\n : this.props.loadingElement || jsx(DefaultLoadingElement, {})] }));\n };\n LoadScript.defaultProps = defaultLoadScriptProps;\n return LoadScript;\n}(PureComponent));\n\n/* eslint-disable filenames/match-regex */\nvar previouslyLoadedUrl;\nfunction useLoadScript(_a) {\n var _b = _a.id, id = _b === void 0 ? defaultLoadScriptProps.id : _b, _c = _a.version, version = _c === void 0 ? defaultLoadScriptProps.version : _c, nonce = _a.nonce, googleMapsApiKey = _a.googleMapsApiKey, googleMapsClientId = _a.googleMapsClientId, language = _a.language, region = _a.region, libraries = _a.libraries, preventGoogleFontsLoading = _a.preventGoogleFontsLoading, channel = _a.channel, mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var isMounted = useRef(false);\n var _d = useState(false), isLoaded = _d[0], setLoaded = _d[1];\n var _e = useState(undefined), loadError = _e[0], setLoadError = _e[1];\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n useEffect(function validateLoadedState() {\n if (isLoaded) {\n invariant$1(!!window.google, 'useLoadScript was marked as loaded, but window.google is not present. Something went wrong.');\n }\n }, [isLoaded]);\n var url = makeLoadScriptUrl({\n version: version,\n googleMapsApiKey: googleMapsApiKey,\n googleMapsClientId: googleMapsClientId,\n language: language,\n region: region,\n libraries: libraries,\n channel: channel,\n mapIds: mapIds,\n authReferrerPolicy: authReferrerPolicy\n });\n useEffect(function loadScriptAndModifyLoadedState() {\n if (!isBrowser) {\n return;\n }\n function setLoadedIfMounted() {\n if (isMounted.current) {\n setLoaded(true);\n previouslyLoadedUrl = url;\n }\n }\n if (window.google && window.google.maps && previouslyLoadedUrl === url) {\n setLoadedIfMounted();\n return;\n }\n injectScript({ id: id, url: url, nonce: nonce })\n .then(setLoadedIfMounted)\n .catch(function handleInjectError(err) {\n if (isMounted.current) {\n setLoadError(err);\n }\n console.warn(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(googleMapsApiKey ||\n '-', \") or Client ID (\").concat(googleMapsClientId || '-', \")\\n Otherwise it is a Network issue.\\n \"));\n console.error(err);\n });\n }, [id, url, nonce]);\n var prevLibraries = useRef();\n useEffect(function checkPerformance() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n console.warn('Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded: isLoaded, loadError: loadError, url: url };\n}\n\nvar defaultLoadingElement = jsx(DefaultLoadingElement, {});\nfunction LoadScriptNext(_a) {\n var loadingElement = _a.loadingElement, onLoad = _a.onLoad, onError = _a.onError, onUnmount = _a.onUnmount, children = _a.children, hookOptions = __rest$1(_a, [\"loadingElement\", \"onLoad\", \"onError\", \"onUnmount\", \"children\"]);\n var _b = useLoadScript(hookOptions), isLoaded = _b.isLoaded, loadError = _b.loadError;\n useEffect(function handleOnLoad() {\n if (isLoaded && typeof onLoad === 'function') {\n onLoad();\n }\n }, [isLoaded, onLoad]);\n useEffect(function handleOnError() {\n if (loadError && typeof onError === 'function') {\n onError(loadError);\n }\n }, [loadError, onError]);\n useEffect(function handleOnUnmount() {\n return function () {\n if (onUnmount) {\n onUnmount();\n }\n };\n }, [onUnmount]);\n return isLoaded ? children : loadingElement || defaultLoadingElement;\n}\nvar LoadScriptNext$1 = memo(LoadScriptNext);\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual$1 = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!fastDeepEqual$1(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n * @deprecated\n */\n createUrl() {\n let url = this.url;\n url += `?callback=__googleMapsCallback`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n * @deprecated, use importLibrary() instead.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n * @deprecated, use importLibrary() instead.\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n importLibrary(name) {\n this.execute();\n return google.maps.importLibrary(name);\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n * @deprecated, use importLibrary() instead.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n var _a, _b;\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const params = {\n key: this.apiKey,\n channel: this.channel,\n client: this.client,\n libraries: this.libraries.length && this.libraries,\n v: this.version,\n mapIds: this.mapIds,\n language: this.language,\n region: this.region,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n // keep the URL minimal:\n Object.keys(params).forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (key) => !params[key] && delete params[key]);\n if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {\n // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n // which also sets the base url, the id, and the nonce\n /* eslint-disable */\n ((g) => {\n // @ts-ignore\n let h, a, k, p = \"The Google Maps JavaScript API\", c = \"google\", l = \"importLibrary\", q = \"__ib__\", m = document, b = window;\n // @ts-ignore\n b = b[c] || (b[c] = {});\n // @ts-ignore\n const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () => \n // @ts-ignore\n h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n yield (a = m.createElement(\"script\"));\n a.id = this.id;\n e.set(\"libraries\", [...r] + \"\");\n // @ts-ignore\n for (k in g)\n e.set(k.replace(/[A-Z]/g, (t) => \"_\" + t[0].toLowerCase()), g[k]);\n e.set(\"callback\", c + \".maps.\" + q);\n a.src = this.url + `?` + e;\n d[q] = f;\n a.onerror = () => (h = n(Error(p + \" could not load.\")));\n // @ts-ignore\n a.nonce = this.nonce || ((_a = m.querySelector(\"script[nonce]\")) === null || _a === void 0 ? void 0 : _a.nonce) || \"\";\n m.head.append(a);\n })));\n // @ts-ignore\n d[l] ? console.warn(p + \" only loads once. Ignoring:\", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));\n })(params);\n /* eslint-enable */\n }\n // While most libraries populate the global namespace when loaded via bootstrap params,\n // this is not the case for \"marker\" when used with the inline bootstrap loader\n // (and maybe others in the future). So ensure there is an importLibrary for each:\n const libraryPromises = this.libraries.map((library) => this.importLibrary(library));\n // ensure at least one library, to kick off loading...\n if (!libraryPromises.length) {\n libraryPromises.push(this.importLibrary(\"core\"));\n }\n Promise.all(libraryPromises).then(() => this.callback(), (error) => {\n const event = new ErrorEvent(\"error\", { error }); // for backwards compat\n this.loadErrorCallback(event);\n });\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader.\" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n if (this.loading) ;\n else {\n this.loading = true;\n this.setScript();\n }\n }\n }\n}\n\nvar defaultLibraries = ['maps'];\nfunction useJsApiLoader(_a) {\n var _b = _a.id, id = _b === void 0 ? defaultLoadScriptProps.id : _b, _c = _a.version, version = _c === void 0 ? defaultLoadScriptProps.version : _c, nonce = _a.nonce, googleMapsApiKey = _a.googleMapsApiKey, \n // googleMapsClientId,\n language = _a.language, region = _a.region, _d = _a.libraries, libraries = _d === void 0 ? defaultLibraries : _d, preventGoogleFontsLoading = _a.preventGoogleFontsLoading, \n // channel,\n mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var isMounted = useRef(false);\n var _e = useState(false), isLoaded = _e[0], setLoaded = _e[1];\n var _f = useState(undefined), loadError = _f[0], setLoadError = _f[1];\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n var loader = useMemo(function () {\n return new Loader({\n id: id,\n apiKey: googleMapsApiKey,\n version: version,\n libraries: libraries,\n language: language || 'en',\n region: region || 'US',\n mapIds: mapIds || [],\n nonce: nonce || '',\n authReferrerPolicy: authReferrerPolicy || 'origin',\n });\n }, [id, googleMapsApiKey, version, libraries, language, region, mapIds, nonce, authReferrerPolicy]);\n useEffect(function effect() {\n if (isLoaded) {\n return;\n }\n else {\n loader.load().then(function () {\n if (isMounted.current) {\n setLoaded(true);\n }\n return;\n })\n .catch(function (error) {\n setLoadError(error);\n });\n }\n }, []);\n useEffect(function () {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n var prevLibraries = useRef();\n useEffect(function () {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n console.warn('Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded: isLoaded, loadError: loadError };\n}\n\nvar eventMap$h = {};\nvar updaterMap$h = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction TrafficLayerFunctional(_a) {\n var options = _a.options, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n var trafficLayer = new google.maps.TrafficLayer(__assign(__assign({}, (options || {})), { map: map }));\n setInstance(trafficLayer);\n if (onLoad) {\n onLoad(trafficLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar TrafficLayerF = memo(TrafficLayerFunctional);\nvar TrafficLayer = /** @class */ (function (_super) {\n __extends(TrafficLayer, _super);\n function TrafficLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n trafficLayer: null,\n };\n _this.setTrafficLayerCallback = function () {\n if (_this.state.trafficLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.trafficLayer);\n }\n };\n _this.registeredEvents = [];\n return _this;\n }\n TrafficLayer.prototype.componentDidMount = function () {\n var trafficLayer = new google.maps.TrafficLayer(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: {},\n nextProps: this.props,\n instance: trafficLayer,\n });\n this.setState(function setTrafficLayer() {\n return {\n trafficLayer: trafficLayer,\n };\n }, this.setTrafficLayerCallback);\n };\n TrafficLayer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.trafficLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.trafficLayer,\n });\n }\n };\n TrafficLayer.prototype.componentWillUnmount = function () {\n if (this.state.trafficLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.trafficLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.trafficLayer.setMap(null);\n }\n };\n TrafficLayer.prototype.render = function () {\n return null;\n };\n TrafficLayer.contextType = MapContext;\n return TrafficLayer;\n}(PureComponent));\n\nfunction BicyclingLayerFunctional(_a) {\n var onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n var bicyclingLayer = new google.maps.BicyclingLayer();\n setInstance(bicyclingLayer);\n bicyclingLayer.setMap(map);\n if (onLoad) {\n onLoad(bicyclingLayer);\n }\n return function () {\n if (bicyclingLayer !== null) {\n if (onUnmount) {\n onUnmount(bicyclingLayer);\n }\n bicyclingLayer.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar BicyclingLayerF = memo(BicyclingLayerFunctional);\nvar BicyclingLayer = /** @class */ (function (_super) {\n __extends(BicyclingLayer, _super);\n function BicyclingLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n bicyclingLayer: null,\n };\n _this.setBicyclingLayerCallback = function () {\n if (_this.state.bicyclingLayer !== null) {\n _this.state.bicyclingLayer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.bicyclingLayer);\n }\n }\n };\n return _this;\n }\n BicyclingLayer.prototype.componentDidMount = function () {\n var bicyclingLayer = new google.maps.BicyclingLayer();\n this.setState(function () {\n return {\n bicyclingLayer: bicyclingLayer,\n };\n }, this.setBicyclingLayerCallback);\n };\n BicyclingLayer.prototype.componentWillUnmount = function () {\n if (this.state.bicyclingLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.bicyclingLayer);\n }\n this.state.bicyclingLayer.setMap(null);\n }\n };\n BicyclingLayer.prototype.render = function () {\n return null;\n };\n BicyclingLayer.contextType = MapContext;\n return BicyclingLayer;\n}(PureComponent));\n\nfunction TransitLayerFunctional(_a) {\n var onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n var transitLayer = new google.maps.TransitLayer();\n setInstance(transitLayer);\n transitLayer.setMap(map);\n if (onLoad) {\n onLoad(transitLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar TransitLayerF = memo(TransitLayerFunctional);\nvar TransitLayer = /** @class */ (function (_super) {\n __extends(TransitLayer, _super);\n function TransitLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n transitLayer: null,\n };\n _this.setTransitLayerCallback = function () {\n if (_this.state.transitLayer !== null) {\n _this.state.transitLayer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.transitLayer);\n }\n }\n };\n return _this;\n }\n TransitLayer.prototype.componentDidMount = function () {\n var transitLayer = new google.maps.TransitLayer();\n this.setState(function setTransitLayer() {\n return {\n transitLayer: transitLayer,\n };\n }, this.setTransitLayerCallback);\n };\n TransitLayer.prototype.componentWillUnmount = function () {\n if (this.state.transitLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.transitLayer);\n }\n this.state.transitLayer.setMap(null);\n }\n };\n TransitLayer.prototype.render = function () {\n return null;\n };\n TransitLayer.contextType = MapContext;\n return TransitLayer;\n}(PureComponent));\n\nvar eventMap$g = {\n onCircleComplete: 'circlecomplete',\n onMarkerComplete: 'markercomplete',\n onOverlayComplete: 'overlaycomplete',\n onPolygonComplete: 'polygoncomplete',\n onPolylineComplete: 'polylinecomplete',\n onRectangleComplete: 'rectanglecomplete',\n};\nvar updaterMap$g = {\n drawingMode: function (instance, drawingMode) {\n instance.setDrawingMode(drawingMode);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction DrawingManagerFunctional(_a) {\n var options = _a.options, drawingMode = _a.drawingMode, onCircleComplete = _a.onCircleComplete, onMarkerComplete = _a.onMarkerComplete, onOverlayComplete = _a.onOverlayComplete, onPolygonComplete = _a.onPolygonComplete, onPolylineComplete = _a.onPolylineComplete, onRectangleComplete = _a.onRectangleComplete, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), circlecompleteListener = _c[0], setCircleCompleteListener = _c[1];\n var _d = useState(null), markercompleteListener = _d[0], setMarkerCompleteListener = _d[1];\n var _e = useState(null), overlaycompleteListener = _e[0], setOverlayCompleteListener = _e[1];\n var _f = useState(null), polygoncompleteListener = _f[0], setPolygonCompleteListener = _f[1];\n var _g = useState(null), polylinecompleteListener = _g[0], setPolylineCompleteListener = _g[1];\n var _h = useState(null), rectanglecompleteListener = _h[0], setRectangleCompleteListener = _h[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (instance !== null) {\n instance.setDrawingMode(drawingMode !== null && drawingMode !== void 0 ? drawingMode : null);\n }\n }, [instance, drawingMode]);\n useEffect(function () {\n if (instance && onCircleComplete) {\n if (circlecompleteListener !== null) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n setCircleCompleteListener(google.maps.event.addListener(instance, 'circlecomplete', onCircleComplete));\n }\n }, [instance, onCircleComplete]);\n useEffect(function () {\n if (instance && onMarkerComplete) {\n if (markercompleteListener !== null) {\n google.maps.event.removeListener(markercompleteListener);\n }\n setMarkerCompleteListener(google.maps.event.addListener(instance, 'markercomplete', onMarkerComplete));\n }\n }, [instance, onMarkerComplete]);\n useEffect(function () {\n if (instance && onOverlayComplete) {\n if (overlaycompleteListener !== null) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n setOverlayCompleteListener(google.maps.event.addListener(instance, 'overlaycomplete', onOverlayComplete));\n }\n }, [instance, onOverlayComplete]);\n useEffect(function () {\n if (instance && onPolygonComplete) {\n if (polygoncompleteListener !== null) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n setPolygonCompleteListener(google.maps.event.addListener(instance, 'polygoncomplete', onPolygonComplete));\n }\n }, [instance, onPolygonComplete]);\n useEffect(function () {\n if (instance && onPolylineComplete) {\n if (polylinecompleteListener !== null) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n setPolylineCompleteListener(google.maps.event.addListener(instance, 'polylinecomplete', onPolylineComplete));\n }\n }, [instance, onPolylineComplete]);\n useEffect(function () {\n if (instance && onRectangleComplete) {\n if (rectanglecompleteListener !== null) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n setRectangleCompleteListener(google.maps.event.addListener(instance, 'rectanglecomplete', onRectangleComplete));\n }\n }, [instance, onRectangleComplete]);\n useEffect(function () {\n invariant$1(!!google.maps.drawing, \"Did you include prop libraries={['drawing']} in the URL? %s\", google.maps.drawing);\n var drawingManager = new google.maps.drawing.DrawingManager(__assign(__assign({}, (options || {})), { map: map }));\n if (drawingMode) {\n drawingManager.setDrawingMode(drawingMode);\n }\n if (onCircleComplete) {\n setCircleCompleteListener(google.maps.event.addListener(drawingManager, 'circlecomplete', onCircleComplete));\n }\n if (onMarkerComplete) {\n setMarkerCompleteListener(google.maps.event.addListener(drawingManager, 'markercomplete', onMarkerComplete));\n }\n if (onOverlayComplete) {\n setOverlayCompleteListener(google.maps.event.addListener(drawingManager, 'overlaycomplete', onOverlayComplete));\n }\n if (onPolygonComplete) {\n setPolygonCompleteListener(google.maps.event.addListener(drawingManager, 'polygoncomplete', onPolygonComplete));\n }\n if (onPolylineComplete) {\n setPolylineCompleteListener(google.maps.event.addListener(drawingManager, 'polylinecomplete', onPolylineComplete));\n }\n if (onRectangleComplete) {\n setRectangleCompleteListener(google.maps.event.addListener(drawingManager, 'rectanglecomplete', onRectangleComplete));\n }\n setInstance(drawingManager);\n if (onLoad) {\n onLoad(drawingManager);\n }\n return function () {\n if (instance !== null) {\n if (circlecompleteListener) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n if (markercompleteListener) {\n google.maps.event.removeListener(markercompleteListener);\n }\n if (overlaycompleteListener) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n if (polygoncompleteListener) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n if (polylinecompleteListener) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n if (rectanglecompleteListener) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar DrawingManagerF = memo(DrawingManagerFunctional);\nvar DrawingManager = /** @class */ (function (_super) {\n __extends(DrawingManager, _super);\n function DrawingManager(props) {\n var _this = _super.call(this, props) || this;\n _this.registeredEvents = [];\n _this.state = {\n drawingManager: null,\n };\n _this.setDrawingManagerCallback = function () {\n if (_this.state.drawingManager !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.drawingManager);\n }\n };\n invariant$1(!!google.maps.drawing, \"Did you include prop libraries={['drawing']} in the URL? %s\", google.maps.drawing);\n return _this;\n }\n DrawingManager.prototype.componentDidMount = function () {\n var drawingManager = new google.maps.drawing.DrawingManager(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: {},\n nextProps: this.props,\n instance: drawingManager,\n });\n this.setState(function setDrawingManager() {\n return {\n drawingManager: drawingManager,\n };\n }, this.setDrawingManagerCallback);\n };\n DrawingManager.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.drawingManager !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.drawingManager,\n });\n }\n };\n DrawingManager.prototype.componentWillUnmount = function () {\n if (this.state.drawingManager !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.drawingManager);\n }\n unregisterEvents(this.registeredEvents);\n this.state.drawingManager.setMap(null);\n }\n };\n DrawingManager.prototype.render = function () {\n return null;\n };\n DrawingManager.contextType = MapContext;\n return DrawingManager;\n}(PureComponent));\n\nvar eventMap$f = {\n onAnimationChanged: 'animation_changed',\n onClick: 'click',\n onClickableChanged: 'clickable_changed',\n onCursorChanged: 'cursor_changed',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDraggableChanged: 'draggable_changed',\n onDragStart: 'dragstart',\n onFlatChanged: 'flat_changed',\n onIconChanged: 'icon_changed',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onPositionChanged: 'position_changed',\n onRightClick: 'rightclick',\n onShapeChanged: 'shape_changed',\n onTitleChanged: 'title_changed',\n onVisibleChanged: 'visible_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$f = {\n animation: function (instance, animation) {\n instance.setAnimation(animation);\n },\n clickable: function (instance, clickable) {\n instance.setClickable(clickable);\n },\n cursor: function (instance, cursor) {\n instance.setCursor(cursor);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n icon: function (instance, icon) {\n instance.setIcon(icon);\n },\n label: function (instance, label) {\n instance.setLabel(label);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n opacity: function (instance, opacity) {\n instance.setOpacity(opacity);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n shape: function (instance, shape) {\n instance.setShape(shape);\n },\n title: function (instance, title) {\n instance.setTitle(title);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar defaultOptions$5 = {};\nfunction MarkerFunctional(_a) {\n var position = _a.position, options = _a.options, clusterer = _a.clusterer, noClustererRedraw = _a.noClustererRedraw, children = _a.children, draggable = _a.draggable, visible = _a.visible, animation = _a.animation, clickable = _a.clickable, cursor = _a.cursor, icon = _a.icon, label = _a.label, opacity = _a.opacity, shape = _a.shape, title = _a.title, zIndex = _a.zIndex, onClick = _a.onClick, onDblClick = _a.onDblClick, onDrag = _a.onDrag, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onMouseDown = _a.onMouseDown, onRightClick = _a.onRightClick, onClickableChanged = _a.onClickableChanged, onCursorChanged = _a.onCursorChanged, onAnimationChanged = _a.onAnimationChanged, onDraggableChanged = _a.onDraggableChanged, onFlatChanged = _a.onFlatChanged, onIconChanged = _a.onIconChanged, onPositionChanged = _a.onPositionChanged, onShapeChanged = _a.onShapeChanged, onTitleChanged = _a.onTitleChanged, onVisibleChanged = _a.onVisibleChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mouseoutListener = _g[0], setMouseoutListener = _g[1];\n var _h = useState(null), mouseoverListener = _h[0], setMouseoverListener = _h[1];\n var _j = useState(null), mouseupListener = _j[0], setMouseupListener = _j[1];\n var _k = useState(null), rightclickListener = _k[0], setRightclickListener = _k[1];\n var _l = useState(null), clickListener = _l[0], setClickListener = _l[1];\n var _m = useState(null), dragListener = _m[0], setDragListener = _m[1];\n var _o = useState(null), clickableChangedListener = _o[0], setClickableChangedListener = _o[1];\n var _p = useState(null), cursorChangedListener = _p[0], setCursorChangedListener = _p[1];\n var _q = useState(null), animationChangedListener = _q[0], setAnimationChangedListener = _q[1];\n var _r = useState(null), draggableChangedListener = _r[0], setDraggableChangedListener = _r[1];\n var _s = useState(null), flatChangedListener = _s[0], setFlatChangedListener = _s[1];\n var _t = useState(null), iconChangedListener = _t[0], setIconChangedListener = _t[1];\n var _u = useState(null), positionChangedListener = _u[0], setPositionChangedListener = _u[1];\n var _v = useState(null), shapeChangedListener = _v[0], setShapeChangedListener = _v[1];\n var _w = useState(null), titleChangedListener = _w[0], setTitleChangedListener = _w[1];\n var _x = useState(null), visibleChangedListener = _x[0], setVisibleChangedListener = _x[1];\n var _y = useState(null), zIndexChangedListener = _y[0], setZindexChangedListener = _y[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [instance, position]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n instance === null || instance === void 0 ? void 0 : instance.setAnimation(animation);\n }, [instance, animation]);\n useEffect(function () {\n if (instance && clickable !== undefined) {\n instance.setClickable(clickable);\n }\n }, [instance, clickable]);\n useEffect(function () {\n if (instance && cursor !== undefined) {\n instance.setCursor(cursor);\n }\n }, [instance, cursor]);\n useEffect(function () {\n if (instance && icon !== undefined) {\n instance.setIcon(icon);\n }\n }, [instance, icon]);\n useEffect(function () {\n if (instance && label !== undefined) {\n instance.setLabel(label);\n }\n }, [instance, label]);\n useEffect(function () {\n if (instance && opacity !== undefined) {\n instance.setOpacity(opacity);\n }\n }, [instance, opacity]);\n useEffect(function () {\n if (instance && shape !== undefined) {\n instance.setShape(shape);\n }\n }, [instance, shape]);\n useEffect(function () {\n if (instance && title !== undefined) {\n instance.setTitle(title);\n }\n }, [instance, title]);\n useEffect(function () {\n if (instance && zIndex !== undefined) {\n instance.setZIndex(zIndex);\n }\n }, [instance, zIndex]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onClickableChanged) {\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n setClickableChangedListener(google.maps.event.addListener(instance, 'clickable_changed', onClickableChanged));\n }\n }, [onClickableChanged]);\n useEffect(function () {\n if (instance && onCursorChanged) {\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n setCursorChangedListener(google.maps.event.addListener(instance, 'cursor_changed', onCursorChanged));\n }\n }, [onCursorChanged]);\n useEffect(function () {\n if (instance && onAnimationChanged) {\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n setAnimationChangedListener(google.maps.event.addListener(instance, 'animation_changed', onAnimationChanged));\n }\n }, [onAnimationChanged]);\n useEffect(function () {\n if (instance && onDraggableChanged) {\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n setDraggableChangedListener(google.maps.event.addListener(instance, 'draggable_changed', onDraggableChanged));\n }\n }, [onDraggableChanged]);\n useEffect(function () {\n if (instance && onFlatChanged) {\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n setFlatChangedListener(google.maps.event.addListener(instance, 'flat_changed', onFlatChanged));\n }\n }, [onFlatChanged]);\n useEffect(function () {\n if (instance && onIconChanged) {\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n setIconChangedListener(google.maps.event.addListener(instance, 'icon_changed', onIconChanged));\n }\n }, [onIconChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n setPositionChangedListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onShapeChanged) {\n if (shapeChangedListener !== null) {\n google.maps.event.removeListener(shapeChangedListener);\n }\n setShapeChangedListener(google.maps.event.addListener(instance, 'shape_changed', onShapeChanged));\n }\n }, [onShapeChanged]);\n useEffect(function () {\n if (instance && onTitleChanged) {\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n setTitleChangedListener(google.maps.event.addListener(instance, 'title_changed', onTitleChanged));\n }\n }, [onTitleChanged]);\n useEffect(function () {\n if (instance && onVisibleChanged) {\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n setVisibleChangedListener(google.maps.event.addListener(instance, 'visible_changed', onVisibleChanged));\n }\n }, [onVisibleChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n setZindexChangedListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n var markerOptions = __assign(__assign(__assign({}, (options || defaultOptions$5)), (clusterer ? defaultOptions$5 : { map: map })), { position: position });\n var marker = new google.maps.Marker(markerOptions);\n if (clusterer) {\n clusterer.addMarker(marker, !!noClustererRedraw);\n }\n else {\n marker.setMap(map);\n }\n if (position) {\n marker.setPosition(position);\n }\n if (typeof visible !== 'undefined') {\n marker.setVisible(visible);\n }\n if (typeof draggable !== 'undefined') {\n marker.setDraggable(draggable);\n }\n if (typeof clickable !== 'undefined') {\n marker.setClickable(clickable);\n }\n if (typeof cursor === 'string') {\n marker.setCursor(cursor);\n }\n if (icon) {\n marker.setIcon(icon);\n }\n if (typeof label !== 'undefined') {\n marker.setLabel(label);\n }\n if (typeof opacity !== 'undefined') {\n marker.setOpacity(opacity);\n }\n if (shape) {\n marker.setShape(shape);\n }\n if (typeof title === 'string') {\n marker.setTitle(title);\n }\n if (typeof zIndex === 'number') {\n marker.setZIndex(zIndex);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(marker, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(marker, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(marker, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(marker, 'mousedown', onMouseDown));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(marker, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(marker, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(marker, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(marker, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(marker, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(marker, 'drag', onDrag));\n }\n if (onClickableChanged) {\n setClickableChangedListener(google.maps.event.addListener(marker, 'clickable_changed', onClickableChanged));\n }\n if (onCursorChanged) {\n setCursorChangedListener(google.maps.event.addListener(marker, 'cursor_changed', onCursorChanged));\n }\n if (onAnimationChanged) {\n setAnimationChangedListener(google.maps.event.addListener(marker, 'animation_changed', onAnimationChanged));\n }\n if (onDraggableChanged) {\n setDraggableChangedListener(google.maps.event.addListener(marker, 'draggable_changed', onDraggableChanged));\n }\n if (onFlatChanged) {\n setFlatChangedListener(google.maps.event.addListener(marker, 'flat_changed', onFlatChanged));\n }\n if (onIconChanged) {\n setIconChangedListener(google.maps.event.addListener(marker, 'icon_changed', onIconChanged));\n }\n if (onPositionChanged) {\n setPositionChangedListener(google.maps.event.addListener(marker, 'position_changed', onPositionChanged));\n }\n if (onShapeChanged) {\n setShapeChangedListener(google.maps.event.addListener(marker, 'shape_changed', onShapeChanged));\n }\n if (onTitleChanged) {\n setTitleChangedListener(google.maps.event.addListener(marker, 'title_changed', onTitleChanged));\n }\n if (onVisibleChanged) {\n setVisibleChangedListener(google.maps.event.addListener(marker, 'visible_changed', onVisibleChanged));\n }\n if (onZindexChanged) {\n setZindexChangedListener(google.maps.event.addListener(marker, 'zindex_changed', onZindexChanged));\n }\n setInstance(marker);\n if (onLoad) {\n onLoad(marker);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n if (onUnmount) {\n onUnmount(marker);\n }\n if (clusterer) {\n clusterer.removeMarker(marker, !!noClustererRedraw);\n }\n else if (marker) {\n marker.setMap(null);\n }\n };\n }, []);\n var chx = useMemo(function () {\n return children\n ? Children.map(children, function (child) {\n if (!isValidElement(child)) {\n return child;\n }\n var elementChild = child;\n return cloneElement(elementChild, { anchor: instance });\n })\n : null;\n }, [children, instance]);\n return jsx(Fragment, { children: chx }) || null;\n}\nvar MarkerF = memo(MarkerFunctional);\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n return _this;\n }\n Marker.prototype.componentDidMount = function () {\n var markerOptions = __assign(__assign(__assign({}, (this.props.options || defaultOptions$5)), (this.props.clusterer ? defaultOptions$5 : { map: this.context })), { position: this.props.position });\n // Unfortunately we can't just do this in the contstructor, because the\n // `MapContext` might not be filled in yet.\n this.marker = new google.maps.Marker(markerOptions);\n if (this.props.clusterer) {\n this.props.clusterer.addMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker.setMap(this.context);\n }\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: {},\n nextProps: this.props,\n instance: this.marker,\n });\n if (this.props.onLoad) {\n this.props.onLoad(this.marker);\n }\n };\n Marker.prototype.componentDidUpdate = function (prevProps) {\n if (this.marker) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.marker,\n });\n }\n };\n Marker.prototype.componentWillUnmount = function () {\n if (this.marker) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.marker);\n }\n unregisterEvents(this.registeredEvents);\n if (this.props.clusterer) {\n this.props.clusterer.removeMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker && this.marker.setMap(null);\n }\n }\n };\n Marker.prototype.render = function () {\n var _this = this;\n var children = null;\n if (this.props.children) {\n children = Children.map(this.props.children, function (child) {\n if (!isValidElement(child)) {\n return child;\n }\n var elementChild = child;\n return cloneElement(elementChild, { anchor: _this.marker });\n });\n }\n return children || null;\n };\n Marker.contextType = MapContext;\n return Marker;\n}(PureComponent));\n\nvar ClusterIcon = /** @class */ (function () {\n function ClusterIcon(cluster, styles) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);\n this.cluster = cluster;\n this.clusterClassName = this.cluster.getClusterer().getClusterClass();\n this.className = this.clusterClassName;\n this.styles = styles;\n this.center = undefined;\n this.div = null;\n this.sums = null;\n this.visible = false;\n this.boundsChangedListener = null;\n this.url = '';\n this.height = 0;\n this.width = 0;\n this.anchorText = [0, 0];\n this.anchorIcon = [0, 0];\n this.textColor = 'black';\n this.textSize = 11;\n this.textDecoration = 'none';\n this.fontWeight = 'bold';\n this.fontStyle = 'normal';\n this.fontFamily = 'Arial,sans-serif';\n this.backgroundPosition = '0 0';\n this.cMouseDownInCluster = null;\n this.cDraggingMapByCluster = null;\n this.timeOut = null;\n this.setMap(cluster.getMap()); // Note: this causes onAdd to be called\n this.onBoundsChanged = this.onBoundsChanged.bind(this);\n this.onMouseDown = this.onMouseDown.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onMouseOver = this.onMouseOver.bind(this);\n this.onMouseOut = this.onMouseOut.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.draw = this.draw.bind(this);\n this.hide = this.hide.bind(this);\n this.show = this.show.bind(this);\n this.useStyle = this.useStyle.bind(this);\n this.setCenter = this.setCenter.bind(this);\n this.getPosFromLatLng = this.getPosFromLatLng.bind(this);\n }\n ClusterIcon.prototype.onBoundsChanged = function () {\n this.cDraggingMapByCluster = this.cMouseDownInCluster;\n };\n ClusterIcon.prototype.onMouseDown = function () {\n this.cMouseDownInCluster = true;\n this.cDraggingMapByCluster = false;\n };\n ClusterIcon.prototype.onClick = function (event) {\n this.cMouseDownInCluster = false;\n if (!this.cDraggingMapByCluster) {\n var markerClusterer_1 = this.cluster.getClusterer();\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer_1, 'click', this.cluster);\n google.maps.event.trigger(markerClusterer_1, 'clusterclick', this.cluster); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer_1.getZoomOnClick()) {\n // Zoom into the cluster.\n var maxZoom_1 = markerClusterer_1.getMaxZoom();\n var bounds_1 = this.cluster.getBounds();\n var map = markerClusterer_1.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n // There is a fix for Issue 170 here:\n this.timeOut = window.setTimeout(function () {\n var map = markerClusterer_1.getMap();\n if (map !== null) {\n if ('fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n var zoom = map.getZoom() || 0;\n // Don't zoom beyond the max zoom level\n if (maxZoom_1 !== null &&\n zoom > maxZoom_1) {\n map.setZoom(maxZoom_1 + 1);\n }\n }\n }, 100);\n }\n // Prevent event propagation to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n }\n };\n ClusterIcon.prototype.onMouseOver = function () {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseover', this.cluster);\n };\n ClusterIcon.prototype.onMouseOut = function () {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseout', this.cluster);\n };\n ClusterIcon.prototype.onAdd = function () {\n var _a;\n this.div = document.createElement('div');\n this.div.className = this.className;\n if (this.visible) {\n this.show();\n }\n (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a.overlayMouseTarget.appendChild(this.div);\n var map = this.getMap();\n if (map !== null) {\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(map, 'bounds_changed', this.onBoundsChanged);\n this.div.addEventListener('mousedown', this.onMouseDown);\n this.div.addEventListener('click', this.onClick);\n this.div.addEventListener('mouseover', this.onMouseOver);\n this.div.addEventListener('mouseout', this.onMouseOut);\n }\n };\n ClusterIcon.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.hide();\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener);\n }\n this.div.removeEventListener('mousedown', this.onMouseDown);\n this.div.removeEventListener('click', this.onClick);\n this.div.removeEventListener('mouseover', this.onMouseOver);\n this.div.removeEventListener('mouseout', this.onMouseOut);\n this.div.parentNode.removeChild(this.div);\n if (this.timeOut !== null) {\n window.clearTimeout(this.timeOut);\n this.timeOut = null;\n }\n this.div = null;\n }\n };\n ClusterIcon.prototype.draw = function () {\n if (this.visible && this.div !== null && this.center) {\n var pos = this.getPosFromLatLng(this.center);\n this.div.style.top = pos !== null ? \"\".concat(pos.y, \"px\") : '0';\n this.div.style.left = pos !== null ? \"\".concat(pos.x, \"px\") : '0';\n }\n };\n ClusterIcon.prototype.hide = function () {\n if (this.div) {\n this.div.style.display = 'none';\n }\n this.visible = false;\n };\n ClusterIcon.prototype.show = function () {\n var _a, _b, _c, _d, _e, _f;\n if (this.div && this.center) {\n var divTitle = this.sums === null ||\n typeof this.sums.title === 'undefined' ||\n this.sums.title === '' ? this.cluster.getClusterer().getTitle() : this.sums.title;\n // NOTE: values must be specified in px units\n var bp = this.backgroundPosition.split(' ');\n var spriteH = parseInt(((_a = bp[0]) === null || _a === void 0 ? void 0 : _a.replace(/^\\s+|\\s+$/g, '')) || '0', 10);\n var spriteV = parseInt(((_b = bp[1]) === null || _b === void 0 ? void 0 : _b.replace(/^\\s+|\\s+$/g, '')) || '0', 10);\n var pos = this.getPosFromLatLng(this.center);\n this.div.className = this.className;\n this.div.setAttribute('style', \"cursor: pointer; position: absolute; top: \".concat(pos !== null ? \"\".concat(pos.y, \"px\") : '0', \"; left: \").concat(pos !== null ? \"\".concat(pos.x, \"px\") : '0', \"; width: \").concat(this.width, \"px; height: \").concat(this.height, \"px; \"));\n var img = document.createElement('img');\n img.alt = divTitle;\n img.src = this.url;\n img.width = this.width;\n img.height = this.height;\n img.setAttribute('style', \"position: absolute; top: \".concat(spriteV, \"px; left: \").concat(spriteH, \"px\"));\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = \"rect(-\".concat(spriteV, \"px, -\").concat(spriteH + this.width, \"px, -\").concat(spriteV + this.height, \", -\").concat(spriteH, \")\");\n }\n var textElm = document.createElement('div');\n textElm.setAttribute('style', \"position: absolute; top: \".concat(this.anchorText[0], \"px; left: \").concat(this.anchorText[1], \"px; color: \").concat(this.textColor, \"; font-size: \").concat(this.textSize, \"px; font-family: \").concat(this.fontFamily, \"; font-weight: \").concat(this.fontWeight, \"; fontStyle: \").concat(this.fontStyle, \"; text-decoration: \").concat(this.textDecoration, \"; text-align: center; width: \").concat(this.width, \"px; line-height: \").concat(this.height, \"px\"));\n if ((_c = this.sums) === null || _c === void 0 ? void 0 : _c.text)\n textElm.innerText = \"\".concat((_d = this.sums) === null || _d === void 0 ? void 0 : _d.text);\n if ((_e = this.sums) === null || _e === void 0 ? void 0 : _e.html)\n textElm.innerHTML = \"\".concat((_f = this.sums) === null || _f === void 0 ? void 0 : _f.html);\n this.div.innerHTML = '';\n this.div.appendChild(img);\n this.div.appendChild(textElm);\n this.div.title = divTitle;\n this.div.style.display = '';\n }\n this.visible = true;\n };\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums = sums;\n var styles = this.cluster.getClusterer().getStyles();\n var style = styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))];\n if (style) {\n this.url = style.url;\n this.height = style.height;\n this.width = style.width;\n if (style.className) {\n this.className = \"\".concat(this.clusterClassName, \" \").concat(style.className);\n }\n this.anchorText = style.anchorText || [0, 0];\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2];\n this.textColor = style.textColor || 'black';\n this.textSize = style.textSize || 11;\n this.textDecoration = style.textDecoration || 'none';\n this.fontWeight = style.fontWeight || 'bold';\n this.fontStyle = style.fontStyle || 'normal';\n this.fontFamily = style.fontFamily || 'Arial,sans-serif';\n this.backgroundPosition = style.backgroundPosition || '0 0';\n }\n };\n ClusterIcon.prototype.setCenter = function (center) {\n this.center = center;\n };\n ClusterIcon.prototype.getPosFromLatLng = function (latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n if (pos !== null) {\n pos.x -= this.anchorIcon[1];\n pos.y -= this.anchorIcon[0];\n }\n return pos;\n };\n return ClusterIcon;\n}());\n\n/* global google */\nvar Cluster$1 = /** @class */ (function () {\n function Cluster(markerClusterer) {\n this.markerClusterer = markerClusterer;\n this.map = this.markerClusterer.getMap();\n this.gridSize = this.markerClusterer.getGridSize();\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize();\n this.averageCenter = this.markerClusterer.getAverageCenter();\n this.markers = [];\n this.center = undefined;\n this.bounds = null;\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles());\n this.getSize = this.getSize.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.getCenter = this.getCenter.bind(this);\n this.getMap = this.getMap.bind(this);\n this.getClusterer = this.getClusterer.bind(this);\n this.getBounds = this.getBounds.bind(this);\n this.remove = this.remove.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.isMarkerInClusterBounds = this.isMarkerInClusterBounds.bind(this);\n this.calculateBounds = this.calculateBounds.bind(this);\n this.updateIcon = this.updateIcon.bind(this);\n this.isMarkerAlreadyAdded = this.isMarkerAlreadyAdded.bind(this);\n }\n Cluster.prototype.getSize = function () {\n return this.markers.length;\n };\n Cluster.prototype.getMarkers = function () {\n return this.markers;\n };\n Cluster.prototype.getCenter = function () {\n return this.center;\n };\n Cluster.prototype.getMap = function () {\n return this.map;\n };\n Cluster.prototype.getClusterer = function () {\n return this.markerClusterer;\n };\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center, this.center);\n var markers = this.getMarkers();\n for (var _i = 0, markers_1 = markers; _i < markers_1.length; _i++) {\n var marker = markers_1[_i];\n var position = marker.getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n return bounds;\n };\n Cluster.prototype.remove = function () {\n this.clusterIcon.setMap(null);\n this.markers = [];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.markers;\n };\n Cluster.prototype.addMarker = function (marker) {\n var _a;\n if (this.isMarkerAlreadyAdded(marker)) {\n return false;\n }\n if (!this.center) {\n var position = marker.getPosition();\n if (position) {\n this.center = position;\n this.calculateBounds();\n }\n }\n else {\n if (this.averageCenter) {\n var position = marker.getPosition();\n if (position) {\n var length_1 = this.markers.length + 1;\n this.center = new google.maps.LatLng((this.center.lat() * (length_1 - 1) + position.lat()) / length_1, (this.center.lng() * (length_1 - 1) + position.lng()) / length_1);\n this.calculateBounds();\n }\n }\n }\n marker.isAdded = true;\n this.markers.push(marker);\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (var _i = 0, _b = this.markers; _i < _b.length; _i++) {\n var markerElement = _b[_i];\n markerElement.setMap(null);\n }\n }\n else {\n marker.setMap(null);\n }\n return true;\n };\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n if (this.bounds !== null) {\n var position = marker.getPosition();\n if (position) {\n return this.bounds.contains(position);\n }\n }\n return false;\n };\n Cluster.prototype.calculateBounds = function () {\n this.bounds = this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center, this.center));\n };\n Cluster.prototype.updateIcon = function () {\n var _a;\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide();\n return;\n }\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide();\n return;\n }\n if (this.center) {\n this.clusterIcon.setCenter(this.center);\n }\n this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length));\n this.clusterIcon.show();\n };\n Cluster.prototype.isMarkerAlreadyAdded = function (marker) {\n if (this.markers.includes) {\n return this.markers.includes(marker);\n }\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true;\n }\n }\n return false;\n };\n return Cluster;\n}());\n\n/* global google */\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\nfunction CALCULATOR(markers, numStyles) {\n var count = markers.length;\n var numberOfDigits = count.toString().length;\n var index = Math.min(numberOfDigits, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: '',\n };\n}\nvar BATCH_SIZE = 2000;\nvar BATCH_SIZE_IE = 500;\nvar IMAGE_PATH = 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';\nvar IMAGE_EXTENSION = 'png';\nvar IMAGE_SIZES = [53, 56, 66, 78, 90];\nvar CLUSTERER_CLASS = 'cluster';\nvar Clusterer = /** @class */ (function () {\n function Clusterer(map, optMarkers, optOptions) {\n if (optMarkers === void 0) { optMarkers = []; }\n if (optOptions === void 0) { optOptions = {}; }\n this.getMinimumClusterSize = this.getMinimumClusterSize.bind(this);\n this.setMinimumClusterSize = this.setMinimumClusterSize.bind(this);\n this.getEnableRetinaIcons = this.getEnableRetinaIcons.bind(this);\n this.setEnableRetinaIcons = this.setEnableRetinaIcons.bind(this);\n this.addToClosestCluster = this.addToClosestCluster.bind(this);\n this.getImageExtension = this.getImageExtension.bind(this);\n this.setImageExtension = this.setImageExtension.bind(this);\n this.getExtendedBounds = this.getExtendedBounds.bind(this);\n this.getAverageCenter = this.getAverageCenter.bind(this);\n this.setAverageCenter = this.setAverageCenter.bind(this);\n this.getTotalClusters = this.getTotalClusters.bind(this);\n this.fitMapToMarkers = this.fitMapToMarkers.bind(this);\n this.getIgnoreHidden = this.getIgnoreHidden.bind(this);\n this.setIgnoreHidden = this.setIgnoreHidden.bind(this);\n this.getClusterClass = this.getClusterClass.bind(this);\n this.setClusterClass = this.setClusterClass.bind(this);\n this.getTotalMarkers = this.getTotalMarkers.bind(this);\n this.getZoomOnClick = this.getZoomOnClick.bind(this);\n this.setZoomOnClick = this.setZoomOnClick.bind(this);\n this.getBatchSizeIE = this.getBatchSizeIE.bind(this);\n this.setBatchSizeIE = this.setBatchSizeIE.bind(this);\n this.createClusters = this.createClusters.bind(this);\n this.onZoomChanged = this.onZoomChanged.bind(this);\n this.getImageSizes = this.getImageSizes.bind(this);\n this.setImageSizes = this.setImageSizes.bind(this);\n this.getCalculator = this.getCalculator.bind(this);\n this.setCalculator = this.setCalculator.bind(this);\n this.removeMarkers = this.removeMarkers.bind(this);\n this.resetViewport = this.resetViewport.bind(this);\n this.getImagePath = this.getImagePath.bind(this);\n this.setImagePath = this.setImagePath.bind(this);\n this.pushMarkerTo = this.pushMarkerTo.bind(this);\n this.removeMarker = this.removeMarker.bind(this);\n this.clearMarkers = this.clearMarkers.bind(this);\n this.setupStyles = this.setupStyles.bind(this);\n this.getGridSize = this.getGridSize.bind(this);\n this.setGridSize = this.setGridSize.bind(this);\n this.getClusters = this.getClusters.bind(this);\n this.getMaxZoom = this.getMaxZoom.bind(this);\n this.setMaxZoom = this.setMaxZoom.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.addMarkers = this.addMarkers.bind(this);\n this.getStyles = this.getStyles.bind(this);\n this.setStyles = this.setStyles.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.getTitle = this.getTitle.bind(this);\n this.setTitle = this.setTitle.bind(this);\n this.repaint = this.repaint.bind(this);\n this.onIdle = this.onIdle.bind(this);\n this.redraw = this.redraw.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.draw = this.draw.bind(this);\n this.extend = this.extend.bind(this);\n this.extend(Clusterer, google.maps.OverlayView);\n this.markers = [];\n this.clusters = [];\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n this.gridSize = optOptions.gridSize || 60;\n this.minClusterSize = optOptions.minimumClusterSize || 2;\n this.maxZoom = optOptions.maxZoom || null;\n this.styles = optOptions.styles || [];\n this.title = optOptions.title || '';\n this.zoomOnClick = true;\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick;\n }\n this.averageCenter = false;\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter;\n }\n this.ignoreHidden = false;\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden;\n }\n this.enableRetinaIcons = false;\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons;\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH;\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION;\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES;\n this.calculator = optOptions.calculator || CALCULATOR;\n this.batchSize = optOptions.batchSize || BATCH_SIZE;\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE;\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS;\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE;\n }\n this.timerRefStatic = null;\n this.setupStyles();\n this.addMarkers(optMarkers, true);\n this.setMap(map); // Note: this causes onAdd to be called\n }\n Clusterer.prototype.onZoomChanged = function () {\n var _a, _b;\n this.resetViewport(false);\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (((_a = this.getMap()) === null || _a === void 0 ? void 0 : _a.getZoom()) === (this.get('minZoom') || 0) ||\n ((_b = this.getMap()) === null || _b === void 0 ? void 0 : _b.getZoom()) === this.get('maxZoom')) {\n google.maps.event.trigger(this, 'idle');\n }\n };\n Clusterer.prototype.onIdle = function () {\n this.redraw();\n };\n Clusterer.prototype.onAdd = function () {\n var map = this.getMap();\n this.activeMap = map;\n this.ready = true;\n this.repaint();\n if (map !== null) {\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(map, 'zoom_changed', this.onZoomChanged),\n google.maps.event.addListener(map, 'idle', this.onIdle),\n ];\n }\n };\n Clusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var _i = 0, _a = this.markers; _i < _a.length; _i++) {\n var marker = _a[_i];\n if (marker.getMap() !== this.activeMap) {\n marker.setMap(this.activeMap);\n }\n }\n // Remove all clusters:\n for (var _b = 0, _c = this.clusters; _b < _c.length; _b++) {\n var cluster = _c[_b];\n cluster.remove();\n }\n this.clusters = [];\n // Remove map event listeners:\n for (var _d = 0, _e = this.listeners; _d < _e.length; _d++) {\n var listener = _e[_d];\n google.maps.event.removeListener(listener);\n }\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n };\n Clusterer.prototype.draw = function () { return; };\n Clusterer.prototype.getMap = function () { return null; };\n Clusterer.prototype.getPanes = function () { return null; };\n Clusterer.prototype.getProjection = function () {\n return {\n fromContainerPixelToLatLng: function () { return null; },\n fromDivPixelToLatLng: function () { return null; },\n fromLatLngToContainerPixel: function () { return null; },\n fromLatLngToDivPixel: function () { return null; },\n getVisibleRegion: function () { return null; },\n getWorldWidth: function () { return 0; }\n };\n };\n Clusterer.prototype.setMap = function () { return; };\n Clusterer.prototype.addListener = function () {\n return {\n remove: function () { return; }\n };\n };\n Clusterer.prototype.bindTo = function () { return; };\n Clusterer.prototype.get = function () { return; };\n Clusterer.prototype.notify = function () { return; };\n Clusterer.prototype.set = function () { return; };\n Clusterer.prototype.setValues = function () { return; };\n Clusterer.prototype.unbind = function () { return; };\n Clusterer.prototype.unbindAll = function () { return; };\n Clusterer.prototype.setupStyles = function () {\n if (this.styles.length > 0) {\n return;\n }\n for (var i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: \"\".concat(this.imagePath + (i + 1), \".\").concat(this.imageExtension),\n height: this.imageSizes[i] || 0,\n width: this.imageSizes[i] || 0,\n });\n }\n };\n Clusterer.prototype.fitMapToMarkers = function () {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n for (var _i = 0, markers_1 = markers; _i < markers_1.length; _i++) {\n var marker = markers_1[_i];\n var position = marker.getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n var map = this.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds);\n }\n };\n Clusterer.prototype.getGridSize = function () {\n return this.gridSize;\n };\n Clusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize = gridSize;\n };\n Clusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize;\n };\n Clusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize = minimumClusterSize;\n };\n Clusterer.prototype.getMaxZoom = function () {\n return this.maxZoom;\n };\n Clusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom = maxZoom;\n };\n Clusterer.prototype.getStyles = function () {\n return this.styles;\n };\n Clusterer.prototype.setStyles = function (styles) {\n this.styles = styles;\n };\n Clusterer.prototype.getTitle = function () {\n return this.title;\n };\n Clusterer.prototype.setTitle = function (title) {\n this.title = title;\n };\n Clusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick;\n };\n Clusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick = zoomOnClick;\n };\n Clusterer.prototype.getAverageCenter = function () {\n return this.averageCenter;\n };\n Clusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter = averageCenter;\n };\n Clusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden;\n };\n Clusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden = ignoreHidden;\n };\n Clusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons;\n };\n Clusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons = enableRetinaIcons;\n };\n Clusterer.prototype.getImageExtension = function () {\n return this.imageExtension;\n };\n Clusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension = imageExtension;\n };\n Clusterer.prototype.getImagePath = function () {\n return this.imagePath;\n };\n Clusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath = imagePath;\n };\n Clusterer.prototype.getImageSizes = function () {\n return this.imageSizes;\n };\n Clusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes = imageSizes;\n };\n Clusterer.prototype.getCalculator = function () {\n return this.calculator;\n };\n Clusterer.prototype.setCalculator = function (calculator) {\n this.calculator = calculator;\n };\n Clusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE;\n };\n Clusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE = batchSizeIE;\n };\n Clusterer.prototype.getClusterClass = function () {\n return this.clusterClass;\n };\n Clusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass = clusterClass;\n };\n Clusterer.prototype.getMarkers = function () {\n return this.markers;\n };\n Clusterer.prototype.getTotalMarkers = function () {\n return this.markers.length;\n };\n Clusterer.prototype.getClusters = function () {\n return this.clusters;\n };\n Clusterer.prototype.getTotalClusters = function () {\n return this.clusters.length;\n };\n Clusterer.prototype.addMarker = function (marker, optNoDraw) {\n this.pushMarkerTo(marker);\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.addMarkers = function (markers, optNoDraw) {\n for (var key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n var marker = markers[key];\n if (marker) {\n this.pushMarkerTo(marker);\n }\n }\n }\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.pushMarkerTo = function (marker) {\n var _this = this;\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, 'dragend', function () {\n if (_this.ready) {\n marker.isAdded = false;\n _this.repaint();\n }\n });\n }\n marker.isAdded = false;\n this.markers.push(marker);\n };\n Clusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker);\n }\n else {\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i;\n break;\n }\n }\n }\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n return true;\n };\n Clusterer.prototype.removeMarker = function (marker, optNoDraw) {\n var removed = this.removeMarker_(marker);\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.removeMarkers = function (markers, optNoDraw) {\n var removed = false;\n for (var _i = 0, markers_2 = markers; _i < markers_2.length; _i++) {\n var marker = markers_2[_i];\n removed = removed || this.removeMarker_(marker);\n }\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.clearMarkers = function () {\n this.resetViewport(true);\n this.markers = [];\n };\n Clusterer.prototype.repaint = function () {\n var oldClusters = this.clusters.slice();\n this.clusters = [];\n this.resetViewport(false);\n this.redraw();\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (var _i = 0, oldClusters_1 = oldClusters; _i < oldClusters_1.length; _i++) {\n var oldCluster = oldClusters_1[_i];\n oldCluster.remove();\n }\n }, 0);\n };\n Clusterer.prototype.getExtendedBounds = function (bounds) {\n var projection = this.getProjection();\n // Convert the points to pixels and the extend out by the grid size.\n var trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()));\n if (trPix !== null) {\n trPix.x += this.gridSize;\n trPix.y -= this.gridSize;\n }\n var blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()));\n if (blPix !== null) {\n blPix.x -= this.gridSize;\n blPix.y += this.gridSize;\n }\n // Extend the bounds to contain the new bounds.\n if (trPix !== null) {\n // Convert the pixel points back to LatLng nw\n var point1 = projection.fromDivPixelToLatLng(trPix);\n if (point1 !== null) {\n bounds.extend(point1);\n }\n }\n if (blPix !== null) {\n // Convert the pixel points back to LatLng sw\n var point2 = projection.fromDivPixelToLatLng(blPix);\n if (point2 !== null) {\n bounds.extend(point2);\n }\n }\n return bounds;\n };\n Clusterer.prototype.redraw = function () {\n // Redraws all the clusters.\n this.createClusters(0);\n };\n Clusterer.prototype.resetViewport = function (optHide) {\n // Remove all the clusters\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var cluster = _a[_i];\n cluster.remove();\n }\n this.clusters = [];\n // Reset the markers to not be added and to be removed from the map.\n for (var _b = 0, _c = this.markers; _b < _c.length; _b++) {\n var marker = _c[_b];\n marker.isAdded = false;\n if (optHide) {\n marker.setMap(null);\n }\n }\n };\n Clusterer.prototype.distanceBetweenPoints = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n var dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180;\n var dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2);\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)));\n };\n Clusterer.prototype.isMarkerInBounds = function (marker, bounds) {\n var position = marker.getPosition();\n if (position) {\n return bounds.contains(position);\n }\n return false;\n };\n Clusterer.prototype.addToClosestCluster = function (marker) {\n var cluster;\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var clusterElement = _a[_i];\n cluster = clusterElement;\n var center = cluster.getCenter();\n var position = marker.getPosition();\n if (center && position) {\n var d = this.distanceBetweenPoints(center, position);\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n }\n else {\n cluster = new Cluster$1(this);\n cluster.addMarker(marker);\n this.clusters.push(cluster);\n }\n };\n Clusterer.prototype.createClusters = function (iFirst) {\n var _this = this;\n if (!this.ready) {\n return;\n }\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the Clusterer begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.timerRefStatic;\n }\n }\n var map = this.getMap();\n var bounds = map !== null && 'getBounds' in map ? map.getBounds() : null;\n var zoom = (map === null || map === void 0 ? void 0 : map.getZoom()) || 0;\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n var mapBounds = zoom > 3\n ? new google.maps.LatLngBounds(bounds === null || bounds === void 0 ? void 0 : bounds.getSouthWest(), bounds === null || bounds === void 0 ? void 0 : bounds.getNorthEast())\n : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n var extendedMapBounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize, this.markers.length);\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers[i];\n if (marker && !marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {\n this.addToClosestCluster(marker);\n }\n }\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters(iLast);\n }, 0);\n }\n else {\n this.timerRefStatic = null;\n /**\n * This event is fired when the Clusterer stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this);\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var cluster = _a[_i];\n cluster.updateIcon();\n }\n }\n };\n Clusterer.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-types\n var prop = property;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[prop] = object.prototype[prop];\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return Clusterer;\n}());\n\nvar eventMap$e = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n};\nvar updaterMap$e = {\n averageCenter: function (instance, averageCenter) {\n instance.setAverageCenter(averageCenter);\n },\n batchSizeIE: function (instance, batchSizeIE) {\n instance.setBatchSizeIE(batchSizeIE);\n },\n calculator: function (instance, calculator) {\n instance.setCalculator(calculator);\n },\n clusterClass: function (instance, clusterClass) {\n instance.setClusterClass(clusterClass);\n },\n enableRetinaIcons: function (instance, enableRetinaIcons) {\n instance.setEnableRetinaIcons(enableRetinaIcons);\n },\n gridSize: function (instance, gridSize) {\n instance.setGridSize(gridSize);\n },\n ignoreHidden: function (instance, ignoreHidden) {\n instance.setIgnoreHidden(ignoreHidden);\n },\n imageExtension: function (instance, imageExtension) {\n instance.setImageExtension(imageExtension);\n },\n imagePath: function (instance, imagePath) {\n instance.setImagePath(imagePath);\n },\n imageSizes: function (instance, imageSizes) {\n instance.setImageSizes(imageSizes);\n },\n maxZoom: function (instance, maxZoom) {\n instance.setMaxZoom(maxZoom);\n },\n minimumClusterSize: function (instance, minimumClusterSize) {\n instance.setMinimumClusterSize(minimumClusterSize);\n },\n styles: function (instance, styles) {\n instance.setStyles(styles);\n },\n title: function (instance, title) {\n instance.setTitle(title);\n },\n zoomOnClick: function (instance, zoomOnClick) {\n instance.setZoomOnClick(zoomOnClick);\n },\n};\nvar defaultOptions$4 = {};\nfunction MarkerClustererFunctional(props) {\n var children = props.children, options = props.options, averageCenter = props.averageCenter, batchSizeIE = props.batchSizeIE, calculator = props.calculator, clusterClass = props.clusterClass, enableRetinaIcons = props.enableRetinaIcons, gridSize = props.gridSize, ignoreHidden = props.ignoreHidden, imageExtension = props.imageExtension, imagePath = props.imagePath, imageSizes = props.imageSizes, maxZoom = props.maxZoom, minimumClusterSize = props.minimumClusterSize, styles = props.styles, title = props.title, zoomOnClick = props.zoomOnClick, onClick = props.onClick, onClusteringBegin = props.onClusteringBegin, onClusteringEnd = props.onClusteringEnd, onMouseOver = props.onMouseOver, onMouseOut = props.onMouseOut, onLoad = props.onLoad, onUnmount = props.onUnmount;\n var _a = useState(null), instance = _a[0], setInstance = _a[1];\n var map = useContext(MapContext);\n var _b = useState(null), clickListener = _b[0], setClickListener = _b[1];\n var _c = useState(null), clusteringBeginListener = _c[0], setClusteringBeginListener = _c[1];\n var _d = useState(null), clusteringEndListener = _d[0], setClusteringEndListener = _d[1];\n var _e = useState(null), mouseoutListener = _e[0], setMouseoutListener = _e[1];\n var _f = useState(null), mouseoverListener = _f[0], setMouseoverListener = _f[1];\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, eventMap$e.onMouseOut, onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, eventMap$e.onMouseOver, onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, eventMap$e.onClick, onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onClusteringBegin) {\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n }, [onClusteringBegin]);\n useEffect(function () {\n if (instance && onClusteringEnd) {\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n }, [onClusteringEnd]);\n useEffect(function () {\n if (typeof averageCenter !== 'undefined' && instance !== null) {\n updaterMap$e.averageCenter(instance, averageCenter);\n }\n }, [instance, averageCenter]);\n useEffect(function () {\n if (typeof batchSizeIE !== 'undefined' && instance !== null) {\n updaterMap$e.batchSizeIE(instance, batchSizeIE);\n }\n }, [instance, batchSizeIE]);\n useEffect(function () {\n if (typeof calculator !== 'undefined' && instance !== null) {\n updaterMap$e.calculator(instance, calculator);\n }\n }, [instance, calculator]);\n useEffect(function () {\n if (typeof clusterClass !== 'undefined' && instance !== null) {\n updaterMap$e.clusterClass(instance, clusterClass);\n }\n }, [instance, clusterClass]);\n useEffect(function () {\n if (typeof enableRetinaIcons !== 'undefined' && instance !== null) {\n updaterMap$e.enableRetinaIcons(instance, enableRetinaIcons);\n }\n }, [instance, enableRetinaIcons]);\n useEffect(function () {\n if (typeof gridSize !== 'undefined' && instance !== null) {\n updaterMap$e.gridSize(instance, gridSize);\n }\n }, [instance, gridSize]);\n useEffect(function () {\n if (typeof ignoreHidden !== 'undefined' && instance !== null) {\n updaterMap$e.ignoreHidden(instance, ignoreHidden);\n }\n }, [instance, ignoreHidden]);\n useEffect(function () {\n if (typeof imageExtension !== 'undefined' && instance !== null) {\n updaterMap$e.imageExtension(instance, imageExtension);\n }\n }, [instance, imageExtension]);\n useEffect(function () {\n if (typeof imagePath !== 'undefined' && instance !== null) {\n updaterMap$e.imagePath(instance, imagePath);\n }\n }, [instance, imagePath]);\n useEffect(function () {\n if (typeof imageSizes !== 'undefined' && instance !== null) {\n updaterMap$e.imageSizes(instance, imageSizes);\n }\n }, [instance, imageSizes]);\n useEffect(function () {\n if (typeof maxZoom !== 'undefined' && instance !== null) {\n updaterMap$e.maxZoom(instance, maxZoom);\n }\n }, [instance, maxZoom]);\n useEffect(function () {\n if (typeof minimumClusterSize !== 'undefined' && instance !== null) {\n updaterMap$e.minimumClusterSize(instance, minimumClusterSize);\n }\n }, [instance, minimumClusterSize]);\n useEffect(function () {\n if (typeof styles !== 'undefined' && instance !== null) {\n updaterMap$e.styles(instance, styles);\n }\n }, [instance, styles]);\n useEffect(function () {\n if (typeof title !== 'undefined' && instance !== null) {\n updaterMap$e.title(instance, title);\n }\n }, [instance, title]);\n useEffect(function () {\n if (typeof zoomOnClick !== 'undefined' && instance !== null) {\n updaterMap$e.zoomOnClick(instance, zoomOnClick);\n }\n }, [instance, zoomOnClick]);\n useEffect(function () {\n if (!map)\n return;\n var clustererOptions = __assign({}, (options || defaultOptions$4));\n var clusterer = new Clusterer(map, [], clustererOptions);\n if (averageCenter) {\n updaterMap$e.averageCenter(clusterer, averageCenter);\n }\n if (batchSizeIE) {\n updaterMap$e.batchSizeIE(clusterer, batchSizeIE);\n }\n if (calculator) {\n updaterMap$e.calculator(clusterer, calculator);\n }\n if (clusterClass) {\n updaterMap$e.clusterClass(clusterer, clusterClass);\n }\n if (enableRetinaIcons) {\n updaterMap$e.enableRetinaIcons(clusterer, enableRetinaIcons);\n }\n if (gridSize) {\n updaterMap$e.gridSize(clusterer, gridSize);\n }\n if (ignoreHidden) {\n updaterMap$e.ignoreHidden(clusterer, ignoreHidden);\n }\n if (imageExtension) {\n updaterMap$e.imageExtension(clusterer, imageExtension);\n }\n if (imagePath) {\n updaterMap$e.imagePath(clusterer, imagePath);\n }\n if (imageSizes) {\n updaterMap$e.imageSizes(clusterer, imageSizes);\n }\n if (maxZoom) {\n updaterMap$e.maxZoom(clusterer, maxZoom);\n }\n if (minimumClusterSize) {\n updaterMap$e.minimumClusterSize(clusterer, minimumClusterSize);\n }\n if (styles) {\n updaterMap$e.styles(clusterer, styles);\n }\n if (title) {\n updaterMap$e.title(clusterer, title);\n }\n if (zoomOnClick) {\n updaterMap$e.zoomOnClick(clusterer, zoomOnClick);\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOut, onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOver, onMouseOver));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(clusterer, eventMap$e.onClick, onClick));\n }\n if (onClusteringBegin) {\n setClusteringBeginListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n if (onClusteringEnd) {\n setClusteringEndListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n setInstance(clusterer);\n if (onLoad) {\n onLoad(clusterer);\n }\n return function () {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n if (onUnmount) {\n onUnmount(clusterer);\n }\n };\n }, []);\n return instance !== null ? children(instance) || null : null;\n}\nvar MarkerClustererF = memo(MarkerClustererFunctional);\nvar ClustererComponent = /** @class */ (function (_super) {\n __extends(ClustererComponent, _super);\n function ClustererComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n markerClusterer: null,\n };\n _this.setClustererCallback = function () {\n if (_this.state.markerClusterer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.markerClusterer);\n }\n };\n return _this;\n }\n ClustererComponent.prototype.componentDidMount = function () {\n if (this.context) {\n var markerClusterer_1 = new Clusterer(this.context, [], this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer_1,\n });\n this.setState(function () {\n return {\n markerClusterer: markerClusterer_1,\n };\n }, this.setClustererCallback);\n }\n };\n ClustererComponent.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer,\n });\n }\n };\n ClustererComponent.prototype.componentWillUnmount = function () {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer);\n }\n unregisterEvents(this.registeredEvents);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.state.markerClusterer.setMap(null);\n }\n };\n ClustererComponent.prototype.render = function () {\n return this.state.markerClusterer !== null\n ? this.props.children(this.state.markerClusterer)\n : null;\n };\n ClustererComponent.contextType = MapContext;\n return ClustererComponent;\n}(PureComponent));\n\n// This handler prevents an event in the InfoBox from being passed on to the map.\nfunction cancelHandler(event) {\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n}\nvar InfoBox = /** @class */ (function () {\n function InfoBox(options) {\n if (options === void 0) { options = {}; }\n this.getCloseClickHandler = this.getCloseClickHandler.bind(this);\n this.closeClickHandler = this.closeClickHandler.bind(this);\n this.createInfoBoxDiv = this.createInfoBoxDiv.bind(this);\n this.addClickHandler = this.addClickHandler.bind(this);\n this.getCloseBoxImg = this.getCloseBoxImg.bind(this);\n this.getBoxWidths = this.getBoxWidths.bind(this);\n this.setBoxStyle = this.setBoxStyle.bind(this);\n this.setPosition = this.setPosition.bind(this);\n this.getPosition = this.getPosition.bind(this);\n this.setOptions = this.setOptions.bind(this);\n this.setContent = this.setContent.bind(this);\n this.setVisible = this.setVisible.bind(this);\n this.getContent = this.getContent.bind(this);\n this.getVisible = this.getVisible.bind(this);\n this.setZIndex = this.setZIndex.bind(this);\n this.getZIndex = this.getZIndex.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.panBox = this.panBox.bind(this);\n this.extend = this.extend.bind(this);\n this.close = this.close.bind(this);\n this.draw = this.draw.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.open = this.open.bind(this);\n this.extend(InfoBox, google.maps.OverlayView);\n // Standard options (in common with google.maps.InfoWindow):\n this.content = options.content || '';\n this.disableAutoPan = options.disableAutoPan || false;\n this.maxWidth = options.maxWidth || 0;\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0);\n this.position = options.position || new google.maps.LatLng(0, 0);\n this.zIndex = options.zIndex || null;\n // Additional options (unique to InfoBox):\n this.boxClass = options.boxClass || 'infoBox';\n this.boxStyle = options.boxStyle || {};\n this.closeBoxMargin = options.closeBoxMargin || '2px';\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif';\n if (options.closeBoxURL === '') {\n this.closeBoxURL = '';\n }\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1);\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true;\n }\n else {\n options.visible = !options.isHidden;\n }\n }\n this.isHidden = !options.visible;\n this.alignBottom = options.alignBottom || false;\n this.pane = options.pane || 'floatPane';\n this.enableEventPropagation = options.enableEventPropagation || false;\n this.div = null;\n this.closeListener = null;\n this.moveListener = null;\n this.mapListener = null;\n this.contextListener = null;\n this.eventListeners = null;\n this.fixedWidthSet = null;\n }\n InfoBox.prototype.createInfoBoxDiv = function () {\n var _this = this;\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n var ignoreHandler = function (event) {\n event.returnValue = false;\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (!_this.enableEventPropagation) {\n cancelHandler(event);\n }\n };\n if (!this.div) {\n this.div = document.createElement('div');\n this.setBoxStyle();\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(this.content);\n }\n var panes = this.getPanes();\n if (panes !== null) {\n panes[this.pane].appendChild(this.div); // Add the InfoBox div to the DOM\n }\n this.addClickHandler();\n if (this.div.style.width) {\n this.fixedWidthSet = true;\n }\n else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px';\n this.fixedWidthSet = true;\n }\n else {\n // The following code is needed to overcome problems with MSIE\n var bw = this.getBoxWidths();\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px';\n this.fixedWidthSet = false;\n }\n }\n this.panBox(this.disableAutoPan);\n if (!this.enableEventPropagation) {\n this.eventListeners = [];\n // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n var events = [\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'mouseup',\n 'click',\n 'dblclick',\n 'touchstart',\n 'touchend',\n 'touchmove',\n ];\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n this.eventListeners.push(google.maps.event.addListener(this.div, event_1, cancelHandler));\n }\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners.push(google.maps.event.addListener(this.div, 'mouseover', function () {\n if (_this.div) {\n _this.div.style.cursor = 'default';\n }\n }));\n }\n this.contextListener = google.maps.event.addListener(this.div, 'contextmenu', ignoreHandler);\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, 'domready');\n }\n };\n InfoBox.prototype.getCloseBoxImg = function () {\n var img = '';\n if (this.closeBoxURL !== '') {\n img = '\"\"';\n\";\n }\n return img;\n };\n InfoBox.prototype.addClickHandler = function () {\n this.closeListener = this.div && this.div.firstChild && this.closeBoxURL !== ''\n ? google.maps.event.addListener(this.div.firstChild, 'click', this.getCloseClickHandler())\n : null;\n };\n InfoBox.prototype.closeClickHandler = function (event) {\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n google.maps.event.trigger(this, 'closeclick');\n this.close();\n };\n InfoBox.prototype.getCloseClickHandler = function () {\n return this.closeClickHandler;\n };\n InfoBox.prototype.panBox = function (disablePan) {\n if (this.div && !disablePan) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var map = this.getMap();\n // Only pan if attached to map, not panorama\n if (map instanceof google.maps.Map) {\n var xOffset = 0;\n var yOffset = 0;\n var bounds = map.getBounds();\n if (bounds && !bounds.contains(this.position)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position);\n }\n var mapDiv = map.getDiv();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapWidth = mapDiv.offsetWidth;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapHeight = mapDiv.offsetHeight;\n var iwOffsetX = this.pixelOffset.width;\n var iwOffsetY = this.pixelOffset.height;\n var iwWidth = this.div.offsetWidth;\n var iwHeight = this.div.offsetHeight;\n var padX = this.infoBoxClearance.width;\n var padY = this.infoBoxClearance.height;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToContainerPixel(this.position);\n if (pixPosition !== null) {\n if (pixPosition.x < -iwOffsetX + padX) {\n xOffset = pixPosition.x + iwOffsetX - padX;\n }\n else if (pixPosition.x + iwWidth + iwOffsetX + padX > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth;\n }\n if (this.alignBottom) {\n if (pixPosition.y < -iwOffsetY + padY + iwHeight) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight;\n }\n else if (pixPosition.y + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight;\n }\n }\n else {\n if (pixPosition.y < -iwOffsetY + padY) {\n yOffset = pixPosition.y + iwOffsetY - padY;\n }\n else if (pixPosition.y + iwHeight + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight;\n }\n }\n }\n if (!(xOffset === 0 && yOffset === 0)) {\n // Move the map to the shifted center.\n map.panBy(xOffset, yOffset);\n }\n }\n }\n };\n InfoBox.prototype.setBoxStyle = function () {\n if (this.div) {\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div.className = this.boxClass;\n // Clear existing inline style values:\n this.div.style.cssText = '';\n // Apply style values defined in the boxStyle parameter:\n var boxStyle = this.boxStyle;\n for (var i in boxStyle) {\n if (Object.prototype.hasOwnProperty.call(boxStyle, i)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style[i] = boxStyle[i];\n }\n }\n // Fix for iOS disappearing InfoBox problem\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n this.div.style.webkitTransform = 'translateZ(0)';\n // Fix up opacity style for benefit of MSIE\n if (typeof this.div.style.opacity !== 'undefined' && this.div.style.opacity !== '') {\n // See http://www.quirksmode.org/css/opacity.html\n var opacity = parseFloat(this.div.style.opacity || '');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style.msFilter =\n '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')\"';\n this.div.style.filter = 'alpha(opacity=' + opacity * 100 + ')';\n }\n // Apply required styles\n this.div.style.position = 'absolute';\n this.div.style.visibility = 'hidden';\n if (this.zIndex !== null) {\n this.div.style.zIndex = this.zIndex + '';\n }\n if (!this.div.style.overflow) {\n this.div.style.overflow = 'auto';\n }\n }\n };\n InfoBox.prototype.getBoxWidths = function () {\n var bw = { top: 0, bottom: 0, left: 0, right: 0 };\n if (!this.div) {\n return bw;\n }\n if (document.defaultView) {\n var ownerDocument = this.div.ownerDocument;\n var computedStyle = ownerDocument && ownerDocument.defaultView\n ? ownerDocument.defaultView.getComputedStyle(this.div, '')\n : null;\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth || '', 10) || 0;\n }\n }\n else if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n document.documentElement.currentStyle // MSIE\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var currentStyle = this.div.currentStyle;\n if (currentStyle) {\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(currentStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(currentStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(currentStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(currentStyle.borderRightWidth || '', 10) || 0;\n }\n }\n return bw;\n };\n InfoBox.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.div.parentNode.removeChild(this.div);\n this.div = null;\n }\n };\n InfoBox.prototype.draw = function () {\n this.createInfoBoxDiv();\n if (this.div) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToDivPixel(this.position);\n if (pixPosition !== null) {\n this.div.style.left = pixPosition.x + this.pixelOffset.width + 'px';\n if (this.alignBottom) {\n this.div.style.bottom = -(pixPosition.y + this.pixelOffset.height) + 'px';\n }\n else {\n this.div.style.top = pixPosition.y + this.pixelOffset.height + 'px';\n }\n }\n if (this.isHidden) {\n this.div.style.visibility = 'hidden';\n }\n else {\n this.div.style.visibility = 'visible';\n }\n }\n };\n InfoBox.prototype.setOptions = function (options) {\n if (options === void 0) { options = {}; }\n if (typeof options.boxClass !== 'undefined') {\n // Must be first\n this.boxClass = options.boxClass;\n this.setBoxStyle();\n }\n if (typeof options.boxStyle !== 'undefined') {\n // Must be second\n this.boxStyle = options.boxStyle;\n this.setBoxStyle();\n }\n if (typeof options.content !== 'undefined') {\n this.setContent(options.content);\n }\n if (typeof options.disableAutoPan !== 'undefined') {\n this.disableAutoPan = options.disableAutoPan;\n }\n if (typeof options.maxWidth !== 'undefined') {\n this.maxWidth = options.maxWidth;\n }\n if (typeof options.pixelOffset !== 'undefined') {\n this.pixelOffset = options.pixelOffset;\n }\n if (typeof options.alignBottom !== 'undefined') {\n this.alignBottom = options.alignBottom;\n }\n if (typeof options.position !== 'undefined') {\n this.setPosition(options.position);\n }\n if (typeof options.zIndex !== 'undefined') {\n this.setZIndex(options.zIndex);\n }\n if (typeof options.closeBoxMargin !== 'undefined') {\n this.closeBoxMargin = options.closeBoxMargin;\n }\n if (typeof options.closeBoxURL !== 'undefined') {\n this.closeBoxURL = options.closeBoxURL;\n }\n if (typeof options.infoBoxClearance !== 'undefined') {\n this.infoBoxClearance = options.infoBoxClearance;\n }\n if (typeof options.isHidden !== 'undefined') {\n this.isHidden = options.isHidden;\n }\n if (typeof options.visible !== 'undefined') {\n this.isHidden = !options.visible;\n }\n if (typeof options.enableEventPropagation !== 'undefined') {\n this.enableEventPropagation = options.enableEventPropagation;\n }\n if (this.div) {\n this.draw();\n }\n };\n InfoBox.prototype.setContent = function (content) {\n this.content = content;\n if (this.div) {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n // Odd code required to make things work with MSIE.\n if (!this.fixedWidthSet) {\n this.div.style.width = '';\n }\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n if (!this.fixedWidthSet) {\n this.div.style.width = this.div.offsetWidth + 'px';\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n }\n this.addClickHandler();\n }\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n google.maps.event.trigger(this, 'content_changed');\n };\n InfoBox.prototype.setPosition = function (latLng) {\n this.position = latLng;\n if (this.div) {\n this.draw();\n }\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n google.maps.event.trigger(this, 'position_changed');\n };\n InfoBox.prototype.setVisible = function (isVisible) {\n this.isHidden = !isVisible;\n if (this.div) {\n this.div.style.visibility = this.isHidden ? 'hidden' : 'visible';\n }\n };\n InfoBox.prototype.setZIndex = function (index) {\n this.zIndex = index;\n if (this.div) {\n this.div.style.zIndex = index + '';\n }\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n google.maps.event.trigger(this, 'zindex_changed');\n };\n InfoBox.prototype.getContent = function () {\n return this.content;\n };\n InfoBox.prototype.getPosition = function () {\n return this.position;\n };\n InfoBox.prototype.getZIndex = function () {\n return this.zIndex;\n };\n InfoBox.prototype.getVisible = function () {\n var map = this.getMap();\n return typeof map === 'undefined' || map === null ? false : !this.isHidden;\n };\n InfoBox.prototype.show = function () {\n this.isHidden = false;\n if (this.div) {\n this.div.style.visibility = 'visible';\n }\n };\n InfoBox.prototype.hide = function () {\n this.isHidden = true;\n if (this.div) {\n this.div.style.visibility = 'hidden';\n }\n };\n InfoBox.prototype.open = function (map, anchor) {\n var _this = this;\n if (anchor) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.position = anchor.getPosition();\n this.moveListener = google.maps.event.addListener(anchor, 'position_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var position = anchor.getPosition();\n _this.setPosition(position);\n });\n this.mapListener = google.maps.event.addListener(anchor, 'map_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _this.setMap(anchor.map);\n });\n }\n this.setMap(map);\n if (this.div) {\n this.panBox();\n }\n };\n InfoBox.prototype.close = function () {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n if (this.eventListeners) {\n for (var _i = 0, _a = this.eventListeners; _i < _a.length; _i++) {\n var eventListener = _a[_i];\n google.maps.event.removeListener(eventListener);\n }\n this.eventListeners = null;\n }\n if (this.moveListener) {\n google.maps.event.removeListener(this.moveListener);\n this.moveListener = null;\n }\n if (this.mapListener) {\n google.maps.event.removeListener(this.mapListener);\n this.mapListener = null;\n }\n if (this.contextListener) {\n google.maps.event.removeListener(this.contextListener);\n this.contextListener = null;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.setMap(null);\n };\n InfoBox.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n if (!Object.prototype.hasOwnProperty.call(this, property)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n }\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return InfoBox;\n}());\n\nvar eventMap$d = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$d = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n if (position instanceof google.maps.LatLng) {\n instance.setPosition(position);\n }\n else {\n instance.setPosition(new google.maps.LatLng(position.lat, position.lng));\n }\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar defaultOptions$3 = {};\nfunction InfoBoxFunctional(_a) {\n var children = _a.children, anchor = _a.anchor, options = _a.options, position = _a.position, zIndex = _a.zIndex, onCloseClick = _a.onCloseClick, onDomReady = _a.onDomReady, onContentChanged = _a.onContentChanged, onPositionChanged = _a.onPositionChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), closeClickListener = _c[0], setCloseClickListener = _c[1];\n var _d = useState(null), domReadyClickListener = _d[0], setDomReadyClickListener = _d[1];\n var _e = useState(null), contentChangedClickListener = _e[0], setContentChangedClickListener = _e[1];\n var _f = useState(null), positionChangedClickListener = _f[0], setPositionChangedClickListener = _f[1];\n var _g = useState(null), zIndexChangedClickListener = _g[0], setZindexChangedClickListener = _g[1];\n var containerElementRef = useRef(null);\n // Order does matter\n useEffect(function () {\n if (map && instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (position && instance !== null) {\n var positionLatLng = position instanceof google.maps.LatLng\n ? position\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n : new google.maps.LatLng(position.lat, position.lng);\n instance.setPosition(positionLatLng);\n }\n }, [position]);\n useEffect(function () {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(function () {\n if (instance && onCloseClick) {\n if (closeClickListener !== null) {\n google.maps.event.removeListener(closeClickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(function () {\n if (instance && onDomReady) {\n if (domReadyClickListener !== null) {\n google.maps.event.removeListener(domReadyClickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(function () {\n if (instance && onContentChanged) {\n if (contentChangedClickListener !== null) {\n google.maps.event.removeListener(contentChangedClickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionChangedClickListener !== null) {\n google.maps.event.removeListener(positionChangedClickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zIndexChangedClickListener !== null) {\n google.maps.event.removeListener(zIndexChangedClickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n if (map) {\n var _a = options || defaultOptions$3, position_1 = _a.position, infoBoxOptions = __rest$1(_a, [\"position\"]);\n var positionLatLng = void 0;\n if (position_1 && !(position_1 instanceof google.maps.LatLng)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position_1.lat, position_1.lng);\n }\n var infoBox = new InfoBox(__assign(__assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n containerElementRef.current = document.createElement('div');\n setInstance(infoBox);\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoBox, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoBox, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoBox, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoBox, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoBox, 'zindex_changed', onZindexChanged));\n }\n infoBox.setContent(containerElementRef.current);\n if (anchor) {\n infoBox.open(map, anchor);\n }\n else if (infoBox.getPosition()) {\n infoBox.open(map);\n }\n else {\n invariant$1(false, 'You must provide either an anchor or a position prop for .');\n }\n if (onLoad) {\n onLoad(infoBox);\n }\n }\n return function () {\n if (instance !== null) {\n if (closeClickListener) {\n google.maps.event.removeListener(closeClickListener);\n }\n if (contentChangedClickListener) {\n google.maps.event.removeListener(contentChangedClickListener);\n }\n if (domReadyClickListener) {\n google.maps.event.removeListener(domReadyClickListener);\n }\n if (positionChangedClickListener) {\n google.maps.event.removeListener(positionChangedClickListener);\n }\n if (zIndexChangedClickListener) {\n google.maps.event.removeListener(zIndexChangedClickListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.close();\n }\n };\n }, []);\n return containerElementRef.current ? createPortal(Children.only(children), containerElementRef.current) : null;\n}\nvar InfoBoxF = memo(InfoBoxFunctional);\nvar InfoBoxComponent = /** @class */ (function (_super) {\n __extends(InfoBoxComponent, _super);\n function InfoBoxComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = null;\n _this.state = {\n infoBox: null,\n };\n _this.open = function (infoBox, anchor) {\n if (anchor) {\n if (_this.context !== null) {\n infoBox.open(_this.context, anchor);\n }\n }\n else if (infoBox.getPosition()) {\n if (_this.context !== null) {\n infoBox.open(_this.context);\n }\n }\n else {\n invariant$1(false, 'You must provide either an anchor or a position prop for .');\n }\n };\n _this.setInfoBoxCallback = function () {\n if (_this.state.infoBox !== null && _this.containerElement !== null) {\n _this.state.infoBox.setContent(_this.containerElement);\n _this.open(_this.state.infoBox, _this.props.anchor);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.infoBox);\n }\n }\n };\n return _this;\n }\n InfoBoxComponent.prototype.componentDidMount = function () {\n var _a = this.props.options || {}, position = _a.position, infoBoxOptions = __rest$1(_a, [\"position\"]);\n var positionLatLng;\n if (position && !(position instanceof google.maps.LatLng)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position.lat, position.lng);\n }\n var infoBox = new InfoBox(__assign(__assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: {},\n nextProps: this.props,\n instance: infoBox,\n });\n this.setState({ infoBox: infoBox }, this.setInfoBoxCallback);\n };\n InfoBoxComponent.prototype.componentDidUpdate = function (prevProps) {\n var infoBox = this.state.infoBox;\n if (infoBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: prevProps,\n nextProps: this.props,\n instance: infoBox,\n });\n }\n };\n InfoBoxComponent.prototype.componentWillUnmount = function () {\n var onUnmount = this.props.onUnmount;\n var infoBox = this.state.infoBox;\n if (infoBox !== null) {\n if (onUnmount) {\n onUnmount(infoBox);\n }\n unregisterEvents(this.registeredEvents);\n infoBox.close();\n }\n };\n InfoBoxComponent.prototype.render = function () {\n return this.containerElement ? createPortal(Children.only(this.props.children), this.containerElement) : null;\n };\n InfoBoxComponent.contextType = MapContext;\n return InfoBoxComponent;\n}(PureComponent));\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\nvar equal = /*@__PURE__*/getDefaultExportFromCjs(fastDeepEqual);\n\nconst ARRAY_TYPES = [\n Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nclass KDBush {\n\n /**\n * Creates an index from raw `ArrayBuffer` data.\n * @param {ArrayBuffer} data\n */\n static from(data) {\n if (!(data instanceof ArrayBuffer)) {\n throw new Error('Data must be an instance of ArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n if (magic !== 0xdb) {\n throw new Error('Data does not appear to be in a KDBush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, 2, 1);\n const [numItems] = new Uint32Array(data, 4, 1);\n\n return new KDBush(numItems, nodeSize, ArrayType, data);\n }\n\n /**\n * Creates an index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBuffer} [data] (For internal use only)\n */\n constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n const padCoords = (8 - idsByteSize % 8) % 8;\n\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n\n if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n this.data = data;\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = numItems * 2;\n this._finished = true;\n } else { // initialize a new index\n this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = 0;\n this._finished = false;\n\n // set header\n new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n new Uint32Array(this.data, 4, 1)[0] = numItems;\n }\n }\n\n /**\n * Add a point to the index.\n * @param {number} x\n * @param {number} y\n * @returns {number} An incremental index associated with the added item (starting from `0`).\n */\n add(x, y) {\n const index = this._pos >> 1;\n this.ids[index] = index;\n this.coords[this._pos++] = x;\n this.coords[this._pos++] = y;\n return index;\n }\n\n /**\n * Perform indexing of the added points.\n */\n finish() {\n const numAdded = this._pos >> 1;\n if (numAdded !== this.numItems) {\n throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n }\n // kd-sort both arrays for efficient search\n sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n this._finished = true;\n return this;\n }\n\n /**\n * Search the index for items within a given bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number[]} An array of indices correponding to the found items.\n */\n range(minX, minY, maxX, maxY) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n\n // recursively search for items in range in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n\n /**\n * Search the index for items within a given radius.\n * @param {number} qx\n * @param {number} qy\n * @param {number} r Query radius.\n * @returns {number[]} An array of indices correponding to the found items.\n */\n within(qx, qy, r) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n const r2 = r * r;\n\n // recursively search for items within radius in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1; // middle index\n\n // sort ids and coords around the middle index so that the halves lie\n // either left/right or top/bottom correspondingly (taking turns)\n select(ids, coords, m, left, right, axis);\n\n // recursively kd-sort first half and second half on the opposite axis\n sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, axis);\n }\n\n const t = coords[2 * k + axis];\n let i = left;\n let j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + axis] < t) i++;\n while (coords[2 * j + axis] > t) j--;\n }\n\n if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nconst defaultOptions$2 = {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n minPoints: 2, // minimum points to form a cluster\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n // properties to use for individual points when running the reducer\n map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nconst OFFSET_ZOOM = 2;\nconst OFFSET_ID = 3;\nconst OFFSET_PARENT = 4;\nconst OFFSET_NUM = 5;\nconst OFFSET_PROP = 6;\n\nclass Supercluster {\n constructor(options) {\n this.options = Object.assign(Object.create(defaultOptions$2), options);\n this.trees = new Array(this.options.maxZoom + 1);\n this.stride = this.options.reduce ? 7 : 6;\n this.clusterProps = [];\n }\n\n load(points) {\n const {log, minZoom, maxZoom} = this.options;\n\n if (log) console.time('total time');\n\n const timerId = `prepare ${ points.length } points`;\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point and index input points into a KD-tree\n const data = [];\n\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n if (!p.geometry) continue;\n\n const [lng, lat] = p.geometry.coordinates;\n const x = fround(lngX(lng));\n const y = fround(latY(lat));\n // store internal point/cluster data in flat numeric arrays for performance\n data.push(\n x, y, // projected point coordinates\n Infinity, // the last zoom the point was processed at\n i, // index of the source feature in the original input array\n -1, // parent cluster id\n 1 // number of points in a cluster\n );\n if (this.options.reduce) data.push(0); // noop\n }\n let tree = this.trees[maxZoom + 1] = this._createTree(data);\n\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (let z = maxZoom; z >= minZoom; z--) {\n const now = +Date.now();\n\n // create a new set of clusters for the zoom and index them with a KD-tree\n tree = this.trees[z] = this._createTree(this._cluster(tree, z));\n\n if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n\n return this;\n }\n\n getClusters(bbox, zoom) {\n let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n const minLat = Math.max(-90, Math.min(90, bbox[1]));\n let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n const tree = this.trees[this._limitZoom(zoom)];\n const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n const data = tree.data;\n const clusters = [];\n for (const id of ids) {\n const k = this.stride * id;\n clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n return clusters;\n }\n\n getChildren(clusterId) {\n const originId = this._getOriginId(clusterId);\n const originZoom = this._getOriginZoom(clusterId);\n const errorMsg = 'No cluster with the specified id.';\n\n const tree = this.trees[originZoom];\n if (!tree) throw new Error(errorMsg);\n\n const data = tree.data;\n if (originId * this.stride >= data.length) throw new Error(errorMsg);\n\n const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n const x = data[originId * this.stride];\n const y = data[originId * this.stride + 1];\n const ids = tree.within(x, y, r);\n const children = [];\n for (const id of ids) {\n const k = id * this.stride;\n if (data[k + OFFSET_PARENT] === clusterId) {\n children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n\n return children;\n }\n\n getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n const leaves = [];\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n\n getTile(z, x, y) {\n const tree = this.trees[this._limitZoom(z)];\n const z2 = Math.pow(2, z);\n const {extent, radius} = this.options;\n const p = radius / extent;\n const top = (y - p) / z2;\n const bottom = (y + 1 + p) / z2;\n\n const tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.data, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.data, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.data, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n\n getClusterExpansionZoom(clusterId) {\n let expansionZoom = this._getOriginZoom(clusterId) - 1;\n while (expansionZoom <= this.options.maxZoom) {\n const children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return expansionZoom;\n }\n\n _appendLeaves(result, clusterId, limit, offset, skipped) {\n const children = this.getChildren(clusterId);\n\n for (const child of children) {\n const props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n }\n\n _createTree(data) {\n const tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);\n for (let i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);\n tree.finish();\n tree.data = data;\n return tree;\n }\n\n _addTileFeatures(ids, data, x, y, z2, tile) {\n for (const i of ids) {\n const k = i * this.stride;\n const isCluster = data[k + OFFSET_NUM] > 1;\n\n let tags, px, py;\n if (isCluster) {\n tags = getClusterProperties(data, k, this.clusterProps);\n px = data[k];\n py = data[k + 1];\n } else {\n const p = this.points[data[k + OFFSET_ID]];\n tags = p.properties;\n const [lng, lat] = p.geometry.coordinates;\n px = lngX(lng);\n py = latY(lat);\n }\n\n const f = {\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (px * z2 - x)),\n Math.round(this.options.extent * (py * z2 - y))\n ]],\n tags\n };\n\n // assign id\n let id;\n if (isCluster || this.options.generateId) {\n // optionally generate id for points\n id = data[k + OFFSET_ID];\n } else {\n // keep id if already assigned\n id = this.points[data[k + OFFSET_ID]].id;\n }\n\n if (id !== undefined) f.id = id;\n\n tile.features.push(f);\n }\n }\n\n _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n }\n\n _cluster(tree, zoom) {\n const {radius, extent, reduce, minPoints} = this.options;\n const r = radius / (extent * Math.pow(2, zoom));\n const data = tree.data;\n const nextData = [];\n const stride = this.stride;\n\n // loop through each point\n for (let i = 0; i < data.length; i += stride) {\n // if we've already visited the point at this zoom level, skip it\n if (data[i + OFFSET_ZOOM] <= zoom) continue;\n data[i + OFFSET_ZOOM] = zoom;\n\n // find all nearby points\n const x = data[i];\n const y = data[i + 1];\n const neighborIds = tree.within(data[i], data[i + 1], r);\n\n const numPointsOrigin = data[i + OFFSET_NUM];\n let numPoints = numPointsOrigin;\n\n // count the number of points in a potential cluster\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n // filter out neighbors that are already processed\n if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];\n }\n\n // if there were neighbors to merge, and there are enough points to form a cluster\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n let wx = x * numPointsOrigin;\n let wy = y * numPointsOrigin;\n\n let clusterProperties;\n let clusterPropIndex = -1;\n\n // encode both zoom and point index on which the cluster originated -- offset by total length of features\n const id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;\n\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)\n\n const numPoints2 = data[k + OFFSET_NUM];\n wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center\n wy += data[k + 1] * numPoints2;\n\n data[k + OFFSET_PARENT] = id;\n\n if (reduce) {\n if (!clusterProperties) {\n clusterProperties = this._map(data, i, true);\n clusterPropIndex = this.clusterProps.length;\n this.clusterProps.push(clusterProperties);\n }\n reduce(clusterProperties, this._map(data, k));\n }\n }\n\n data[i + OFFSET_PARENT] = id;\n nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);\n if (reduce) nextData.push(clusterPropIndex);\n\n } else { // left points as unclustered\n for (let j = 0; j < stride; j++) nextData.push(data[i + j]);\n\n if (numPoints > 1) {\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom;\n for (let j = 0; j < stride; j++) nextData.push(data[k + j]);\n }\n }\n }\n }\n\n return nextData;\n }\n\n // get index of the point from which the cluster originated\n _getOriginId(clusterId) {\n return (clusterId - this.points.length) >> 5;\n }\n\n // get zoom of the point from which the cluster originated\n _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n\n _map(data, i, clone) {\n if (data[i + OFFSET_NUM] > 1) {\n const props = this.clusterProps[data[i + OFFSET_PROP]];\n return clone ? Object.assign({}, props) : props;\n }\n const original = this.points[data[i + OFFSET_ID]].properties;\n const result = this.options.map(original);\n return clone && result === original ? Object.assign({}, result) : result;\n }\n}\n\nfunction getClusterJSON(data, i, clusterProps) {\n return {\n type: 'Feature',\n id: data[i + OFFSET_ID],\n properties: getClusterProperties(data, i, clusterProps),\n geometry: {\n type: 'Point',\n coordinates: [xLng(data[i]), yLat(data[i + 1])]\n }\n };\n}\n\nfunction getClusterProperties(data, i, clusterProps) {\n const count = data[i + OFFSET_NUM];\n const abbrev =\n count >= 10000 ? `${Math.round(count / 1000) }k` :\n count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;\n const propIndex = data[i + OFFSET_PROP];\n const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);\n return Object.assign(properties, {\n cluster: true,\n cluster_id: data[i + OFFSET_ID],\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n const sin = Math.sin(lat * Math.PI / 180);\n const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n const y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\n/**\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * util class that creates a common set of convenience functions to wrap\n * shared behavior of Advanced Markers and Markers.\n */\nclass MarkerUtils {\n static isAdvancedMarkerAvailable(map) {\n return (google.maps.marker &&\n map.getMapCapabilities().isAdvancedMarkersAvailable === true);\n }\n static isAdvancedMarker(marker) {\n return (google.maps.marker &&\n marker instanceof google.maps.marker.AdvancedMarkerElement);\n }\n static setMap(marker, map) {\n if (this.isAdvancedMarker(marker)) {\n marker.map = map;\n }\n else {\n marker.setMap(map);\n }\n }\n static getPosition(marker) {\n // SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers\n if (this.isAdvancedMarker(marker)) {\n if (marker.position) {\n if (marker.position instanceof google.maps.LatLng) {\n return marker.position;\n }\n // since we can't cast to LatLngLiteral for reasons =(\n if (marker.position.lat && marker.position.lng) {\n return new google.maps.LatLng(marker.position.lat, marker.position.lng);\n }\n }\n return new google.maps.LatLng(null);\n }\n return marker.getPosition();\n }\n static getVisible(marker) {\n if (this.isAdvancedMarker(marker)) {\n /**\n * Always return true for Advanced Markers because the clusterer\n * uses getVisible as a way to count legacy markers not as an actual\n * indicator of visibility for some reason. Even when markers are hidden\n * Marker.getVisible returns `true` and this is used to set the marker count\n * on the cluster. See the behavior of Cluster.count\n */\n return true;\n }\n return marker.getVisible();\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Cluster {\n constructor({ markers, position }) {\n this.markers = markers;\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n }\n else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n get bounds() {\n if (this.markers.length === 0 && !this._position) {\n return;\n }\n const bounds = new google.maps.LatLngBounds(this._position, this._position);\n for (const marker of this.markers) {\n bounds.extend(MarkerUtils.getPosition(marker));\n }\n return bounds;\n }\n get position() {\n return this._position || this.bounds.getCenter();\n }\n /**\n * Get the count of **visible** markers.\n */\n get count() {\n return this.markers.filter((m) => MarkerUtils.getVisible(m)).length;\n }\n /**\n * Add a marker to the cluster.\n */\n push(marker) {\n this.markers.push(marker);\n }\n /**\n * Cleanup references and remove marker from map.\n */\n delete() {\n if (this.marker) {\n MarkerUtils.setMap(this.marker, null);\n this.marker = undefined;\n }\n this.markers.length = 0;\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns the markers visible in a padded map viewport\n *\n * @param map\n * @param mapCanvasProjection\n * @param markers The list of marker to filter\n * @param viewportPaddingPixels The padding in pixel\n * @returns The list of markers in the padded viewport\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPaddingPixels) => {\n const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPaddingPixels);\n return markers.filter((marker) => extendedMapBounds.contains(MarkerUtils.getPosition(marker)));\n};\n/**\n * Extends a bounds by a number of pixels in each direction\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, numPixels) => {\n const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, numPixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * Gets the extended bounds as a bbox [westLng, southLat, eastLng, northLat]\n */\nconst getPaddedViewport = (bounds, projection, pixels) => {\n const extended = extendBoundsToPaddedViewport(bounds, projection, pixels);\n const ne = extended.getNorthEast();\n const sw = extended.getSouthWest();\n return [sw.lng(), sw.lat(), ne.lng(), ne.lat()];\n};\n/**\n * Returns the distance between 2 positions.\n *\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n const R = 6371; // Radius of the Earth in km\n const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n const sinDLat = Math.sin(dLat / 2);\n const sinDLon = Math.sin(dLon / 2);\n const a = sinDLat * sinDLat +\n Math.cos((p1.lat * Math.PI) / 180) *\n Math.cos((p2.lat * Math.PI) / 180) *\n sinDLon *\n sinDLon;\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\n * Converts a LatLng bound to pixels.\n *\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest()),\n };\n};\n/**\n * Extends a pixel bounds by numPixels in all directions.\n *\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, numPixels) => {\n northEast.x += numPixels;\n northEast.y -= numPixels;\n southWest.x -= numPixels;\n southWest.y += numPixels;\n return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n const sw = projection.fromDivPixelToLatLng(southWest);\n const ne = projection.fromDivPixelToLatLng(northEast);\n return new google.maps.LatLngBounds(sw, ne);\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @hidden\n */\nclass AbstractAlgorithm {\n constructor({ maxZoom = 16 }) {\n this.maxZoom = maxZoom;\n }\n /**\n * Helper function to bypass clustering based upon some map state such as\n * zoom, number of markers, etc.\n *\n * ```typescript\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\n * if (shouldBypassClustering(map)) {\n * return this.noop({markers})\n * }\n * }\n * ```\n */\n noop({ markers, }) {\n return noop$1(markers);\n }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n super(options);\n this.viewportPadding = 60;\n this.viewportPadding = viewportPadding;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed: false,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n}\n/**\n * @hidden\n */\nconst noop$1 = (markers) => {\n const clusters = markers.map((marker) => new Cluster({\n position: MarkerUtils.getPosition(marker),\n markers: [marker],\n }));\n return clusters;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n super(options);\n this.clusters = [];\n this.state = { zoom: -1 };\n this.maxDistance = maxDistance;\n this.gridSize = gridSize;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n const state = { zoom: map.getZoom() };\n let changed = false;\n if (this.state.zoom >= this.maxZoom && state.zoom >= this.maxZoom) ;\n else {\n changed = !equal(this.state, state);\n }\n this.state = state;\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n cluster({ markers, map, mapCanvasProjection, }) {\n this.clusters = [];\n markers.forEach((marker) => {\n this.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n addToClosestCluster(marker, map, projection) {\n let maxDistance = this.maxDistance; // Some large number\n let cluster = null;\n for (let i = 0; i < this.clusters.length; i++) {\n const candidate = this.clusters[i];\n const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), MarkerUtils.getPosition(marker).toJSON());\n if (distance < maxDistance) {\n maxDistance = distance;\n cluster = candidate;\n }\n }\n if (cluster &&\n extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(MarkerUtils.getPosition(marker))) {\n cluster.push(marker);\n }\n else {\n const cluster = new Cluster({ markers: [marker] });\n this.clusters.push(cluster);\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var options = __rest(_a, []);\n super(options);\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n return {\n clusters: this.cluster({ markers, map, mapCanvasProjection }),\n changed: false,\n };\n }\n cluster(input) {\n return this.noop(input);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n super({ maxZoom });\n this.state = { zoom: -1 };\n this.superCluster = new Supercluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n }\n calculate(input) {\n let changed = false;\n const state = { zoom: input.map.getZoom() };\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (!changed) {\n if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {\n changed = !equal(this.state, state);\n }\n }\n this.state = state;\n if (changed) {\n this.clusters = this.cluster(input);\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map }) {\n return this.superCluster\n .getClusters([-180, -90, 180, 90], Math.round(map.getZoom()))\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterViewportAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60, viewportPadding = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\", \"viewportPadding\"]);\n super({ maxZoom, viewportPadding });\n this.superCluster = new Supercluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n this.state = { zoom: -1, view: [0, 0, 0, 0] };\n }\n calculate(input) {\n const state = {\n zoom: Math.round(input.map.getZoom()),\n view: getPaddedViewport(input.map.getBounds(), input.mapCanvasProjection, this.viewportPadding),\n };\n let changed = !equal(this.state, state);\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (changed) {\n this.clusters = this.cluster(input);\n this.state = state;\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map, mapCanvasProjection }) {\n /* recalculate new state because we can't use the cached version. */\n const state = {\n zoom: Math.round(map.getZoom()),\n view: getPaddedViewport(map.getBounds(), mapCanvasProjection, this.viewportPadding),\n };\n return this.superCluster\n .getClusters(state.view, state.zoom)\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n constructor(markers, clusters) {\n this.markers = { sum: markers.length };\n const clusterMarkerCounts = clusters.map((a) => a.count);\n const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min(...clusterMarkerCounts),\n max: Math.max(...clusterMarkerCounts),\n },\n };\n }\n}\nclass DefaultRenderer {\n /**\n * The default render function for the library used by {@link MarkerClusterer}.\n *\n * Currently set to use the following:\n *\n * ```typescript\n * // change color if this cluster has more markers than the mean cluster\n * const color =\n * count > Math.max(10, stats.clusters.markers.mean)\n * ? \"#ff0000\"\n * : \"#0000ff\";\n *\n * // create svg url with fill color\n * const svg = window.btoa(`\n * \n * \n * \n * \n * \n * `);\n *\n * // create marker using svg icon\n * return new google.maps.Marker({\n * position,\n * icon: {\n * url: `data:image/svg+xml;base64,${svg}`,\n * scaledSize: new google.maps.Size(45, 45),\n * },\n * label: {\n * text: String(count),\n * color: \"rgba(255,255,255,0.9)\",\n * fontSize: \"12px\",\n * },\n * // adjust zIndex to be above other markers\n * zIndex: 1000 + count,\n * });\n * ```\n */\n render({ count, position }, stats, map) {\n // change color if this cluster has more markers than the mean cluster\n const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\";\n // create svg literal with fill color\n const svg = `\n\n\n\n${count}\n`;\n const title = `Cluster of ${count} markers`, \n // adjust zIndex to be above other markers\n zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;\n if (MarkerUtils.isAdvancedMarkerAvailable(map)) {\n // create cluster SVG element\n const parser = new DOMParser();\n const svgEl = parser.parseFromString(svg, \"image/svg+xml\").documentElement;\n svgEl.setAttribute(\"transform\", \"translate(0 25)\");\n const clusterOptions = {\n map,\n position,\n zIndex,\n title,\n content: svgEl,\n };\n return new google.maps.marker.AdvancedMarkerElement(clusterOptions);\n }\n const clusterOptions = {\n position,\n zIndex,\n title,\n icon: {\n url: `data:image/svg+xml;base64,${btoa(svg)}`,\n anchor: new google.maps.Point(25, 25),\n },\n };\n return new google.maps.Marker(clusterOptions);\n }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (let property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\n * @ignore\n */\nclass OverlayViewSafe {\n constructor() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n constructor({ map, markers = [], algorithmOptions = {}, algorithm = new SuperClusterAlgorithm(algorithmOptions), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n super();\n this.markers = [...markers];\n this.clusters = [];\n this.algorithm = algorithm;\n this.renderer = renderer;\n this.onClusterClick = onClusterClick;\n if (map) {\n this.setMap(map);\n }\n }\n addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n this.markers.push(marker);\n if (!noDraw) {\n this.render();\n }\n }\n addMarkers(markers, noDraw) {\n markers.forEach((marker) => {\n this.addMarker(marker, true);\n });\n if (!noDraw) {\n this.render();\n }\n }\n removeMarker(marker, noDraw) {\n const index = this.markers.indexOf(marker);\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n MarkerUtils.setMap(marker, null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n if (!noDraw) {\n this.render();\n }\n return true;\n }\n removeMarkers(markers, noDraw) {\n let removed = false;\n markers.forEach((marker) => {\n removed = this.removeMarker(marker, true) || removed;\n });\n if (removed && !noDraw) {\n this.render();\n }\n return removed;\n }\n clearMarkers(noDraw) {\n this.markers.length = 0;\n if (!noDraw) {\n this.render();\n }\n }\n /**\n * Recalculates and draws all the marker clusters.\n */\n render() {\n const map = this.getMap();\n if (map instanceof google.maps.Map && map.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n const { clusters, changed } = this.algorithm.calculate({\n markers: this.markers,\n map,\n mapCanvasProjection: this.getProjection(),\n });\n // Allow algorithms to return flag on whether the clusters/markers have changed.\n if (changed || changed == undefined) {\n // Accumulate the markers of the clusters composed of a single marker.\n // Those clusters directly use the marker.\n // Clusters with more than one markers use a group marker generated by a renderer.\n const singleMarker = new Set();\n for (const cluster of clusters) {\n if (cluster.markers.length == 1) {\n singleMarker.add(cluster.markers[0]);\n }\n }\n const groupMarkers = [];\n // Iterate the clusters that are currently rendered.\n for (const cluster of this.clusters) {\n if (cluster.marker == null) {\n continue;\n }\n if (cluster.markers.length == 1) {\n if (!singleMarker.has(cluster.marker)) {\n // The marker:\n // - was previously rendered because it is from a cluster with 1 marker,\n // - should no more be rendered as it is not in singleMarker.\n MarkerUtils.setMap(cluster.marker, null);\n }\n }\n else {\n // Delay the removal of old group markers to avoid flickering.\n groupMarkers.push(cluster.marker);\n }\n }\n this.clusters = clusters;\n this.renderClusters();\n // Delayed removal of the markers of the former groups.\n requestAnimationFrame(() => groupMarkers.forEach((marker) => MarkerUtils.setMap(marker, null)));\n }\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n reset() {\n this.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n this.clusters.forEach((cluster) => cluster.delete());\n this.clusters = [];\n }\n renderClusters() {\n // Generate stats to pass to renderers.\n const stats = new ClusterStats(this.markers, this.clusters);\n const map = this.getMap();\n this.clusters.forEach((cluster) => {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n }\n else {\n // Generate the marker to represent the group.\n cluster.marker = this.renderer.render(cluster, stats, map);\n // Make sure all individual markers are removed from the map.\n cluster.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n if (this.onClusterClick) {\n cluster.marker.addListener(\"click\", \n /* istanbul ignore next */\n (event) => {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n this.onClusterClick(event, cluster, map);\n });\n }\n }\n MarkerUtils.setMap(cluster.marker, map);\n });\n }\n}\n\nvar index_esm = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AbstractAlgorithm: AbstractAlgorithm,\n AbstractViewportAlgorithm: AbstractViewportAlgorithm,\n Cluster: Cluster,\n ClusterStats: ClusterStats,\n DefaultRenderer: DefaultRenderer,\n GridAlgorithm: GridAlgorithm,\n MarkerClusterer: MarkerClusterer,\n get MarkerClustererEvents () { return MarkerClustererEvents; },\n MarkerUtils: MarkerUtils,\n NoopAlgorithm: NoopAlgorithm,\n SuperClusterAlgorithm: SuperClusterAlgorithm,\n SuperClusterViewportAlgorithm: SuperClusterViewportAlgorithm,\n defaultOnClusterClickHandler: defaultOnClusterClickHandler,\n distanceBetweenPoints: distanceBetweenPoints,\n extendBoundsToPaddedViewport: extendBoundsToPaddedViewport,\n extendPixelBounds: extendPixelBounds,\n filterMarkersToPaddedViewport: filterMarkersToPaddedViewport,\n getPaddedViewport: getPaddedViewport,\n noop: noop$1,\n pixelBoundsToLatLngBounds: pixelBoundsToLatLngBounds\n});\n\nfunction useGoogleMarkerClusterer(options) {\n var map = useGoogleMap();\n var _a = useState(null), markerClusterer = _a[0], setMarkerClusterer = _a[1];\n useEffect(function () {\n if (map && markerClusterer === null) {\n var markerCluster = new MarkerClusterer(__assign(__assign({}, options), { map: map }));\n setMarkerClusterer(markerCluster);\n }\n }, [map]);\n return markerClusterer;\n}\n/** Wrapper around [@googlemaps/markerclusterer](https://github.com/googlemaps/js-markerclusterer)\n *\n * Accepts {@link MarkerClustererOptionsSubset} which is a subset of {@link MarkerClustererOptions}\n */\nfunction GoogleMarkerClusterer(_a) {\n var children = _a.children, options = _a.options;\n var markerClusterer = useGoogleMarkerClusterer(options);\n return markerClusterer !== null ? children(markerClusterer) : null;\n}\nvar GoogleMarkerClusterer$1 = memo(GoogleMarkerClusterer);\n\nvar eventMap$c = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$c = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nfunction InfoWindowFunctional(_a) {\n var children = _a.children, anchor = _a.anchor, options = _a.options, position = _a.position, zIndex = _a.zIndex, onCloseClick = _a.onCloseClick, onDomReady = _a.onDomReady, onContentChanged = _a.onContentChanged, onPositionChanged = _a.onPositionChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), closeclickListener = _c[0], setCloseClickListener = _c[1];\n var _d = useState(null), domreadyclickListener = _d[0], setDomReadyClickListener = _d[1];\n var _e = useState(null), contentchangedclickListener = _e[0], setContentChangedClickListener = _e[1];\n var _f = useState(null), positionchangedclickListener = _f[0], setPositionChangedClickListener = _f[1];\n var _g = useState(null), zindexchangedclickListener = _g[0], setZindexChangedClickListener = _g[1];\n var containerElementRef = useRef(null);\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [position]);\n useEffect(function () {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(function () {\n if (instance && onCloseClick) {\n if (closeclickListener !== null) {\n google.maps.event.removeListener(closeclickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(function () {\n if (instance && onDomReady) {\n if (domreadyclickListener !== null) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(function () {\n if (instance && onContentChanged) {\n if (contentchangedclickListener !== null) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionchangedclickListener !== null) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zindexchangedclickListener !== null) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n var infoWindow = new google.maps.InfoWindow(__assign({}, (options || {})));\n setInstance(infoWindow);\n containerElementRef.current = document.createElement('div');\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoWindow, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoWindow, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoWindow, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoWindow, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoWindow, 'zindex_changed', onZindexChanged));\n }\n infoWindow.setContent(containerElementRef.current);\n if (position) {\n infoWindow.setPosition(position);\n }\n if (zIndex) {\n infoWindow.setZIndex(zIndex);\n }\n if (anchor) {\n infoWindow.open(map, anchor);\n }\n else if (infoWindow.getPosition()) {\n infoWindow.open(map);\n }\n else {\n invariant$1(false, \"You must provide either an anchor (typically render it inside a ) or a position props for .\");\n }\n if (onLoad) {\n onLoad(infoWindow);\n }\n return function () {\n if (closeclickListener) {\n google.maps.event.removeListener(closeclickListener);\n }\n if (contentchangedclickListener) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n if (domreadyclickListener) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n if (positionchangedclickListener) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n if (zindexchangedclickListener) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n if (onUnmount) {\n onUnmount(infoWindow);\n }\n infoWindow.close();\n };\n }, []);\n return containerElementRef.current ? (createPortal(Children.only(children), containerElementRef.current)) : (null);\n}\nvar InfoWindowF = memo(InfoWindowFunctional);\nvar InfoWindow = /** @class */ (function (_super) {\n __extends(InfoWindow, _super);\n function InfoWindow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = null;\n _this.state = {\n infoWindow: null,\n };\n _this.open = function (infoWindow, anchor) {\n if (anchor) {\n infoWindow.open(_this.context, anchor);\n }\n else if (infoWindow.getPosition()) {\n infoWindow.open(_this.context);\n }\n else {\n invariant$1(false, \"You must provide either an anchor (typically render it inside a ) or a position props for .\");\n }\n };\n _this.setInfoWindowCallback = function () {\n if (_this.state.infoWindow !== null && _this.containerElement !== null) {\n _this.state.infoWindow.setContent(_this.containerElement);\n _this.open(_this.state.infoWindow, _this.props.anchor);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.infoWindow);\n }\n }\n };\n return _this;\n }\n InfoWindow.prototype.componentDidMount = function () {\n var infoWindow = new google.maps.InfoWindow(__assign({}, (this.props.options || {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: {},\n nextProps: this.props,\n instance: infoWindow,\n });\n this.setState(function () {\n return {\n infoWindow: infoWindow,\n };\n }, this.setInfoWindowCallback);\n };\n InfoWindow.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.infoWindow,\n });\n }\n };\n InfoWindow.prototype.componentWillUnmount = function () {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.infoWindow);\n }\n this.state.infoWindow.close();\n }\n };\n InfoWindow.prototype.render = function () {\n return this.containerElement ? (createPortal(Children.only(this.props.children), this.containerElement)) : (null);\n };\n InfoWindow.contextType = MapContext;\n return InfoWindow;\n}(PureComponent));\n\nvar eventMap$b = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$b = {\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n path: function (instance, path) {\n instance.setPath(path);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nvar defaultOptions$1 = {};\nfunction PolylineFunctional(_a) {\n var options = _a.options, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, path = _a.path, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n var polyline = new google.maps.Polyline(__assign(__assign({}, (options || defaultOptions$1)), { map: map }));\n if (path) {\n polyline.setPath(path);\n }\n if (typeof visible !== 'undefined') {\n polyline.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polyline.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polyline.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polyline, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polyline, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polyline, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polyline, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polyline, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polyline, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polyline, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polyline, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polyline, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polyline, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polyline, 'drag', onDrag));\n }\n setInstance(polyline);\n if (onLoad) {\n onLoad(polyline);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polyline);\n }\n polyline.setMap(null);\n };\n }, []);\n return null;\n}\nvar PolylineF = memo(PolylineFunctional);\nvar Polyline = /** @class */ (function (_super) {\n __extends(Polyline, _super);\n function Polyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n polyline: null,\n };\n _this.setPolylineCallback = function () {\n if (_this.state.polyline !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.polyline);\n }\n };\n return _this;\n }\n Polyline.prototype.componentDidMount = function () {\n var polyline = new google.maps.Polyline(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: {},\n nextProps: this.props,\n instance: polyline,\n });\n this.setState(function setPolyline() {\n return {\n polyline: polyline,\n };\n }, this.setPolylineCallback);\n };\n Polyline.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.polyline !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polyline,\n });\n }\n };\n Polyline.prototype.componentWillUnmount = function () {\n if (this.state.polyline !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polyline);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polyline.setMap(null);\n }\n };\n Polyline.prototype.render = function () {\n return null;\n };\n Polyline.contextType = MapContext;\n return Polyline;\n}(PureComponent));\n\nvar eventMap$a = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$a = {\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n path: function (instance, path) {\n instance.setPath(path);\n },\n paths: function (instance, paths) {\n instance.setPaths(paths);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction PolygonFunctional(_a) {\n var options = _a.options, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, path = _a.path, paths = _a.paths, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onLoad = _a.onLoad, onUnmount = _a.onUnmount, onEdit = _a.onEdit;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(function () {\n if (typeof paths !== 'undefined' && instance !== null) {\n instance.setPaths(paths);\n }\n }, [instance, paths]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance) {\n google.maps.event.addListener(instance.getPath(), 'insert_at', function () {\n onEdit === null || onEdit === void 0 ? void 0 : onEdit(instance);\n });\n google.maps.event.addListener(instance.getPath(), 'set_at', function () {\n onEdit === null || onEdit === void 0 ? void 0 : onEdit(instance);\n });\n }\n }, [instance, onEdit]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n var polygon = new google.maps.Polygon(__assign(__assign({}, (options || {})), { map: map }));\n if (path) {\n polygon.setPath(path);\n }\n if (paths) {\n polygon.setPaths(paths);\n }\n if (typeof visible !== 'undefined') {\n polygon.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polygon.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polygon.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polygon, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polygon, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polygon, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polygon, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polygon, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polygon, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polygon, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polygon, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polygon, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polygon, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polygon, 'drag', onDrag));\n }\n setInstance(polygon);\n if (onLoad) {\n onLoad(polygon);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polygon);\n }\n polygon.setMap(null);\n };\n }, []);\n return null;\n}\nvar PolygonF = memo(PolygonFunctional);\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n polygon: null,\n };\n _this.setPolygonCallback = function () {\n if (_this.state.polygon !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.polygon);\n }\n };\n return _this;\n }\n Polygon.prototype.componentDidMount = function () {\n var polygon = new google.maps.Polygon(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: {},\n nextProps: this.props,\n instance: polygon,\n });\n this.setState(function setPolygon() {\n return {\n polygon: polygon,\n };\n }, this.setPolygonCallback);\n };\n Polygon.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.polygon !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polygon,\n });\n }\n };\n Polygon.prototype.componentWillUnmount = function () {\n if (this.state.polygon !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polygon);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polygon && this.state.polygon.setMap(null);\n }\n };\n Polygon.prototype.render = function () {\n return null;\n };\n Polygon.contextType = MapContext;\n return Polygon;\n}(PureComponent));\n\nvar eventMap$9 = {\n onBoundsChanged: 'bounds_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$9 = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction RectangleFunctional(_a) {\n var options = _a.options, bounds = _a.bounds, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onBoundsChanged = _a.onBoundsChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightClickListener = _l[0], setRightClickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n var _p = useState(null), boundsChangedListener = _p[0], setBoundsChangedListener = _p[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof bounds !== 'undefined' && instance !== null) {\n instance.setBounds(bounds);\n }\n }, [instance, bounds]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightClickListener !== null) {\n google.maps.event.removeListener(rightClickListener);\n }\n setRightClickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onBoundsChanged) {\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n setBoundsChangedListener(google.maps.event.addListener(instance, 'bounds_changed', onBoundsChanged));\n }\n }, [onBoundsChanged]);\n useEffect(function () {\n var rectangle = new google.maps.Rectangle(__assign(__assign({}, (options || {})), { map: map }));\n if (typeof visible !== 'undefined') {\n rectangle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n rectangle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n rectangle.setDraggable(draggable);\n }\n if (typeof bounds !== 'undefined') {\n rectangle.setBounds(bounds);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(rectangle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(rectangle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(rectangle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(rectangle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(rectangle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(rectangle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(rectangle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(rectangle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightClickListener(google.maps.event.addListener(rectangle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(rectangle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(rectangle, 'drag', onDrag));\n }\n if (onBoundsChanged) {\n setBoundsChangedListener(google.maps.event.addListener(rectangle, 'bounds_changed', onBoundsChanged));\n }\n setInstance(rectangle);\n if (onLoad) {\n onLoad(rectangle);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightClickListener !== null) {\n google.maps.event.removeListener(rightClickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n if (onUnmount) {\n onUnmount(rectangle);\n }\n rectangle.setMap(null);\n };\n }, []);\n return null;\n}\nvar RectangleF = memo(RectangleFunctional);\nvar Rectangle = /** @class */ (function (_super) {\n __extends(Rectangle, _super);\n function Rectangle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n rectangle: null,\n };\n _this.setRectangleCallback = function () {\n if (_this.state.rectangle !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.rectangle);\n }\n };\n return _this;\n }\n Rectangle.prototype.componentDidMount = function () {\n var rectangle = new google.maps.Rectangle(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: {},\n nextProps: this.props,\n instance: rectangle,\n });\n this.setState(function setRectangle() {\n return {\n rectangle: rectangle,\n };\n }, this.setRectangleCallback);\n };\n Rectangle.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.rectangle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.rectangle,\n });\n }\n };\n Rectangle.prototype.componentWillUnmount = function () {\n if (this.state.rectangle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.rectangle);\n }\n unregisterEvents(this.registeredEvents);\n this.state.rectangle.setMap(null);\n }\n };\n Rectangle.prototype.render = function () {\n return null;\n };\n Rectangle.contextType = MapContext;\n return Rectangle;\n}(PureComponent));\n\nvar eventMap$8 = {\n onCenterChanged: 'center_changed',\n onRadiusChanged: 'radius_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$8 = {\n center: function (instance, center) {\n instance.setCenter(center);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n radius: function (instance, radius) {\n instance.setRadius(radius);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nvar defaultOptions = {};\nfunction CircleFunctional(_a) {\n var options = _a.options, center = _a.center, radius = _a.radius, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onCenterChanged = _a.onCenterChanged, onRadiusChanged = _a.onRadiusChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n var _p = useState(null), centerChangedListener = _p[0], setCenterChangedListener = _p[1];\n var _q = useState(null), radiusChangedListener = _q[0], setRadiusChangedListener = _q[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof radius === 'number' && instance !== null) {\n instance.setRadius(radius);\n }\n }, [instance, radius]);\n useEffect(function () {\n if (typeof center !== 'undefined' && instance !== null) {\n instance.setCenter(center);\n }\n }, [instance, center]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(instance, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onRadiusChanged) {\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n setRadiusChangedListener(google.maps.event.addListener(instance, 'radius_changed', onRadiusChanged));\n }\n }, [onRadiusChanged]);\n useEffect(function () {\n var circle = new google.maps.Circle(__assign(__assign({}, (options || defaultOptions)), { map: map }));\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof center !== 'undefined') {\n circle.setCenter(center);\n }\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof visible !== 'undefined') {\n circle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n circle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n circle.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(circle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(circle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(circle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(circle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(circle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(circle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(circle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(circle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(circle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(circle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(circle, 'drag', onDrag));\n }\n if (onCenterChanged) {\n setCenterChangedListener(google.maps.event.addListener(circle, 'center_changed', onCenterChanged));\n }\n if (onRadiusChanged) {\n setRadiusChangedListener(google.maps.event.addListener(circle, 'radius_changed', onRadiusChanged));\n }\n setInstance(circle);\n if (onLoad) {\n onLoad(circle);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n if (onUnmount) {\n onUnmount(circle);\n }\n circle.setMap(null);\n };\n }, []);\n return null;\n}\nvar CircleF = memo(CircleFunctional);\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n circle: null,\n };\n _this.setCircleCallback = function () {\n if (_this.state.circle !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.circle);\n }\n };\n return _this;\n }\n Circle.prototype.componentDidMount = function () {\n var circle = new google.maps.Circle(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: {},\n nextProps: this.props,\n instance: circle,\n });\n this.setState(function setCircle() {\n return {\n circle: circle,\n };\n }, this.setCircleCallback);\n };\n Circle.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.circle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.circle,\n });\n }\n };\n Circle.prototype.componentWillUnmount = function () {\n var _a;\n if (this.state.circle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.circle);\n }\n unregisterEvents(this.registeredEvents);\n (_a = this.state.circle) === null || _a === void 0 ? void 0 : _a.setMap(null);\n }\n };\n Circle.prototype.render = function () {\n return null;\n };\n Circle.contextType = MapContext;\n return Circle;\n}(PureComponent));\n\nvar eventMap$7 = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onAddFeature: 'addfeature',\n onRemoveFeature: 'removefeature',\n onRemoveProperty: 'removeproperty',\n onSetGeometry: 'setgeometry',\n onSetProperty: 'setproperty',\n};\nvar updaterMap$7 = {\n add: function (instance, feature) {\n instance.add(feature);\n },\n addgeojson: function (instance, geojson, options) {\n instance.addGeoJson(geojson, options);\n },\n contains: function (instance, feature) {\n instance.contains(feature);\n },\n foreach: function (instance, callback) {\n instance.forEach(callback);\n },\n loadgeojson: function (instance, url, options, callback) {\n instance.loadGeoJson(url, options, callback);\n },\n overridestyle: function (instance, feature, style) {\n instance.overrideStyle(feature, style);\n },\n remove: function (instance, feature) {\n instance.remove(feature);\n },\n revertstyle: function (instance, feature) {\n instance.revertStyle(feature);\n },\n controlposition: function (instance, controlPosition) {\n instance.setControlPosition(controlPosition);\n },\n controls: function (instance, controls) {\n instance.setControls(controls);\n },\n drawingmode: function (instance, mode) {\n instance.setDrawingMode(mode);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n style: function (instance, style) {\n instance.setStyle(style);\n },\n togeojson: function (instance, callback) {\n instance.toGeoJson(callback);\n },\n};\nfunction DataFunctional(_a) {\n var options = _a.options, onClick = _a.onClick, onDblClick = _a.onDblClick, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onAddFeature = _a.onAddFeature, onRemoveFeature = _a.onRemoveFeature, onRemoveProperty = _a.onRemoveProperty, onSetGeometry = _a.onSetGeometry, onSetProperty = _a.onSetProperty, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), mousedownListener = _d[0], setMousedownListener = _d[1];\n var _e = useState(null), mousemoveListener = _e[0], setMousemoveListener = _e[1];\n var _f = useState(null), mouseoutListener = _f[0], setMouseoutListener = _f[1];\n var _g = useState(null), mouseoverListener = _g[0], setMouseoverListener = _g[1];\n var _h = useState(null), mouseupListener = _h[0], setMouseupListener = _h[1];\n var _j = useState(null), rightclickListener = _j[0], setRightclickListener = _j[1];\n var _k = useState(null), clickListener = _k[0], setClickListener = _k[1];\n var _l = useState(null), addFeatureListener = _l[0], setAddFeatureListener = _l[1];\n var _m = useState(null), removeFeatureListener = _m[0], setRemoveFeatureListener = _m[1];\n var _o = useState(null), removePropertyListener = _o[0], setRemovePropertyListener = _o[1];\n var _p = useState(null), setGeometryListener = _p[0], setSetGeometryListener = _p[1];\n var _q = useState(null), setPropertyListener = _q[0], setSetPropertyListener = _q[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onAddFeature) {\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n setAddFeatureListener(google.maps.event.addListener(instance, 'addfeature', onAddFeature));\n }\n }, [onAddFeature]);\n useEffect(function () {\n if (instance && onRemoveFeature) {\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n setRemoveFeatureListener(google.maps.event.addListener(instance, 'removefeature', onRemoveFeature));\n }\n }, [onRemoveFeature]);\n useEffect(function () {\n if (instance && onRemoveProperty) {\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n setRemovePropertyListener(google.maps.event.addListener(instance, 'removeproperty', onRemoveProperty));\n }\n }, [onRemoveProperty]);\n useEffect(function () {\n if (instance && onSetGeometry) {\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n setSetGeometryListener(google.maps.event.addListener(instance, 'setgeometry', onSetGeometry));\n }\n }, [onSetGeometry]);\n useEffect(function () {\n if (instance && onSetProperty) {\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n setSetPropertyListener(google.maps.event.addListener(instance, 'setproperty', onSetProperty));\n }\n }, [onSetProperty]);\n useEffect(function () {\n if (map !== null) {\n var data = new google.maps.Data(__assign(__assign({}, (options || {})), { map: map }));\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(data, 'dblclick', onDblClick));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(data, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(data, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(data, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(data, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(data, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(data, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(data, 'click', onClick));\n }\n if (onAddFeature) {\n setAddFeatureListener(google.maps.event.addListener(data, 'addfeature', onAddFeature));\n }\n if (onRemoveFeature) {\n setRemoveFeatureListener(google.maps.event.addListener(data, 'removefeature', onRemoveFeature));\n }\n if (onRemoveProperty) {\n setRemovePropertyListener(google.maps.event.addListener(data, 'removeproperty', onRemoveProperty));\n }\n if (onSetGeometry) {\n setSetGeometryListener(google.maps.event.addListener(data, 'setgeometry', onSetGeometry));\n }\n if (onSetProperty) {\n setSetPropertyListener(google.maps.event.addListener(data, 'setproperty', onSetProperty));\n }\n setInstance(data);\n if (onLoad) {\n onLoad(data);\n }\n }\n return function () {\n if (instance) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar DataF = memo(DataFunctional);\nvar Data = /** @class */ (function (_super) {\n __extends(Data, _super);\n function Data() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n data: null,\n };\n _this.setDataCallback = function () {\n if (_this.state.data !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.data);\n }\n };\n return _this;\n }\n Data.prototype.componentDidMount = function () {\n if (this.context !== null) {\n var data_1 = new google.maps.Data(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: {},\n nextProps: this.props,\n instance: data_1,\n });\n this.setState(function () {\n return {\n data: data_1,\n };\n }, this.setDataCallback);\n }\n };\n Data.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.data !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.data,\n });\n }\n };\n Data.prototype.componentWillUnmount = function () {\n if (this.state.data !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.data);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.data) {\n this.state.data.setMap(null);\n }\n }\n };\n Data.prototype.render = function () {\n return null;\n };\n Data.contextType = MapContext;\n return Data;\n}(PureComponent));\n\nvar eventMap$6 = {\n onClick: 'click',\n onDefaultViewportChanged: 'defaultviewport_changed',\n onStatusChanged: 'status_changed',\n};\nvar updaterMap$6 = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n url: function (instance, url) {\n instance.setUrl(url);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar KmlLayer = /** @class */ (function (_super) {\n __extends(KmlLayer, _super);\n function KmlLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n kmlLayer: null,\n };\n _this.setKmlLayerCallback = function () {\n if (_this.state.kmlLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.kmlLayer);\n }\n };\n return _this;\n }\n KmlLayer.prototype.componentDidMount = function () {\n var kmlLayer = new google.maps.KmlLayer(__assign(__assign({}, this.props.options), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: {},\n nextProps: this.props,\n instance: kmlLayer,\n });\n this.setState(function setLmlLayer() {\n return {\n kmlLayer: kmlLayer,\n };\n }, this.setKmlLayerCallback);\n };\n KmlLayer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.kmlLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.kmlLayer,\n });\n }\n };\n KmlLayer.prototype.componentWillUnmount = function () {\n if (this.state.kmlLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.kmlLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.kmlLayer.setMap(null);\n }\n };\n KmlLayer.prototype.render = function () {\n return null;\n };\n KmlLayer.contextType = MapContext;\n return KmlLayer;\n}(PureComponent));\n\nfunction getOffsetOverride(containerElement, getPixelPositionOffset) {\n return typeof getPixelPositionOffset === 'function'\n ? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)\n : {\n x: 0,\n y: 0,\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLng(inst, Type) { return new Type(inst.lat, inst.lng); }\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLngBounds(inst, Type) {\n return new Type(new google.maps.LatLng(inst.ne.lat, inst.ne.lng), new google.maps.LatLng(inst.sw.lat, inst.sw.lng));\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction ensureOfType(inst, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfactory\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction ensureOfTypeBounds(inst, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfactory\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction getLayoutStylesByBounds(mapCanvasProjection, offset, bounds) {\n var ne = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast());\n var sw = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest());\n if (ne && sw) {\n return {\n left: \"\".concat(sw.x + offset.x, \"px\"),\n top: \"\".concat(ne.y + offset.y, \"px\"),\n width: \"\".concat(ne.x - sw.x - offset.x, \"px\"),\n height: \"\".concat(sw.y - ne.y - offset.y, \"px\"),\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStylesByPosition(mapCanvasProjection, offset, position) {\n var point = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(position);\n if (point) {\n var x = point.x, y = point.y;\n return {\n left: \"\".concat(x + offset.x, \"px\"),\n top: \"\".concat(y + offset.y, \"px\"),\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStyles(mapCanvasProjection, offset, bounds, position) {\n return bounds !== undefined\n ? getLayoutStylesByBounds(mapCanvasProjection, offset, ensureOfTypeBounds(bounds, google.maps.LatLngBounds, createLatLngBounds))\n : getLayoutStylesByPosition(mapCanvasProjection, offset, ensureOfType(position, google.maps.LatLng, createLatLng));\n}\nfunction arePositionsEqual(currentPosition, previousPosition) {\n return currentPosition.left === previousPosition.left\n && currentPosition.top === previousPosition.top\n && currentPosition.width === previousPosition.height\n && currentPosition.height === previousPosition.height;\n}\n\nfunction createOverlay(container, pane, position, bounds, getPixelPositionOffset) {\n var Overlay = /** @class */ (function (_super) {\n __extends(Overlay, _super);\n function Overlay(container, pane, position, bounds) {\n var _this = _super.call(this) || this;\n _this.container = container;\n _this.pane = pane;\n _this.position = position;\n _this.bounds = bounds;\n return _this;\n }\n Overlay.prototype.onAdd = function () {\n var _a;\n var pane = (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a[this.pane];\n pane === null || pane === void 0 ? void 0 : pane.appendChild(this.container);\n };\n Overlay.prototype.draw = function () {\n var projection = this.getProjection();\n var offset = __assign({}, (this.container\n ? getOffsetOverride(this.container, getPixelPositionOffset)\n : {\n x: 0,\n y: 0,\n }));\n var layoutStyles = getLayoutStyles(projection, offset, this.bounds, this.position);\n for (var _i = 0, _a = Object.entries(layoutStyles); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.container.style[key] = value;\n }\n };\n Overlay.prototype.onRemove = function () {\n if (this.container.parentNode !== null) {\n this.container.parentNode.removeChild(this.container);\n }\n };\n return Overlay;\n }(google.maps.OverlayView));\n return new Overlay(container, pane, position, bounds);\n}\n\nfunction convertToLatLngString(latLngLike) {\n if (!latLngLike) {\n return '';\n }\n var latLng = latLngLike instanceof google.maps.LatLng\n ? latLngLike\n : new google.maps.LatLng(latLngLike.lat, latLngLike.lng);\n return latLng + '';\n}\nfunction convertToLatLngBoundsString(latLngBoundsLike) {\n if (!latLngBoundsLike) {\n return '';\n }\n var latLngBounds = latLngBoundsLike instanceof google.maps.LatLngBounds\n ? latLngBoundsLike\n : new google.maps.LatLngBounds(new google.maps.LatLng(latLngBoundsLike.south, latLngBoundsLike.east), new google.maps.LatLng(latLngBoundsLike.north, latLngBoundsLike.west));\n return latLngBounds + '';\n}\nvar FLOAT_PANE = \"floatPane\";\nvar MAP_PANE = \"mapPane\";\nvar MARKER_LAYER = \"markerLayer\";\nvar OVERLAY_LAYER = \"overlayLayer\";\nvar OVERLAY_MOUSE_TARGET = \"overlayMouseTarget\";\nfunction OverlayViewFunctional(_a) {\n var position = _a.position, bounds = _a.bounds, mapPaneName = _a.mapPaneName, zIndex = _a.zIndex, onLoad = _a.onLoad, onUnmount = _a.onUnmount, getPixelPositionOffset = _a.getPixelPositionOffset, children = _a.children;\n var map = useContext(MapContext);\n var container = useMemo(function () {\n var div = document.createElement('div');\n div.style.position = 'absolute';\n return div;\n }, []);\n var overlay = useMemo(function () {\n return createOverlay(container, mapPaneName, position, bounds, getPixelPositionOffset);\n }, [container, mapPaneName, position, bounds]);\n useEffect(function () {\n onLoad === null || onLoad === void 0 ? void 0 : onLoad(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(map);\n return function () {\n onUnmount === null || onUnmount === void 0 ? void 0 : onUnmount(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(null);\n };\n }, [map, overlay]);\n // to move the container to the foreground and background\n useEffect(function () {\n container.style.zIndex = \"\".concat(zIndex);\n }, [zIndex, container]);\n return ReactDOM.createPortal(children, container);\n}\nvar OverlayViewF = memo(OverlayViewFunctional);\nvar OverlayView = /** @class */ (function (_super) {\n __extends(OverlayView, _super);\n function OverlayView(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n paneEl: null,\n containerStyle: {\n // set initial position\n position: 'absolute',\n },\n };\n _this.updatePane = function () {\n var mapPaneName = _this.props.mapPaneName;\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapPanes\n var mapPanes = _this.overlayView.getPanes();\n invariant$1(!!mapPaneName, \"OverlayView requires props.mapPaneName but got %s\", mapPaneName);\n if (mapPanes) {\n _this.setState({\n paneEl: mapPanes[mapPaneName],\n });\n }\n else {\n _this.setState({\n paneEl: null,\n });\n }\n };\n _this.onAdd = function () {\n var _a, _b;\n _this.updatePane();\n (_b = (_a = _this.props).onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, _this.overlayView);\n };\n _this.onPositionElement = function () {\n var mapCanvasProjection = _this.overlayView.getProjection();\n var offset = __assign({ x: 0, y: 0 }, (_this.containerRef.current\n ? getOffsetOverride(_this.containerRef.current, _this.props.getPixelPositionOffset)\n : {}));\n var layoutStyles = getLayoutStyles(mapCanvasProjection, offset, _this.props.bounds, _this.props.position);\n var _a = _this.state.containerStyle, left = _a.left, top = _a.top, width = _a.width, height = _a.height;\n if (!arePositionsEqual(layoutStyles, { left: left, top: top, width: width, height: height })) {\n _this.setState({\n containerStyle: {\n top: layoutStyles.top || 0,\n left: layoutStyles.left || 0,\n width: layoutStyles.width || 0,\n height: layoutStyles.height || 0,\n position: 'absolute',\n },\n });\n }\n };\n _this.draw = function () {\n _this.onPositionElement();\n };\n _this.onRemove = function () {\n var _a, _b;\n _this.setState(function () { return ({\n paneEl: null,\n }); });\n (_b = (_a = _this.props).onUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, _this.overlayView);\n };\n _this.containerRef = createRef();\n // You must implement three methods: onAdd(), draw(), and onRemove().\n var overlayView = new google.maps.OverlayView();\n overlayView.onAdd = _this.onAdd;\n overlayView.draw = _this.draw;\n overlayView.onRemove = _this.onRemove;\n _this.overlayView = overlayView;\n return _this;\n }\n OverlayView.prototype.componentDidMount = function () {\n this.overlayView.setMap(this.context);\n };\n OverlayView.prototype.componentDidUpdate = function (prevProps) {\n var prevPositionString = convertToLatLngString(prevProps.position);\n var positionString = convertToLatLngString(this.props.position);\n var prevBoundsString = convertToLatLngBoundsString(prevProps.bounds);\n var boundsString = convertToLatLngBoundsString(this.props.bounds);\n if (prevPositionString !== positionString ||\n prevBoundsString !== boundsString) {\n this.overlayView.draw();\n }\n if (prevProps.mapPaneName !== this.props.mapPaneName) {\n this.updatePane();\n }\n };\n OverlayView.prototype.componentWillUnmount = function () {\n this.overlayView.setMap(null);\n };\n OverlayView.prototype.render = function () {\n var paneEl = this.state.paneEl;\n if (paneEl) {\n return ReactDOM.createPortal(jsx(\"div\", { ref: this.containerRef, style: this.state.containerStyle, children: Children.only(this.props.children) }), paneEl);\n }\n else {\n return null;\n }\n };\n OverlayView.FLOAT_PANE = \"floatPane\";\n OverlayView.MAP_PANE = \"mapPane\";\n OverlayView.MARKER_LAYER = \"markerLayer\";\n OverlayView.OVERLAY_LAYER = \"overlayLayer\";\n OverlayView.OVERLAY_MOUSE_TARGET = \"overlayMouseTarget\";\n OverlayView.contextType = MapContext;\n return OverlayView;\n}(PureComponent));\n\nfunction noop() { return; }\n\nvar eventMap$5 = {\n onDblClick: 'dblclick',\n onClick: 'click',\n};\nvar updaterMap$5 = {\n opacity: function (instance, opacity) {\n instance.setOpacity(opacity);\n },\n};\nfunction GroundOverlayFunctional(_a) {\n var url = _a.url, bounds = _a.bounds, options = _a.options, visible = _a.visible;\n var map = useContext(MapContext);\n var imageBounds = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.south, bounds.west), new google.maps.LatLng(bounds.north, bounds.east));\n var groundOverlay = useMemo(function () {\n var overlay = new google.maps.GroundOverlay(url, imageBounds, __assign({}, options));\n return overlay;\n }, []);\n useEffect(function () {\n if (groundOverlay !== null) {\n groundOverlay.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof url !== 'undefined' && groundOverlay !== null) {\n groundOverlay.set(\"url\", url);\n groundOverlay.setMap(map);\n }\n }, [groundOverlay, url]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && groundOverlay !== null) {\n groundOverlay.setOpacity(visible ? 1 : 0);\n }\n }, [groundOverlay, visible]);\n useEffect(function () {\n var newBounds = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.south, bounds.west), new google.maps.LatLng(bounds.north, bounds.east));\n if (typeof bounds !== 'undefined' && groundOverlay !== null) {\n groundOverlay.set(\"bounds\", newBounds);\n groundOverlay.setMap(map);\n }\n }, [groundOverlay, bounds]);\n return null;\n}\nvar GroundOverlayF = memo(GroundOverlayFunctional);\nvar GroundOverlay = /** @class */ (function (_super) {\n __extends(GroundOverlay, _super);\n function GroundOverlay() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n groundOverlay: null,\n };\n _this.setGroundOverlayCallback = function () {\n if (_this.state.groundOverlay !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.groundOverlay);\n }\n };\n return _this;\n }\n GroundOverlay.prototype.componentDidMount = function () {\n invariant$1(!!this.props.url || !!this.props.bounds, \"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655\");\n var groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, __assign(__assign({}, this.props.options), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: {},\n nextProps: this.props,\n instance: groundOverlay,\n });\n this.setState(function setGroundOverlay() {\n return {\n groundOverlay: groundOverlay,\n };\n }, this.setGroundOverlayCallback);\n };\n GroundOverlay.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.groundOverlay !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.groundOverlay,\n });\n }\n };\n GroundOverlay.prototype.componentWillUnmount = function () {\n if (this.state.groundOverlay) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.groundOverlay);\n }\n this.state.groundOverlay.setMap(null);\n }\n };\n GroundOverlay.prototype.render = function () {\n return null;\n };\n GroundOverlay.defaultProps = {\n onLoad: noop,\n };\n GroundOverlay.contextType = MapContext;\n return GroundOverlay;\n}(PureComponent));\n\nvar eventMap$4 = {};\nvar updaterMap$4 = {\n data: function (instance, data) {\n instance.setData(data);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction HeatmapLayerFunctional(_a) {\n var data = _a.data, onLoad = _a.onLoad, onUnmount = _a.onUnmount, options = _a.options;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n useEffect(function () {\n if (!google.maps.visualization) {\n invariant$1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} in useJsApiScript? %s', google.maps.visualization);\n }\n }, []);\n useEffect(function () {\n invariant$1(!!data, 'data property is required in HeatmapLayer %s', data);\n }, [data]);\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n var heatmapLayer = new google.maps.visualization.HeatmapLayer(__assign(__assign({}, (options || {})), { data: data, map: map }));\n setInstance(heatmapLayer);\n if (onLoad) {\n onLoad(heatmapLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar HeatmapLayerF = memo(HeatmapLayerFunctional);\nvar HeatmapLayer = /** @class */ (function (_super) {\n __extends(HeatmapLayer, _super);\n function HeatmapLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n heatmapLayer: null,\n };\n _this.setHeatmapLayerCallback = function () {\n if (_this.state.heatmapLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.heatmapLayer);\n }\n };\n return _this;\n }\n HeatmapLayer.prototype.componentDidMount = function () {\n invariant$1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} to ? %s', google.maps.visualization);\n invariant$1(!!this.props.data, 'data property is required in HeatmapLayer %s', this.props.data);\n var heatmapLayer = new google.maps.visualization.HeatmapLayer(__assign(__assign({}, (this.props.options || {})), { data: this.props.data, map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: {},\n nextProps: this.props,\n instance: heatmapLayer,\n });\n this.setState(function setHeatmapLayer() {\n return {\n heatmapLayer: heatmapLayer,\n };\n }, this.setHeatmapLayerCallback);\n };\n HeatmapLayer.prototype.componentDidUpdate = function (prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.heatmapLayer,\n });\n };\n HeatmapLayer.prototype.componentWillUnmount = function () {\n if (this.state.heatmapLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.heatmapLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.heatmapLayer.setMap(null);\n }\n };\n HeatmapLayer.prototype.render = function () {\n return null;\n };\n HeatmapLayer.contextType = MapContext;\n return HeatmapLayer;\n}(PureComponent));\n\nvar eventMap$3 = {\n onCloseClick: 'closeclick',\n onPanoChanged: 'pano_changed',\n onPositionChanged: 'position_changed',\n onPovChanged: 'pov_changed',\n onResize: 'resize',\n onStatusChanged: 'status_changed',\n onVisibleChanged: 'visible_changed',\n onZoomChanged: 'zoom_changed',\n};\nvar updaterMap$3 = {\n register: function (instance, provider, options) {\n instance.registerPanoProvider(provider, options);\n },\n links: function (instance, links) {\n instance.setLinks(links);\n },\n motionTracking: function (instance, motionTracking) {\n instance.setMotionTracking(motionTracking);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n pano: function (instance, pano) {\n instance.setPano(pano);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n pov: function (instance, pov) {\n instance.setPov(pov);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zoom: function (instance, zoom) {\n instance.setZoom(zoom);\n },\n};\nvar StreetViewPanorama = /** @class */ (function (_super) {\n __extends(StreetViewPanorama, _super);\n function StreetViewPanorama() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n streetViewPanorama: null,\n };\n _this.setStreetViewPanoramaCallback = function () {\n if (_this.state.streetViewPanorama !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.streetViewPanorama);\n }\n };\n return _this;\n }\n StreetViewPanorama.prototype.componentDidMount = function () {\n var _a, _b;\n var streetViewPanorama = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.getStreetView()) !== null && _b !== void 0 ? _b : null;\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: {},\n nextProps: this.props,\n instance: streetViewPanorama,\n });\n this.setState(function () {\n return {\n streetViewPanorama: streetViewPanorama,\n };\n }, this.setStreetViewPanoramaCallback);\n };\n StreetViewPanorama.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.streetViewPanorama !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.streetViewPanorama,\n });\n }\n };\n StreetViewPanorama.prototype.componentWillUnmount = function () {\n if (this.state.streetViewPanorama !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewPanorama);\n }\n unregisterEvents(this.registeredEvents);\n this.state.streetViewPanorama.setVisible(false);\n }\n };\n StreetViewPanorama.prototype.render = function () {\n return null;\n };\n StreetViewPanorama.contextType = MapContext;\n return StreetViewPanorama;\n}(PureComponent));\n\nvar StreetViewService = /** @class */ (function (_super) {\n __extends(StreetViewService, _super);\n function StreetViewService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n streetViewService: null,\n };\n _this.setStreetViewServiceCallback = function () {\n if (_this.state.streetViewService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.streetViewService);\n }\n };\n return _this;\n }\n StreetViewService.prototype.componentDidMount = function () {\n var streetViewService = new google.maps.StreetViewService();\n this.setState(function setStreetViewService() {\n return {\n streetViewService: streetViewService,\n };\n }, this.setStreetViewServiceCallback);\n };\n StreetViewService.prototype.componentWillUnmount = function () {\n if (this.state.streetViewService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewService);\n }\n };\n StreetViewService.prototype.render = function () {\n return null;\n };\n StreetViewService.contextType = MapContext;\n return StreetViewService;\n}(PureComponent));\n\nvar DirectionsService = /** @class */ (function (_super) {\n __extends(DirectionsService, _super);\n function DirectionsService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n directionsService: null,\n };\n _this.setDirectionsServiceCallback = function () {\n if (_this.state.directionsService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.directionsService);\n }\n };\n return _this;\n }\n DirectionsService.prototype.componentDidMount = function () {\n invariant$1(!!this.props.options, 'DirectionsService expected options object as parameter, but got %s', this.props.options);\n var directionsService = new google.maps.DirectionsService();\n this.setState(function setDirectionsService() {\n return {\n directionsService: directionsService,\n };\n }, this.setDirectionsServiceCallback);\n };\n DirectionsService.prototype.componentDidUpdate = function () {\n if (this.state.directionsService !== null) {\n this.state.directionsService.route(this.props.options, this.props.callback);\n }\n };\n DirectionsService.prototype.componentWillUnmount = function () {\n if (this.state.directionsService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsService);\n }\n }\n };\n DirectionsService.prototype.render = function () {\n return null;\n };\n return DirectionsService;\n}(PureComponent));\n\nvar eventMap$2 = {\n onDirectionsChanged: 'directions_changed',\n};\nvar updaterMap$2 = {\n directions: function (instance, directions) {\n instance.setDirections(directions);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n panel: function (instance, panel) {\n instance.setPanel(panel);\n },\n routeIndex: function (instance, routeIndex) {\n instance.setRouteIndex(routeIndex);\n },\n};\nvar DirectionsRenderer = /** @class */ (function (_super) {\n __extends(DirectionsRenderer, _super);\n function DirectionsRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n directionsRenderer: null,\n };\n _this.setDirectionsRendererCallback = function () {\n if (_this.state.directionsRenderer !== null) {\n _this.state.directionsRenderer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.directionsRenderer);\n }\n }\n };\n return _this;\n }\n DirectionsRenderer.prototype.componentDidMount = function () {\n var directionsRenderer = new google.maps.DirectionsRenderer(this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: {},\n nextProps: this.props,\n instance: directionsRenderer,\n });\n this.setState(function setDirectionsRenderer() {\n return {\n directionsRenderer: directionsRenderer,\n };\n }, this.setDirectionsRendererCallback);\n };\n DirectionsRenderer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.directionsRenderer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.directionsRenderer,\n });\n }\n };\n DirectionsRenderer.prototype.componentWillUnmount = function () {\n if (this.state.directionsRenderer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsRenderer);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.directionsRenderer) {\n this.state.directionsRenderer.setMap(null);\n }\n }\n };\n DirectionsRenderer.prototype.render = function () {\n return jsx(Fragment, {});\n };\n DirectionsRenderer.contextType = MapContext;\n return DirectionsRenderer;\n}(PureComponent));\n\nvar DistanceMatrixService = /** @class */ (function (_super) {\n __extends(DistanceMatrixService, _super);\n function DistanceMatrixService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n distanceMatrixService: null,\n };\n _this.setDistanceMatrixServiceCallback = function () {\n if (_this.state.distanceMatrixService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.distanceMatrixService);\n }\n };\n return _this;\n }\n DistanceMatrixService.prototype.componentDidMount = function () {\n invariant$1(!!this.props.options, 'DistanceMatrixService expected options object as parameter, but go %s', this.props.options);\n var distanceMatrixService = new google.maps.DistanceMatrixService();\n this.setState(function setDistanceMatrixService() {\n return {\n distanceMatrixService: distanceMatrixService,\n };\n }, this.setDistanceMatrixServiceCallback);\n };\n DistanceMatrixService.prototype.componentDidUpdate = function () {\n if (this.state.distanceMatrixService !== null) {\n this.state.distanceMatrixService.getDistanceMatrix(this.props.options, this.props.callback);\n }\n };\n DistanceMatrixService.prototype.componentWillUnmount = function () {\n if (this.state.distanceMatrixService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.distanceMatrixService);\n }\n };\n DistanceMatrixService.prototype.render = function () {\n return null;\n };\n return DistanceMatrixService;\n}(PureComponent));\n\nvar eventMap$1 = {\n onPlacesChanged: 'places_changed',\n};\nvar updaterMap$1 = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n};\nvar StandaloneSearchBox = /** @class */ (function (_super) {\n __extends(StandaloneSearchBox, _super);\n function StandaloneSearchBox() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = createRef();\n _this.state = {\n searchBox: null,\n };\n _this.setSearchBoxCallback = function () {\n if (_this.state.searchBox !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.searchBox);\n }\n };\n return _this;\n }\n StandaloneSearchBox.prototype.componentDidMount = function () {\n invariant$1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n if (this.containerElement !== null && this.containerElement.current !== null) {\n var input = this.containerElement.current.querySelector('input');\n if (input !== null) {\n var searchBox_1 = new google.maps.places.SearchBox(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: {},\n nextProps: this.props,\n instance: searchBox_1,\n });\n this.setState(function setSearchBox() {\n return {\n searchBox: searchBox_1,\n };\n }, this.setSearchBoxCallback);\n }\n }\n };\n StandaloneSearchBox.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.searchBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.searchBox,\n });\n }\n };\n StandaloneSearchBox.prototype.componentWillUnmount = function () {\n if (this.state.searchBox !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.searchBox);\n }\n unregisterEvents(this.registeredEvents);\n }\n };\n StandaloneSearchBox.prototype.render = function () {\n return jsx(\"div\", { ref: this.containerElement, children: Children.only(this.props.children) });\n };\n StandaloneSearchBox.contextType = MapContext;\n return StandaloneSearchBox;\n}(PureComponent));\n\nvar eventMap = {\n onPlaceChanged: 'place_changed',\n};\nvar updaterMap = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n restrictions: function (instance, restrictions) {\n instance.setComponentRestrictions(restrictions);\n },\n fields: function (instance, fields) {\n instance.setFields(fields);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n types: function (instance, types) {\n instance.setTypes(types);\n },\n};\nvar Autocomplete = /** @class */ (function (_super) {\n __extends(Autocomplete, _super);\n function Autocomplete() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = createRef();\n _this.state = {\n autocomplete: null,\n };\n _this.setAutocompleteCallback = function () {\n if (_this.state.autocomplete !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.autocomplete);\n }\n };\n return _this;\n }\n Autocomplete.prototype.componentDidMount = function () {\n var _a;\n invariant$1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n // TODO: why current could be equal null?\n var input = (_a = this.containerElement.current) === null || _a === void 0 ? void 0 : _a.querySelector('input');\n if (input) {\n var autocomplete_1 = new google.maps.places.Autocomplete(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: autocomplete_1,\n });\n this.setState(function () {\n return {\n autocomplete: autocomplete_1,\n };\n }, this.setAutocompleteCallback);\n }\n };\n Autocomplete.prototype.componentDidUpdate = function (prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.autocomplete,\n });\n };\n Autocomplete.prototype.componentWillUnmount = function () {\n if (this.state.autocomplete !== null) {\n unregisterEvents(this.registeredEvents);\n }\n };\n Autocomplete.prototype.render = function () {\n return jsx(\"div\", { ref: this.containerElement, className: this.props.className, children: Children.only(this.props.children) });\n };\n Autocomplete.defaultProps = {\n className: ''\n };\n Autocomplete.contextType = MapContext;\n return Autocomplete;\n}(PureComponent));\n\nexport { Autocomplete, BicyclingLayer, BicyclingLayerF, Circle, CircleF, Data, DataF, DirectionsRenderer, DirectionsService, DistanceMatrixService, DrawingManager, DrawingManagerF, FLOAT_PANE, GoogleMap, index_esm as GoogleMapsMarkerClusterer, GoogleMarkerClusterer$1 as GoogleMarkerClusterer, GroundOverlay, GroundOverlayF, HeatmapLayer, HeatmapLayerF, InfoBoxComponent as InfoBox, InfoBoxF, InfoWindow, InfoWindowF, KmlLayer, LoadScript, LoadScriptNext$1 as LoadScriptNext, MAP_PANE, MARKER_LAYER, MapContext, Marker, ClustererComponent as MarkerClusterer, MarkerClustererF, MarkerF, OVERLAY_LAYER, OVERLAY_MOUSE_TARGET, OverlayView, OverlayViewF, Polygon, PolygonF, Polyline, PolylineF, Rectangle, RectangleF, StandaloneSearchBox, StreetViewPanorama, StreetViewService, TrafficLayer, TrafficLayerF, TransitLayer, TransitLayerF, useGoogleMap, useJsApiLoader, useLoadScript };\n//# sourceMappingURL=esm.js.map\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` attribute. This attribute is added at build-time\n * by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","const bindReporter = (\n callback,\n metric,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getNavigationEntryFromPerformanceTiming = () => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);\n }\n }\n return navigationEntry ;\n};\n\nconst getNavigationEntry = () => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if ((WINDOW.document && WINDOW.document.prerendering) || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() );\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst onHidden = (cb, once) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n\n if (WINDOW.document) {\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n }\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (\n onReport,\n options = {},\n) => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric, options.reportAllChanges);\n\n const stopListening = () => {\n handleEntries(po.takeRecords() );\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { WINDOW } from '../../types.js';\nimport { onHidden } from './onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n if (WINDOW.document && WINDOW.document.visibilityState) {\n firstHiddenTime = WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n }\n};\n\nconst trackChanges = () => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nconst getVisibilityWatcher = (\n\n) => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }, true);\n }\n};\n\nexport { onFID };\n//# sourceMappingURL=getFID.js.map\n","import { observe } from '../observe.js';\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n (entries ).forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n if ('interactionCount' in performance || po) return;\n\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n } );\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };\n//# sourceMappingURL=interactionCountPolyfill.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill, getInteractionCount } from './lib/polyfills/interactionCountPolyfill.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n return getInteractionCount();\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is as most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = {};\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processEntry = (entry) => {\n // The least-long of the 10 longest interactions.\n const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const existingInteraction = longestInteractionMap[entry.interactionId];\n\n // Only process the entry if it's possibly one of the ten longest,\n // or if it's part of an existing interaction.\n if (\n existingInteraction ||\n longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n entry.duration > minLongestInteraction.latency\n ) {\n // If the interaction already exists, update it. Otherwise create one.\n if (existingInteraction) {\n existingInteraction.entries.push(entry);\n existingInteraction.latency = Math.max(existingInteraction.latency, entry.duration);\n } else {\n const interaction = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n id: entry.interactionId,\n latency: entry.duration,\n entries: [entry],\n };\n longestInteractionMap[interaction.id] = interaction;\n longestInteractionList.push(interaction);\n }\n\n // Sort the entries by latency (descending) and keep only the top ten.\n longestInteractionList.sort((a, b) => b.latency - a.latency);\n longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete longestInteractionMap[i.id];\n });\n }\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n const candidateInteractionIndex = Math.min(\n longestInteractionList.length - 1,\n Math.floor(getInteractionCountForNavigation() / 50),\n );\n\n return longestInteractionList[candidateInteractionIndex];\n};\n\n/**\n * Calculates the [INP](https://web.dev/responsiveness/) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts) => {\n // Set defaults\n // eslint-disable-next-line no-param-reassign\n opts = opts || {};\n\n // https://web.dev/inp/#what's-a-%22good%22-inp-value\n // const thresholds = [200, 500];\n\n // TODO(philipwalton): remove once the polyfill is no longer needed.\n initInteractionCountPolyfill();\n\n const metric = initMetric('INP');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n if (entry.interactionId) {\n processEntry(entry);\n }\n\n // Entries of type `first-input` don't currently have an `interactionId`,\n // so to consider them in INP we have to first check that an existing\n // entry doesn't match the `duration` and `startTime`.\n // Note that this logic assumes that `event` entries are dispatched\n // before `first-input` entries. This is true in Chrome but it is not\n // true in Firefox; however, Firefox doesn't support interactionId, so\n // it's not an issue at the moment.\n // TODO(philipwalton): remove once crbug.com/1325826 is fixed.\n if (entry.entryType === 'first-input') {\n const noMatchingEntry = !longestInteractionList.some(interaction => {\n return interaction.entries.some(prevEntry => {\n return entry.duration === prevEntry.duration && entry.startTime === prevEntry.startTime;\n });\n });\n if (noMatchingEntry) {\n processEntry(entry);\n }\n }\n });\n\n const inp = estimateP98LongestInteraction();\n\n if (inp && inp.latency !== metric.value) {\n metric.value = inp.latency;\n metric.entries = inp.entries;\n report();\n }\n };\n\n const po = observe('event', handleEntries, {\n // Event Timing entries have their durations rounded to the nearest 8ms,\n // so a duration of 40ms would be any event that spans 2.5 or more frames\n // at 60Hz. This threshold is chosen to strike a balance between usefulness\n // and performance. Running this callback for any interaction that spans\n // just one or two frames is likely not worth the insight that could be\n // gained.\n durationThreshold: opts.durationThreshold || 40,\n } );\n\n report = bindReporter(onReport, metric, opts.reportAllChanges);\n\n if (po) {\n // Also observe entries of type `first-input`. This is useful in cases\n // where the first interaction is less than the `durationThreshold`.\n po.observe({ type: 'first-input', buffered: true });\n\n onHidden(() => {\n handleEntries(po.takeRecords() );\n\n // If the interaction count shows that there were interactions but\n // none were captured by the PerformanceObserver, report a latency of 0.\n if (metric.value < 0 && getInteractionCountForNavigation() > 0) {\n metric.value = 0;\n metric.entries = [];\n }\n\n report(true);\n });\n }\n};\n\nexport { onINP };\n//# sourceMappingURL=getINP.js.map\n","import { WINDOW } from '../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nconst onLCP = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n const lastEntry = entries[entries.length - 1] ;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n if (WINDOW.document) {\n addEventListener(type, stopListening, { once: true, capture: true });\n }\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { WINDOW } from '../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n if (!WINDOW.document) {\n return;\n }\n\n if (WINDOW.document.prerendering) {\n addEventListener('prerenderingchange', () => whenReady(callback), true);\n } else if (WINDOW.document.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/time-to-first-byte/) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nconst onTTFB = (onReport, opts) => {\n // Set defaults\n // eslint-disable-next-line no-param-reassign\n opts = opts || {};\n\n // https://web.dev/ttfb/#what-is-a-good-ttfb-score\n // const thresholds = [800, 1800];\n\n const metric = initMetric('TTFB');\n const report = bindReporter(onReport, metric, opts.reportAllChanges);\n\n whenReady(() => {\n const navEntry = getNavigationEntry() ;\n\n if (navEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navEntry.responseStart - getActivationStart(), 0);\n\n // In some cases the value reported is negative or is larger\n // than the current page time. Ignore these cases:\n // https://github.com/GoogleChrome/web-vitals/issues/137\n // https://github.com/GoogleChrome/web-vitals/issues/162\n if (metric.value < 0 || metric.value > performance.now()) return;\n\n metric.entries = [navEntry];\n\n report(true);\n }\n });\n};\n\nexport { onTTFB };\n//# sourceMappingURL=onTTFB.js.map\n","import { logger, getFunctionName } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n callback,\n stopOnCallback = false,\n) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n */\nfunction addTtfbInstrumentationHandler(callback) {\n return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n callback,\n) {\n return addMetricObserver('inp', callback, instrumentInp, _previousInp);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n return onCLS(\n metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n },\n { reportAllChanges: true },\n );\n}\n\nfunction instrumentFid() {\n return onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n return onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction instrumentTtfb() {\n return onTTFB(metric => {\n triggerHandlers('ttfb', {\n metric,\n });\n _previousTtfb = metric;\n });\n}\n\nfunction instrumentInp() {\n return onINP(metric => {\n triggerHandlers('inp', {\n metric,\n });\n _previousInp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n stopOnCallback = false,\n) {\n addHandler(type, callback);\n\n let stopListening;\n\n if (!instrumented[type]) {\n stopListening = instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(\n type,\n callback,\n stopListening,\n) {\n return () => {\n if (stopListening) {\n stopListening();\n }\n\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler };\n//# sourceMappingURL=instrument.js.map\n","import { dsnToString, createEnvelope } from '@sentry/utils';\n\n/**\n * Create envelope from Span item.\n */\nfunction createSpanEnvelope(spans, dsn) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const items = spans.map(createSpanItem);\n return createEnvelope(headers, items);\n}\n\nfunction createSpanItem(span) {\n const spanHeaders = {\n type: 'span',\n };\n return [spanHeaders, span];\n}\n\nexport { createSpanEnvelope };\n//# sourceMappingURL=span.js.map\n","/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n *\n * Note: this will not be possible anymore in v8,\n * unless we do some special handling for browser here...\n */\nfunction _startChild(transaction, { startTimestamp, ...ctx }) {\n // eslint-disable-next-line deprecation/deprecation\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.startTimestamp = startTimestamp;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n\nexport { _startChild, isMeasurementValue };\n//# sourceMappingURL=utils.js.map\n","import { getActiveTransaction, spanToJSON, setMeasurement, getClient, Span, createSpanEnvelope, hasTracingEnabled, isValidSampleRate } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, getComponentName, logger, parseUrl } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler, addTtfbInstrumentationHandler, addInpInstrumentationHandler } from '../instrument.js';\nimport { WINDOW } from '../types.js';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher.js';\nimport { _startChild, isMeasurementValue } from './utils.js';\nimport { getNavigationEntry } from '../web-vitals/lib/getNavigationEntry.js';\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n const ttfbCallback = _trackTtfb();\n\n return () => {\n fidCallback();\n clsCallback();\n lcpCallback();\n ttfbCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n // eslint-disable-next-line deprecation/deprecation\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n const span = {\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n };\n\n const componentName = getComponentName(entry.target);\n if (componentName) {\n span.attributes = { 'ui.component_name': componentName };\n }\n\n // eslint-disable-next-line deprecation/deprecation\n transaction.startChild(span);\n }\n }\n });\n}\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP(\n interactionIdtoRouteNameMapping,\n interactionsSampleRate,\n) {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n const inpCallback = _trackINP(interactionIdtoRouteNameMapping, interactionsSampleRate);\n\n return () => {\n inpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n DEBUG_BUILD && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n DEBUG_BUILD && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n DEBUG_BUILD && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\nfunction _trackTtfb() {\n return addTtfbInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1];\n if (!entry) {\n return;\n }\n\n DEBUG_BUILD && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n });\n}\n\nconst INP_ENTRY_MAP = {\n click: 'click',\n pointerdown: 'click',\n pointerup: 'click',\n mousedown: 'click',\n mouseup: 'click',\n touchstart: 'click',\n touchend: 'click',\n mouseover: 'hover',\n mouseout: 'hover',\n mouseenter: 'hover',\n mouseleave: 'hover',\n pointerover: 'hover',\n pointerout: 'hover',\n pointerenter: 'hover',\n pointerleave: 'hover',\n dragstart: 'drag',\n dragend: 'drag',\n drag: 'drag',\n dragenter: 'drag',\n dragleave: 'drag',\n dragover: 'drag',\n drop: 'drag',\n keydown: 'press',\n keyup: 'press',\n keypress: 'press',\n input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP(\n interactionIdToRouteNameMapping,\n interactionsSampleRate,\n) {\n return addInpInstrumentationHandler(({ metric }) => {\n if (metric.value === undefined) {\n return;\n }\n const entry = metric.entries.find(\n entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name] !== undefined,\n );\n const client = getClient();\n if (!entry || !client) {\n return;\n }\n const interactionType = INP_ENTRY_MAP[entry.name];\n const options = client.getOptions();\n /** Build the INP span, create an envelope from the span, and then send the envelope */\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(metric.value);\n const interaction =\n entry.interactionId !== undefined ? interactionIdToRouteNameMapping[entry.interactionId] : undefined;\n if (interaction === undefined) {\n return;\n }\n const { routeName, parentContext, activeTransaction, user, replayId } = interaction;\n const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n // eslint-disable-next-line deprecation/deprecation\n const profileId = activeTransaction !== undefined ? activeTransaction.getProfileId() : undefined;\n const span = new Span({\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n op: `ui.interaction.${interactionType}`,\n name: htmlTreeAsString(entry.target),\n attributes: {\n release: options.release,\n environment: options.environment,\n transaction: routeName,\n ...(userDisplay !== undefined && userDisplay !== '' ? { user: userDisplay } : {}),\n ...(profileId !== undefined ? { profile_id: profileId } : {}),\n ...(replayId !== undefined ? { replay_id: replayId } : {}),\n },\n exclusiveTime: metric.value,\n measurements: {\n inp: { value: metric.value, unit: 'millisecond' },\n },\n });\n\n /** Check to see if the span should be sampled */\n const sampleRate = getSampleRate(parentContext, options, interactionsSampleRate);\n\n if (!sampleRate) {\n return;\n }\n\n if (Math.random() < (sampleRate )) {\n const envelope = span ? createSpanEnvelope([span], client.getDsn()) : undefined;\n const transport = client && client.getTransport();\n if (transport && envelope) {\n transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending interaction:', reason);\n });\n }\n return;\n }\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(transaction) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n DEBUG_BUILD && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n const { op, start_timestamp: transactionStartTime } = spanToJSON(transaction);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n // eslint-disable-next-line deprecation/deprecation\n if (transaction.op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n DEBUG_BUILD && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n DEBUG_BUILD && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n _addResourceSpans(transaction, entry, entry.name , startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (op === 'pageload') {\n _addTtfbRequestTimeToMeasurements(_measurements);\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || !transactionStartTime || timeOrigin >= transactionStartTime) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transactionStartTime) * 1000);\n const delta = normalizedValue - oldValue;\n\n DEBUG_BUILD && logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n setMeasurement(measurementName, _measurements[measurementName].value, _measurements[measurementName].unit);\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nfunction _addMeasureSpans(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name ,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType ,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n event,\n timeOrigin,\n description,\n eventEnd,\n) {\n const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] );\n const start = entry[`${event}Start`] ;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction, entry, timeOrigin) {\n if (entry.responseEnd) {\n // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n // these spans when the responseEnd value is available. The backend (Relay) would drop the entire transaction if it contained faulty spans.\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n }\n}\n\n/** Create resource-related spans */\nfunction _addResourceSpans(\n transaction,\n entry,\n resourceUrl,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n const parsedUrl = parseUrl(resourceUrl);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n setResourceEntrySizeData(data, entry, 'transferSize', 'http.response_transfer_size');\n setResourceEntrySizeData(data, entry, 'encodedBodySize', 'http.response_content_length');\n setResourceEntrySizeData(data, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n if (parsedUrl.protocol) {\n data['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n }\n\n if (parsedUrl.host) {\n data['server.address'] = parsedUrl.host;\n }\n\n data['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceUrl.replace(WINDOW.location.origin, ''),\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction) {\n if (_lcpEntry) {\n DEBUG_BUILD && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n DEBUG_BUILD && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nfunction setResourceEntrySizeData(\n data,\n entry,\n key,\n dataKey,\n) {\n const entryVal = entry[key];\n if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n data[dataKey] = entryVal;\n }\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements) {\n const navEntry = getNavigationEntry();\n if (!navEntry) {\n return;\n }\n\n const { responseStart, requestStart } = navEntry;\n\n if (requestStart <= responseStart) {\n DEBUG_BUILD && logger.log('[Measurements] Adding TTFB Request Time');\n _measurements['ttfb.requestTime'] = {\n value: responseStart - requestStart,\n unit: 'millisecond',\n };\n }\n}\n\n/** Taken from @sentry/core sampling.ts */\nfunction getSampleRate(\n transactionContext,\n options,\n interactionsSampleRate,\n) {\n if (!hasTracingEnabled(options)) {\n return false;\n }\n let sampleRate;\n if (transactionContext !== undefined && typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler({\n transactionContext,\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n location: WINDOW.location,\n });\n } else if (transactionContext !== undefined && transactionContext.sampled !== undefined) {\n sampleRate = transactionContext.sampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n } else {\n sampleRate = 1;\n }\n if (!isValidSampleRate(sampleRate)) {\n DEBUG_BUILD && logger.warn('[Tracing] Discarding interaction span because of invalid sample rate.');\n return false;\n }\n if (sampleRate === true) {\n return interactionsSampleRate;\n } else if (sampleRate === false) {\n return 0;\n }\n return sampleRate * interactionsSampleRate;\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingINP, startTrackingInteractions, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=index.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { fill } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(handler) {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, instrumentFetch);\n}\n\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response) => {\n const finishedHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n };\n\n triggerHandlers('fetch', finishedHandlerData);\n return response;\n },\n (error) => {\n const erroredHandlerData = {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n };\n\n triggerHandlers('fetch', erroredHandlerData);\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\nexport { addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.js.map\n","import { isString } from '../is.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(args[0]) ? args[0].toUpperCase() : undefined;\n const url = parseUrl(args[1]);\n\n if (!method || !url) {\n return originalOpen.apply(this, args);\n }\n\n this[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData = {\n args: [method, url],\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(this, args);\n }\n\n if (args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n const handlerData = {\n args: [sentryXhrData.method, sentryXhrData.url],\n startTimestamp: Date.now(),\n xhr: this,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nfunction parseUrl(url) {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url ).toString();\n } catch (e2) {} // eslint-disable-line no-empty\n\n return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { spanToJSON, hasTracingEnabled, setHttpStatus, getCurrentScope, getIsolationScope, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getClient, spanToTraceHeader, getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromClient } from '@sentry/core';\nimport { addFetchInstrumentationHandler, parseUrl, addXhrInstrumentationHandler, SENTRY_XHR_DATA_KEY, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, BAGGAGE_HEADER_NAME, browserPerformanceTimeOrigin, stringMatchesSomePattern } from '@sentry/utils';\nimport { instrumentFetchRequest } from '../common/fetch.js';\nimport { addPerformanceInstrumentationHandler } from './instrument.js';\nimport { WINDOW } from './types.js';\n\n/* eslint-disable max-lines */\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(_options) {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url) =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans = {};\n\n if (traceFetch) {\n addFetchInstrumentationHandler(handlerData => {\n const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n // We cannot use `window.location` in the generic fetch instrumentation,\n // but we need it for reliable `server.address` attribute.\n // so we extend this in here\n if (createdSpan) {\n const fullUrl = getFullURL(handlerData.fetchData.url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n createdSpan.setAttributes({\n 'http.url': fullUrl,\n 'server.address': host,\n });\n }\n\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addXhrInstrumentationHandler(handlerData => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const { url } = spanToJSON(span).data || {};\n\n if (!url || typeof url !== 'string') {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setAttribute(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nfunction shouldAttachHeaders(url, tracePropagationTargets) {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || !xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span && sentryXhrData.status_code !== undefined) {\n setHttpStatus(span, sentryXhrData.status_code);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const scope = getCurrentScope();\n const isolationScope = getIsolationScope();\n\n const fullUrl = getFullURL(sentryXhrData.url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n const span = shouldCreateSpanResult\n ? startInactiveSpan({\n name: `${sentryXhrData.method} ${sentryXhrData.url}`,\n onlyIfParent: true,\n attributes: {\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n 'http.url': fullUrl,\n url: sentryXhrData.url,\n 'server.address': host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n },\n op: 'http.client',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n const client = getClient();\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url) && client) {\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nfunction getFullURL(url) {\n try {\n // By adding a base URL to new URL(), this will also work for relative urls\n // If `url` is a full URL, the base URL is ignored anyhow\n const parsed = new URL(url, WINDOW.location.origin);\n return parsed.href;\n } catch (e) {\n return undefined;\n }\n}\n\nexport { DEFAULT_TRACE_PROPAGATION_TARGETS, defaultRequestInstrumentationOptions, extractNetworkProtocol, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { hasTracingEnabled, getCurrentScope, getClient, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getIsolationScope, spanToTraceHeader, getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromClient, setHttpStatus } from '@sentry/core';\nimport { parseUrl, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, isInstanceOf, BAGGAGE_HEADER_NAME } from '@sentry/utils';\n\n/**\n * Create and track fetch request spans for usage in combination with `addInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n spanOrigin = 'auto.http.browser',\n) {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n endSpan(span, handlerData);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const scope = getCurrentScope();\n const client = getClient();\n\n const { method, url } = handlerData.fetchData;\n\n const fullUrl = getFullURL(url);\n const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n const span = shouldCreateSpanResult\n ? startInactiveSpan({\n name: `${method} ${url}`,\n onlyIfParent: true,\n attributes: {\n url,\n type: 'fetch',\n 'http.method': method,\n 'http.url': fullUrl,\n 'server.address': host,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n },\n op: 'http.client',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanContext().spanId;\n spans[span.spanContext().spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nfunction addTracingHeadersToFetchRequest(\n request, // unknown is actually type Request but we can't export DOM types from this package,\n client,\n scope,\n options\n\n,\n requestSpan,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const span = requestSpan || scope.getSpan();\n\n const isolationScope = getIsolationScope();\n\n const { traceId, spanId, sampled, dsc } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, spanId, sampled);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(\n dsc ||\n (span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromClient(traceId, client, scope)),\n );\n\n const headers =\n options.headers ||\n (typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request ).headers : undefined);\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers );\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders ;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\nfunction getFullURL(url) {\n try {\n const parsed = new URL(url);\n return parsed.href;\n } catch (e) {\n return undefined;\n }\n}\n\nfunction endSpan(span, handlerData) {\n if (handlerData.response) {\n setHttpStatus(span, handlerData.response.status);\n\n const contentLength =\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n if (contentLength) {\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setAttribute('http.response_content_length', contentLengthNum);\n }\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.end();\n}\n\nexport { addTracingHeadersToFetchRequest, instrumentFetchRequest };\n//# sourceMappingURL=fetch.js.map\n","import { getGlobalObject } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chromeVar = (WINDOW ).chrome;\n const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n//# sourceMappingURL=supportsHistory.js.map\n","import { fill } from '../object.js';\nimport '../debug-build.js';\nimport '../logger.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { supportsHistory } from '../vendor/supportsHistory.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n const handlerData = { from, to };\n triggerHandlers('history', handlerData);\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n const handlerData = { from, to };\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n//# sourceMappingURL=history.js.map\n","import { TRACING_DEFAULTS, addTracingExtensions, startIdleTransaction, getActiveTransaction, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, getClient, getCurrentScope } from '@sentry/core';\nimport { logger, propagationContextFromHeaders, getDomElement } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build.js';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { addPerformanceInstrumentationHandler } from './instrument.js';\nimport { startTrackingWebVitals, startTrackingINP, startTrackingLongTasks, startTrackingInteractions, addPerformanceEntries } from './metrics/index.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\nimport { instrumentRoutingWithDefaults } from './router.js';\nimport { WINDOW } from './types.js';\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n enableInp: false,\n interactionsSampleRate: 1,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/** We store up to 10 interaction candidates max to cap memory usage. This is the same cap as getINP from web-vitals */\nconst MAX_INTERACTIONS = 10;\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n *\n * @deprecated Use `browserTracingIntegration()` instead.\n */\nclass BrowserTracing {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n\n /**\n * @inheritDoc\n */\n\n // eslint-disable-next-line deprecation/deprecation\n\n constructor(_options) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if (DEBUG_BUILD) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n /** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */\n this._interactionIdToRouteNameMapping = {};\n\n if (this.options.enableInp) {\n startTrackingINP(this._interactionIdToRouteNameMapping, this.options.interactionsSampleRate);\n }\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n\n this._latestRoute = {\n name: undefined,\n context: undefined,\n };\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if (DEBUG_BUILD && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n if (this.options.enableInp) {\n this._registerInpInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n DEBUG_BUILD &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n let expandedContext;\n if (isPageloadTransaction) {\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : undefined;\n const { traceId, dsc, parentSpanId, sampled } = propagationContextFromHeaders(sentryTrace, baggage);\n expandedContext = {\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...context,\n metadata: {\n // eslint-disable-next-line deprecation/deprecation\n ...context.metadata,\n dynamicSamplingContext: dsc,\n },\n trimEnd: true,\n };\n } else {\n expandedContext = {\n trimEnd: true,\n ...context,\n };\n }\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? // eslint-disable-next-line deprecation/deprecation\n { ...finalContext.metadata, source: 'custom' }\n : // eslint-disable-next-line deprecation/deprecation\n finalContext.metadata;\n\n this._latestRoute.name = finalContext.name;\n this._latestRoute.context = finalContext;\n\n // eslint-disable-next-line deprecation/deprecation\n if (finalContext.sampled === false) {\n DEBUG_BUILD && logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n DEBUG_BUILD && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n isPageloadTransaction, // should wait for finish signal if it's a pageload transaction\n );\n\n if (isPageloadTransaction) {\n if (WINDOW.document) {\n WINDOW.document.addEventListener('readystatechange', () => {\n if (['interactive', 'complete'].includes(WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n });\n\n if (['interactive', 'complete'].includes(WINDOW.document.readyState)) {\n idleTransaction.sendAutoFinishSignal();\n }\n }\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n /** Start listener for interaction transactions */\n _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n // eslint-disable-next-line deprecation/deprecation\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.end();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRoute.name) {\n DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context = {\n name: this._latestRoute.name,\n op,\n trimEnd: true,\n data: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: this._latestRoute.context\n ? getSource(this._latestRoute.context)\n : 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n if (WINDOW.document) {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n }\n });\n }\n\n /** Creates a listener on interaction entries, and maps interactionIds to the origin path of the interaction */\n _registerInpInteractionListener() {\n const handleEntries = ({ entries }) => {\n const client = getClient();\n // We need to get the replay, user, and activeTransaction from the current scope\n // so that we can associate replay id, profile id, and a user display to the span\n const replay =\n client !== undefined && client.getIntegrationByName !== undefined\n ? (client.getIntegrationByName('Replay') )\n : undefined;\n const replayId = replay !== undefined ? replay.getReplayId() : undefined;\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n const currentScope = getCurrentScope();\n const user = currentScope !== undefined ? currentScope.getUser() : undefined;\n entries.forEach(entry => {\n if (isPerformanceEventTiming(entry)) {\n const interactionId = entry.interactionId;\n if (interactionId === undefined) {\n return;\n }\n const existingInteraction = this._interactionIdToRouteNameMapping[interactionId];\n const duration = entry.duration;\n const startTime = entry.startTime;\n const keys = Object.keys(this._interactionIdToRouteNameMapping);\n const minInteractionId =\n keys.length > 0\n ? keys.reduce((a, b) => {\n return this._interactionIdToRouteNameMapping[a].duration <\n this._interactionIdToRouteNameMapping[b].duration\n ? a\n : b;\n })\n : undefined;\n // For a first input event to be considered, we must check that an interaction event does not already exist with the same duration and start time.\n // This is also checked in the web-vitals library.\n if (entry.entryType === 'first-input') {\n const matchingEntry = keys\n .map(key => this._interactionIdToRouteNameMapping[key])\n .some(interaction => {\n return interaction.duration === duration && interaction.startTime === startTime;\n });\n if (matchingEntry) {\n return;\n }\n }\n // Interactions with an id of 0 and are not first-input are not valid.\n if (!interactionId) {\n return;\n }\n // If the interaction already exists, we want to use the duration of the longest entry, since that is what the INP metric uses.\n if (existingInteraction) {\n existingInteraction.duration = Math.max(existingInteraction.duration, duration);\n } else if (\n keys.length < MAX_INTERACTIONS ||\n minInteractionId === undefined ||\n duration > this._interactionIdToRouteNameMapping[minInteractionId].duration\n ) {\n // If the interaction does not exist, we want to add it to the mapping if there is space, or if the duration is longer than the shortest entry.\n const routeName = this._latestRoute.name;\n const parentContext = this._latestRoute.context;\n if (routeName && parentContext) {\n if (minInteractionId && Object.keys(this._interactionIdToRouteNameMapping).length >= MAX_INTERACTIONS) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._interactionIdToRouteNameMapping[minInteractionId];\n }\n this._interactionIdToRouteNameMapping[interactionId] = {\n routeName,\n duration,\n parentContext,\n user,\n activeTransaction,\n replayId,\n startTime,\n };\n }\n }\n }\n });\n };\n addPerformanceInstrumentationHandler('event', handleEntries);\n addPerformanceInstrumentationHandler('first-input', handleEntries);\n }\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\nfunction getSource(context) {\n const sourceFromAttributes = context.attributes && context.attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromData = context.data && context.data[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n // eslint-disable-next-line deprecation/deprecation\n const sourceFromMetadata = context.metadata && context.metadata.source;\n\n return sourceFromAttributes || sourceFromData || sourceFromMetadata;\n}\n\nfunction isPerformanceEventTiming(entry) {\n return 'duration' in entry;\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing, getMetaContent };\n//# sourceMappingURL=browsertracing.js.map\n","import { logger, browserPerformanceTimeOrigin, addHistoryInstrumentationHandler } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nfunction instrumentRoutingWithDefaults(\n customStartTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n if (!WINDOW || !WINDOW.location) {\n DEBUG_BUILD && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl = WINDOW.location.href;\n\n let activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addHistoryInstrumentationHandler(({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n DEBUG_BUILD && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.end();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n\nexport { instrumentRoutingWithDefaults };\n//# sourceMappingURL=router.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getActiveTransaction, spanToJSON } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction() ;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n const { op, status } = spanToJSON(activeTransaction);\n\n DEBUG_BUILD &&\n logger.log(`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${op}`);\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n activeTransaction.setStatus(statusType);\n }\n // TODO: Can we rewrite this to an attribute?\n // eslint-disable-next-line deprecation/deprecation\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.end();\n }\n });\n } else {\n DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","import { getActiveTransaction } from './utils.js';\n\n/**\n * Adds a measurement to the current active transaction.\n */\nfunction setMeasurement(name, value, unit) {\n // eslint-disable-next-line deprecation/deprecation\n const transaction = getActiveTransaction();\n if (transaction) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setMeasurement(name, value, unit);\n }\n}\n\nexport { setMeasurement };\n//# sourceMappingURL=measurement.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { addTracingExtensions, getMainCarrier } from '@sentry/core';\nimport { isNodeEnv, loadModule, dynamicRequire } from '@sentry/utils';\n\n/**\n * @private\n */\nfunction _autoloadDatabaseIntegrations() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n\n const packageToIntegrationMapping = {\n mongodb() {\n const integration = dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mongoose() {\n const integration = dynamicRequire(module, './node/integrations/mongo')\n\n;\n return new integration.Mongo();\n },\n mysql() {\n const integration = dynamicRequire(module, './node/integrations/mysql')\n\n;\n return new integration.Mysql();\n },\n pg() {\n const integration = dynamicRequire(module, './node/integrations/postgres')\n\n;\n return new integration.Postgres();\n },\n };\n\n const mappedPackages = Object.keys(packageToIntegrationMapping)\n .filter(moduleName => !!loadModule(moduleName))\n .map(pkg => {\n try {\n return packageToIntegrationMapping[pkg]();\n } catch (e) {\n return undefined;\n }\n })\n .filter(p => p) ;\n\n if (mappedPackages.length > 0) {\n carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages];\n }\n}\n\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\nfunction addExtensionMethods() {\n addTracingExtensions();\n\n // Detect and automatically load specified integrations.\n if (isNodeEnv()) {\n _autoloadDatabaseIntegrations();\n }\n}\n\nexport { addExtensionMethods };\n//# sourceMappingURL=extensions.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, arrayify, isThenable } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for Apollo */\nclass Apollo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Apollo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(\n options = {\n useNestjs: false,\n },\n ) {\n this.name = Apollo.id;\n this._useNest = !!options.useNestjs;\n }\n\n /** @inheritdoc */\n loadDependency() {\n if (this._useNest) {\n this._module = this._module || loadModule('@nestjs/graphql');\n } else {\n this._module = this._module || loadModule('apollo-server-core');\n }\n\n return this._module;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('Apollo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n if (this._useNest) {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n DEBUG_BUILD && logger.error('Apollo-NestJS Integration was unable to require @nestjs/graphql package.');\n return;\n }\n\n /**\n * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed.\n */\n fill(\n pkg.GraphQLFactory.prototype,\n 'mergeWithSchema',\n function (orig) {\n return function (\n\n ...args\n ) {\n fill(this.resolversExplorerService, 'explore', function (orig) {\n return function () {\n const resolvers = arrayify(orig.call(this));\n\n const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return instrumentedResolvers;\n };\n });\n\n return orig.call(this, ...args);\n };\n },\n );\n } else {\n const pkg = this.loadDependency();\n\n if (!pkg) {\n DEBUG_BUILD && logger.error('Apollo Integration was unable to require apollo-server-core package.');\n return;\n }\n\n /**\n * Iterate over resolvers of the ApolloServer instance before schemas are constructed.\n */\n fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig) {\n return function (\n\n) {\n if (!this.config.resolvers) {\n if (DEBUG_BUILD) {\n if (this.config.schema) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.' +\n 'If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.',\n );\n logger.warn();\n } else if (this.config.modules) {\n logger.warn(\n 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.',\n );\n }\n\n logger.error('Skipping tracing as no resolvers found on the `ApolloServer` instance.');\n }\n\n return orig.call(this);\n }\n\n const resolvers = arrayify(this.config.resolvers);\n\n this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub);\n\n return orig.call(this);\n };\n });\n }\n }\n}Apollo.__initStatic();\n\n// eslint-disable-next-line deprecation/deprecation\nfunction instrumentResolvers(resolvers, getCurrentHub) {\n return resolvers.map(model => {\n Object.keys(model).forEach(resolverGroupName => {\n Object.keys(model[resolverGroupName]).forEach(resolverName => {\n if (typeof model[resolverGroupName][resolverName] !== 'function') {\n return;\n }\n\n wrapResolver(model, resolverGroupName, resolverName, getCurrentHub);\n });\n });\n\n return model;\n });\n}\n\n/**\n * Wrap a single resolver which can be a parent of other resolvers and/or db operations.\n */\nfunction wrapResolver(\n model,\n resolverGroupName,\n resolverName,\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub,\n) {\n fill(model[resolverGroupName], resolverName, function (orig) {\n return function ( ...args) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: `${resolverGroupName}.${resolverName}`,\n op: 'graphql.resolve',\n origin: 'auto.graphql.apollo',\n })]);\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n\n return rv;\n };\n });\n}\n\nexport { Apollo };\n//# sourceMappingURL=apollo.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';\nimport { logger, getNumberOfUrlSegments, stripUrlQueryAndFragment, extractPathForTransaction, isRegExp, GLOBAL_OBJ } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/* eslint-disable max-lines */\n\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\nclass Express {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Express';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Express App instance\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (!this._router) {\n DEBUG_BUILD && logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('Express Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n instrumentRouter(this._router );\n }\n}Express.__initStatic();\n\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\nfunction wrap(fn, method) {\n const arity = fn.length;\n\n switch (arity) {\n case 2: {\n return function ( req, res) {\n const transaction = res.__sentry_transaction;\n if (transaction) {\n // eslint-disable-next-line deprecation/deprecation\n const span = transaction.startChild({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n });\n res.once('finish', () => {\n span.end();\n });\n }\n return fn.call(this, req, res);\n };\n }\n case 3: {\n return function (\n\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([transaction, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]);\n next.call(this, ...args);\n });\n };\n }\n case 4: {\n return function (\n\n err,\n req,\n res,\n next,\n ) {\n const transaction = res.__sentry_transaction;\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([transaction, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({\n description: fn.name,\n op: `middleware.express.${method}`,\n origin: 'auto.middleware.express',\n })]);\n fn.call(this, err, req, res, function ( ...args) {\n _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]);\n next.call(this, ...args);\n });\n };\n }\n default: {\n throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`);\n }\n }\n}\n\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\nfunction wrapMiddlewareArgs(args, method) {\n return args.map((arg) => {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map((a) => {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n return a;\n });\n }\n\n return arg;\n });\n}\n\n/**\n * Patches original router to utilize our tracing functionality\n */\nfunction patchMiddleware(router, method) {\n const originalCallback = router[method];\n\n router[method] = function (...args) {\n return originalCallback.call(this, ...wrapMiddlewareArgs(args, method));\n };\n\n return router;\n}\n\n/**\n * Patches original router methods\n */\nfunction instrumentMiddlewares(router, methods = []) {\n methods.forEach((method) => patchMiddleware(router, method));\n}\n\n/**\n * Patches the prototype of Express.Router to accumulate the resolved route\n * if a layer instance's `match` function was called and it returned a successful match.\n *\n * @see https://github.com/expressjs/express/blob/master/lib/router/index.js\n *\n * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router.\n */\nfunction instrumentRouter(appOrRouter) {\n // This is how we can distinguish between app and routers\n const isApp = 'settings' in appOrRouter;\n\n // In case the app's top-level router hasn't been initialized yet, we have to do it now\n if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) {\n appOrRouter.lazyrouter();\n }\n\n const router = isApp ? appOrRouter._router : appOrRouter;\n\n if (!router) {\n /*\n If we end up here, this means likely that this integration is used with Express 3 or Express 5.\n For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5,\n we'd need to make more changes to the routing instrumentation because the router is no longer part of\n the Express core package but maintained in its own package. The new router has different function\n signatures and works slightly differently, demanding more changes than just taking the router from\n `app.router` instead of `app._router`.\n @see https://github.com/pillarjs/router\n\n TODO: Proper Express 5 support\n */\n DEBUG_BUILD && logger.debug('Cannot instrument router for URL Parameterization (did not find a valid router).');\n DEBUG_BUILD && logger.debug('Routing instrumentation is currently only supported in Express 4.');\n return;\n }\n\n const routerProto = Object.getPrototypeOf(router) ;\n\n const originalProcessParams = routerProto.process_params;\n routerProto.process_params = function process_params(\n layer,\n called,\n req,\n res,\n done,\n ) {\n // Base case: We're in the first part of the URL (thus we start with the root '/')\n if (!req._reconstructedRoute) {\n req._reconstructedRoute = '';\n }\n\n // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route.\n const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer);\n\n if (layerRoutePath || isRegex || isArray) {\n req._hasParameters = true;\n }\n\n // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path\n let partialRoute;\n\n if (layerRoutePath) {\n partialRoute = layerRoutePath;\n } else {\n /**\n * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path\n * example:\n * original url: /api/v1/1234\n * prevent: /api/api/v1/:userId\n * router structure\n * /api -> middleware\n * /api/v1 -> middleware\n * /1234 -> endpoint with param :userId\n * final _reconstructedRoute is /api/v1/:userId\n */\n partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || '';\n }\n\n // Normalize the partial route so that it doesn't contain leading or trailing slashes\n // and exclude empty or '*' wildcard routes.\n // The exclusion of '*' routes is our best effort to not \"pollute\" the transaction name\n // with interim handlers (e.g. ones that check authentication or do other middleware stuff).\n // We want to end up with the parameterized URL of the incoming request without any extraneous path segments.\n const finalPartialRoute = partialRoute\n .split('/')\n .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*')))\n .join('/');\n\n // If we found a valid partial URL, we append it to the reconstructed route\n if (finalPartialRoute && finalPartialRoute.length > 0) {\n // If the partial route is from a regex route, we append a '/' to close the regex\n req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`;\n }\n\n // Now we check if we are in the \"last\" part of the route. We determine this by comparing the\n // number of URL segments from the original URL to that of our reconstructed parameterized URL.\n // If we've reached our final destination, we update the transaction name.\n const urlLength = getNumberOfUrlSegments(stripUrlQueryAndFragment(req.originalUrl || '')) + numExtraSegments;\n const routeLength = getNumberOfUrlSegments(req._reconstructedRoute);\n\n if (urlLength === routeLength) {\n if (!req._hasParameters) {\n if (req._reconstructedRoute !== req.originalUrl) {\n req._reconstructedRoute = req.originalUrl ? stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl;\n }\n }\n\n const transaction = res.__sentry_transaction;\n const attributes = (transaction && spanToJSON(transaction).data) || {};\n if (transaction && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== 'custom') {\n // If the request URL is '/' or empty, the reconstructed route will be empty.\n // Therefore, we fall back to setting the final route to '/' in this case.\n const finalRoute = req._reconstructedRoute || '/';\n\n const [name, source] = extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute });\n transaction.updateName(name);\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n }\n\n return originalProcessParams.call(this, layer, called, req, res, done);\n };\n}\n\n/**\n * Recreate layer.route.path from layer.regexp and layer.keys.\n * Works until express.js used package path-to-regexp@0.1.7\n * or until layer.keys contain offset attribute\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns string in layer.route.path structure 'router/:pathParam' or undefined\n */\nconst extractOriginalRoute = (\n path,\n regexp,\n keys,\n) => {\n if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.offset])) {\n return undefined;\n }\n\n const orderedKeys = keys.sort((a, b) => a.offset - b.offset);\n\n // add d flag for getting indices from regexp result\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- regexp comes from express.js\n const pathRegex = new RegExp(regexp, `${regexp.flags}d`);\n /**\n * use custom type cause of TS error with missing indices in RegExpExecArray\n */\n const execResult = pathRegex.exec(path) ;\n\n if (!execResult || !execResult.indices) {\n return undefined;\n }\n /**\n * remove first match from regex cause contain whole layer.path\n */\n const [, ...paramIndices] = execResult.indices;\n\n if (paramIndices.length !== orderedKeys.length) {\n return undefined;\n }\n let resultPath = path;\n let indexShift = 0;\n\n /**\n * iterate param matches from regexp.exec\n */\n paramIndices.forEach((item, index) => {\n /** check if offsets is define because in some cases regex d flag returns undefined */\n if (item) {\n const [startOffset, endOffset] = item;\n /**\n * isolate part before param\n */\n const substr1 = resultPath.substring(0, startOffset - indexShift);\n /**\n * define paramName as replacement in format :pathParam\n */\n const replacement = `:${orderedKeys[index].name}`;\n\n /**\n * isolate part after param\n */\n const substr2 = resultPath.substring(endOffset - indexShift);\n\n /**\n * recreate original path but with param replacement\n */\n resultPath = substr1 + replacement + substr2;\n\n /**\n * calculate new index shift after resultPath was modified\n */\n indexShift = indexShift + (endOffset - startOffset - replacement.length);\n }\n });\n\n return resultPath;\n};\n\n/**\n * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`),\n * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\\/path[2-5]/, /path/:id]`). Additionally\n * returns extra information about the route, such as if the route is defined as regex or as an array.\n *\n * @param layer the layer to extract the stringified route from\n *\n * @returns an object containing the stringified route, a flag determining if the route was a regex\n * and the number of extra segments to the matched path that are additionally in the route,\n * if the route was an array (defaults to 0).\n */\nfunction getLayerRoutePathInfo(layer) {\n let lrp = _optionalChain([layer, 'access', _12 => _12.route, 'optionalAccess', _13 => _13.path]);\n\n const isRegex = isRegExp(lrp);\n const isArray = Array.isArray(lrp);\n\n if (!lrp) {\n // parse node.js major version\n // Next.js will complain if we directly use `proces.versions` here because of edge runtime.\n const [major] = (GLOBAL_OBJ ).process.versions.node.split('.').map(Number);\n\n // allow call extractOriginalRoute only if node version support Regex d flag, node 16+\n if (major >= 16) {\n /**\n * If lrp does not exist try to recreate original layer path from route regexp\n */\n lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys);\n }\n }\n\n if (!lrp) {\n return { isRegex, isArray, numExtraSegments: 0 };\n }\n\n const numExtraSegments = isArray\n ? Math.max(getNumberOfArrayUrlSegments(lrp ) - getNumberOfUrlSegments(layer.path || ''), 0)\n : 0;\n\n const layerRoutePath = getLayerRoutePathString(isArray, lrp);\n\n return { layerRoutePath, isRegex, isArray, numExtraSegments };\n}\n\n/**\n * Returns the number of URL segments in an array of routes\n *\n * Example: ['/api/test', /\\/api\\/post[0-9]/, '/users/:id/details`] -> 7\n */\nfunction getNumberOfArrayUrlSegments(routesArray) {\n return routesArray.reduce((accNumSegments, currentRoute) => {\n // array members can be a RegEx -> convert them toString\n return accNumSegments + getNumberOfUrlSegments(currentRoute.toString());\n }, 0);\n}\n\n/**\n * Extracts and returns the stringified version of the layers route path\n * Handles route arrays (by joining the paths together) as well as RegExp and normal\n * string values (in the latter case the toString conversion is technically unnecessary but\n * it doesn't hurt us either).\n */\nfunction getLayerRoutePathString(isArray, lrp) {\n if (isArray) {\n return (lrp ).map(r => r.toString()).join(',');\n }\n return lrp && lrp.toString();\n}\n\n/**\n * remove duplicate segment contain in layerPath against reconstructedRoute,\n * and return only unique segment that can be added into reconstructedRoute\n */\nfunction preventDuplicateSegments(\n originalUrl,\n reconstructedRoute,\n layerPath,\n) {\n // filter query params\n const normalizeURL = stripUrlQueryAndFragment(originalUrl || '');\n const originalUrlSplit = _optionalChain([normalizeURL, 'optionalAccess', _14 => _14.split, 'call', _15 => _15('/'), 'access', _16 => _16.filter, 'call', _17 => _17(v => !!v)]);\n let tempCounter = 0;\n const currentOffset = _optionalChain([reconstructedRoute, 'optionalAccess', _18 => _18.split, 'call', _19 => _19('/'), 'access', _20 => _20.filter, 'call', _21 => _21(v => !!v), 'access', _22 => _22.length]) || 0;\n const result = _optionalChain([layerPath\n, 'optionalAccess', _23 => _23.split, 'call', _24 => _24('/')\n, 'access', _25 => _25.filter, 'call', _26 => _26(segment => {\n if (_optionalChain([originalUrlSplit, 'optionalAccess', _27 => _27[currentOffset + tempCounter]]) === segment) {\n tempCounter += 1;\n return true;\n }\n return false;\n })\n, 'access', _28 => _28.join, 'call', _29 => _29('/')]);\n return result;\n}\n\nexport { Express, extractOriginalRoute, preventDuplicateSegments };\n//# sourceMappingURL=express.js.map\n","import { parseCookie } from './cookie.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isString, isPlainObject } from './is.js';\nimport { logger } from './logger.js';\nimport { normalize } from './normalize.js';\nimport { stripUrlQueryAndFragment } from './url.js';\n\nconst DEFAULT_INCLUDES = {\n ip: false,\n request: true,\n transaction: true,\n user: true,\n};\nconst DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\nconst DEFAULT_USER_INCLUDES = ['id', 'username', 'email'];\n\n/**\n * Sets parameterized route as transaction name e.g.: `GET /users/:id`\n * Also adds more context data on the transaction from the request.\n *\n * @deprecated This utility will be removed in v8.\n */\nfunction addRequestDataToTransaction(\n transaction,\n req,\n deps,\n) {\n if (!transaction) return;\n // eslint-disable-next-line deprecation/deprecation\n if (!transaction.metadata.source || transaction.metadata.source === 'url') {\n // Attempt to grab a parameterized route off of the request\n const [name, source] = extractPathForTransaction(req, { path: true, method: true });\n transaction.updateName(name);\n // TODO: SEMANTIC_ATTRIBUTE_SENTRY_SOURCE is in core, align this once we merge utils & core\n // eslint-disable-next-line deprecation/deprecation\n transaction.setMetadata({ source });\n }\n transaction.setAttribute('url', req.originalUrl || req.url);\n if (req.baseUrl) {\n transaction.setAttribute('baseUrl', req.baseUrl);\n }\n // TODO: We need to rewrite this to a flat format?\n // eslint-disable-next-line deprecation/deprecation\n transaction.setData('query', extractQueryParams(req, deps));\n}\n\n/**\n * Extracts a complete and parameterized path from the request object and uses it to construct transaction name.\n * If the parameterized transaction name cannot be extracted, we fall back to the raw URL.\n *\n * Additionally, this function determines and returns the transaction name source\n *\n * eg. GET /mountpoint/user/:id\n *\n * @param req A request object\n * @param options What to include in the transaction name (method, path, or a custom route name to be\n * used instead of the request's route)\n *\n * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')\n */\nfunction extractPathForTransaction(\n req,\n options = {},\n) {\n const method = req.method && req.method.toUpperCase();\n\n let path = '';\n let source = 'url';\n\n // Check to see if there's a parameterized route we can use (as there is in Express)\n if (options.customRoute || req.route) {\n path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`;\n source = 'route';\n }\n\n // Otherwise, just take the original URL\n else if (req.originalUrl || req.url) {\n path = stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n }\n\n let name = '';\n if (options.method && method) {\n name += method;\n }\n if (options.method && options.path) {\n name += ' ';\n }\n if (options.path && path) {\n name += path;\n }\n\n return [name, source];\n}\n\n/** JSDoc */\nfunction extractTransaction(req, type) {\n switch (type) {\n case 'path': {\n return extractPathForTransaction(req, { path: true })[0];\n }\n case 'handler': {\n return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || '';\n }\n case 'methodPath':\n default: {\n // if exist _reconstructedRoute return that path instead of route.path\n const customRoute = req._reconstructedRoute ? req._reconstructedRoute : undefined;\n return extractPathForTransaction(req, { path: true, method: true, customRoute })[0];\n }\n }\n}\n\n/** JSDoc */\nfunction extractUserData(\n user\n\n,\n keys,\n) {\n const extractedUser = {};\n const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES;\n\n attributes.forEach(key => {\n if (user && key in user) {\n extractedUser[key] = user[key];\n }\n });\n\n return extractedUser;\n}\n\n/**\n * Normalize data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param options.include An optional array of keys to include in the normalized data. Defaults to\n * DEFAULT_REQUEST_INCLUDES if not provided.\n * @param options.deps Injected, platform-specific dependencies\n * @returns An object containing normalized request data\n */\nfunction extractRequestData(\n req,\n options\n\n,\n) {\n const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const requestData = {};\n\n // headers:\n // node, express, koa, nextjs: req.headers\n const headers = (req.headers || {})\n\n;\n // method:\n // node, express, koa, nextjs: req.method\n const method = req.method;\n // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node, nextjs: req.headers.host\n // Express 4 mistakenly strips off port number from req.host / req.hostname so we can't rely on them\n // See: https://github.com/expressjs/express/issues/3047#issuecomment-236653223\n // Also: https://github.com/getsentry/sentry-javascript/issues/1917\n const host = headers.host || req.hostname || req.host || '';\n // protocol:\n // node, nextjs: \n // express, koa: req.protocol\n const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http';\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n const originalUrl = req.originalUrl || req.url || '';\n // absolute url\n const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`;\n include.forEach(key => {\n switch (key) {\n case 'headers': {\n requestData.headers = headers;\n\n // Remove the Cookie header in case cookie data should not be included in the event\n if (!include.includes('cookies')) {\n delete (requestData.headers ).cookie;\n }\n\n break;\n }\n case 'method': {\n requestData.method = method;\n break;\n }\n case 'url': {\n requestData.url = absoluteUrl;\n break;\n }\n case 'cookies': {\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies\n requestData.cookies =\n // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can\n // come off in v8\n req.cookies || (headers.cookie && parseCookie(headers.cookie)) || {};\n break;\n }\n case 'query_string': {\n // query string:\n // node: req.url (raw)\n // express, koa, nextjs: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = extractQueryParams(req, deps);\n break;\n }\n case 'data': {\n if (method === 'GET' || method === 'HEAD') {\n break;\n }\n // body data:\n // express, koa, nextjs: req.body\n //\n // when using node by itself, you have to read the incoming stream(see\n // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know\n // where they're going to store the final result, so they'll have to capture this data themselves\n if (req.body !== undefined) {\n requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));\n }\n break;\n }\n default: {\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = (req )[key];\n }\n }\n }\n });\n\n return requestData;\n}\n\n/**\n * Add data from the given request to the given event\n *\n * @param event The event to which the request data will be added\n * @param req Request object\n * @param options.include Flags to control what data is included\n * @param options.deps Injected platform-specific dependencies\n * @returns The mutated `Event` object\n */\nfunction addRequestDataToEvent(\n event,\n req,\n options,\n) {\n const include = {\n ...DEFAULT_INCLUDES,\n ...(options && options.include),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: options && options.deps })\n : extractRequestData(req, { deps: options && options.deps });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}\n\nfunction extractQueryParams(\n req,\n deps,\n) {\n // url (including path and query string):\n // node, express: req.originalUrl\n // koa, nextjs: req.url\n let originalUrl = req.originalUrl || req.url || '';\n\n if (!originalUrl) {\n return;\n }\n\n // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and\n // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use.\n if (originalUrl.startsWith('/')) {\n originalUrl = `http://dogs.are.great${originalUrl}`;\n }\n\n try {\n return (\n req.query ||\n (typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) ||\n // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node\n (deps && deps.url && deps.url.parse(originalUrl).query) ||\n undefined\n );\n } catch (e2) {\n return undefined;\n }\n}\n\n/**\n * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.\n * The header keys will be lower case: e.g. A \"Content-Type\" header will be stored as \"content-type\".\n */\n// TODO(v8): Make this function return undefined when the extraction fails.\nfunction winterCGHeadersToDict(winterCGHeaders) {\n const headers = {};\n try {\n winterCGHeaders.forEach((value, key) => {\n if (typeof value === 'string') {\n // We check that value is a string even though it might be redundant to make sure prototype pollution is not possible.\n headers[key] = value;\n }\n });\n } catch (e) {\n DEBUG_BUILD &&\n logger.warn('Sentry failed extracting headers from a request object. If you see this, please file an issue.');\n }\n\n return headers;\n}\n\n/**\n * Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.\n */\nfunction winterCGRequestToRequestData(req) {\n const headers = winterCGHeadersToDict(req.headers);\n return {\n method: req.method,\n url: req.url,\n headers,\n };\n}\n\nexport { DEFAULT_USER_INCLUDES, addRequestDataToEvent, addRequestDataToTransaction, extractPathForTransaction, extractRequestData, winterCGHeadersToDict, winterCGRequestToRequestData };\n//# sourceMappingURL=requestdata.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for graphql package */\nclass GraphQL {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GraphQL';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = GraphQL.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('graphql/execution/execute.js'));\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('GraphQL Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n DEBUG_BUILD && logger.error('GraphQL Integration was unable to require graphql/execution package.');\n return;\n }\n\n fill(pkg, 'execute', function (orig) {\n return function ( ...args) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: 'execute',\n op: 'graphql.execute',\n origin: 'auto.graphql.graphql',\n })]);\n\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _4 => _4.setSpan, 'call', _5 => _5(span)]);\n\n const rv = orig.call(this, ...args);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _8 => _8.setSpan, 'call', _9 => _9(parentSpan)]);\n\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]);\n // eslint-disable-next-line deprecation/deprecation\n _optionalChain([scope, 'optionalAccess', _12 => _12.setSpan, 'call', _13 => _13(parentSpan)]);\n return rv;\n };\n });\n }\n}GraphQL.__initStatic();\n\nexport { GraphQL };\n//# sourceMappingURL=graphql.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n// This allows us to use the same array for both defaults options and the type itself.\n// (note `as const` at the end to make it a union of string literal types (i.e. \"a\" | \"b\" | ... )\n// and not just a string[])\n\nconst OPERATIONS = [\n 'aggregate', // aggregate(pipeline, options, callback)\n 'bulkWrite', // bulkWrite(operations, options, callback)\n 'countDocuments', // countDocuments(query, options, callback)\n 'createIndex', // createIndex(fieldOrSpec, options, callback)\n 'createIndexes', // createIndexes(indexSpecs, options, callback)\n 'deleteMany', // deleteMany(filter, options, callback)\n 'deleteOne', // deleteOne(filter, options, callback)\n 'distinct', // distinct(key, query, options, callback)\n 'drop', // drop(options, callback)\n 'dropIndex', // dropIndex(indexName, options, callback)\n 'dropIndexes', // dropIndexes(options, callback)\n 'estimatedDocumentCount', // estimatedDocumentCount(options, callback)\n 'find', // find(query, options, callback)\n 'findOne', // findOne(query, options, callback)\n 'findOneAndDelete', // findOneAndDelete(filter, options, callback)\n 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback)\n 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback)\n 'indexes', // indexes(options, callback)\n 'indexExists', // indexExists(indexes, options, callback)\n 'indexInformation', // indexInformation(options, callback)\n 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback)\n 'insertMany', // insertMany(docs, options, callback)\n 'insertOne', // insertOne(doc, options, callback)\n 'isCapped', // isCapped(options, callback)\n 'mapReduce', // mapReduce(map, reduce, options, callback)\n 'options', // options(options, callback)\n 'parallelCollectionScan', // parallelCollectionScan(options, callback)\n 'rename', // rename(newName, options, callback)\n 'replaceOne', // replaceOne(filter, doc, options, callback)\n 'stats', // stats(options, callback)\n 'updateMany', // updateMany(filter, update, options, callback)\n 'updateOne', // updateOne(filter, update, options, callback)\n] ;\n\n// All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\nconst OPERATION_SIGNATURES\n\n = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n find: ['query'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update'],\n};\n\nfunction isCursor(maybeCursor) {\n return maybeCursor && typeof maybeCursor === 'object' && maybeCursor.once && typeof maybeCursor.once === 'function';\n}\n\n/** Tracing integration for mongo package */\nclass Mongo {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mongo';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS );\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n this._useMongoose = !!options.useMongoose;\n }\n\n /** @inheritdoc */\n loadDependency() {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n return (this._module = this._module || loadModule(moduleName));\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('Mongo Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n const moduleName = this._useMongoose ? 'mongoose' : 'mongodb';\n DEBUG_BUILD && logger.error(`Mongo Integration was unable to require \\`${moduleName}\\` package.`);\n return;\n }\n\n this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub);\n }\n\n /**\n * Patches original collection methods\n */\n // eslint-disable-next-line deprecation/deprecation\n _instrumentOperations(collection, operations, getCurrentHub) {\n operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub));\n }\n\n /**\n * Patches original collection to utilize our tracing functionality\n */\n // eslint-disable-next-line deprecation/deprecation\n _patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig) {\n return function ( ...args) {\n const lastArg = args[args.length - 1];\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const scope = hub.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const sendDefaultPii = _optionalChain([client, 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3(), 'access', _4 => _4.sendDefaultPii]);\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _5 => _5.startChild, 'call', _6 => _6(getSpanContext(this, operation, args, sendDefaultPii))]);\n const maybePromiseOrCursor = orig.call(this, ...args);\n\n if (isThenable(maybePromiseOrCursor)) {\n return maybePromiseOrCursor.then((res) => {\n _optionalChain([span, 'optionalAccess', _7 => _7.end, 'call', _8 => _8()]);\n return res;\n });\n }\n // If the operation returns a Cursor\n // we need to attach a listener to it to finish the span when the cursor is closed.\n else if (isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor ;\n\n try {\n cursor.once('close', () => {\n _optionalChain([span, 'optionalAccess', _9 => _9.end, 'call', _10 => _10()]);\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n _optionalChain([span, 'optionalAccess', _11 => _11.end, 'call', _12 => _12()]);\n }\n\n return cursor;\n } else {\n _optionalChain([span, 'optionalAccess', _13 => _13.end, 'call', _14 => _14()]);\n return maybePromiseOrCursor;\n }\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _15 => _15.startChild, 'call', _16 => _16(getSpanContext(this, operation, args.slice(0, -1)))]);\n\n return orig.call(this, ...args.slice(0, -1), function (err, result) {\n _optionalChain([span, 'optionalAccess', _17 => _17.end, 'call', _18 => _18()]);\n lastArg(err, result);\n });\n };\n });\n }\n\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n _getSpanContextFromOperationArguments(\n collection,\n operation,\n args,\n sendDefaultPii = false,\n ) {\n const data = {\n 'db.system': 'mongodb',\n 'db.name': collection.dbName,\n 'db.operation': operation,\n 'db.mongodb.collection': collection.collectionName,\n };\n const spanContext = {\n op: 'db',\n // TODO v8: Use `${collection.collectionName}.${operation}`\n origin: 'auto.db.mongo',\n description: operation,\n data,\n };\n\n // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n const signature = OPERATION_SIGNATURES[operation];\n const shouldDescribe = Array.isArray(this._describeOperations)\n ? this._describeOperations.includes(operation)\n : this._describeOperations;\n\n if (!signature || !shouldDescribe || !sendDefaultPii) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n const [map, reduce] = args ;\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (let i = 0; i < signature.length; i++) {\n data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {\n // no-empty\n }\n\n return spanContext;\n }\n}Mongo.__initStatic();\n\nexport { Mongo };\n//# sourceMappingURL=mongo.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for node-mysql package */\nclass Mysql {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mysql';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Mysql.id;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('mysql/lib/Connection.js'));\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('Mysql Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n DEBUG_BUILD && logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n let mySqlConfig = undefined;\n\n try {\n pkg.prototype.connect = new Proxy(pkg.prototype.connect, {\n apply(wrappingTarget, thisArg, args) {\n if (!mySqlConfig) {\n mySqlConfig = thisArg.config;\n }\n return wrappingTarget.apply(thisArg, args);\n },\n });\n } catch (e) {\n DEBUG_BUILD && logger.error('Mysql Integration was unable to instrument `mysql` config.');\n }\n\n function spanDataFromConfig() {\n if (!mySqlConfig) {\n return {};\n }\n return {\n 'server.address': mySqlConfig.host,\n 'server.port': mySqlConfig.port,\n 'db.user': mySqlConfig.user,\n };\n }\n\n function finishSpan(span) {\n if (!span) {\n return;\n }\n\n const data = spanDataFromConfig();\n Object.keys(data).forEach(key => {\n span.setAttribute(key, data[key]);\n });\n\n span.end();\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig) {\n return function ( options, values, callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({\n description: typeof options === 'string' ? options : (options ).sql,\n op: 'db',\n origin: 'auto.db.mysql',\n data: {\n 'db.system': 'mysql',\n },\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n finishSpan(span);\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n finishSpan(span);\n values(err, result, fields);\n });\n }\n\n // streaming, no callback!\n const query = orig.call(this, options, values) ;\n\n query.on('end', () => {\n finishSpan(span);\n });\n\n return query;\n };\n });\n }\n}Mysql.__initStatic();\n\nexport { Mysql };\n//# sourceMappingURL=mysql.js.map\n","import { _optionalChain } from '@sentry/utils';\nimport { loadModule, logger, fill, isThenable } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\n/** Tracing integration for node-postgres package */\nclass Postgres {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Postgres';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = Postgres.id;\n this._usePgNative = !!options.usePgNative;\n this._module = options.module;\n }\n\n /** @inheritdoc */\n loadDependency() {\n return (this._module = this._module || loadModule('pg'));\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n setupOnce(_, getCurrentHub) {\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n DEBUG_BUILD && logger.log('Postgres Integration is skipped because of instrumenter configuration.');\n return;\n }\n\n const pkg = this.loadDependency();\n\n if (!pkg) {\n DEBUG_BUILD && logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n\n const Client = this._usePgNative ? _optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client]) : pkg.Client;\n\n if (!Client) {\n DEBUG_BUILD && logger.error(\"Postgres Integration was unable to access 'pg-native' bindings.\");\n return;\n }\n\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n * function (pg.Cursor) => pg.Cursor\n */\n fill(Client.prototype, 'query', function (orig) {\n return function ( config, values, callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = getCurrentHub().getScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const data = {\n 'db.system': 'postgresql',\n };\n\n try {\n if (this.database) {\n data['db.name'] = this.database;\n }\n if (this.host) {\n data['server.address'] = this.host;\n }\n if (this.port) {\n data['server.port'] = this.port;\n }\n if (this.user) {\n data['db.user'] = this.user;\n }\n } catch (e) {\n // ignore\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({\n description: typeof config === 'string' ? config : (config ).text,\n op: 'db',\n origin: 'auto.db.postgres',\n data,\n })]);\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]);\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]);\n values(err, result);\n });\n }\n\n const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config);\n\n if (isThenable(rv)) {\n return rv.then((res) => {\n _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]);\n return res;\n });\n }\n\n _optionalChain([span, 'optionalAccess', _12 => _12.end, 'call', _13 => _13()]);\n return rv;\n };\n });\n }\n}Postgres.__initStatic();\n\nexport { Postgres };\n//# sourceMappingURL=postgres.js.map\n","import { startSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getCurrentHub } from '@sentry/core';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../../common/debug-build.js';\nimport { shouldDisableAutoInstrumentation } from './utils/node-utils.js';\n\nfunction isValidPrismaClient(possibleClient) {\n return !!possibleClient && !!(possibleClient )['$use'];\n}\n\n/** Tracing integration for @prisma/client package */\nclass Prisma {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Prisma';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = Prisma.id;\n\n // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side\n // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting\n // in setupOnce we can only ever instrument one client.\n // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012\n // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack.\n if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n addNonEnumerableProperty(options.client , '_sentryInstrumented', true);\n\n const clientData = {};\n try {\n const engineConfig = (options.client )._engineConfig;\n if (engineConfig) {\n const { activeProvider, clientVersion } = engineConfig;\n if (activeProvider) {\n clientData['db.system'] = activeProvider;\n }\n if (clientVersion) {\n clientData['db.prisma.version'] = clientVersion;\n }\n }\n } catch (e) {\n // ignore\n }\n\n options.client.$use((params, next) => {\n // eslint-disable-next-line deprecation/deprecation\n if (shouldDisableAutoInstrumentation(getCurrentHub)) {\n return next(params);\n }\n\n const action = params.action;\n const model = params.model;\n\n return startSpan(\n {\n name: model ? `${model} ${action}` : action,\n onlyIfParent: true,\n op: 'db.prisma',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.prisma',\n },\n data: { ...clientData, 'db.operation': action },\n },\n () => next(params),\n );\n });\n } else {\n DEBUG_BUILD &&\n logger.warn('Unsupported Prisma client provided to PrismaIntegration. Provided client:', options.client);\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // Noop - here for backwards compatibility\n }\n} Prisma.__initStatic();\n\nexport { Prisma };\n//# sourceMappingURL=prisma.js.map\n","import { _optionalChain } from '@sentry/utils';\n\n/**\n * Check if Sentry auto-instrumentation should be disabled.\n *\n * @param getCurrentHub A method to fetch the current hub\n * @returns boolean\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction shouldDisableAutoInstrumentation(getCurrentHub) {\n // eslint-disable-next-line deprecation/deprecation\n const clientOptions = _optionalChain([getCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]);\n const instrumenter = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.instrumenter]) || 'sentry';\n\n return instrumenter !== 'sentry';\n}\n\nexport { shouldDisableAutoInstrumentation };\n//# sourceMappingURL=node-utils.js.map\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { logger, uuid4, timestampInSeconds, isThenable, GLOBAL_OBJ } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { getCurrentHub, runWithAsyncContext, getIsolationScope } from './hub.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exception,\n hint,\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param exception The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n *\n * @deprecated Use getCurrentScope() directly.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().addBreadcrumb(breadcrumb, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, deprecation/deprecation\nfunction setContext(name, context) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtras(extras) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setExtra(key, extra) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTags(tags) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setUser(user) {\n // eslint-disable-next-line deprecation/deprecation\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n */\n\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n ...rest\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(callback);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(() => {\n // eslint-disable-next-line deprecation/deprecation\n hub.getStackTop().scope = scope ;\n return callback(scope );\n });\n }\n\n // eslint-disable-next-line deprecation/deprecation\n return hub.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async\n * context strategy, the currently active isolation scope may change within execution of the callback.)\n * @returns The same value that `callback` returns.\n */\nfunction withIsolationScope(callback) {\n return runWithAsyncContext(() => {\n return callback(getIsolationScope());\n });\n}\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback.\n *\n * @param span Spans started in the context of the provided callback will be children of this span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n return withScope(scope => {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n return callback(scope);\n });\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n // eslint-disable-next-line deprecation/deprecation\n) {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n * @deprecated This function will be removed in the next major version of the Sentry SDK.\n */\nfunction lastEventId() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().lastEventId();\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getClient();\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n return !!getClient();\n}\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getScope();\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nfunction captureSession(end = false) {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, endSession, flush, getClient, getCurrentScope, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope };\n//# sourceMappingURL=exports.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import { SyncPromise, logger, isThenable, getGlobalSingleton } from '@sentry/utils';\nimport { DEBUG_BUILD } from './debug-build.js';\n\n/**\n * Returns the global event processors.\n * @deprecated Global event processors will be removed in v8.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8.\n */\nfunction addGlobalEventProcessor(callback) {\n // eslint-disable-next-line deprecation/deprecation\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };\n//# sourceMappingURL=scope.js.map\n","import { dropUndefinedKeys, arrayify } from '@sentry/utils';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { getRootSpan } from './getRootSpan.js';\nimport { spanToTraceContext, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n mergeAndOverwriteScopeData(data, 'sdkProcessingMetadata', sdkProcessingMetadata);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n // eslint-disable-next-line deprecation/deprecation\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n if (mergeVal && Object.keys(mergeVal).length) {\n // Clone object\n data[prop] = { ...data[prop] };\n for (const key in mergeVal) {\n if (Object.prototype.hasOwnProperty.call(mergeVal, key)) {\n data[prop][key] = mergeVal[key];\n }\n }\n }\n}\n\nfunction applyDataToEvent(event, data) {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n // eslint-disable-next-line deprecation/deprecation\n transactionName,\n } = data;\n\n const cleanedExtra = dropUndefinedKeys(extra);\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = dropUndefinedKeys(tags);\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = dropUndefinedKeys(user);\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n if (transactionName) {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event, span) {\n event.contexts = { trace: spanToTraceContext(span), ...event.contexts };\n const rootSpan = getRootSpan(span);\n if (rootSpan) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event, fingerprint) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n//# sourceMappingURL=applyScopeDataToEvent.js.map\n","const SDK_VERSION = '7.114.0';\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { isThenable, uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\nimport { SDK_VERSION } from './version.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = parseFloat(SDK_VERSION);\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @deprecated The `Hub` class will be removed in version 8 of the SDK in favour of `Scope` and `Client` objects.\n *\n * If you previously used the `Hub` class directly, replace it with `Scope` and `Client` objects. More information:\n * - [Multiple Sentry Instances](https://docs.sentry.io/platforms/javascript/best-practices/multiple-sentry-instances/)\n * - [Browser Extensions](https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/)\n *\n * Some of our APIs are typed with the Hub class instead of the interface (e.g. `getCurrentHub`). Most of them are deprecated\n * themselves and will also be removed in version 8. More information:\n * - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)\n */\n// eslint-disable-next-line deprecation/deprecation\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n *\n * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.\n *\n * If you are currently using the Hub for multi-client use like so:\n *\n * ```\n * // OLD\n * const hub = new Hub();\n * hub.bindClient(client);\n * makeMain(hub)\n * ```\n *\n * instead initialize the client as follows:\n *\n * ```\n * // NEW\n * Sentry.withIsolationScope(() => {\n * Sentry.setCurrentClient(client);\n * client.init();\n * });\n * ```\n *\n * If you are using the Hub to capture events like so:\n *\n * ```\n * // OLD\n * const client = new Client();\n * const hub = new Hub(client);\n * hub.captureException()\n * ```\n *\n * instead capture isolated events as follows:\n *\n * ```\n * // NEW\n * const client = new Client();\n * const scope = new Scope();\n * scope.setClient(client);\n * scope.captureException();\n * ```\n */\n constructor(\n client,\n scope,\n isolationScope,\n _version = API_VERSION,\n ) {this._version = _version;\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n assignedScope.setClient(client);\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n assignedIsolationScope.setClient(client);\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n this._stack = [{ scope: assignedScope }];\n\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n this.bindClient(client);\n }\n\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @deprecated This will be removed in v8.\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n *\n * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.\n */\n bindClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n const top = this.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n // eslint-disable-next-line deprecation/deprecation\n if (client && client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n pushScope() {\n // We want to clone the content of prev scope\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope().clone();\n // eslint-disable-next-line deprecation/deprecation\n this.getStack().push({\n // eslint-disable-next-line deprecation/deprecation\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n popScope() {\n // eslint-disable-next-line deprecation/deprecation\n if (this.getStack().length <= 1) return false;\n // eslint-disable-next-line deprecation/deprecation\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.withScope()` instead.\n */\n withScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return res;\n },\n e => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n },\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return maybePromiseResult;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.getClient()` instead.\n */\n getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n *\n * @deprecated Use `Sentry.getCurrentScope()` instead.\n */\n getScope() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().scope;\n }\n\n /**\n * @deprecated Use `Sentry.getIsolationScope()` instead.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the scope stack for domains or the process.\n * @deprecated This will be removed in v8.\n */\n getStack() {\n return this._stack;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n * @deprecated This will be removed in v8.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureException()` instead.\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureException(exception, {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureMessage()` instead.\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureMessage(message, level, {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureEvent()` instead.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureEvent(event, { ...hint, event_id: eventId });\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated This will be removed in v8.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.addBreadcrumb()` instead.\n */\n addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to\n // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would\n // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope\n // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would\n // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout\n // the event processing pipeline.\n // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setUser()` instead.\n */\n setUser(user) {\n // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setUser(user);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTags()` instead.\n */\n setTags(tags) {\n // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTags(tags);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtras()` instead.\n */\n setExtras(extras) {\n // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtras(extras);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTag()` instead.\n */\n setTag(key, value) {\n // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTag(key, value);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtra()` instead.\n */\n setExtra(key, extra) {\n // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtra(key, extra);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setContext()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setContext(name, context);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `getScope()` directly.\n */\n configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n run(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n // eslint-disable-next-line deprecation/deprecation\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.\n */\n getIntegration(integration) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) return null;\n try {\n // eslint-disable-next-line deprecation/deprecation\n return client.getIntegration(integration);\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (DEBUG_BUILD && !result) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) {\n logger.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top level `captureSession` instead.\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n // eslint-disable-next-line deprecation/deprecation\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `endSession` instead.\n */\n endSession() {\n // eslint-disable-next-line deprecation/deprecation\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `startSession` instead.\n */\n startSession(context) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n // eslint-disable-next-line deprecation/deprecation\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n *\n * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function\n * only unnecessarily increased API surface but only wrapped accessing the option.\n */\n shouldSendDefaultPii() {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n DEBUG_BUILD && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n *\n * @deprecated Use `setCurrentClient()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n *\n * @deprecated Use the respective replacement method directly instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current exection context,\n * meaning that it will remain stable for the same Hub.\n */\nfunction getIsolationScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getIsolationScope();\n}\n\n// eslint-disable-next-line deprecation/deprecation\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n\n if (\n !hasHubOnCarrier(registry) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(registry).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (\n !hasHubOnCarrier(carrier) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(carrier).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const client = parent.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const scope = parent.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const isolationScope = parent.getIsolationScope();\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone()));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getHubFromCarrier(carrier) {\n // eslint-disable-next-line deprecation/deprecation\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getIsolationScope, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };\n//# sourceMappingURL=metric-summary.js.map\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/**\n * The id of the profile that this span occured in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'profile_id';\n\nexport { SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE };\n//# sourceMappingURL=semanticAttributes.js.map\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient, getCurrentScope } from '../exports.js';\nimport { getRootSpan } from '../utils/getRootSpan.js';\nimport { spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n // TODO(v8): Remove segment from User\n // eslint-disable-next-line deprecation/deprecation\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * A Span with a frozen dynamic sampling context.\n */\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n\n // passing emit=false here to only emit later once the DSC is actually populated\n const dsc = getDynamicSamplingContextFromClient(spanToJSON(span).trace_id || '', client, getCurrentScope());\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n const txn = getRootSpan(span) ;\n if (!txn) {\n return dsc;\n }\n\n // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext\n // For now we need to avoid breaking users who directly created a txn with a DSC, where this field is still set.\n // @see Transaction class constructor\n const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext;\n if (v7FrozenDsc) {\n return v7FrozenDsc;\n }\n\n // TODO (v8): Replace txn.metadata with txn.attributes[]\n // We can't do this yet because attributes aren't always set yet.\n // eslint-disable-next-line deprecation/deprecation\n const { sampleRate: maybeSampleRate, source } = txn.metadata;\n if (maybeSampleRate != null) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const jsonSpan = spanToJSON(txn);\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n if (source && source !== 'url') {\n dsc.transaction = jsonSpan.description;\n }\n\n dsc.sampled = String(spanIsSampled(txn));\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexport { getDynamicSamplingContextFromClient, getDynamicSamplingContextFromSpan };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n GLOBAL_OBJ.onerror = function (\n msg,\n url,\n line,\n column,\n error,\n ) {\n const handlerData = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './_handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n handler,\n) {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n GLOBAL_OBJ.onunhandledrejection = function (e) {\n const handlerData = e;\n triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","import { addGlobalErrorInstrumentationHandler, addGlobalUnhandledRejectionInstrumentationHandler, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getActiveTransaction } from './utils.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addGlobalErrorInstrumentationHandler(errorCallback);\n addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n // eslint-disable-next-line deprecation/deprecation\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status = 'internal_error';\n DEBUG_BUILD && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getMainCarrier } from '../hub.js';\nimport { spanToTraceHeader } from '../utils/spanUtils.js';\nimport { registerErrorInstrumentation } from './errors.js';\nimport { IdleTransaction } from './idletransaction.js';\nimport { sampleTransaction } from './sampling.js';\nimport { Transaction } from './transaction.js';\n\n/** Returns all trace headers that are currently on the top scope. */\n// eslint-disable-next-line deprecation/deprecation\nfunction traceHeaders() {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': spanToTraceHeader(span),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n // eslint-disable-next-line deprecation/deprecation\n\n transactionContext,\n customSamplingContext,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n DEBUG_BUILD &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n // eslint-disable-next-line deprecation/deprecation\n transactionContext.sampled = false;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n ...customSamplingContext,\n });\n if (transaction.isRecording()) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nfunction startIdleTransaction(\n // eslint-disable-next-line deprecation/deprecation\n hub,\n transactionContext,\n idleTimeout,\n finalTimeout,\n onScope,\n customSamplingContext,\n heartbeatInterval,\n delayAutoFinishUntilSignal = false,\n) {\n // eslint-disable-next-line deprecation/deprecation\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {};\n\n // eslint-disable-next-line deprecation/deprecation\n let transaction = new IdleTransaction(\n transactionContext,\n hub,\n idleTimeout,\n finalTimeout,\n heartbeatInterval,\n onScope,\n delayAutoFinishUntilSignal,\n );\n transaction = sampleTransaction(transaction, options, {\n name: transactionContext.name,\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n attributes: {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.data,\n ...transactionContext.attributes,\n },\n ...customSamplingContext,\n });\n if (transaction.isRecording()) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nfunction addTracingExtensions() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n\nexport { addTracingExtensions, startIdleTransaction };\n//# sourceMappingURL=hubextensions.js.map\n","import { logger, timestampInSeconds } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { spanTimeInputToSeconds, spanToJSON } from '../utils/spanUtils.js';\nimport { SpanRecorder } from './span.js';\nimport { Transaction } from './transaction.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nclass IdleTransactionSpanRecorder extends SpanRecorder {\n constructor(\n _pushActivity,\n _popActivity,\n transactionSpanId,\n maxlen,\n ) {\n super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; }\n\n /**\n * @inheritDoc\n */\n add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanContext().spanId !== this.transactionSpanId) {\n // We patch span.end() to pop an activity after setting an endTimestamp.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalEnd = span.end;\n span.end = (...rest) => {\n this._popActivity(span.spanContext().spanId);\n return originalEnd.apply(span, rest);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (spanToJSON(span).timestamp === undefined) {\n this._pushActivity(span.spanContext().spanId);\n }\n }\n\n super.add(span);\n }\n}\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nclass IdleTransaction extends Transaction {\n // Activities store a list of active spans\n\n // Track state of activities in previous heartbeat\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n // We should not use heartbeat if we finished a transaction\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n\n /**\n * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n constructor(\n transactionContext,\n // eslint-disable-next-line deprecation/deprecation\n _idleHub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n _idleTimeout = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n _finalTimeout = TRACING_DEFAULTS.finalTimeout,\n _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false,\n /**\n * When set to `true`, will disable the idle timeout (`_idleTimeout` option) and heartbeat mechanisms (`_heartbeatInterval`\n * option) until the `sendAutoFinishSignal()` method is called. The final timeout mechanism (`_finalTimeout` option)\n * will not be affected by this option, meaning the transaction will definitely be finished when the final timeout is\n * reached, no matter what this option is configured to.\n *\n * Defaults to `false`.\n */\n delayAutoFinishUntilSignal = false,\n ) {\n super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n this._autoFinishAllowed = !delayAutoFinishUntilSignal;\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n DEBUG_BUILD && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`);\n // eslint-disable-next-line deprecation/deprecation\n _idleHub.getScope().setSpan(this);\n }\n\n if (!delayAutoFinishUntilSignal) {\n this._restartIdleTimeout();\n }\n\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.end();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n end(endTimestamp) {\n const endTimestampInS = spanTimeInputToSeconds(endTimestamp);\n\n this._finished = true;\n this.activities = {};\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.op === 'ui.action.click') {\n this.setAttribute(FINISH_REASON_TAG, this._finishReason);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n if (this.spanRecorder) {\n DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestampInS * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestampInS);\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanContext().spanId === this.spanContext().spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!spanToJSON(span).timestamp) {\n span.setStatus('cancelled');\n span.end(endTimestampInS);\n DEBUG_BUILD &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const { start_timestamp: startTime, timestamp: endTime } = spanToJSON(span);\n const spanStartedBeforeTransactionFinish = startTime && startTime < endTimestampInS;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = endTime && startTime && endTime - startTime < timeoutWithMarginOfError;\n\n if (DEBUG_BUILD) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n DEBUG_BUILD && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n DEBUG_BUILD && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this._idleHub.getScope();\n // eslint-disable-next-line deprecation/deprecation\n if (scope.getTransaction() === this) {\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(undefined);\n }\n }\n\n return super.end(endTimestamp);\n }\n\n /**\n * Register a callback function that gets executed before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n initSpanRecorder(maxlen) {\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n const pushActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanContext().spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n DEBUG_BUILD && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n cancelIdleTimeout(\n endTimestamp,\n {\n restartOnChildSpanChange,\n }\n\n = {\n restartOnChildSpanChange: true,\n },\n ) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.end(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n setFinishReason(reason) {\n this._finishReason = reason;\n }\n\n /**\n * Permits the IdleTransaction to automatically end itself via the idle timeout and heartbeat mechanisms when the `delayAutoFinishUntilSignal` option was set to `true`.\n */\n sendAutoFinishSignal() {\n if (!this._autoFinishAllowed) {\n DEBUG_BUILD && logger.log('[Tracing] Received finish signal for idle transaction.');\n this._restartIdleTimeout();\n this._autoFinishAllowed = true;\n }\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.end(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n DEBUG_BUILD && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n _popActivity(spanId) {\n if (this.activities[spanId]) {\n DEBUG_BUILD && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n DEBUG_BUILD && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n if (this._autoFinishAllowed) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.end(endTimestamp);\n }\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n if (this._autoFinishAllowed) {\n DEBUG_BUILD && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.end();\n }\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n _pingHeartbeat() {\n DEBUG_BUILD && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\nexport { IdleTransaction, IdleTransactionSpanRecorder, TRACING_DEFAULTS };\n//# sourceMappingURL=idletransaction.js.map\n","import { isNaN, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nfunction sampleTransaction(\n transaction,\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n // eslint-disable-next-line deprecation/deprecation\n if (transaction.sampled !== undefined) {\n // eslint-disable-next-line deprecation/deprecation\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(transaction.sampled));\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate));\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n // eslint-disable-next-line deprecation/deprecation\n transaction.sampled = Math.random() < (sampleRate );\n\n // if we're not going to keep it, we're done\n // eslint-disable-next-line deprecation/deprecation\n if (!transaction.sampled) {\n DEBUG_BUILD &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n logger.log(`[Tracing] starting ${transaction.op} transaction - ${spanToJSON(transaction).description}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n DEBUG_BUILD &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nexport { isValidSampleRate, sampleTransaction };\n//# sourceMappingURL=sampling.js.map\n","import { uuid4, timestampInSeconds, logger, dropUndefinedKeys } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes.js';\nimport { getRootSpan } from '../utils/getRootSpan.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanToJSON, spanTimeInputToSeconds, spanToTraceHeader, spanToTraceContext } from '../utils/spanUtils.js';\nimport { setHttpStatus } from './spanstatus.js';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nclass SpanRecorder {\n\n constructor(maxlen = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n add(span) {\n if (this.spans.length > this._maxlen) {\n // eslint-disable-next-line deprecation/deprecation\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nclass Span {\n /**\n * Tags for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n\n /**\n * Data for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n *\n * @deprecated This property will no longer be public. Span recording will be handled internally.\n */\n\n /**\n * @inheritDoc\n * @deprecated Use top level `Sentry.getRootSpan()` instead\n */\n\n /**\n * The instrumenter that created this span.\n *\n * TODO (v8): This can probably be replaced by an `instanceOf` check of the span class.\n * the instrumenter can only be sentry or otel so we can check the span instance\n * to verify which one it is and remove this field entirely.\n *\n * @deprecated This field will be removed.\n */\n\n /** Epoch timestamp in seconds when the span started. */\n\n /** Epoch timestamp in seconds when the span ended. */\n\n /** Internal keeper of the status */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || uuid4();\n this._spanId = spanContext.spanId || uuid4().substring(16);\n this._startTime = spanContext.startTimestamp || timestampInSeconds();\n // eslint-disable-next-line deprecation/deprecation\n this.tags = spanContext.tags ? { ...spanContext.tags } : {};\n // eslint-disable-next-line deprecation/deprecation\n this.data = spanContext.data ? { ...spanContext.data } : {};\n // eslint-disable-next-line deprecation/deprecation\n this.instrumenter = spanContext.instrumenter || 'sentry';\n\n this._attributes = {};\n this.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanContext.origin || 'manual',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n ...spanContext.attributes,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n this._name = spanContext.name || spanContext.description;\n\n if (spanContext.parentSpanId) {\n this._parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this._sampled = spanContext.sampled;\n }\n if (spanContext.status) {\n this._status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this._endTime = spanContext.endTimestamp;\n }\n if (spanContext.exclusiveTime !== undefined) {\n this._exclusiveTime = spanContext.exclusiveTime;\n }\n this._measurements = spanContext.measurements ? { ...spanContext.measurements } : {};\n }\n\n // This rule conflicts with another eslint rule :(\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * An alias for `description` of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get name() {\n return this._name || '';\n }\n\n /**\n * Update the name of the span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n set name(name) {\n this.updateName(name);\n }\n\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get description() {\n return this._name;\n }\n\n /**\n * Get the description of the Span.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n set description(description) {\n this._name = description;\n }\n\n /**\n * The ID of the trace.\n * @deprecated Use `spanContext().traceId` instead.\n */\n get traceId() {\n return this._traceId;\n }\n\n /**\n * The ID of the trace.\n * @deprecated You cannot update the traceId of a span after span creation.\n */\n set traceId(traceId) {\n this._traceId = traceId;\n }\n\n /**\n * The ID of the span.\n * @deprecated Use `spanContext().spanId` instead.\n */\n get spanId() {\n return this._spanId;\n }\n\n /**\n * The ID of the span.\n * @deprecated You cannot update the spanId of a span after span creation.\n */\n set spanId(spanId) {\n this._spanId = spanId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `startSpan` functions instead.\n */\n set parentSpanId(string) {\n this._parentSpanId = string;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).parent_span_id` instead.\n */\n get parentSpanId() {\n return this._parentSpanId;\n }\n\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated Use `isRecording()` instead.\n */\n get sampled() {\n return this._sampled;\n }\n\n /**\n * Was this span chosen to be sent as part of the sample?\n * @deprecated You cannot update the sampling decision of a span after span creation.\n */\n set sampled(sampled) {\n this._sampled = sampled;\n }\n\n /**\n * Attributes for the span.\n * @deprecated Use `spanToJSON(span).atttributes` instead.\n */\n get attributes() {\n return this._attributes;\n }\n\n /**\n * Attributes for the span.\n * @deprecated Use `setAttributes()` instead.\n */\n set attributes(attributes) {\n this._attributes = attributes;\n }\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated Use `spanToJSON()` instead.\n */\n get startTimestamp() {\n return this._startTime;\n }\n\n /**\n * Timestamp in seconds (epoch time) indicating when the span started.\n * @deprecated In v8, you will not be able to update the span start time after creation.\n */\n set startTimestamp(startTime) {\n this._startTime = startTime;\n }\n\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Use `spanToJSON()` instead.\n */\n get endTimestamp() {\n return this._endTime;\n }\n\n /**\n * Timestamp in seconds when the span ended.\n * @deprecated Set the end time via `span.end()` instead.\n */\n set endTimestamp(endTime) {\n this._endTime = endTime;\n }\n\n /**\n * The status of the span.\n *\n * @deprecated Use `spanToJSON().status` instead to get the status.\n */\n get status() {\n return this._status;\n }\n\n /**\n * The status of the span.\n *\n * @deprecated Use `.setStatus()` instead to set or update the status.\n */\n set status(status) {\n this._status = status;\n }\n\n /**\n * Operation of the span\n *\n * @deprecated Use `spanToJSON().op` to read the op instead.\n */\n get op() {\n return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] ;\n }\n\n /**\n * Operation of the span\n *\n * @deprecated Use `startSpan()` functions to set or `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op')\n * to update the span instead.\n */\n set op(op) {\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op);\n }\n\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `spanToJSON().origin` to read the origin instead.\n */\n get origin() {\n return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ;\n }\n\n /**\n * The origin of the span, giving context about what created the span.\n *\n * @deprecated Use `startSpan()` functions to set the origin instead.\n */\n set origin(origin) {\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);\n }\n\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /** @inheritdoc */\n spanContext() {\n const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n return {\n spanId,\n traceId,\n traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n };\n }\n\n /**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * Also the `sampled` decision will be inherited.\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startChild(\n spanContext,\n ) {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this._spanId,\n sampled: this._sampled,\n traceId: this._traceId,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n childSpan.spanRecorder = this.spanRecorder;\n // eslint-disable-next-line deprecation/deprecation\n if (childSpan.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n childSpan.spanRecorder.add(childSpan);\n }\n\n const rootSpan = getRootSpan(this);\n // TODO: still set span.transaction here until we have a more permanent solution\n // Probably similarly to the weakmap we hold in node-experimental\n // eslint-disable-next-line deprecation/deprecation\n childSpan.transaction = rootSpan ;\n\n if (DEBUG_BUILD && rootSpan) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = spanToJSON(childSpan).description || '< unknown name >';\n const idStr = rootSpan.spanContext().spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n logger.log(logMessage);\n this._logMessage = logMessage;\n }\n\n return childSpan;\n }\n\n /**\n * Sets the tag attribute on the current span.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key Tag key\n * @param value Tag value\n * @deprecated Use `setAttribute()` instead.\n */\n setTag(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * Sets the data attribute on the current span\n * @param key Data key\n * @param value Data value\n * @deprecated Use `setAttribute()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setData(key, value) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /** @inheritdoc */\n setAttribute(key, value) {\n if (value === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n } else {\n this._attributes[key] = value;\n }\n }\n\n /** @inheritdoc */\n setAttributes(attributes) {\n Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this._status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top-level `setHttpStatus()` instead.\n */\n setHttpStatus(httpStatus) {\n setHttpStatus(this, httpStatus);\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @deprecated Use `.updateName()` instead.\n */\n setName(name) {\n this.updateName(name);\n }\n\n /**\n * @inheritDoc\n */\n updateName(name) {\n this._name = name;\n return this;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON(span).status === 'ok'` instead.\n */\n isSuccess() {\n return this._status === 'ok';\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `.end()` instead.\n */\n finish(endTimestamp) {\n return this.end(endTimestamp);\n }\n\n /** @inheritdoc */\n end(endTimestamp) {\n // If already ended, skip\n if (this._endTime) {\n return;\n }\n const rootSpan = getRootSpan(this);\n if (\n DEBUG_BUILD &&\n // Don't call this for transactions\n rootSpan &&\n rootSpan.spanContext().spanId !== this._spanId\n ) {\n const logMessage = this._logMessage;\n if (logMessage) {\n logger.log((logMessage ).replace('Starting', 'Finishing'));\n }\n }\n\n this._endTime = spanTimeInputToSeconds(endTimestamp);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n toTraceparent() {\n return spanToTraceHeader(this);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToJSON()` or access the fields directly instead.\n */\n toContext() {\n return dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n endTimestamp: this._endTime,\n // eslint-disable-next-line deprecation/deprecation\n op: this.op,\n parentSpanId: this._parentSpanId,\n sampled: this._sampled,\n spanId: this._spanId,\n startTimestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n traceId: this._traceId,\n });\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Update the fields directly instead.\n */\n updateWithContext(spanContext) {\n // eslint-disable-next-line deprecation/deprecation\n this.data = spanContext.data || {};\n // eslint-disable-next-line deprecation/deprecation\n this._name = spanContext.name || spanContext.description;\n this._endTime = spanContext.endTimestamp;\n // eslint-disable-next-line deprecation/deprecation\n this.op = spanContext.op;\n this._parentSpanId = spanContext.parentSpanId;\n this._sampled = spanContext.sampled;\n this._spanId = spanContext.spanId || this._spanId;\n this._startTime = spanContext.startTimestamp || this._startTime;\n this._status = spanContext.status;\n // eslint-disable-next-line deprecation/deprecation\n this.tags = spanContext.tags || {};\n this._traceId = spanContext.traceId || this._traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `spanToTraceContext()` util function instead.\n */\n getTraceContext() {\n return spanToTraceContext(this);\n }\n\n /**\n * Get JSON representation of this span.\n *\n * @hidden\n * @internal This method is purely for internal purposes and should not be used outside\n * of SDK code. If you need to get a JSON representation of a span,\n * use `spanToJSON(span)` instead.\n */\n getSpanJSON() {\n return dropUndefinedKeys({\n data: this._getData(),\n description: this._name,\n op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] ,\n parent_span_id: this._parentSpanId,\n span_id: this._spanId,\n start_timestamp: this._startTime,\n status: this._status,\n // eslint-disable-next-line deprecation/deprecation\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this._endTime,\n trace_id: this._traceId,\n origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n _metrics_summary: getMetricSummaryJsonForSpan(this),\n profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n exclusive_time: this._exclusiveTime,\n measurements: Object.keys(this._measurements).length > 0 ? this._measurements : undefined,\n });\n }\n\n /** @inheritdoc */\n isRecording() {\n return !this._endTime && !!this._sampled;\n }\n\n /**\n * Convert the object to JSON.\n * @deprecated Use `spanToJSON(span)` instead.\n */\n toJSON() {\n return this.getSpanJSON();\n }\n\n /**\n * Get the merged data for this span.\n * For now, this combines `data` and `attributes` together,\n * until eventually we can ingest `attributes` directly.\n */\n _getData()\n\n {\n // eslint-disable-next-line deprecation/deprecation\n const { data, _attributes: attributes } = this;\n\n const hasData = Object.keys(data).length > 0;\n const hasAttributes = Object.keys(attributes).length > 0;\n\n if (!hasData && !hasAttributes) {\n return undefined;\n }\n\n if (hasData && hasAttributes) {\n return {\n ...data,\n ...attributes,\n };\n }\n\n return hasData ? data : attributes;\n }\n}\n\nexport { Span, SpanRecorder };\n//# sourceMappingURL=span.js.map\n","/** The status of an Span.\n *\n * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type\n */\nvar SpanStatus; (function (SpanStatus) {\n /** The operation completed successfully. */\n const Ok = 'ok'; SpanStatus[\"Ok\"] = Ok;\n /** Deadline expired before operation could complete. */\n const DeadlineExceeded = 'deadline_exceeded'; SpanStatus[\"DeadlineExceeded\"] = DeadlineExceeded;\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n const Unauthenticated = 'unauthenticated'; SpanStatus[\"Unauthenticated\"] = Unauthenticated;\n /** 403 Forbidden */\n const PermissionDenied = 'permission_denied'; SpanStatus[\"PermissionDenied\"] = PermissionDenied;\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n const NotFound = 'not_found'; SpanStatus[\"NotFound\"] = NotFound;\n /** 429 Too Many Requests */\n const ResourceExhausted = 'resource_exhausted'; SpanStatus[\"ResourceExhausted\"] = ResourceExhausted;\n /** Client specified an invalid argument. 4xx. */\n const InvalidArgument = 'invalid_argument'; SpanStatus[\"InvalidArgument\"] = InvalidArgument;\n /** 501 Not Implemented */\n const Unimplemented = 'unimplemented'; SpanStatus[\"Unimplemented\"] = Unimplemented;\n /** 503 Service Unavailable */\n const Unavailable = 'unavailable'; SpanStatus[\"Unavailable\"] = Unavailable;\n /** Other/generic 5xx. */\n const InternalError = 'internal_error'; SpanStatus[\"InternalError\"] = InternalError;\n /** Unknown. Any non-standard HTTP status code. */\n const UnknownError = 'unknown_error'; SpanStatus[\"UnknownError\"] = UnknownError;\n /** The operation was cancelled (typically by the user). */\n const Cancelled = 'cancelled'; SpanStatus[\"Cancelled\"] = Cancelled;\n /** Already exists (409) */\n const AlreadyExists = 'already_exists'; SpanStatus[\"AlreadyExists\"] = AlreadyExists;\n /** Operation was rejected because the system is not in a state required for the operation's */\n const FailedPrecondition = 'failed_precondition'; SpanStatus[\"FailedPrecondition\"] = FailedPrecondition;\n /** The operation was aborted, typically due to a concurrency issue. */\n const Aborted = 'aborted'; SpanStatus[\"Aborted\"] = Aborted;\n /** Operation was attempted past the valid range. */\n const OutOfRange = 'out_of_range'; SpanStatus[\"OutOfRange\"] = OutOfRange;\n /** Unrecoverable data loss or corruption */\n const DataLoss = 'data_loss'; SpanStatus[\"DataLoss\"] = DataLoss;\n})(SpanStatus || (SpanStatus = {}));\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nfunction getSpanStatusFromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @deprecated Use {@link spanStatusFromHttpCode} instead.\n * This export will be removed in v8 as the signature contains a typo.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nconst spanStatusfromHttpCode = getSpanStatusFromHttpCode;\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n // TODO (v8): Remove these calls\n // Relay does not require us to send the status code as a tag\n // For now, just because users might expect it to land as a tag we keep sending it.\n // Same with data.\n // In v8, we replace both, simply with\n // span.setAttribute('http.response.status_code', httpStatus);\n\n // eslint-disable-next-line deprecation/deprecation\n span.setTag('http.status_code', String(httpStatus));\n // eslint-disable-next-line deprecation/deprecation\n span.setData('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n\nexport { SpanStatus, getSpanStatusFromHttpCode, setHttpStatus, spanStatusfromHttpCode };\n//# sourceMappingURL=spanstatus.js.map\n","import { tracingContextFromHeaders, logger, dropUndefinedKeys, addNonEnumerableProperty } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getCurrentHub, runWithAsyncContext, getIsolationScope } from '../hub.js';\nimport { spanToJSON, spanIsSampled, spanTimeInputToSeconds } from '../utils/spanUtils.js';\nimport './errors.js';\nimport './spanstatus.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { getCurrentScope, withScope } from '../exports.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n *\n * @deprecated Use `startSpan` instead.\n */\nfunction trace(\n context,\n callback,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onError = () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n afterFinish = () => {},\n) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n const scope = getCurrentScope();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const spanContext = normalizeContext(context);\n const activeSpan = createChildSpanOrTransaction(hub, {\n parentSpan,\n spanContext,\n forceTransaction: false,\n scope,\n });\n\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(activeSpan);\n\n return handleCallbackErrors(\n () => callback(activeSpan),\n error => {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(error, activeSpan);\n },\n () => {\n activeSpan && activeSpan.end();\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(parentSpan);\n afterFinish();\n },\n );\n}\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpan(context, callback) {\n const spanContext = normalizeContext(context);\n\n return runWithAsyncContext(() => {\n return withScope(context.scope, scope => {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? undefined\n : createChildSpanOrTransaction(hub, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope,\n });\n\n return handleCallbackErrors(\n () => callback(activeSpan),\n () => {\n // Only update the span status if it hasn't been changed yet\n if (activeSpan) {\n const { status } = spanToJSON(activeSpan);\n if (!status || status === 'ok') {\n activeSpan.setStatus('internal_error');\n }\n }\n },\n () => activeSpan && activeSpan.end(),\n );\n });\n });\n}\n\n/**\n * @deprecated Use {@link startSpan} instead.\n */\nconst startActiveSpan = startSpan;\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically. You'll have to call `span.end()` manually.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpanManual(\n context,\n callback,\n) {\n const spanContext = normalizeContext(context);\n\n return runWithAsyncContext(() => {\n return withScope(context.scope, scope => {\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const parentSpan = scope.getSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n const activeSpan = shouldSkipSpan\n ? undefined\n : createChildSpanOrTransaction(hub, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope,\n });\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.end();\n }\n\n return handleCallbackErrors(\n () => callback(activeSpan, finishAndSetSpan),\n () => {\n // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n if (activeSpan && activeSpan.isRecording()) {\n const { status } = spanToJSON(activeSpan);\n if (!status || status === 'ok') {\n activeSpan.setStatus('internal_error');\n }\n }\n },\n );\n });\n });\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startInactiveSpan(context) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n\n const spanContext = normalizeContext(context);\n // eslint-disable-next-line deprecation/deprecation\n const hub = getCurrentHub();\n const parentSpan = context.scope\n ? // eslint-disable-next-line deprecation/deprecation\n context.scope.getSpan()\n : getActiveSpan();\n\n const shouldSkipSpan = context.onlyIfParent && !parentSpan;\n\n if (shouldSkipSpan) {\n return undefined;\n }\n\n const scope = context.scope || getCurrentScope();\n\n // Even though we don't actually want to make this span active on the current scope,\n // we need to make it active on a temporary scope that we use for event processing\n // as otherwise, it won't pick the correct span for the event when processing it\n const temporaryScope = (scope ).clone();\n\n return createChildSpanOrTransaction(hub, {\n parentSpan,\n spanContext,\n forceTransaction: context.forceTransaction,\n scope: temporaryScope,\n });\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentScope().getSpan();\n}\n\nconst continueTrace = (\n {\n sentryTrace,\n baggage,\n }\n\n,\n callback,\n) => {\n // TODO(v8): Change this function so it doesn't do anything besides setting the propagation context on the current scope:\n /*\n return withScope((scope) => {\n const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n scope.setPropagationContext(propagationContext);\n return callback();\n })\n */\n\n const currentScope = getCurrentScope();\n\n // eslint-disable-next-line deprecation/deprecation\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n currentScope.setPropagationContext(propagationContext);\n\n if (DEBUG_BUILD && traceparentData) {\n logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n }\n\n const transactionContext = {\n ...traceparentData,\n metadata: dropUndefinedKeys({\n dynamicSamplingContext,\n }),\n };\n\n if (!callback) {\n return transactionContext;\n }\n\n return runWithAsyncContext(() => {\n return callback(transactionContext);\n });\n};\n\nfunction createChildSpanOrTransaction(\n // eslint-disable-next-line deprecation/deprecation\n hub,\n {\n parentSpan,\n spanContext,\n forceTransaction,\n scope,\n }\n\n,\n) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n\n const isolationScope = getIsolationScope();\n\n let span;\n if (parentSpan && !forceTransaction) {\n // eslint-disable-next-line deprecation/deprecation\n span = parentSpan.startChild(spanContext);\n } else if (parentSpan) {\n // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n const sampled = spanIsSampled(parentSpan);\n\n // eslint-disable-next-line deprecation/deprecation\n span = hub.startTransaction({\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...spanContext,\n metadata: {\n dynamicSamplingContext: dsc,\n // eslint-disable-next-line deprecation/deprecation\n ...spanContext.metadata,\n },\n });\n } else {\n const { traceId, dsc, parentSpanId, sampled } = {\n ...isolationScope.getPropagationContext(),\n ...scope.getPropagationContext(),\n };\n\n // eslint-disable-next-line deprecation/deprecation\n span = hub.startTransaction({\n traceId,\n parentSpanId,\n parentSampled: sampled,\n ...spanContext,\n metadata: {\n dynamicSamplingContext: dsc,\n // eslint-disable-next-line deprecation/deprecation\n ...spanContext.metadata,\n },\n });\n }\n\n // We always set this as active span on the scope\n // In the case of this being an inactive span, we ensure to pass a detached scope in here in the first place\n // But by having this here, we can ensure that the lookup through `getCapturedScopesOnSpan` results in the correct scope & span combo\n // eslint-disable-next-line deprecation/deprecation\n scope.setSpan(span);\n\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n return span;\n}\n\n/**\n * This converts StartSpanOptions to TransactionContext.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n *\n * Eventually the StartSpanOptions will be more aligned with OpenTelemetry.\n */\nfunction normalizeContext(context) {\n if (context.startTime) {\n const ctx = { ...context };\n ctx.startTimestamp = spanTimeInputToSeconds(context.startTime);\n delete ctx.startTime;\n return ctx;\n }\n\n return context;\n}\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n return {\n scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n };\n}\n\nexport { continueTrace, getActiveSpan, getCapturedScopesOnSpan, startActiveSpan, startInactiveSpan, startSpan, startSpanManual, trace };\n//# sourceMappingURL=trace.js.map\n","import { isThenable } from '@sentry/utils';\n\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\nfunction handleCallbackErrors\n\n(\n fn,\n onError,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onFinally = () => {},\n) {\n let maybePromiseResult;\n try {\n maybePromiseResult = fn();\n } catch (e) {\n onError(e);\n onFinally();\n throw e;\n }\n\n return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally);\n}\n\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n * Other than this, it will generally return the given value as-is.\n */\nfunction maybeHandlePromiseRejection(\n value,\n onError,\n onFinally,\n) {\n if (isThenable(value)) {\n // @ts-expect-error - the isThenable check returns the \"wrong\" type here\n return value.then(\n res => {\n onFinally();\n return res;\n },\n e => {\n onError(e);\n onFinally();\n throw e;\n },\n );\n }\n\n onFinally();\n return value;\n}\n\nexport { handleCallbackErrors };\n//# sourceMappingURL=handleCallbackErrors.js.map\n","import { dropUndefinedKeys, logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { getCurrentHub } from '../hub.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { spanTimeInputToSeconds, spanToJSON, spanToTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { Span, SpanRecorder } from './span.js';\nimport { getCapturedScopesOnSpan } from './trace.js';\n\n/** JSDoc */\nclass Transaction extends Span {\n /**\n * The reference to the current hub.\n */\n // eslint-disable-next-line deprecation/deprecation\n\n // DO NOT yet remove this property, it is used in a hack for v7 backwards compatibility.\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n *\n * @deprecated Transactions will be removed in v8. Use spans instead.\n */\n // eslint-disable-next-line deprecation/deprecation\n constructor(transactionContext, hub) {\n super(transactionContext);\n this._contexts = {};\n\n // eslint-disable-next-line deprecation/deprecation\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this._metadata = {\n // eslint-disable-next-line deprecation/deprecation\n ...transactionContext.metadata,\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n // TODO (v8): Replace this with another way to set the root span\n // eslint-disable-next-line deprecation/deprecation\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this._metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n // This sadly conflicts with the getter/setter ordering :(\n /* eslint-disable @typescript-eslint/member-ordering */\n\n /**\n * Getter for `name` property.\n * @deprecated Use `spanToJSON(span).description` instead.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Setter for `name` property, which also sets `source` as custom.\n * @deprecated Use `updateName()` and `setMetadata()` instead.\n */\n set name(newName) {\n // eslint-disable-next-line deprecation/deprecation\n this.setName(newName);\n }\n\n /**\n * Get the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n get metadata() {\n // We merge attributes in for backwards compatibility\n return {\n // Defaults\n // eslint-disable-next-line deprecation/deprecation\n source: 'custom',\n spanMetadata: {},\n\n // Legacy metadata\n ...this._metadata,\n\n // From attributes\n ...(this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] && {\n source: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ,\n }),\n ...(this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] && {\n sampleRate: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ,\n }),\n };\n }\n\n /**\n * Update the metadata for this transaction.\n * @deprecated Use `spanGetMetadata(transaction)` instead.\n */\n set metadata(metadata) {\n this._metadata = metadata;\n }\n\n /* eslint-enable @typescript-eslint/member-ordering */\n\n /**\n * Setter for `name` property, which also sets `source` on the metadata.\n *\n * @deprecated Use `.updateName()` and `.setAttribute()` instead.\n */\n setName(name, source = 'custom') {\n this._name = name;\n this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);\n }\n\n /** @inheritdoc */\n updateName(name) {\n this._name = name;\n return this;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n initSpanRecorder(maxlen = 1000) {\n // eslint-disable-next-line deprecation/deprecation\n if (!this.spanRecorder) {\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.add(this);\n }\n\n /**\n * Set the context of a transaction event.\n * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction.\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top-level `setMeasurement()` instead.\n */\n setMeasurement(name, value, unit = '') {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * Store metadata on this transaction.\n * @deprecated Use attributes or store data on the scope instead.\n */\n setMetadata(newMetadata) {\n this._metadata = { ...this._metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n end(endTimestamp) {\n const timestampInS = spanTimeInputToSeconds(endTimestamp);\n const transaction = this._finishTransaction(timestampInS);\n if (!transaction) {\n return undefined;\n }\n // eslint-disable-next-line deprecation/deprecation\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n // eslint-disable-next-line deprecation/deprecation\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this._name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(transactionContext) {\n // eslint-disable-next-line deprecation/deprecation\n super.updateWithContext(transactionContext);\n\n this._name = transactionContext.name || '';\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n *\n * @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead.\n */\n getDynamicSamplingContext() {\n return getDynamicSamplingContextFromSpan(this);\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n // eslint-disable-next-line deprecation/deprecation\n setHub(hub) {\n this._hub = hub;\n }\n\n /**\n * Get the profile id of the transaction.\n */\n getProfileId() {\n if (this._contexts !== undefined && this._contexts['profile'] !== undefined) {\n return this._contexts['profile'].profile_id ;\n }\n return undefined;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this._endTime !== undefined) {\n return undefined;\n }\n\n if (!this._name) {\n DEBUG_BUILD && logger.warn('Transaction has no name, falling back to ``.');\n this._name = '';\n }\n\n // just sets the end timestamp\n super.end(endTimestamp);\n\n // eslint-disable-next-line deprecation/deprecation\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this._sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n const finishedSpans = this.spanRecorder\n ? // eslint-disable-next-line deprecation/deprecation\n this.spanRecorder.spans.filter(span => span !== this && spanToJSON(span).timestamp)\n : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n const endTimes = finishedSpans.map(span => spanToJSON(span).timestamp).filter(Boolean) ;\n this._endTime = endTimes.reduce((prev, current) => {\n return prev > current ? prev : current;\n });\n }\n\n const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n\n // eslint-disable-next-line deprecation/deprecation\n const { metadata } = this;\n // eslint-disable-next-line deprecation/deprecation\n const { source } = metadata;\n\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: spanToTraceContext(this),\n },\n // TODO: Pass spans serialized via `spanToJSON()` here instead in v8.\n spans: finishedSpans,\n start_timestamp: this._startTime,\n // eslint-disable-next-line deprecation/deprecation\n tags: this.tags,\n timestamp: this._endTime,\n transaction: this._name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n capturedSpanScope,\n capturedSpanIsolationScope,\n ...dropUndefinedKeys({\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n }),\n },\n _metrics_summary: getMetricSummaryJsonForSpan(this),\n ...(source && {\n transaction_info: {\n source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n DEBUG_BUILD &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n DEBUG_BUILD && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`);\n\n return transaction;\n }\n}\n\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map\n","import { extractTraceparentData as extractTraceparentData$1 } from '@sentry/utils';\nexport { stripUrlQueryAndFragment } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\n\n/**\n * Grabs active transaction off scope.\n *\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getActiveTransaction(maybeHub) {\n // eslint-disable-next-line deprecation/deprecation\n const hub = maybeHub || getCurrentHub();\n // eslint-disable-next-line deprecation/deprecation\n const scope = hub.getScope();\n // eslint-disable-next-line deprecation/deprecation\n return scope.getTransaction() ;\n}\n\n/**\n * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used\n * to be declared in this file. It was later moved into `@sentry/utils` as part of a\n * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData`\n * is the only tracing function used by `@sentry/node`).\n *\n * These exports are kept here for backwards compatability's sake.\n *\n * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.\n *\n * @deprecated Import this function from `@sentry/utils` instead\n */\nconst extractTraceparentData = extractTraceparentData$1;\n\nexport { extractTraceparentData, getActiveTransaction };\n//# sourceMappingURL=utils.js.map\n","/**\n * Returns the root span of a given span.\n *\n * As long as we use `Transaction`s internally, the returned root span\n * will be a `Transaction` but be aware that this might change in the future.\n *\n * If the given span has no root span or transaction, `undefined` is returned.\n */\nfunction getRootSpan(span) {\n // TODO (v8): Remove this check and just return span\n // eslint-disable-next-line deprecation/deprecation\n return span.transaction;\n}\n\nexport { getRootSpan };\n//# sourceMappingURL=getRootSpan.js.map\n","import { getClient } from '../exports.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","import { dropUndefinedKeys, generateSentryTraceHeader, timestampInSeconds } from '@sentry/utils';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n */\nfunction spanToTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n data,\n op,\n parent_span_id,\n span_id,\n status,\n tags,\n trace_id,\n origin,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input intp a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n * Note that all fields returned here are optional and need to be guarded against.\n *\n * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n * And `spanToJSON` needs the Span class from `span.ts` to check here.\n * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again.\n */\nfunction spanToJSON(span) {\n if (spanIsSpanClass(span)) {\n return span.getSpanJSON();\n }\n\n // Fallback: We also check for `.toJSON()` here...\n // eslint-disable-next-line deprecation/deprecation\n if (typeof span.toJSON === 'function') {\n // eslint-disable-next-line deprecation/deprecation\n return span.toJSON();\n }\n\n return {};\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSpanClass(span) {\n return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n // eslint-disable-next-line no-bitwise\n return Boolean(traceFlags & TRACE_FLAG_SAMPLED);\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader };\n//# sourceMappingURL=spanUtils.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n for (const key of Object.keys(currBaggageObject)) {\n acc[key] = currBaggageObject[key];\n }\n return acc;\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=_handlers.js.map\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n return typedArray[0];\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(\n value,\n)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input) {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) ).constructor.name;\n return !name || name === 'Object';\n } catch (e) {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","import { node } from './node-stack-trace.js';\nexport { filenameIsInApp } from './node-stack-trace.js';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, node(getModule)];\n}\n\nexport { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ ;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs };\n//# sourceMappingURL=time.js.map\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { uuid4 } from './misc.js';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n *\n * @deprecated Use `propagationContextFromHeaders` instead.\n */\n// TODO(v8): Remove this function\nfunction tracingContextFromHeaders(\n sentryTrace,\n baggage,\n)\n\n {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n if (!traceparentData) {\n return {\n traceparentData,\n dynamicSamplingContext: undefined,\n propagationContext: {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n },\n };\n } else {\n return {\n traceparentData,\n dynamicSamplingContext: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n propagationContext: {\n traceId: traceId || uuid4(),\n parentSpanId: parentSpanId || uuid4().substring(16),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n },\n };\n }\n}\n\n/**\n * Create a propagation context from incoming headers.\n */\nfunction propagationContextFromHeaders(\n sentryTrace,\n baggage,\n) {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n if (!traceparentData) {\n return {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n };\n } else {\n return {\n traceId: traceId || uuid4(),\n parentSpanId: parentSpanId || uuid4().substring(16),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n };\n }\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = uuid4(),\n spanId = uuid4().substring(16),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders, tracingContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__rest$1","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","getDefaultExportFromCjs","x","__esModule","invariant$1","condition","format","a","c","f","error","undefined","Error","args","argIndex","replace","name","framesToPop","MapContext","createContext","useGoogleMap","useContext","map","unregisterEvent","registered","google","maps","event","removeListener","unregisterEvents","events","forEach","applyUpdatersToPropsAndRegisterEvents","_a","updaterMap","eventMap","prevProps","nextProps","instance","registeredEvents","props","obj","fn","acc","registeredList","googleEventName","onEventName","push","addListener","keys","reduce","newAcc","key","registerEvents","nextValue","applyUpdaterToNextProps","eventMap$i","onDblClick","onDragEnd","onDragStart","onMapTypeIdChanged","onMouseMove","onMouseOut","onMouseOver","onMouseDown","onMouseUp","onRightClick","onTilesLoaded","onBoundsChanged","onCenterChanged","onClick","onDrag","onHeadingChanged","onIdle","onProjectionChanged","onResize","onTiltChanged","onZoomChanged","updaterMap$i","extraMapTypes","extra","it","mapTypes","set","center","setCenter","clickableIcons","clickable","setClickableIcons","heading","setHeading","mapTypeId","setMapTypeId","options","setOptions","streetView","setStreetView","tilt","setTilt","zoom","setZoom","memo","children","id","mapContainerStyle","mapContainerClassName","onLoad","onUnmount","_b","useState","setMap","ref","useRef","_c","centerChangedListener","setCenterChangedListener","_d","dblclickListener","setDblclickListener","_e","dragendListener","setDragendListener","_f","dragstartListener","setDragstartListener","_g","mousedownListener","setMousedownListener","_h","mousemoveListener","setMousemoveListener","_j","mouseoutListener","setMouseoutListener","_k","mouseoverListener","setMouseoverListener","_l","mouseupListener","setMouseupListener","_m","rightclickListener","setRightclickListener","_o","clickListener","setClickListener","_p","dragListener","setDragListener","useEffect","current","Map","jsx","style","className","Provider","value","GoogleMap","_super","_this","state","mapRef","getInstance","panTo","latLng","setMapCallback","getRef","componentDidMount","setState","componentDidUpdate","componentWillUnmount","render","PureComponent","isBrowser","document","injectScript","url","nonce","Promise","resolve","reject","existingScript","getElementById","windowWithGoogleMap","window","dataStateAttribute","getAttribute","src","originalInitMap_1","initMap","originalErrorCallback_1","onerror","err","remove","script","createElement","type","async","setAttribute","head","appendChild","catch","console","isGoogleFontStyle","element","href","tagName","toLowerCase","styleSheet","cssText","innerHTML","preventGoogleFonts","getElementsByTagName","trueInsertBefore_1","insertBefore","bind","newElement","referenceElement","Reflect","trueAppend_1","textNode","makeLoadScriptUrl","googleMapsApiKey","googleMapsClientId","version","language","region","libraries","channel","mapIds","authReferrerPolicy","params","concat","sort","join","cleaningUp","DefaultLoadingElement","previouslyLoadedUrl","defaultLoadScriptProps","useLoadScript","preventGoogleFontsLoading","isMounted","isLoaded","setLoaded","loadError","setLoadError","setLoadedIfMounted","then","warn","prevLibraries","LoadScript","check","createRef","loaded","cleanupCallback","isCleaningUp","thisArg","_arguments","generator","promiseCallback","timer_1","setInterval","clearInterval","body","y","g","_","label","sent","trys","ops","next","verb","Symbol","iterator","v","op","done","pop","step","__generator","P","fulfilled","rejected","result","cleanup","parentNode","removeChild","slice","filter","includes","link","innerText","onError","setTimeout","jsxs","Fragment","loadingElement","defaultProps","LoaderStatus","defaultLoadingElement","eventMap$h","updaterMap$h","setInstance","trafficLayer","TrafficLayer","setTrafficLayerCallback","context","contextType","bicyclingLayer","BicyclingLayer","setBicyclingLayerCallback","transitLayer","TransitLayer","setTransitLayerCallback","eventMap$g","onCircleComplete","onMarkerComplete","onOverlayComplete","onPolygonComplete","onPolylineComplete","onRectangleComplete","updaterMap$g","drawingMode","setDrawingMode","circlecompleteListener","setCircleCompleteListener","markercompleteListener","setMarkerCompleteListener","overlaycompleteListener","setOverlayCompleteListener","polygoncompleteListener","setPolygonCompleteListener","polylinecompleteListener","setPolylineCompleteListener","rectanglecompleteListener","setRectangleCompleteListener","drawing","drawingManager","DrawingManager","setDrawingManagerCallback","eventMap$f","onAnimationChanged","onClickableChanged","onCursorChanged","onDraggableChanged","onFlatChanged","onIconChanged","onPositionChanged","onShapeChanged","onTitleChanged","onVisibleChanged","onZindexChanged","updaterMap$f","animation","setAnimation","setClickable","cursor","setCursor","draggable","setDraggable","icon","setIcon","setLabel","opacity","setOpacity","position","setPosition","shape","setShape","title","setTitle","visible","setVisible","zIndex","setZIndex","defaultOptions$5","clusterer","noClustererRedraw","clickableChangedListener","setClickableChangedListener","cursorChangedListener","setCursorChangedListener","_q","animationChangedListener","setAnimationChangedListener","_r","draggableChangedListener","setDraggableChangedListener","_s","flatChangedListener","setFlatChangedListener","_t","iconChangedListener","setIconChangedListener","_u","positionChangedListener","setPositionChangedListener","_v","shapeChangedListener","setShapeChangedListener","_w","titleChangedListener","setTitleChangedListener","_x","visibleChangedListener","setVisibleChangedListener","_y","zIndexChangedListener","setZindexChangedListener","markerOptions","marker","Marker","addMarker","removeMarker","chx","useMemo","Children","child","isValidElement","elementChild","cloneElement","anchor","ClusterIcon","cluster","styles","getClusterer","extend","OverlayView","clusterClassName","getClusterClass","div","sums","boundsChangedListener","height","width","anchorText","anchorIcon","textColor","textSize","textDecoration","fontWeight","fontStyle","fontFamily","backgroundPosition","cMouseDownInCluster","cDraggingMapByCluster","timeOut","getMap","onAdd","onRemove","draw","hide","show","useStyle","getPosFromLatLng","markerClusterer_1","trigger","getZoomOnClick","maxZoom_1","getMaxZoom","bounds_1","getBounds","fitBounds","getZoom","cancelBubble","stopPropagation","getPanes","overlayMouseTarget","addEventListener","removeEventListener","clearTimeout","pos","top","left","display","divTitle","getTitle","bp","split","spriteH","parseInt","spriteV","img","alt","enableRetinaIcons","clip","textElm","text","html","getStyles","Math","min","max","index","latlng","getProjection","fromLatLngToDivPixel","Cluster$1","Cluster","markerClusterer","gridSize","getGridSize","minClusterSize","getMinimumClusterSize","averageCenter","getAverageCenter","markers","bounds","clusterIcon","getSize","getMarkers","getCenter","isMarkerInClusterBounds","calculateBounds","updateIcon","isMarkerAlreadyAdded","LatLngBounds","_i","markers_1","getPosition","length_1","LatLng","lat","lng","isAdded","mCount","maxZoom","contains","getExtendedBounds","getCalculator","CALCULATOR","numStyles","count","numberOfDigits","toString","IMAGE_SIZES","Clusterer","optMarkers","optOptions","setMinimumClusterSize","getEnableRetinaIcons","setEnableRetinaIcons","addToClosestCluster","getImageExtension","setImageExtension","setAverageCenter","getTotalClusters","fitMapToMarkers","getIgnoreHidden","setIgnoreHidden","setClusterClass","getTotalMarkers","setZoomOnClick","getBatchSizeIE","setBatchSizeIE","createClusters","getImageSizes","setImageSizes","setCalculator","removeMarkers","resetViewport","getImagePath","setImagePath","pushMarkerTo","clearMarkers","setupStyles","setGridSize","getClusters","setMaxZoom","addMarkers","setStyles","repaint","redraw","clusters","listeners","activeMap","ready","minimumClusterSize","zoomOnClick","ignoreHidden","imagePath","imageExtension","imageSizes","calculator","batchSize","batchSizeIE","clusterClass","navigator","userAgent","timerRefStatic","get","listener","fromContainerPixelToLatLng","fromDivPixelToLatLng","fromLatLngToContainerPixel","getVisibleRegion","getWorldWidth","bindTo","notify","setValues","unbind","unbindAll","optNoDraw","getDraggable","removeMarker_","splice","removed","markers_2","oldClusters","oldClusters_1","projection","trPix","getNorthEast","blPix","getSouthWest","point1","point2","optHide","distanceBetweenPoints","p1","p2","dLat","PI","dLon","sin","cos","atan2","sqrt","isMarkerInBounds","distance","clusterToAddTo","iFirst","mapBounds","extendedMapBounds","iLast","getVisible","obj1","obj2","object","property","prop","eventMap$e","onClusteringBegin","onClusteringEnd","updaterMap$e","defaultOptions$4","cancelHandler","clusteringBeginListener","setClusteringBeginListener","clusteringEndListener","setClusteringEndListener","clustererOptions","ClustererComponent","setClustererCallback","InfoBox","getCloseClickHandler","closeClickHandler","createInfoBoxDiv","addClickHandler","getCloseBoxImg","getBoxWidths","setBoxStyle","setContent","getContent","getZIndex","panBox","close","open","content","disableAutoPan","maxWidth","pixelOffset","Size","boxClass","boxStyle","closeBoxMargin","closeBoxURL","infoBoxClearance","isHidden","alignBottom","pane","enableEventPropagation","closeListener","moveListener","mapListener","contextListener","eventListeners","fixedWidthSet","panes","offsetWidth","bw","right","events_1","event_1","returnValue","preventDefault","firstChild","disablePan","xOffset","yOffset","mapDiv","getDiv","mapWidth","mapHeight","offsetHeight","iwOffsetX","iwOffsetY","iwWidth","iwHeight","padX","padY","pixPosition","panBy","webkitTransform","parseFloat","msFilter","visibility","overflow","bottom","defaultView","ownerDocument","computedStyle","getComputedStyle","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","documentElement","currentStyle","isVisible","eventListener","eventMap$d","onCloseClick","onContentChanged","onDomReady","updaterMap$d","defaultOptions$3","closeClickListener","setCloseClickListener","domReadyClickListener","setDomReadyClickListener","contentChangedClickListener","setContentChangedClickListener","positionChangedClickListener","setPositionChangedClickListener","zIndexChangedClickListener","setZindexChangedClickListener","containerElementRef","positionLatLng","position_1","infoBoxOptions","infoBox","createPortal","only","InfoBoxComponent","containerElement","setInfoBoxCallback","fastDeepEqual","equal","isArray","RegExp","source","flags","valueOf","ARRAY_TYPES","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","KDBush","from","data","ArrayBuffer","magic","versionAndType","ArrayType","nodeSize","numItems","isNaN","IndexArrayType","arrayTypeIndex","coordsByteSize","BYTES_PER_ELEMENT","idsByteSize","padCoords","ids","coords","_pos","_finished","add","finish","numAdded","range","minX","minY","maxX","maxY","stack","axis","m","within","qx","qy","r","r2","sqDist","select","k","z","log","exp","sd","floor","j","swapItem","swap","arr","tmp","ax","ay","bx","by","dx","dy","defaultOptions$2","minZoom","minPoints","radius","extent","generateId","fround","OFFSET_ID","OFFSET_NUM","OFFSET_PROP","Supercluster","trees","stride","clusterProps","load","points","time","timerId","geometry","coordinates","lngX","latY","Infinity","tree","_createTree","timeEnd","now","Date","_cluster","bbox","minLng","minLat","maxLng","maxLat","easternHem","westernHem","_limitZoom","getClusterJSON","getChildren","clusterId","originId","_getOriginId","originZoom","_getOriginZoom","errorMsg","pow","getLeaves","limit","offset","leaves","_appendLeaves","getTile","z2","tile","features","_addTileFeatures","getClusterExpansionZoom","expansionZoom","properties","cluster_id","skipped","point_count","isCluster","tags","px","py","getClusterProperties","round","nextData","neighborIds","numPointsOrigin","numPoints","neighborId","clusterProperties","wx","wy","clusterPropIndex","numPoints2","_map","clone","original","yLat","abbrev","propIndex","point_count_abbreviated","y2","atan","MarkerUtils","isAdvancedMarkerAvailable","getMapCapabilities","isAdvancedMarkersAvailable","isAdvancedMarker","AdvancedMarkerElement","_position","AbstractAlgorithm","noop","noop$1","SuperClusterAlgorithm","__rest","super","superCluster","calculate","input","changed","feature","transformCluster","leaf","ClusterStats","sum","clusterMarkerCounts","clusterMarkerSum","mean","DefaultRenderer","stats","svg","Number","MAX_ZINDEX","svgEl","DOMParser","parseFromString","clusterOptions","btoa","Point","OverlayViewSafe","type1","type2","MarkerClustererEvents","defaultOnClusterClickHandler","MarkerClusterer","algorithmOptions","algorithm","renderer","onClusterClick","noDraw","CLUSTERING_BEGIN","mapCanvasProjection","singleMarker","Set","groupMarkers","has","renderClusters","requestAnimationFrame","CLUSTERING_END","idleListener","reset","delete","CLUSTER_CLICK","setMarkerClusterer","markerCluster","useGoogleMarkerClusterer","eventMap$c","updaterMap$c","closeclickListener","domreadyclickListener","contentchangedclickListener","positionchangedclickListener","zindexchangedclickListener","infoWindow","InfoWindow","setInfoWindowCallback","eventMap$b","updaterMap$b","editable","setEditable","path","setPath","defaultOptions$1","polyline","Polyline","setPolylineCallback","eventMap$a","updaterMap$a","paths","setPaths","onEdit","getPath","polygon","Polygon","setPolygonCallback","eventMap$9","updaterMap$9","setBounds","rightClickListener","setRightClickListener","setBoundsChangedListener","rectangle","Rectangle","setRectangleCallback","eventMap$8","onRadiusChanged","updaterMap$8","setRadius","defaultOptions","radiusChangedListener","setRadiusChangedListener","circle","Circle","setCircleCallback","eventMap$7","onAddFeature","onRemoveFeature","onRemoveProperty","onSetGeometry","onSetProperty","updaterMap$7","addgeojson","geojson","addGeoJson","foreach","callback","loadgeojson","loadGeoJson","overridestyle","overrideStyle","revertstyle","revertStyle","controlposition","controlPosition","setControlPosition","controls","setControls","drawingmode","mode","setStyle","togeojson","toGeoJson","addFeatureListener","setAddFeatureListener","removeFeatureListener","setRemoveFeatureListener","removePropertyListener","setRemovePropertyListener","setGeometryListener","setSetGeometryListener","setPropertyListener","setSetPropertyListener","Data","setDataCallback","data_1","eventMap$6","onDefaultViewportChanged","onStatusChanged","updaterMap$6","setUrl","getOffsetOverride","getPixelPositionOffset","createLatLng","inst","Type","createLatLngBounds","ne","sw","getLayoutStyles","getLayoutStylesByBounds","point","getLayoutStylesByPosition","factory","ensureOfType","convertToLatLngString","latLngLike","convertToLatLngBoundsString","latLngBoundsLike","south","east","north","west","KmlLayer","kmlLayer","setKmlLayerCallback","mapPaneName","container","overlay","Overlay","layoutStyles","entries","createOverlay","paneEl","containerStyle","updatePane","mapPanes","overlayView","onPositionElement","currentPosition","previousPosition","containerRef","prevPositionString","positionString","prevBoundsString","boundsString","FLOAT_PANE","MAP_PANE","MARKER_LAYER","OVERLAY_LAYER","OVERLAY_MOUSE_TARGET","eventMap$5","updaterMap$5","imageBounds","groundOverlay","GroundOverlay","newBounds","setGroundOverlayCallback","eventMap$4","updaterMap$4","setData","visualization","heatmapLayer","HeatmapLayer","setHeatmapLayerCallback","eventMap$3","onPanoChanged","onPovChanged","updaterMap$3","register","provider","registerPanoProvider","links","setLinks","motionTracking","setMotionTracking","pano","setPano","pov","setPov","eventMap$2","StreetViewPanorama","streetViewPanorama","setStreetViewPanoramaCallback","getStreetView","StreetViewService","streetViewService","setStreetViewServiceCallback","DirectionsService","directionsService","setDirectionsServiceCallback","route","onDirectionsChanged","updaterMap$2","directions","setDirections","panel","setPanel","routeIndex","setRouteIndex","eventMap$1","DirectionsRenderer","directionsRenderer","setDirectionsRendererCallback","DistanceMatrixService","distanceMatrixService","setDistanceMatrixServiceCallback","getDistanceMatrix","onPlacesChanged","updaterMap$1","StandaloneSearchBox","searchBox","setSearchBoxCallback","places","querySelector","searchBox_1","SearchBox","onPlaceChanged","restrictions","setComponentRestrictions","fields","setFields","types","setTypes","Autocomplete","autocomplete","setAutocompleteCallback","autocomplete_1","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","out","len","separator","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","reverse","_oO","el","classes","attr","HTMLElement","dataset","keyAttrPairs","keyAttr","keyAttrPair","is","allowedAttrs","getComponentName","bindReporter","metric","reportAllChanges","prevValue","delta","forceReport","getNavigationEntry","__WEB_VITALS_POLYFILL__","performance","getEntriesByType","timing","navigation","navigationEntry","entryType","startTime","navigationStart","getNavigationEntryFromPerformanceTiming","getActivationStart","navEntry","activationStart","initMetric","navigationType","prerendering","rating","random","observe","opts","PerformanceObserver","supportedEntryTypes","po","list","getEntries","buffered","onHidden","cb","once","onHiddenOrPageHide","visibilityState","onCLS","onReport","report","sessionValue","sessionEntries","handleEntries","entry","hadRecentInput","firstSessionEntry","lastSessionEntry","stopListening","takeRecords","firstHiddenTime","getVisibilityWatcher","timeStamp","onFID","visibilityWatcher","handleEntry","processingStart","disconnect","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","interactionId","initInteractionCountPolyfill","durationThreshold","getInteractionCountForNavigation","interactionCount","longestInteractionList","longestInteractionMap","processEntry","minLongestInteraction","existingInteraction","duration","latency","interaction","onINP","some","prevEntry","inp","candidateInteractionIndex","estimateP98LongestInteraction","reportedMetricIDs","onLCP","lastEntry","capture","whenReady","readyState","onTTFB","responseStart","handlers","instrumented","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addPerformanceInstrumentationHandler","addHandler","triggerHandlers","instrumentPerformanceObserver","getCleanupCallback","typeHandlers","handler","instrumentCls","instrumentFid","instrumentLcp","instrumentTtfb","instrumentInp","addMetricObserver","instrumentFn","previousValue","stopOnCallback","createSpanItem","span","isMeasurementValue","isFinite","_startChild","transaction","startTimestamp","ctx","startChild","MAX_INT_AS_BYTES","msToSec","getBrowserPerformanceAPI","_lcpEntry","_clsEntry","_performanceCursor","_measurements","startTrackingWebVitals","mark","fidCallback","timeOrigin","unit","clsCallback","addClsInstrumentationHandler","lcpCallback","addLcpInstrumentationHandler","ttfbCallback","INP_ENTRY_MAP","click","pointerdown","pointerup","mousedown","mouseup","touchstart","touchend","mouseover","mouseout","mouseenter","mouseleave","pointerover","pointerout","pointerenter","pointerleave","dragstart","dragend","drag","dragenter","dragleave","dragover","drop","keydown","keyup","keypress","_addPerformanceNavigationTiming","description","eventEnd","end","start","origin","endTimestamp","setResourceEntrySizeData","dataKey","entryVal","isNativeFetch","func","test","instrumentFetch","EdgeRuntime","Headers","Request","Response","supportsFetch","fetch","doc","sandbox","hidden","contentWindow","supportsNativeFetch","originalFetch","method","fetchArgs","getUrlFromResource","hasProp","toUpperCase","arg","parseFetchArgs","handlerData","fetchData","response","finishedHandlerData","erroredHandlerData","resource","SENTRY_XHR_DATA_KEY","instrumentXHR","XMLHttpRequest","xhrproto","originalOpen","e2","parseUrl","request_headers","match","__sentry_own_request__","onreadystatechangeHandler","xhrInfo","status_code","status","xhr","onreadystatechange","readyStateArgs","setRequestHeaderArgs","header","originalSend","sentryXhrData","DEFAULT_TRACE_PROPAGATION_TARGETS","defaultRequestInstrumentationOptions","traceFetch","traceXHR","enableHTTPTimings","tracingOrigins","tracePropagationTargets","instrumentOutgoingRequests","_options","shouldCreateSpanForRequest","shouldCreateSpan","shouldAttachHeadersWithTargets","testString","patterns","requireExactStringMatch","pattern","isMatchingPattern","stringMatchesSomePattern","shouldAttachHeaders","spans","createdSpan","spanOrigin","hasTracingEnabled","shouldCreateSpanResult","spanId","__span","contentLength","headers","contentLengthNum","setStatus","endSpan","scope","client","fullUrl","URL","getFullURL","host","onlyIfParent","attributes","spanContext","request","requestSpan","getSpan","isolationScope","traceId","sampled","dsc","getPropagationContext","sentryTraceHeader","sentryBaggageHeader","newHeaders","append","existingBaggageHeader","baggage","newBaggageHeaders","addTracingHeadersToFetchRequest","instrumentFetchRequest","setAttributes","addHTTPTimings","addFetchInstrumentationHandler","__sentry_xhr_span_id__","setRequestHeader","setHeaderOnXhr","xhrCallback","nextHopProtocol","initiatorType","isPerformanceResourceTiming","endsWith","resourceTiming","_name","char","extractNetworkProtocol","timingSpanData","getAbsoluteTime","redirectStart","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseEnd","resourceTimingEntryToSpanData","location","lastHref","instrumentHistory","chromeVar","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","supportsHistory","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","to","DEFAULT_BROWSER_TRACING_OPTIONS","markBackgroundTransactions","routingInstrumentation","customStartTransaction","startTransactionOnPageLoad","startTransactionOnLocationChange","activeTransaction","startingUrl","pathname","metadata","addHistoryInstrumentationHandler","enableLongTask","enableInp","interactionsSampleRate","_experiments","BrowserTracing","_hasSetTracePropagationTargets","_collectWebVitals","_interactionIdToRouteNameMapping","interactionIdtoRouteNameMapping","inpCallback","interactionIdToRouteNameMapping","find","interactionType","getOptions","routeName","parentContext","user","replayId","userDisplay","email","ip_address","profileId","getProfileId","target","release","environment","profile_id","replay_id","exclusiveTime","measurements","sampleRate","transactionContext","tracesSampler","parentSampled","tracesSampleRate","getSampleRate","envelope","dsn","sent_at","toISOString","withPassword","pass","port","projectId","protocol","publicKey","items","createEnvelope","createSpanEnvelope","getDsn","transport","getTransport","send","reason","_trackINP","startTrackingINP","enableInteractions","componentName","_latestRoute","setupOnce","getCurrentHub","_getCurrentHub","getClient","clientOptions","instrumentRouting","clientOptionsTracePropagationTargets","_createRouteTransaction","onStartRouteTransaction","statusType","setTag","_registerInteractionListener","_registerInpInteractionListener","hub","beforeNavigate","idleTimeout","finalTimeout","heartbeatInterval","isPageloadTransaction","expandedContext","sentryTrace","getMetaContent","parentSpanId","dynamicSamplingContext","trimEnd","modifiedContext","finalContext","idleTransaction","sendAutoFinishSignal","registerBeforeFinishCallback","performanceEntries","start_timestamp","transactionStartTime","_addRequest","_addNavigationSpans","measureStartTimestamp","measureEndTimestamp","_addMeasureSpans","firstHidden","shouldRecord","resourceUrl","parsedUrl","renderBlockingStatus","_addResourceSpans","connection","effectiveType","rtt","deviceMemory","hardwareConcurrency","_trackNavigator","_addTtfbRequestTimeToMeasurements","oldValue","measurementTimestamp","normalizedValue","abs","fidMark","cls","measurementName","setMeasurement","trim","size","sources","node","_tagMetricInfo","addPerformanceEntries","inflightInteractionTransaction","registerInteractionTransaction","currentTransaction","setFinishReason","getSource","replay","getIntegrationByName","getReplayId","currentScope","getUser","isPerformanceEventTiming","minInteractionId","metaName","metaTag","selector","sourceFromAttributes","sourceFromData","sourceFromMetadata","DEBUG_BUILD","__SENTRY_DEBUG__","addExtensionMethods","carrier","__SENTRY__","packageToIntegrationMapping","mongodb","module","Mongo","mongoose","mysql","Mysql","pg","Postgres","mappedPackages","moduleName","pkg","integrations","_autoloadDatabaseIntegrations","Apollo","__initStatic","useNestjs","_useNest","loadDependency","_module","GraphQLFactory","orig","resolversExplorerService","instrumentResolvers","ApolloServerBase","config","resolvers","schema","modules","model","resolverGroupName","resolverName","parentSpan","getScope","_2","_3","rv","res","_4","_5","_6","_7","wrapResolver","Express","_router","router","_methods","methods","originalCallback","wrap","wrapMiddlewareArgs","patchMiddleware","instrumentMiddlewares","appOrRouter","isApp","lazyrouter","debug","routerProto","getPrototypeOf","originalProcessParams","process_params","layer","called","req","_reconstructedRoute","layerRoutePath","isRegex","numExtraSegments","lrp","_optionalChain","_12","_13","major","process","versions","extractOriginalRoute","regexp","accNumSegments","currentRoute","getLayerRoutePathString","getLayerRoutePathInfo","partialRoute","_hasParameters","originalUrl","reconstructedRoute","layerPath","normalizeURL","originalUrlSplit","_14","_15","_16","_17","tempCounter","currentOffset","_18","_19","_20","_21","_22","_23","_24","_25","_26","segment","_27","_28","_29","preventDuplicateSegments","finalPartialRoute","__sentry_transaction","finalRoute","customRoute","baseUrl","extractPathForTransaction","updateName","instrumentRouter","arity","_8","_9","_10","_11","orderedKeys","execResult","exec","indices","paramIndices","resultPath","indexShift","item","startOffset","endOffset","substr1","substring","replacement","substr2","GraphQL","setSpan","OPERATIONS","OPERATION_SIGNATURES","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","dropIndex","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexExists","insertMany","insertOne","mapReduce","rename","replaceOne","updateMany","updateOne","_operations","operations","_describeOperations","describeOperations","_useMongoose","useMongoose","_instrumentOperations","Collection","collection","operation","_patchOperation","getSpanContext","_getSpanContextFromOperationArguments","lastArg","sendDefaultPii","maybePromiseOrCursor","maybeCursor","dbName","collectionName","signature","shouldDescribe","JSON","stringify","mySqlConfig","connect","Proxy","wrappingTarget","finishSpan","values","sql","query","on","_usePgNative","usePgNative","Client","native","database","Prisma","possibleClient","_sentryInstrumented","clientData","engineConfig","_engineConfig","activeProvider","clientVersion","$use","action","shouldDisableAutoInstrumentation","instrumenter","DEFAULT_ENVIRONMENT","withScope","rest","getStackTop","getCurrentScope","States","SyncPromise","executor","__init","__init2","__init3","__init4","_state","PENDING","_handlers","_resolve","_reject","onfulfilled","onrejected","_executeHandlers","val","onfinally","isRejected","_setResult","RESOLVED","REJECTED","_value","cachedHandlers","notifyEventProcessors","processors","hint","processor","logger","final","updateSession","session","ipAddress","did","username","timestamp","abnormal_mechanism","ignoreDuration","sid","init","started","errors","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","generatePropagationContext","newScope","_level","_span","_session","_transactionName","_fingerprint","_requestSession","_client","setClient","addScopeListener","addEventProcessor","setUser","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setTags","setExtras","extras","setExtra","setFingerprint","fingerprint","setLevel","level","setTransactionName","setContext","getTransaction","setSession","getSession","update","captureContext","scopeToMerge","scopeData","getScopeData","contexts","propagationContext","scopeContext","clear","addBreadcrumb","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","breadcrumbs","getLastBreadcrumb","clearBreadcrumbs","addAttachment","attachment","getAttachments","attachments","clearAttachments","eventProcessors","sdkProcessingMetadata","transactionName","applyToEvent","additionalEventProcessors","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","applyDataToEvent","trace","rootSpan","getRootSpan","applySpanToEvent","applyFingerprintToEvent","mergedBreadcrumbs","applyBreadcrumbsToEvent","applySdkMetadataToEvent","applyScopeDataToEvent","setSDKProcessingMetadata","newData","setPropagationContext","captureException","exception","eventId","event_id","syntheticException","originalException","captureMessage","message","captureEvent","API_VERSION","DEFAULT_BREADCRUMBS","Hub","_version","assignedScope","assignedIsolationScope","_stack","bindClient","_isolationScope","isOlderThan","setupIntegrations","pushScope","getStack","popScope","maybePromiseResult","getIsolationScope","_lastEventId","lastEventId","beforeBreadcrumb","finalBreadcrumb","emit","configureScope","run","oldHub","makeMain","getIntegration","integration","startTransaction","customSamplingContext","_callExtensionMethod","traceHeaders","captureSession","endSession","_sendSessionUpdate","closeSession","startSession","startingTime","toJSON","attrs","user_agent","sessionToJSON","makeSession","currentSession","shouldSendDefaultPii","Boolean","sentry","getMainCarrier","extensions","registry","getHubFromCarrier","setHubOnCarrier","acs","getGlobalHub","runWithAsyncContext","SPAN_METRIC_SUMMARY","getMetricSummaryJsonForSpan","storage","getMetricStorageForSpan","output","exportKey","summary","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_PROFILE_ID","getDynamicSamplingContextFromClient","trace_id","public_key","user_segment","getDynamicSamplingContextFromSpan","txn","v7FrozenDsc","_frozenDynamicSamplingContext","maybeSampleRate","sample_rate","jsonSpan","_oldOnErrorHandler","instrumentError","msg","line","column","__SENTRY_LOADER__","__SENTRY_INSTRUMENTED__","_oldOnUnhandledRejectionHandler","instrumentUnhandledRejection","onunhandledrejection","errorsInstrumented","errorCallback","tag","_startTransaction","configInstrumenter","transactionInstrumenter","isRecording","initSpanRecorder","startIdleTransaction","onScope","delayAutoFinishUntilSignal","addTracingExtensions","addGlobalErrorInstrumentationHandler","addGlobalUnhandledRejectionInstrumentationHandler","TRACING_DEFAULTS","IDLE_TRANSACTION_FINISH_REASONS","IdleTransactionSpanRecorder","_pushActivity","_popActivity","transactionSpanId","maxlen","originalEnd","IdleTransaction","_idleHub","_idleTimeout","_finalTimeout","_heartbeatInterval","_onScope","activities","_heartbeatCounter","_idleTimeoutCanceledPermanently","_beforeFinishCallbacks","_finishReason","_autoFinishAllowed","_restartIdleTimeout","endTimestampInS","spanRecorder","endTime","spanStartedBeforeTransactionFinish","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","pushActivity","popActivity","_pingHeartbeat","cancelIdleTimeout","restartOnChildSpanChange","_idleTimeoutID","_beat","heartbeatString","_prevHeartbeatString","sampleTransaction","samplingContext","isValidSampleRate","rate","SpanRecorder","_maxlen","Span","_traceId","_spanId","_startTime","_attributes","_parentSpanId","_sampled","_status","_endTime","_exclusiveTime","string","traceFlags","childSpan","logMessage","_logMessage","setHttpStatus","httpStatus","setName","isSuccess","toTraceparent","toContext","_getData","updateWithContext","getTraceContext","getSpanJSON","parent_span_id","span_id","_metrics_summary","exclusive_time","hasData","hasAttributes","SpanStatus","spanStatus","getSpanStatusFromHttpCode","startSpan","normalizeContext","activeSpan","createChildSpanOrTransaction","forceTransaction","onFinally","maybeHandlePromiseRejection","startInactiveSpan","temporaryScope","ISOLATION_SCOPE_ON_START_SPAN_FIELD","SCOPE_ON_START_SPAN_FIELD","setCapturedScopesOnSpan","getCapturedScopesOnSpan","Transaction","_hub","_metadata","_trimEnd","incomingDynamicSamplingContext","newName","spanMetadata","setMetadata","newMetadata","timestampInS","_finishTransaction","getDynamicSamplingContext","setHub","recordDroppedEvent","finishedSpans","endTimes","prev","capturedSpanScope","capturedSpanIsolationScope","transaction_info","getActiveTransaction","maybeHub","maybeOptions","__SENTRY_TRACING__","enableTracing","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","spanToTraceContext","spanToJSON","spanToTraceHeader","spanIsSampled","spanTimeInputToSeconds","ensureTimestampInSeconds","getTime","spanIsSpanClass","BAGGAGE_HEADER_NAME","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","curr","currBaggageObject","baggageHeaderToObject","dynamicSamplingContextToSentryBaggageHeader","objectKey","objectValue","currentIndex","baggageEntry","encodeURIComponent","newBaggageHeader","objectToBaggageHeader","dscKey","dscValue","keyOrValue","decodeURIComponent","lastAccessLHS","maybeInstrument","objectToString","isBuiltin","wat","isString","isPlainObject","isRegExp","isThenable","isInstanceOf","base","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","wrappedFuncs","wrappedLevels","originalConsoleMethod","enabled","enable","disable","isEnabled","makeLogger","uuid4","gbl","crypto","msCrypto","getRandomByte","randomUUID","getRandomValues","typedArray","arrayify","maybeArray","isNodeEnv","__SENTRY_BROWSER_BUNDLE__","dynamicRequire","mod","require","loadModule","cwd","fill","replacementFactory","wrapped","proto","addNonEnumerableProperty","o_O","markFunctionWrapped","defineProperty","writable","configurable","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","memoVal","defaultFunctionName","getFunctionName","ONE_SECOND_IN_MS","dateTimestampInSeconds","timestampInSeconds","approxStartingTimeOrigin","createUnixTimestampInSecondsFunc","_browserPerformanceTimeOriginMode","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStartDelta","TRACEPARENT_REGEXP","propagationContextFromHeaders","traceparentData","traceparent","matches","extractTraceparentData","generateSentryTraceHeader","sampledString","fragment","search","hash","relative","stripUrlQueryAndFragment","urlPath","getNumberOfUrlSegments","isGlobalObj","GLOBAL_OBJ","globalThis","self","getGlobalObject","getGlobalSingleton","creator"],"sourceRoot":""}