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AAKgF,MAAMkH,MAAMC,UAAzB,CAEI,GAAuC,IAAnCnM,KAAKgF,MAAMkH,MAAMJ,OAAO5J,OAE1B,YADAlC,KAAKgF,MAAMkH,MAAMJ,OAAS,CAAC,UAI7B,MAAM+B,EAAe7N,KAAK8N,qBAAqB,KAC5BC,EAAAA,EAAAA,MAAKF,EAAc,CAAEG,MAAOhO,KAAKgF,MAAMkH,MAAMJ,OAAO,OAErE9L,KAAKgF,MAAMkH,MAAMJ,OAAS,CAAC,WAOnCgC,qBAAqB/C,GACnB,MACO,WADC/K,KAAKgF,MAAMkH,MAAMC,KAEd,CACL,CAAE8B,KAAM,MAAOD,MAAO,OACtB,CAAEC,KAAM,MAAOD,MAAO,OACtB,CAAEC,KAAM,MAAOD,MAAO,OACtB,CAAEC,KAAM,QAASD,MAAO,SACxB,CAAEC,KAAM,QAASD,MAAO,UAKvB,GAGTE,UAAUC,EAAUC,GAClB,MAAMC,EAAgBD,EAASE,MAAM,KACrC,IAAIN,EAAQG,EACZ,IAAK,IAAIjD,EAAI,EAAGA,EAAImD,EAAcnM,SAAUgJ,EAAG,CAC7C,IAAI8C,EAAMK,EAAcnD,IAGtB,OAFA8C,EAAQA,EAAMK,EAAcnD,IAKhC,OAAO8C","sources":["webpack://grafana/./public/app/angular/AngularLocationWrapper.ts","webpack://grafana/./public/app/angular/core_module.ts","webpack://grafana/./public/app/angular/panel/metrics_panel_ctrl.ts","webpack://grafana/./public/app/angular/panel/panel_ctrl.ts","webpack://grafana/./public/app/plugins/panel/graph/data_processor.ts"],"sourcesContent":["import { deprecationWarning, urlUtil } from '@grafana/data';\nimport { locationSearchToObject, locationService, navigationLogger } from '@grafana/runtime';\n\n// Ref: https://github.com/angular/angular.js/blob/ae8e903edf88a83fedd116ae02c0628bf72b150c/src/ng/location.js#L5\nconst DEFAULT_PORTS: Record<string, number> = { http: 80, https: 443, ftp: 21 };\n\nexport class AngularLocationWrapper {\n constructor() {\n this.absUrl = this.wrapInDeprecationWarning(this.absUrl);\n this.hash = this.wrapInDeprecationWarning(this.hash);\n this.host = this.wrapInDeprecationWarning(this.host);\n this.path = this.wrapInDeprecationWarning(this.path);\n this.port = this.wrapInDeprecationWarning(this.port, 'window.location');\n this.protocol = this.wrapInDeprecationWarning(this.protocol, 'window.location');\n this.replace = this.wrapInDeprecationWarning(this.replace);\n this.search = this.wrapInDeprecationWarning(this.search);\n this.state = this.wrapInDeprecationWarning(this.state);\n this.url = this.wrapInDeprecationWarning(this.url);\n }\n\n wrapInDeprecationWarning(fn: Function, replacement?: string) {\n let self = this;\n\n return function wrapper() {\n deprecationWarning('$location', fn.name, replacement || 'locationService');\n return fn.apply(self, arguments);\n };\n }\n\n absUrl(): string {\n return `${window.location.origin}${this.url()}`;\n }\n\n hash(newHash?: string | null) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: hash');\n\n if (!newHash) {\n return locationService.getLocation().hash.slice(1);\n } else {\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n }\n\n host(): string {\n return new URL(window.location.href).hostname;\n }\n\n path(pathname?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: path');\n\n const location = locationService.getLocation();\n\n if (pathname !== undefined && pathname !== null) {\n let parsedPath = String(pathname);\n parsedPath = parsedPath.startsWith('/') ? parsedPath : `/${parsedPath}`;\n const url = new URL(`${window.location.origin}${parsedPath}`);\n\n locationService.push({\n pathname: url.pathname,\n search: url.search.length > 0 ? url.search : location.search,\n hash: url.hash.length > 0 ? url.hash : location.hash,\n });\n return this;\n }\n\n if (pathname === null) {\n locationService.push('/');\n return this;\n }\n\n return location.pathname;\n }\n\n port(): number | null {\n const url = new URL(window.location.href);\n return parseInt(url.port, 10) || DEFAULT_PORTS[url.protocol] || null;\n }\n\n protocol(): string {\n return new URL(window.location.href).protocol.slice(0, -1);\n }\n\n replace() {\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n\n search(search?: any, paramValue?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: search');\n if (!search) {\n return locationService.getSearchObject();\n }\n\n if (search && arguments.length > 1) {\n locationService.partial({\n [search]: paramValue,\n });\n\n return this;\n }\n\n if (search) {\n let newQuery;\n\n if (typeof search === 'object') {\n newQuery = { ...search };\n } else {\n newQuery = locationSearchToObject(search);\n }\n\n for (const key of Object.keys(newQuery)) {\n // removing params with null | undefined\n if (newQuery[key] === null || newQuery[key] === undefined) {\n delete newQuery[key];\n }\n }\n\n const updatedUrl = urlUtil.renderUrl(locationService.getLocation().pathname, newQuery);\n locationService.push(updatedUrl);\n }\n\n return this;\n }\n\n state(state?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: state');\n throw new Error('AngularLocationWrapper method not implemented.');\n }\n\n url(newUrl?: any) {\n navigationLogger('AngularLocationWrapper', false, 'Angular compat layer: url');\n\n if (newUrl !== undefined) {\n if (newUrl.startsWith('#')) {\n locationService.push({ ...locationService.getLocation(), hash: newUrl });\n } else if (newUrl.startsWith('?')) {\n locationService.push({ ...locationService.getLocation(), search: newUrl });\n } else if (newUrl.trim().length === 0) {\n locationService.push('/');\n } else {\n locationService.push(newUrl);\n }\n\n return locationService;\n }\n\n const location = locationService.getLocation();\n return `${location.pathname}${location.search}${location.hash}`;\n }\n}\n","import angular from 'angular';\n\nconst coreModule = angular.module('grafana.core', ['ngRoute']);\n\n// legacy modules\nconst angularModules = [\n coreModule,\n angular.module('grafana.controllers', []),\n angular.module('grafana.directives', []),\n angular.module('grafana.factories', []),\n angular.module('grafana.services', []),\n angular.module('grafana.filters', []),\n angular.module('grafana.routes', []),\n];\n\nexport { angularModules, coreModule };\n\nexport default coreModule;\n","import { isArray } from 'lodash';\nimport { Unsubscribable } from 'rxjs';\n\nimport {\n DataFrame,\n DataQueryResponse,\n DataSourceApi,\n LegacyResponseData,\n LoadingState,\n PanelData,\n PanelEvents,\n TimeRange,\n toDataFrameDTO,\n toLegacyResponseData,\n} from '@grafana/data';\nimport { PanelCtrl } from 'app/angular/panel/panel_ctrl';\nimport { ContextSrv } from 'app/core/services/context_srv';\nimport { PanelModel } from 'app/features/dashboard/state';\nimport { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';\n\nimport { PanelQueryRunner } from '../../features/query/state/PanelQueryRunner';\n\nclass MetricsPanelCtrl extends PanelCtrl {\n declare datasource: DataSourceApi;\n declare range: TimeRange;\n\n contextSrv: ContextSrv;\n datasourceSrv: any;\n timeSrv: any;\n templateSrv: any;\n interval: any;\n intervalMs: any;\n resolution: any;\n timeInfo?: string;\n skipDataOnInit = false;\n dataList: LegacyResponseData[] = [];\n querySubscription?: Unsubscribable | null;\n useDataFrames = false;\n panelData?: PanelData;\n\n constructor($scope: any, $injector: any) {\n super($scope, $injector);\n\n this.contextSrv = $injector.get('contextSrv');\n this.datasourceSrv = $injector.get('datasourceSrv');\n this.timeSrv = $injector.get('timeSrv');\n this.templateSrv = $injector.get('templateSrv');\n this.panel.datasource = this.panel.datasource || null;\n\n this.events.on(PanelEvents.refresh, this.onMetricsPanelRefresh.bind(this));\n this.events.on(PanelEvents.panelTeardown, this.onPanelTearDown.bind(this));\n this.events.on(PanelEvents.componentDidMount, this.onMetricsPanelMounted.bind(this));\n }\n\n private onMetricsPanelMounted() {\n const queryRunner = this.panel.getQueryRunner() as PanelQueryRunner;\n this.querySubscription = queryRunner\n .getData({ withTransforms: true, withFieldConfig: true })\n .subscribe(this.panelDataObserver);\n }\n\n private onPanelTearDown() {\n if (this.querySubscription) {\n this.querySubscription.unsubscribe();\n this.querySubscription = null;\n }\n }\n\n private onMetricsPanelRefresh() {\n // ignore fetching data if another panel is in fullscreen\n if (this.otherPanelInFullscreenMode()) {\n return;\n }\n\n // if we have snapshot data use that\n if (this.panel.snapshotData) {\n this.updateTimeRange();\n let data = this.panel.snapshotData;\n // backward compatibility\n if (!isArray(data)) {\n data = data.data;\n }\n\n this.panelData = {\n state: LoadingState.Done,\n series: data,\n timeRange: this.range,\n };\n\n // Defer panel rendering till the next digest cycle.\n // For some reason snapshot panels don't init at this time, so this helps to avoid rendering issues.\n return this.$timeout(() => {\n this.events.emit(PanelEvents.dataSnapshotLoad, data);\n });\n }\n\n // clear loading/error state\n delete this.error;\n this.loading = true;\n\n // load datasource service\n return this.datasourceSrv\n .get(this.panel.datasource, this.panel.scopedVars)\n .then(this.issueQueries.bind(this))\n .catch((err: any) => {\n this.processDataError(err);\n });\n }\n\n processDataError(err: any) {\n // if canceled keep loading set to true\n if (err.cancelled) {\n console.log('Panel request cancelled', err);\n return;\n }\n\n this.error = err.message || 'Request Error';\n\n if (err.data) {\n if (err.data.message) {\n this.error = err.data.message;\n } else if (err.data.error) {\n this.error = err.data.error;\n }\n }\n\n this.angularDirtyCheck();\n }\n\n angularDirtyCheck() {\n if (!this.$scope.$root.$$phase) {\n this.$scope.$digest();\n }\n }\n\n // Updates the response with information from the stream\n panelDataObserver = {\n next: (data: PanelData) => {\n this.panelData = data;\n\n if (data.state === LoadingState.Error) {\n this.loading = false;\n this.processDataError(data.error);\n }\n\n // Ignore data in loading state\n if (data.state === LoadingState.Loading) {\n this.loading = true;\n this.angularDirtyCheck();\n return;\n }\n\n if (data.request) {\n const { timeInfo } = data.request;\n if (timeInfo) {\n this.timeInfo = timeInfo;\n }\n }\n\n if (data.timeRange) {\n this.range = data.timeRange;\n }\n\n if (this.useDataFrames) {\n this.handleDataFrames(data.series);\n } else {\n // Make the results look as if they came directly from a <6.2 datasource request\n const legacy = data.series.map((v) => toLegacyResponseData(v));\n this.handleQueryResult({ data: legacy });\n }\n\n this.angularDirtyCheck();\n },\n };\n\n updateTimeRange(datasource?: DataSourceApi) {\n this.datasource = datasource || this.datasource;\n this.range = this.timeSrv.timeRange();\n\n const newTimeData = applyPanelTimeOverrides(this.panel, this.range);\n this.timeInfo = newTimeData.timeInfo;\n this.range = newTimeData.timeRange;\n }\n\n issueQueries(datasource: DataSourceApi) {\n this.updateTimeRange(datasource);\n\n this.datasource = datasource;\n\n const panel = this.panel as PanelModel;\n const queryRunner = panel.getQueryRunner();\n\n return queryRunner.run({\n datasource: panel.datasource,\n queries: panel.targets,\n panelId: panel.id,\n dashboardId: this.dashboard.id,\n timezone: this.dashboard.getTimezone(),\n timeInfo: this.timeInfo,\n timeRange: this.range,\n maxDataPoints: panel.maxDataPoints || this.width,\n minInterval: panel.interval,\n scopedVars: panel.scopedVars,\n cacheTimeout: panel.cacheTimeout,\n transformations: panel.transformations,\n });\n }\n\n handleDataFrames(data: DataFrame[]) {\n this.loading = false;\n\n if (this.dashboard && this.dashboard.snapshot) {\n this.panel.snapshotData = data.map((frame) => toDataFrameDTO(frame));\n }\n\n try {\n this.events.emit(PanelEvents.dataFramesReceived, data);\n } catch (err) {\n this.processDataError(err);\n }\n }\n\n handleQueryResult(result: DataQueryResponse) {\n this.loading = false;\n\n if (this.dashboard.snapshot) {\n this.panel.snapshotData = result.data;\n }\n\n if (!result || !result.data) {\n console.log('Data source query result invalid, missing data field:', result);\n result = { data: [] };\n }\n\n try {\n this.events.emit(PanelEvents.dataReceived, result.data);\n } catch (err) {\n this.processDataError(err);\n }\n }\n}\n\nexport { MetricsPanelCtrl };\n","import { auto } from 'angular';\nimport { isString } from 'lodash';\n\nimport {\n AppEvent,\n PanelEvents,\n PanelPluginMeta,\n AngularPanelMenuItem,\n EventBusExtended,\n EventBusSrv,\n} from '@grafana/data';\nimport { AngularLocationWrapper } from 'app/angular/AngularLocationWrapper';\nimport config from 'app/core/config';\nimport { profiler } from 'app/core/core';\n\nimport { DashboardModel } from '../../features/dashboard/state';\n\nexport class PanelCtrl {\n panel: any;\n error: any;\n declare dashboard: DashboardModel;\n pluginName = '';\n pluginId = '';\n editorTabs: any;\n $scope: any;\n $injector: auto.IInjectorService;\n $timeout: any;\n editModeInitiated = false;\n declare height: number;\n declare width: number;\n containerHeight: any;\n events: EventBusExtended;\n loading = false;\n timing: any;\n $location: AngularLocationWrapper;\n\n constructor($scope: any, $injector: auto.IInjectorService) {\n this.panel = this.panel ?? $scope.$parent.panel;\n this.dashboard = this.dashboard ?? $scope.$parent.dashboard;\n this.$injector = $injector;\n this.$scope = $scope;\n this.$timeout = $injector.get('$timeout');\n this.editorTabs = [];\n this.$location = new AngularLocationWrapper();\n this.events = new EventBusSrv();\n this.timing = {}; // not used but here to not break plugins\n\n const plugin = config.panels[this.panel.type];\n if (plugin) {\n this.pluginId = plugin.id;\n this.pluginName = plugin.name;\n }\n\n $scope.$on(PanelEvents.componentDidMount.name, () => this.panelDidMount());\n }\n\n panelDidMount() {\n this.events.emit(PanelEvents.componentDidMount);\n this.events.emit(PanelEvents.initialized);\n this.dashboard.panelInitialized(this.panel);\n }\n\n renderingCompleted() {\n profiler.renderingCompleted();\n }\n\n refresh() {\n this.panel.refresh();\n }\n\n publishAppEvent<T>(event: AppEvent<T>, payload?: T) {\n this.$scope.$root.appEvent(event, payload);\n }\n\n initEditMode() {\n if (!this.editModeInitiated) {\n this.editModeInitiated = true;\n this.events.emit(PanelEvents.editModeInitialized);\n }\n }\n\n addEditorTab(title: string, directiveFn: any, index?: number, icon?: any) {\n const editorTab = { title, directiveFn, icon };\n\n if (isString(directiveFn)) {\n editorTab.directiveFn = () => {\n return { templateUrl: directiveFn };\n };\n }\n\n if (index) {\n this.editorTabs.splice(index, 0, editorTab);\n } else {\n this.editorTabs.push(editorTab);\n }\n }\n\n getExtendedMenu() {\n const menu: AngularPanelMenuItem[] = [];\n this.events.emit(PanelEvents.initPanelActions, menu);\n return menu;\n }\n\n // Override in sub-class to add items before extended menu\n async getAdditionalMenuItems(): Promise<any[]> {\n return [];\n }\n\n otherPanelInFullscreenMode() {\n return this.dashboard.otherPanelInFullscreen(this.panel);\n }\n\n render(payload?: any) {\n this.events.emit(PanelEvents.render, payload);\n }\n\n // overriden from react\n onPluginTypeChange = (plugin: PanelPluginMeta) => {};\n}\n","import { find } from 'lodash';\n\nimport { DataFrame, dateTime, Field, FieldType, getFieldDisplayName, getTimeField, TimeRange } from '@grafana/data';\nimport { colors } from '@grafana/ui';\nimport { applyNullInsertThreshold } from '@grafana/ui/src/components/GraphNG/nullInsertThreshold';\nimport config from 'app/core/config';\nimport TimeSeries from 'app/core/time_series2';\n\ntype Options = {\n dataList: DataFrame[];\n range?: TimeRange;\n};\n\nexport class DataProcessor {\n constructor(private panel: any) {}\n\n getSeriesList(options: Options): TimeSeries[] {\n const list: TimeSeries[] = [];\n const { dataList, range } = options;\n\n if (!dataList || !dataList.length) {\n return list;\n }\n\n for (let i = 0; i < dataList.length; i++) {\n let series = dataList[i];\n let { timeField } = getTimeField(series);\n\n if (!timeField) {\n continue;\n }\n\n series = applyNullInsertThreshold({ frame: series, refFieldName: timeField.name });\n timeField = getTimeField(series).timeField!; // use updated length\n\n for (let j = 0; j < series.fields.length; j++) {\n const field = series.fields[j];\n\n if (field.type !== FieldType.number) {\n continue;\n }\n const name = getFieldDisplayName(field, series, dataList);\n const datapoints = [];\n\n for (let r = 0; r < series.length; r++) {\n datapoints.push([field.values.get(r), dateTime(timeField.values.get(r)).valueOf()]);\n }\n\n list.push(this.toTimeSeries(field, name, i, j, datapoints, list.length, range));\n }\n }\n\n // Merge all the rows if we want to show a histogram\n if (this.panel.xaxis.mode === 'histogram' && !this.panel.stack && list.length > 1) {\n const first = list[0];\n first.alias = first.aliasEscaped = 'Count';\n\n for (let i = 1; i < list.length; i++) {\n first.datapoints = first.datapoints.concat(list[i].datapoints);\n }\n\n return [first];\n }\n\n return list;\n }\n\n private toTimeSeries(\n field: Field,\n alias: string,\n dataFrameIndex: number,\n fieldIndex: number,\n datapoints: any[][],\n index: number,\n range?: TimeRange\n ) {\n const colorIndex = index % colors.length;\n const color = this.panel.aliasColors[alias] || colors[colorIndex];\n\n const series = new TimeSeries({\n datapoints: datapoints || [],\n alias: alias,\n color: config.theme.visualization.getColorByName(color),\n unit: field.config ? field.config.unit : undefined,\n dataFrameIndex,\n fieldIndex,\n });\n\n if (datapoints && datapoints.length > 0 && range) {\n const last = datapoints[datapoints.length - 1][1];\n const from = range.from;\n\n if (last - from.valueOf() < -10000) {\n // If the data is in reverse order\n const first = datapoints[0][1];\n if (first - from.valueOf() < -10000) {\n series.isOutsideRange = true;\n }\n }\n }\n return series;\n }\n\n setPanelDefaultsForNewXAxisMode() {\n switch (this.panel.xaxis.mode) {\n case 'time': {\n this.panel.bars = false;\n this.panel.lines = true;\n this.panel.points = false;\n this.panel.legend.show = true;\n this.panel.tooltip.shared = true;\n this.panel.xaxis.values = [];\n break;\n }\n case 'series': {\n this.panel.bars = true;\n this.panel.lines = false;\n this.panel.points = false;\n this.panel.stack = false;\n this.panel.legend.show = false;\n this.panel.tooltip.shared = false;\n this.panel.xaxis.values = ['total'];\n break;\n }\n case 'histogram': {\n this.panel.bars = true;\n this.panel.lines = false;\n this.panel.points = false;\n this.panel.stack = false;\n this.panel.legend.show = false;\n this.panel.tooltip.shared = false;\n break;\n }\n }\n }\n\n validateXAxisSeriesValue() {\n switch (this.panel.xaxis.mode) {\n case 'series': {\n if (this.panel.xaxis.values.length === 0) {\n this.panel.xaxis.values = ['total'];\n return;\n }\n\n const validOptions = this.getXAxisValueOptions({});\n const found: any = find(validOptions, { value: this.panel.xaxis.values[0] });\n if (!found) {\n this.panel.xaxis.values = ['total'];\n }\n return;\n }\n }\n }\n\n getXAxisValueOptions(options: any) {\n switch (this.panel.xaxis.mode) {\n case 'series': {\n return [\n { text: 'Avg', value: 'avg' },\n { text: 'Min', value: 'min' },\n { text: 'Max', value: 'max' },\n { text: 'Total', value: 'total' },\n { text: 'Count', value: 'count' },\n ];\n }\n }\n\n return [];\n }\n\n pluckDeep(obj: any, property: string) {\n const propertyParts = property.split('.');\n let value = obj;\n for (let i = 0; i < propertyParts.length; ++i) {\n if (value[propertyParts[i]]) {\n value = value[propertyParts[i]];\n } else {\n return undefined;\n }\n }\n return value;\n }\n}\n"],"names":["DEFAULT_PORTS","http","https","ftp","AngularLocationWrapper","constructor","this","absUrl","wrapInDeprecationWarning","hash","host","path","port","protocol","replace","search","state","url","fn","replacement","self","deprecationWarning","name","apply","arguments","window","location","origin","newHash","navigationLogger","Error","locationService","slice","URL","href","hostname","pathname","parsedPath","String","startsWith","length","parseInt","paramValue","newQuery","locationSearchToObject","key","Object","keys","undefined","updatedUrl","urlUtil","newUrl","trim","coreModule","angular","angularModules","MetricsPanelCtrl","PanelCtrl","$scope","$injector","super","next","data","panelData","LoadingState","loading","processDataError","error","angularDirtyCheck","request","timeInfo","timeRange","range","useDataFrames","handleDataFrames","series","legacy","map","v","toLegacyResponseData","handleQueryResult","contextSrv","get","datasourceSrv","timeSrv","templateSrv","panel","datasource","events","on","PanelEvents","onMetricsPanelRefresh","bind","onPanelTearDown","onMetricsPanelMounted","queryRunner","getQueryRunner","querySubscription","getData","withTransforms","withFieldConfig","subscribe","panelDataObserver","unsubscribe","otherPanelInFullscreenMode","snapshotData","updateTimeRange","isArray","$timeout","emit","scopedVars","then","issueQueries","catch","err","cancelled","console","log","message","$root","$$phase","$digest","newTimeData","applyPanelTimeOverrides","run","queries","targets","panelId","id","dashboardId","dashboard","timezone","getTimezone","maxDataPoints","width","minInterval","interval","cacheTimeout","transformations","snapshot","frame","toDataFrameDTO","result","plugin","$parent","editorTabs","$location","EventBusSrv","timing","config","type","pluginId","pluginName","$on","panelDidMount","panelInitialized","renderingCompleted","profiler","refresh","publishAppEvent","event","payload","appEvent","initEditMode","editModeInitiated","addEditorTab","title","directiveFn","index","icon","editorTab","isString","templateUrl","splice","push","getExtendedMenu","menu","otherPanelInFullscreen","render","DataProcessor","getSeriesList","options","list","dataList","i","timeField","getTimeField","applyNullInsertThreshold","refFieldName","j","fields","field","FieldType","getFieldDisplayName","datapoints","r","values","dateTime","valueOf","toTimeSeries","xaxis","mode","stack","first","alias","aliasEscaped","concat","dataFrameIndex","fieldIndex","colorIndex","colors","color","aliasColors","TimeSeries","unit","last","from","isOutsideRange","setPanelDefaultsForNewXAxisMode","bars","lines","points","legend","show","tooltip","shared","validateXAxisSeriesValue","validOptions","getXAxisValueOptions","find","value","text","pluckDeep","obj","property","propertyParts","split"],"sourceRoot":""}