:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(frontend): keep re2js, d3 and big validators off scene eager paths (#127288)
Paul D'Ambra2524a5e461bd
diff --git a/.gitattributes b/.gitattributesindex 2cef41d7f658..bda6c199f627 100644--- a/.gitattributes+++ b/.gitattributes@@ -12,6 +12,7 @@ frontend/src/products.tsx linguist-generatedfrontend/src/queries/schema/latest-versions.json linguist-generatedfrontend/src/queries/schema.json linguist-generatedfrontend/src/queries/validators.js linguist-generated+frontend/src/queries/web-analytics-validators.js linguist-generatedfrontend/src/taxonomy/core-filter-definitions-by-group.json linguist-generatedproducts/*/frontend/generated/** linguist-generateddiff --git a/.oxlintrc.json b/.oxlintrc.jsonindex e7f6efe90140..9a3a42e96abe 100644--- a/.oxlintrc.json+++ b/.oxlintrc.json@@ -25,6 +25,7 @@"common/hogvm/__tests__/__snapshots__","common/hogvm/__tests__/__snapshots__/**","frontend/src/queries/validators.js",+ "frontend/src/queries/web-analytics-validators.js","frontend/src/generated/**","services/mcp/**/generated.ts","services/mcp/schema/tool-inputs.json",diff --git a/frontend/bin/build-validators.mjs b/frontend/bin/build-validators.mjsindex cdb432a33991..57d029880f0c 100644--- a/frontend/bin/build-validators.mjs+++ b/frontend/bin/build-validators.mjs@@ -4,7 +4,12 @@ import standaloneCode from 'ajv/dist/standalone/index.js'import fs from 'fs'const inputPath = 'src/queries/schema.json'-const outputPath = 'src/queries/validators.js'+// esbuild ships a module whole into one chunk. The web analytics scene parses its URL filters with two+// small validators, so they live in their own module, apart from the large ones other scenes use.+const outputs = {+ 'src/queries/validators.js': ['AnyPropertyFilter', 'SessionPropertyFilter', 'ExperimentMetric'],+ 'src/queries/web-analytics-validators.js': ['WebAnalyticsPropertyFilters', 'CompareFilter'],+}// Load the schemaconst schema = JSON.parse(fs.readFileSync(inputPath, 'utf-8'))@@ -23,27 +28,19 @@ const ajv = new Ajv({// Add the main schemaajv.addSchema(schema)-// Define the validators we need-const validators = [- 'AnyPropertyFilter',- 'WebAnalyticsPropertyFilters',- 'SessionPropertyFilter',- 'CompareFilter',- 'ExperimentMetric',-]--// Compile validators - standaloneCode needs the schema references, not the compiled functions-const schemaRefs = {}-for (const name of validators) {- schemaRefs[name] = `#/definitions/${name}`-}+for (const [outputPath, validators] of Object.entries(outputs)) {+ // standaloneCode needs the schema references, not the compiled functions+ const schemaRefs = {}+ for (const name of validators) {+ schemaRefs[name] = `#/definitions/${name}`+ }-// Generate standalone code-const moduleCode = standaloneCode(ajv, schemaRefs)+ const moduleCode = standaloneCode(ajv, schemaRefs)-// Write the output-const output = `// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY+ fs.writeFileSync(+ outputPath,+ `// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY${moduleCode}`--fs.writeFileSync(outputPath, output)+ )+}diff --git a/frontend/bin/check-eager-graph.mjs b/frontend/bin/check-eager-graph.mjsindex 3f5e39ae6030..9553746e60d4 100644--- a/frontend/bin/check-eager-graph.mjs+++ b/frontend/bin/check-eager-graph.mjs@@ -37,6 +37,11 @@ const failForbiddenHits = process.argv.includes('--fail-forbidden-hits')// Budgets are eager output bytes (shipped JS + the stable build's CSS for the root, minified).// Ratchet policy: when a bundle-splitting win lands, lower the budget to lock it in;// raise a budget only as a conscious, reviewed decision in the PR that needs it.+// A test library: its expectLogic and jest matchers ship with any import. Use objectsEqual from+// lib/utils/objects and delay from lib/utils/async instead. No app module imports it, so the guard is+// a tripwire, and the verify prefix checks the kea package layout that it relies on.+const KEA_TEST_UTILS = { pattern: 'node_modules/kea-test-utils/', verifyPrefix: 'node_modules/kea/' }+const ROOTS = [{root: ENTRY,@@ -97,8 +102,7 @@ const ROOTS = ['src/lib/logic/billing/billingLogic.tsx',// Product setup statuses need a logged-in team, so AuthenticatedShell mounts the preload.'src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts',- // See the authenticated shell's note: a test library never ships on a boot path.- 'node_modules/kea-test-utils/',+ KEA_TEST_UTILS,],},{@@ -109,9 +113,7 @@ const ROOTS = [forbidden: ['node_modules/monaco-editor/','products/product_analytics/frontend/insights/activityDescriptions',- // A test library. Its expectLogic and jest matchers ship with any import, so use- // objectsEqual from lib/utils/objects and delay from lib/utils/async instead.- 'node_modules/kea-test-utils/',+ KEA_TEST_UTILS,// Widget previews render product UI (recordings player, error tracking list, logs) and// are only needed by the add-widget modal; the recordings player logic pulls in rrweb.{@@ -174,17 +176,22 @@ const ROOTS = [{root: 'src/scenes/dashboard/Dashboard.tsx',label: 'dashboard scene',- // 2026-10-11: 9.33 MiB (3529 files), stable CSS included. ~10% headroom.- budgetBytes: 10_500_000,+ // 2026-11-02: 9.49 MiB (3729 files), stable CSS included. ~3.6% headroom.+ budgetBytes: 10_314_000,forbidden: [// Neither scene plays recordings. A hit means a static import pulled the playlist and player onto it.'src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx',// Only web analytics insights render this tile. A hit means a static import put the web// analytics stack on every page that shows an insight.'src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx',- // The generated schema validators serve web analytics URL filters. A hit means the web- // analytics editor filters became a static import of the insight editor.+ // The generated schema validators parse the URL filters of other scenes. A hit means a module+ // on this path imports queries/schema-guards or queries/web-analytics-schema-guards.'src/queries/validators.js',+ 'src/queries/web-analytics-validators.js',+ // The RE2 engine checks regex filters, and lib/utils/regexp loads it on first use.+ // A hit means a module imports re2js directly again.+ 'node_modules/re2js/',+ KEA_TEST_UTILS,],},{@@ -212,8 +219,8 @@ const ROOTS = ['src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx',],label: 'AI-first home path',- // 2026-11-01: 6.39 MiB, stable CSS included. ~1% headroom.- budgetBytes: 6_763_000,+ // 2026-11-02: 6.22 MiB, stable CSS included. ~1% headroom.+ budgetBytes: 6_576_000,forbidden: ['products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx','products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx',@@ -227,35 +234,47 @@ const ROOTS = [{root: 'src/scenes/activity/explore/EventsScene.tsx',label: 'events scene',- // 2026-10-11: 8.92 MiB (3373 files), stable CSS included. ~10% headroom.- budgetBytes: 10_055_000,+ // 2026-11-02: 8.92 MiB (3499 files), stable CSS included. ~5.5% headroom.+ budgetBytes: 9_869_000,forbidden: [// Neither scene plays recordings. A hit means a static import pulled the playlist and player onto it.'src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx',// Only web analytics insights render this tile. A hit means a static import put the web// analytics stack on every page that shows an insight.'src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx',- // The generated schema validators serve web analytics URL filters. A hit means the web- // analytics editor filters became a static import of the insight editor.+ // The generated schema validators parse the URL filters of other scenes. A hit means a module+ // on this path imports queries/schema-guards or queries/web-analytics-schema-guards.'src/queries/validators.js',+ 'src/queries/web-analytics-validators.js',+ // The RE2 engine checks regex filters, and lib/utils/regexp loads it on first use.+ // A hit means a module imports re2js directly again.+ 'node_modules/re2js/',+ KEA_TEST_UTILS,],},{root: 'src/scenes/web-analytics/WebAnalyticsScene.tsx',label: 'web analytics scene',- // 2026-10-17: 9.85 MiB (3651 files), stable CSS included. ~10% headroom.- budgetBytes: 11_360_000,+ // 2026-11-02: 9.72 MiB (3766 files), stable CSS included. ~7.9% headroom.+ budgetBytes: 10_999_000,forbidden: [// Only the live tab renders this dashboard. Its world map holds about 1 MiB of country shapes.'src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx','products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx',+ // URL filters use the small validators in web-analytics-validators.js. The large module holds+ // the validators of other scenes.+ 'src/queries/validators.js',+ // The RE2 engine checks regex filters, and lib/utils/regexp loads it on first use.+ // A hit means a module imports re2js directly again.+ 'node_modules/re2js/',+ KEA_TEST_UTILS,],},{root: 'src/scenes/session-recordings/detail/SessionRecordingDetail.tsx',label: 'replay detail scene',- // 2026-10-17: 8.61 MiB (3264 files), stable CSS included. ~10% headroom.- budgetBytes: 9_930_000,+ // 2026-11-02: 7.39 MiB (2690 files), stable CSS included. ~10% headroom.+ budgetBytes: 8_520_000,forbidden: [// The player shows a snapshot of a few settings. A hit means it imports settingsLogic again,// which holds every settings page.@@ -266,6 +285,13 @@ const ROOTS = [pattern: '@jspm/core/nodelibs/browser/fs',verifyPrefix: '@jspm/core/nodelibs/browser/',},+ // The RE2 engine checks regex filters, and lib/utils/regexp loads it on first use.+ // A hit means a module imports re2js directly again.+ 'node_modules/re2js/',+ KEA_TEST_UTILS,+ // The d3 barrel pulls in d3-selection and d3-transition for their side effects. Import array+ // helpers such as range from d3-array.+ 'node_modules/d3/src/',],},]diff --git a/frontend/package.json b/frontend/package.jsonindex c6e358d3731f..c9cced3a1e4d 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -35,7 +35,7 @@"typegen:watch": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen watch --delete --show-ts-errors --use-cache","typegen:write": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen write --delete --show-ts-errors --use-cache","typegen:write:no-cache": "cd .. && NODE_OPTIONS=--max-old-space-size=16384 kea-typegen write --delete --show-ts-errors",- "schema:build:json": "ts-node ./bin/build-schema-json.mjs && oxfmt ./src/queries/schema.json && ts-node ./bin/build-validators.mjs && oxfmt ./src/queries/validators.js",+ "schema:build:json": "ts-node ./bin/build-schema-json.mjs && oxfmt ./src/queries/schema.json && ts-node ./bin/build-validators.mjs && oxfmt ./src/queries/validators.js ./src/queries/web-analytics-validators.js","test": "SHARD_IDX=${SHARD_INDEX:-1}; SHARD_TOTAL=${SHARD_COUNT:-1}; echo $SHARD_IDX/$SHARD_TOTAL; pnpm build:products && jest --testPathPattern='(frontend/|products/|common/|packages/quill/|packages/llm-normalizer/)' --forceExit --shard=$SHARD_IDX/$SHARD_TOTAL","jest": "pnpm build:products && jest","typescript:check": "node ./bin/typescript-check.mjs",@@ -224,6 +224,7 @@"crypto-browserify": "^3.12.0","cva": "1.0.0-beta.3","d3": "^7.9.0",+ "d3-array": "^3.2.4","d3-flame-graph": "^5.0.0","dayjs": "1.11.11","dompurify": "^3.4.0",@@ -327,6 +328,7 @@"@testing-library/user-event": "^14.6.1","@types/clone": "^2.1.1","@types/d3": "^7.4.3",+ "@types/d3-array": "^3.2.1","@types/d3-selection": "3.0.3","@types/dompurify": "^3.0.3","@types/he": "^1.2.3",diff --git a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.test.tsx b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.test.tsxindex 4e3ff6743dae..b1d94e762506 100644--- a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.test.tsx+++ b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.test.tsx@@ -1,27 +1,36 @@+import { RE2Engine, loadRE2 } from 'lib/utils/regexp'+import { PropertyOperator } from '~/types'import { getValidationError } from './OperatorValueSelect'describe('getValidationError', () => {- it('validates every pattern of a multi-value regex filter without crashing on the array', () => {- // A visited_page filter ORs several regex values, so the value is an array. RE2JS.compile- // used to receive the array directly and throw "this.str.codePointAt is not a function",- // surfacing that internal error to the user in the filter editor.- const value = ['/project/[^/]+/replay/home', '/project/[^/]+/replay/playlists']+ let re2: RE2Engine- expect(getValidationError(PropertyOperator.Regex, value)).toBeNull()+ beforeAll(async () => {+ re2 = await loadRE2()})- it('reports the first invalid pattern in a multi-value regex filter', () => {- const value = ['/valid/path', '/bad(unclosed']+ // A visited_page filter ORs several regex values, so the value is an array. RE2JS.compile+ // used to receive the array directly and throw "this.str.codePointAt is not a function",+ // surfacing that internal error to the user in the filter editor.+ it('accepts every valid pattern of a multi-value regex', () => {+ const value = ['/project/[^/]+/replay/home', '/project/[^/]+/replay/playlists']++ expect(getValidationError(PropertyOperator.Regex, value, re2)).toBeNull()+ })- const error = getValidationError(PropertyOperator.Regex, value)+ it.each([+ ['one pattern of a multi-value regex', ['/valid/path', '/bad(unclosed']],+ ['a single-value regex', '(unclosed'],+ ])('reports an invalid pattern in %s', (_name, value) => {+ const error = getValidationError(PropertyOperator.Regex, value, re2)expect(error).not.toBeNull()expect(error).not.toContain('codePointAt')})- it('still reports an invalid single-value regex', () => {- expect(getValidationError(PropertyOperator.Regex, '(unclosed')).not.toBeNull()+ it('reports no regex error before the RE2 engine loads', () => {+ expect(getValidationError(PropertyOperator.Regex, '(unclosed', null)).toBeNull()})})diff --git a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsxindex 1ac44369165e..5456287c076b 100644--- a/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx+++ b/frontend/src/lib/components/PropertyFilters/components/OperatorValueSelect.tsx@@ -1,4 +1,3 @@-import { RE2JS } from 're2js'import { useEffect, useState } from 'react'import { LemonBanner, LemonDropdownProps, LemonSelect, LemonSelectProps, LemonSelectSection } from '@posthog/lemon-ui'@@ -20,7 +19,7 @@ import {isOperatorRegex,isOperatorSemver,} from 'lib/utils/operators'-import { RE2_DOCS_LINK, formatRE2Error } from 'lib/utils/regexp'+import { RE2Engine, RE2_DOCS_LINK, formatRE2Error, getLoadedRE2, loadRE2 } from 'lib/utils/regexp'import { PropValue } from '~/models/propertyDefinitionsModel'import { getCoreFilterDefinition } from '~/taxonomy/helpers'@@ -156,17 +155,18 @@ interface OperatorSelectProps extends Omit<LemonSelectProps<any>, 'options'> {startVisible?: LemonDropdownProps['startVisible']}-function getRegexValidationError(operator: PropertyOperator, value: any): string | null {- if (!isOperatorRegex(operator)) {+function getRegexValidationError(operator: PropertyOperator, value: any, re2: RE2Engine | null): string | null {+ // Until the RE2 engine loads, the pattern is not validated yet, so no error shows.+ if (!isOperatorRegex(operator) || !re2) {return null}// A regex operator can hold several values (e.g. a multi-value `visited_page` filter), so the- // value is an array. RE2JS.compile expects a single string and crashes on an array, so validate+ // value is an array. re2.compile expects a single string and crashes on an array, so validate// each pattern and surface the first that fails.const patterns: unknown[] = Array.isArray(value) ? value : [value]for (const pattern of patterns) {try {- RE2JS.compile(String(pattern))+ re2.compile(String(pattern))} catch (error) {return formatRE2Error(error as Error, String(pattern))}@@ -174,8 +174,13 @@ function getRegexValidationError(operator: PropertyOperator, value: any): stringreturn null}-export function getValidationError(operator: PropertyOperator, value: any, property?: string): string | null {- const regexErrorMessage = getRegexValidationError(operator, value)+export function getValidationError(+ operator: PropertyOperator,+ value: any,+ re2: RE2Engine | null,+ property?: string+): string | null {+ const regexErrorMessage = getRegexValidationError(operator, value, re2)if (regexErrorMessage != null) {return regexErrorMessage}@@ -349,7 +354,21 @@ export function OperatorValueSelect({}}, [propertyDefinition, propertyKey, operator, operatorAllowlist, type]) // oxlint-disable-line react-hooks/exhaustive-deps- const validationError = currentOperator && value ? getValidationError(currentOperator, value, propertyKey) : null+ const needsRE2 = !!value && isOperatorRegex(currentOperator)+ const [re2, setRE2] = useState<RE2Engine | null>(getLoadedRE2)+ useEffect(() => {+ if (needsRE2 && !re2) {+ // The engine is a class, so wrap it: React would call a bare function as a state updater.+ loadRE2().then(+ (engine) => setRE2(() => engine),+ () => {}+ )+ }+ // A failed load leaves re2 null, so the next edit of the value tries again.+ }, [needsRE2, re2, value])++ const validationError =+ currentOperator && value ? getValidationError(currentOperator, value, re2, propertyKey) : nullreturn (<>diff --git a/frontend/src/lib/utils/regexp.test.ts b/frontend/src/lib/utils/regexp.test.tsindex fc959462c0ce..363e2c77804a 100644--- a/frontend/src/lib/utils/regexp.test.ts+++ b/frontend/src/lib/utils/regexp.test.ts@@ -1,8 +1,19 @@import { RE2JS } from 're2js'-import { formatRE2Error } from './regexp'+import { formatRE2Error, getLoadedRE2, isValidRE2 } from './regexp'describe('RE2 Regex Validation', () => {+ describe('isValidRE2', () => {+ it.each([+ { pattern: '^/api/.*', expected: true },+ { pattern: '(?=lookahead)', expected: false },+ { pattern: '[unclosed', expected: false },+ ])('returns $expected for $pattern once the engine loads', async ({ pattern, expected }) => {+ expect(await isValidRE2(pattern)).toBe(expected)+ expect(getLoadedRE2()).toBe(RE2JS)+ })+ })+describe('formatRE2Error', () => {it.each([{ pattern: '(?=test)', expectedSubstring: 'Lookahead and lookbehind' },diff --git a/frontend/src/lib/utils/regexp.ts b/frontend/src/lib/utils/regexp.tsindex 43f29d6d9604..cb4f65bc2ebf 100644--- a/frontend/src/lib/utils/regexp.ts+++ b/frontend/src/lib/utils/regexp.ts@@ -1,4 +1,6 @@-import { RE2JS } from 're2js'+import type { RE2JS } from 're2js'++import { retryImport } from 'lib/utils/retryImport'export const isValidRegexp = (regex: string): boolean => {try {@@ -9,9 +11,34 @@ export const isValidRegexp = (regex: string): boolean => {}}-export const isValidRE2 = (regex: string): boolean => {+export type RE2Engine = typeof RE2JS++let loadedRE2: RE2Engine | null = null+let pendingRE2: Promise<RE2Engine> | null = null++/** The RE2 engine is large and only checks regex filters, so it loads on first use. */+export function loadRE2(): Promise<RE2Engine> {+ pendingRE2 ??= retryImport(() => import('re2js')).then(+ (module) => {+ loadedRE2 = module.RE2JS+ return module.RE2JS+ },+ (error: unknown) => {+ pendingRE2 = null+ throw error+ }+ )+ return pendingRE2+}++export function getLoadedRE2(): RE2Engine | null {+ return loadedRE2+}++export async function isValidRE2(regex: string): Promise<boolean> {+ const engine = await loadRE2()try {- RE2JS.compile(regex)+ engine.compile(regex)return true} catch {return falsediff --git a/frontend/src/queries/nodes/DataNode/dataNodeLogic.test.ts b/frontend/src/queries/nodes/DataNode/dataNodeLogic.test.tsindex 5259a5a7c556..364ad437a7bf 100644--- a/frontend/src/queries/nodes/DataNode/dataNodeLogic.test.ts+++ b/frontend/src/queries/nodes/DataNode/dataNodeLogic.test.ts@@ -369,6 +369,30 @@ describe('dataNodeLogic', () => {.toMatchValues({ responseLoading: false, response: partial({ results: results3 }) })})+ it.each([+ ['runs a query with a valid regex filter', '^/api/.*', false, 1],+ ['skips a query with an invalid regex filter', '(?=lookahead)', false, 0],+ ['skips a query cancelled during the load', '^/api/cancelled', true, 0],+ ])('%s once the RE2 engine loads', async (_name, pattern, cancel, expectedCalls) => {+ mockedQuery.mockResolvedValueOnce({ results: [] })+ logic = dataNodeLogic({+ key: `regex-${pattern}`,+ query: setLatestVersionsOnQuery({+ kind: NodeKind.EventsQuery,+ select: ['*', 'event', 'timestamp'],+ properties: [{ type: 'event', key: '$current_url', operator: 'regex', value: pattern }],+ }),+ })+ logic.mount()+ if (cancel) {+ logic.actions.cancelQuery()+ }++ await expectLogic(logic).toFinishAllListeners()+ await waitFor(() => expect(logic.values.responseLoading).toBe(false))+ expect(performQuery).toHaveBeenCalledTimes(expectedCalls)+ })+it('reports the query kind to its collection when the query arrives after mount', async () => {mockedQuery.mockResolvedValueOnce({ results: [] })const collection = dataNodeCollectionLogic({ key: 'test-collection' })diff --git a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts b/frontend/src/queries/nodes/DataNode/dataNodeLogic.tsindex 8caa7170cd10..8f9102c0609b 100644--- a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts+++ b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts@@ -33,7 +33,7 @@ import { teamLogic } from 'scenes/teamLogic'import { userLogic } from 'scenes/userLogic'import { DataNodeCollectionProps, dataNodeCollectionLogic } from '~/queries/nodes/DataNode/dataNodeCollectionLogic'-import { hasInvalidRegexFilter } from '~/queries/nodes/DataNode/hasInvalidRegexFilter'+import { getRegexFilterPatterns, hasInvalidRegexPattern } from '~/queries/nodes/DataNode/hasInvalidRegexFilter'import { QueryScanPollResult, QueryScanState, resolveQueryScan } from '~/queries/nodes/DataNode/queryScan'import { getSingleRequestServerMs } from '~/queries/nodes/DataNode/queryTimeBreakdown'import { removeExpressionComment } from '~/queries/nodes/DataTable/utils'@@ -1202,9 +1202,20 @@ export const dataNodeLogic = kea<dataNodeLogicType>([return null}- if (!validateQuery(query, hasInvalidRegexFilter)) {+ if (!validateQuery(query)) {return null}+ // Only a query with a regex filter waits for the RE2 engine.+ const regexPatterns = getRegexFilterPatterns(query)+ if (regexPatterns.length > 0) {+ const hasInvalidPattern = await hasInvalidRegexPattern(regexPatterns)+ // A newer load may have started during the engine load. This one must not touch its request.+ breakpoint()+ // A cancel during the engine load finds no request to abort yet.+ if (hasInvalidPattern || values.queryCancelled) {+ return null+ }+ }const abortController = new AbortController()// A retained query keeps running when the node unmounts, so a remount can pick it up.diff --git a/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.test.ts b/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.test.tsindex 8cb1cc948a65..d6fee920de9c 100644--- a/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.test.ts+++ b/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.test.ts@@ -1,74 +1,56 @@-import { hasInvalidRegexFilter } from './hasInvalidRegexFilter'+import * as regexp from 'lib/utils/regexp'++import { getRegexFilterPatterns, hasInvalidRegexPattern } from './hasInvalidRegexFilter'++const nestedQuery = (operator: string, value: unknown): Record<string, unknown> => ({+ kind: 'TrendsQuery',+ series: [{ kind: 'EventsNode', event: '$pageview', properties: [{ operator: 'exact', value: 'ok' }] }],+ properties: { type: 'AND', values: [{ type: 'OR', values: [{ operator, value }] }] },+})describe('hasInvalidRegexFilter', () => {it.each([- ['valid regex in property filter', { operator: 'regex', value: 'test.*' }, false],- ['valid not_regex in property filter', { operator: 'not_regex', value: '^foo$' }, false],- ['invalid regex - lookahead', { operator: 'regex', value: '(?=test)' }, true],- ['invalid regex - unclosed bracket', { operator: 'regex', value: '[unclosed' }, true],- ['invalid not_regex - backreference', { operator: 'not_regex', value: '(test)\\1' }, true],- ['non-regex operator with invalid pattern is ok', { operator: 'exact', value: '(?=test)' }, false],- ['regex operator with non-string value', { operator: 'regex', value: 123 }, false],- ['empty object', {}, false],- ['null', null, false],- ['string', 'test', false],- ['number', 42, false],- ])('%s', (_name, input, expected) => {- expect(hasInvalidRegexFilter(input)).toBe(expected)- })-- it('finds invalid regex nested in arrays', () => {- const nested = [- { operator: 'exact', value: 'ok' },- { operator: 'regex', value: '(?=bad)' },- ]- expect(hasInvalidRegexFilter(nested)).toBe(true)- })+ ['valid regex in property filter', { operator: 'regex', value: 'test.*' }, ['test.*'], false],+ ['valid not_regex in property filter', { operator: 'not_regex', value: '^foo$' }, ['^foo$'], false],+ ['invalid regex - lookahead', { operator: 'regex', value: '(?=test)' }, ['(?=test)'], true],+ ['invalid regex - unclosed bracket', { operator: 'regex', value: '[unclosed' }, ['[unclosed'], true],+ ['invalid not_regex - backreference', { operator: 'not_regex', value: '(test)\\1' }, ['(test)\\1'], true],+ ['non-regex operator with invalid pattern is ok', { operator: 'exact', value: '(?=test)' }, [], false],+ ['regex operator with non-string value', { operator: 'regex', value: 123 }, [], false],+ ['empty object', {}, [], false],+ ['null', null, [], false],+ ['string', 'test', [], false],+ ['number', 42, [], false],+ [+ 'invalid regex nested in arrays',+ [+ { operator: 'exact', value: 'ok' },+ { operator: 'regex', value: '(?=bad)' },+ ],+ ['(?=bad)'],+ true,+ ],+ ['invalid regex deeply nested in a query', nestedQuery('regex', '(?=lookahead)'), ['(?=lookahead)'], true],+ ['valid regex deeply nested in a query', nestedQuery('regex', 'valid.*pattern'), ['valid.*pattern'], false],+ [+ 'one invalid pattern among several filters',+ [+ { type: 'event', key: 'url', operator: 'regex', value: '^/valid/' },+ { type: 'event', key: 'path', operator: 'not_regex', value: '(?!invalid)' },+ ],+ ['^/valid/', '(?!invalid)'],+ true,+ ],+ ])('%s', async (_name, input, expectedPatterns, expectedInvalid) => {+ const patterns = getRegexFilterPatterns(input)- it('finds invalid regex deeply nested in objects', () => {- const deeplyNested = {- properties: {- type: 'AND',- values: [- {- type: 'OR',- values: [{ operator: 'regex', value: '(?=lookahead)' }],- },- ],- },- }- expect(hasInvalidRegexFilter(deeplyNested)).toBe(true)+ expect(patterns).toEqual(expectedPatterns)+ expect(await hasInvalidRegexPattern(patterns)).toBe(expectedInvalid)})- it('returns false for valid regex deeply nested', () => {- const deeplyNested = {- properties: {- type: 'AND',- values: [- {- type: 'OR',- values: [{ operator: 'regex', value: 'valid.*pattern' }],- },- ],- },- }- expect(hasInvalidRegexFilter(deeplyNested)).toBe(false)- })+ it('lets the query run when the RE2 engine fails to load', async () => {+ jest.spyOn(regexp, 'loadRE2').mockRejectedValueOnce(new Error('Failed to fetch dynamically imported module'))- it('handles query-like structure with multiple property filters', () => {- const queryLike = {- kind: 'TrendsQuery',- series: [- {- kind: 'EventsNode',- event: '$pageview',- properties: [- { type: 'event', key: 'url', operator: 'regex', value: '^/valid/' },- { type: 'event', key: 'path', operator: 'not_regex', value: '(?!invalid)' },- ],- },- ],- }- expect(hasInvalidRegexFilter(queryLike)).toBe(true)+ expect(await hasInvalidRegexPattern(['(?=lookahead)'])).toBe(false)})})diff --git a/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.ts b/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.tsindex 294b7a926f48..723b1f73e84a 100644--- a/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.ts+++ b/frontend/src/queries/nodes/DataNode/hasInvalidRegexFilter.ts@@ -1,22 +1,33 @@-import { isValidRE2 } from 'lib/utils/regexp'+import { isValidRE2, loadRE2 } from 'lib/utils/regexp'-export const hasInvalidRegexFilter = (obj: unknown): boolean => {+export const getRegexFilterPatterns = (obj: unknown): string[] => {if (Array.isArray(obj)) {- return obj.some(hasInvalidRegexFilter)+ return obj.flatMap(getRegexFilterPatterns)}if (obj !== null && typeof obj === 'object') {const record = obj as Record<string, unknown>- if (- (record.operator === 'regex' || record.operator === 'not_regex') &&- typeof record.value === 'string' &&- !isValidRE2(record.value)- ) {- return true+ const nestedPatterns = Object.values(record).flatMap(getRegexFilterPatterns)+ if ((record.operator === 'regex' || record.operator === 'not_regex') && typeof record.value === 'string') {+ return [record.value, ...nestedPatterns]}-- return Object.values(record).some(hasInvalidRegexFilter)+ return nestedPatterns}+ return []+}++export const hasInvalidRegexPattern = async (patterns: string[]): Promise<boolean> => {+ try {+ await loadRE2()+ } catch {+ // The backend checks the patterns too, so a stale or missing engine chunk must not block every regex query.+ return false+ }+ for (const pattern of patterns) {+ if (!(await isValidRE2(pattern))) {+ return true+ }+ }return false}diff --git a/frontend/src/queries/nodes/DataVisualization/Components/Charts/sqlReferenceLines.ts b/frontend/src/queries/nodes/DataVisualization/Components/Charts/sqlReferenceLines.tsindex 2ec67ab99c43..57fb9710337b 100644--- a/frontend/src/queries/nodes/DataVisualization/Components/Charts/sqlReferenceLines.ts+++ b/frontend/src/queries/nodes/DataVisualization/Components/Charts/sqlReferenceLines.ts@@ -1,4 +1,4 @@-import { max, mean, median, min } from 'd3'+import { max, mean, median, min } from 'd3-array'import type { Series } from '@posthog/quill-charts'diff --git a/frontend/src/queries/nodes/DataVisualization/displayLogic.ts b/frontend/src/queries/nodes/DataVisualization/displayLogic.tsindex 91cfdfad8cff..9e382958ae76 100644--- a/frontend/src/queries/nodes/DataVisualization/displayLogic.ts+++ b/frontend/src/queries/nodes/DataVisualization/displayLogic.ts@@ -1,4 +1,4 @@-import * as d3 from 'd3'+import { mean } from 'd3-array'import { MakeLogicType, actions, afterMount, connect, kea, key, listeners, path, props, reducers } from 'kea'import { subscriptions } from 'kea-subscriptions'@@ -92,7 +92,7 @@ export const displayLogic = kea<displayLogicType>([addGoalLine: (state, { yData, label }) => {const yDataFlat =yData?.flatMap((n) => n.data).filter((value): value is number => value !== null) ?? []- const yDataAvg = Math.round(d3.mean(yDataFlat) ?? 0)+ const yDataAvg = Math.round(mean(yDataFlat) ?? 0)return [...state,diff --git a/frontend/src/queries/nodes/InsightViz/queryUtils.test.ts b/frontend/src/queries/nodes/InsightViz/queryUtils.test.tsindex 8d4430dccbe9..0bb5cc53a64f 100644--- a/frontend/src/queries/nodes/InsightViz/queryUtils.test.ts+++ b/frontend/src/queries/nodes/InsightViz/queryUtils.test.ts@@ -1,4 +1,3 @@-import { hasInvalidRegexFilter } from '~/queries/nodes/DataNode/hasInvalidRegexFilter'import { getDefaultQuery } from '~/queries/nodes/InsightViz/utils'import { FunnelsQuery, Node, NodeKind, TrendsFilter, TrendsQuery } from '~/queries/schema/schema-general'import { ChartDisplayType, InsightType } from '~/types'@@ -68,7 +67,7 @@ describe('validateQuery', () => {kind: NodeKind.FunnelsQuery,series: [{ kind: NodeKind.EventsNode, event: '$pageview' }],}- expect(validateQuery(funnelQuery, hasInvalidRegexFilter)).toBe(false)+ expect(validateQuery(funnelQuery)).toBe(false)})it('returns true for funnels with 2+ steps', () => {@@ -79,7 +78,7 @@ describe('validateQuery', () => {{ kind: NodeKind.EventsNode, event: '$signup' },],}- expect(validateQuery(funnelQuery, hasInvalidRegexFilter)).toBe(true)+ expect(validateQuery(funnelQuery)).toBe(true)})it('returns false for funnels with incomplete data warehouse step', () => {@@ -95,34 +94,7 @@ describe('validateQuery', () => {{ kind: NodeKind.EventsNode, event: '$signup' },],}- expect(validateQuery(funnelQuery, hasInvalidRegexFilter)).toBe(false)- })-- it('returns false for query with invalid regex property filter', () => {- const trendsQuery = {- kind: NodeKind.TrendsQuery,- series: [{ kind: NodeKind.EventsNode, event: '$pageview' }],- properties: [{ type: 'event', key: 'url', operator: 'regex', value: '(?=lookahead)' }],- }- expect(validateQuery(trendsQuery, hasInvalidRegexFilter)).toBe(false)- })-- it('returns true for query with valid regex property filter', () => {- const trendsQuery = {- kind: NodeKind.TrendsQuery,- series: [{ kind: NodeKind.EventsNode, event: '$pageview' }],- properties: [{ type: 'event', key: 'url', operator: 'regex', value: '^/api/.*' }],- }- expect(validateQuery(trendsQuery, hasInvalidRegexFilter)).toBe(true)- })-- it('returns true for query without regex filters', () => {- const trendsQuery = {- kind: NodeKind.TrendsQuery,- series: [{ kind: NodeKind.EventsNode, event: '$pageview' }],- properties: [{ type: 'event', key: 'url', operator: 'exact', value: '/home' }],- }- expect(validateQuery(trendsQuery, hasInvalidRegexFilter)).toBe(true)+ expect(validateQuery(funnelQuery)).toBe(false)})})diff --git a/frontend/src/queries/nodes/InsightViz/queryUtils.ts b/frontend/src/queries/nodes/InsightViz/queryUtils.tsindex 45e7a67365fa..8b0880db5797 100644--- a/frontend/src/queries/nodes/InsightViz/queryUtils.ts+++ b/frontend/src/queries/nodes/InsightViz/queryUtils.ts@@ -223,8 +223,8 @@ export function isFunnelWithIncompleteDataWarehouseStep(series: FunnelsQuery['se)}-// The caller passes the regex check so that the RE2 engine stays out of every bundle that imports this module.-export const validateQuery = (q: DataNode, hasInvalidRegexFilter: (q: DataNode) => boolean): boolean => {+// Regex filters are checked separately with `hasInvalidRegexPattern`, because the RE2 engine loads on demand.+export const validateQuery = (q: DataNode): boolean => {if (isFunnelsQuery(q)) {return isFunnelWithEnoughSteps(q.series) && !isFunnelWithIncompleteDataWarehouseStep(q.series)}@@ -232,9 +232,6 @@ export const validateQuery = (q: DataNode, hasInvalidRegexFilter: (q: DataNode)if (isTrendsQuery(q) && q.trendsFilter?.display === ChartDisplayType.BoxPlot) {return !isBoxPlotMissingProperty(q.series)}- if (hasInvalidRegexFilter(q)) {- return false- }return true}diff --git a/frontend/src/queries/schema-guards.ts b/frontend/src/queries/schema-guards.tsindex a954102ed3e4..3c6deaa1822f 100644--- a/frontend/src/queries/schema-guards.ts+++ b/frontend/src/queries/schema-guards.ts@@ -1,7 +1,5 @@import {- CompareFilter,ExperimentMetric,- WebAnalyticsPropertyFilters,// eslint-disable-next-line import/no-cycle} from '~/queries/schema/schema-general'import { AnyPropertyFilter, SessionPropertyFilter } from '~/types'@@ -15,10 +13,6 @@ export const isAnyPropertyFilters = (data: unknown): data is AnyPropertyFilter[]return data.every((item) => validators.AnyPropertyFilter(item))}-export const isWebAnalyticsPropertyFilters = (data: unknown): data is WebAnalyticsPropertyFilters => {- return validators.WebAnalyticsPropertyFilters(data) as boolean-}-export const isSessionPropertyFilters = (data: unknown): data is SessionPropertyFilter[] => {if (!Array.isArray(data)) {return false@@ -26,10 +20,6 @@ export const isSessionPropertyFilters = (data: unknown): data is SessionPropertyreturn data.every((item) => validators.SessionPropertyFilter(item))}-export const isCompareFilter = (data: unknown): data is CompareFilter => {- return validators.CompareFilter(data) as boolean-}-export const isExperimentMetric = (data: unknown): data is ExperimentMetric => {return validators.ExperimentMetric(data) as boolean}diff --git a/frontend/src/queries/validators.js b/frontend/src/queries/validators.jsindex ebe3502f50cc..ac50e3fc6e10 100644--- a/frontend/src/queries/validators.js+++ b/frontend/src/queries/validators.js@@ -7137,127 +7137,8 @@ function validate11(data, { instancePath = '', parentData, parentDataProperty, rvalidate11.errors = vErrorsreturn errors === 0}-export const WebAnalyticsPropertyFilters = validate82-const schema67 = { items: { $ref: '#/definitions/WebAnalyticsPropertyFilter' }, type: 'array' }-const schema68 = {- anyOf: [- { $ref: '#/definitions/EventPropertyFilter' },- { $ref: '#/definitions/PersonPropertyFilter' },- { $ref: '#/definitions/SessionPropertyFilter' },- { $ref: '#/definitions/CohortPropertyFilter' },- ],-}-function validate83(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {- let vErrors = null- let errors = 0- const _errs0 = errors- let valid0 = false- const _errs1 = errors- if (!validate12(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors)- errors = vErrors.length- }- var _valid0 = _errs1 === errors- valid0 = valid0 || _valid0- if (!valid0) {- const _errs2 = errors- if (!validate16(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors)- errors = vErrors.length- }- var _valid0 = _errs2 === errors- valid0 = valid0 || _valid0- if (!valid0) {- const _errs3 = errors- if (!validate28(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors)- errors = vErrors.length- }- var _valid0 = _errs3 === errors- valid0 = valid0 || _valid0- if (!valid0) {- const _errs4 = errors- if (!validate31(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors)- errors = vErrors.length- }- var _valid0 = _errs4 === errors- valid0 = valid0 || _valid0- }- }- }- if (!valid0) {- const err0 = {- instancePath,- schemaPath: '#/anyOf',- keyword: 'anyOf',- params: {},- message: 'must match a schema in anyOf',- }- if (vErrors === null) {- vErrors = [err0]- } else {- vErrors.push(err0)- }- errors++- validate83.errors = vErrors- return false- } else {- errors = _errs0- if (vErrors !== null) {- if (_errs0) {- vErrors.length = _errs0- } else {- vErrors = null- }- }- }- validate83.errors = vErrors- return errors === 0-}+export const SessionPropertyFilter = validate82function validate82(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {- let vErrors = null- let errors = 0- if (errors === 0) {- if (Array.isArray(data)) {- var valid0 = true- const len0 = data.length- for (let i0 = 0; i0 < len0; i0++) {- const _errs1 = errors- if (- !validate83(data[i0], {- instancePath: instancePath + '/' + i0,- parentData: data,- parentDataProperty: i0,- rootData,- })- ) {- vErrors = vErrors === null ? validate83.errors : vErrors.concat(validate83.errors)- errors = vErrors.length- }- var valid0 = _errs1 === errors- if (!valid0) {- break- }- }- } else {- validate82.errors = [- {- instancePath,- schemaPath: '#/type',- keyword: 'type',- params: { type: 'array' },- message: 'must be array',- },- ]- return false- }- }- validate82.errors = vErrors- return errors === 0-}-export const SessionPropertyFilter = validate89-function validate89(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -7268,7 +7149,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, r(data.operator === undefined && (missing0 = 'operator')) ||(data.type === undefined && (missing0 = 'type'))) {- validate89.errors = [+ validate82.errors = [{instancePath,schemaPath: '#/required',@@ -7290,7 +7171,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rkey0 === 'value')) {- validate89.errors = [+ validate82.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -7307,7 +7188,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rif (data.key !== undefined) {const _errs2 = errorsif (typeof data.key !== 'string') {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/key',schemaPath: '#/properties/key/type',@@ -7326,7 +7207,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rif (data.label !== undefined) {const _errs4 = errorsif (typeof data.label !== 'string') {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/label',schemaPath: '#/properties/label/type',@@ -7346,7 +7227,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rlet data2 = data.operatorconst _errs6 = errorsif (typeof data2 !== 'string') {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/operator',schemaPath: '#/definitions/PropertyOperator/type',@@ -7400,7 +7281,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rdata2 === 'not_icontains_multi')) {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/operator',schemaPath: '#/definitions/PropertyOperator/enum',@@ -7420,7 +7301,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rlet data3 = data.typeconst _errs9 = errorsif (typeof data3 !== 'string') {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/type',schemaPath: '#/properties/type/type',@@ -7432,7 +7313,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, rreturn false}if ('session' !== data3) {- validate89.errors = [+ validate82.errors = [{instancePath: instancePath + '/type',schemaPath: '#/properties/type/const',@@ -7473,101 +7354,7 @@ function validate89(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate89.errors = [- {- instancePath,- schemaPath: '#/type',- keyword: 'type',- params: { type: 'object' },- message: 'must be object',- },- ]- return false- }- }- validate89.errors = vErrors- return errors === 0-}-export const CompareFilter = validate91-const schema71 = {- additionalProperties: false,- properties: {- compare: {- default: false,- description: 'Whether to compare the current date range to a previous date range.',- type: 'boolean',- },- compare_to: {- description:- 'The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.',- type: 'string',- },- },- type: 'object',-}-function validate91(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {- let vErrors = null- let errors = 0- if (errors === 0) {- if (data && typeof data == 'object' && !Array.isArray(data)) {- const _errs1 = errors- for (const key0 in data) {- if (!(key0 === 'compare' || key0 === 'compare_to')) {- validate91.errors = [- {- instancePath,- schemaPath: '#/additionalProperties',- keyword: 'additionalProperties',- params: { additionalProperty: key0 },- message: 'must NOT have additional properties',- },- ]- return false- break- }- }- if (_errs1 === errors) {- if (data.compare !== undefined) {- const _errs2 = errors- if (typeof data.compare !== 'boolean') {- validate91.errors = [- {- instancePath: instancePath + '/compare',- schemaPath: '#/properties/compare/type',- keyword: 'type',- params: { type: 'boolean' },- message: 'must be boolean',- },- ]- return false- }- var valid0 = _errs2 === errors- } else {- var valid0 = true- }- if (valid0) {- if (data.compare_to !== undefined) {- const _errs4 = errors- if (typeof data.compare_to !== 'string') {- validate91.errors = [- {- instancePath: instancePath + '/compare_to',- schemaPath: '#/properties/compare_to/type',- keyword: 'type',- params: { type: 'string' },- message: 'must be string',- },- ]- return false- }- var valid0 = _errs4 === errors- } else {- var valid0 = true- }- }- }- } else {- validate91.errors = [+ validate82.errors = [{instancePath,schemaPath: '#/type',@@ -7579,11 +7366,11 @@ function validate91(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate91.errors = vErrors+ validate82.errors = vErrorsreturn errors === 0}-export const ExperimentMetric = validate92-const schema72 = {+export const ExperimentMetric = validate84+const schema69 = {discriminator: { propertyName: 'metric_type' },oneOf: [{ $ref: '#/definitions/ExperimentMeanMetric' },@@ -7594,7 +7381,7 @@ const schema72 = {required: ['metric_type'],type: 'object',}-const schema73 = {+const schema70 = {additionalProperties: false,properties: {breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },@@ -7635,10 +7422,10 @@ const schema73 = {required: ['kind', 'metric_type', 'source'],type: 'object',}-const schema75 = { type: 'integer' }-const schema87 = { enum: ['second', 'minute', 'hour', 'day', 'week', 'month'], type: 'string' }-const schema88 = { enum: ['increase', 'decrease'], type: 'string' }-const schema74 = {+const schema72 = { type: 'integer' }+const schema84 = { enum: ['second', 'minute', 'hour', 'day', 'week', 'month'], type: 'string' }+const schema85 = { enum: ['increase', 'decrease'], type: 'string' }+const schema71 = {additionalProperties: false,properties: {breakdown: {@@ -7660,7 +7447,7 @@ const schema74 = {},type: 'object',}-const schema80 = {+const schema77 = {enum: ['cohort','person',@@ -7676,7 +7463,7 @@ const schema80 = {],type: 'string',}-const schema81 = {+const schema78 = {additionalProperties: false,properties: {group_type_index: { anyOf: [{ $ref: '#/definitions/integer' }, { type: 'null' }] },@@ -7688,7 +7475,7 @@ const schema81 = {required: ['property'],type: 'object',}-const schema85 = {+const schema82 = {enum: ['person','event',@@ -7704,14 +7491,14 @@ const schema85 = {],type: 'string',}-function validate95(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate87(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {if (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.property === undefined && (missing0 = 'property')) {- validate95.errors = [+ validate87.errors = [{instancePath,schemaPath: '#/required',@@ -7733,7 +7520,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rkey0 === 'type')) {- validate95.errors = [+ validate87.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -7804,7 +7591,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err2)}errors++- validate95.errors = vErrors+ validate87.errors = vErrorsreturn false} else {errors = _errs3@@ -7825,7 +7612,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rlet data1 = data.histogram_bin_countconst _errs9 = errorsif (!(typeof data1 == 'number' && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {- validate95.errors = [+ validate87.errors = [{instancePath: instancePath + '/histogram_bin_count',schemaPath: '#/definitions/integer/type',@@ -7844,7 +7631,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rif (data.normalize_url !== undefined) {const _errs12 = errorsif (typeof data.normalize_url !== 'boolean') {- validate95.errors = [+ validate87.errors = [{instancePath: instancePath + '/normalize_url',schemaPath: '#/properties/normalize_url/type',@@ -7924,7 +7711,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err5)}errors++- validate95.errors = vErrors+ validate87.errors = vErrorsreturn false} else {errors = _errs15@@ -7981,7 +7768,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rinstancePath: instancePath + '/type',schemaPath: '#/definitions/MultipleBreakdownType/enum',keyword: 'enum',- params: { allowedValues: schema85.enum },+ params: { allowedValues: schema82.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8027,7 +7814,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err9)}errors++- validate95.errors = vErrors+ validate87.errors = vErrorsreturn false} else {errors = _errs22@@ -8050,7 +7837,7 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate95.errors = [+ validate87.errors = [{instancePath,schemaPath: '#/type',@@ -8062,18 +7849,18 @@ function validate95(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate95.errors = vErrors+ validate87.errors = vErrorsreturn errors === 0}-function validate94(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate86(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {if (data && typeof data == 'object' && !Array.isArray(data)) {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema74.properties, key0)) {- validate94.errors = [+ if (!func2.call(schema71.properties, key0)) {+ validate86.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -8268,7 +8055,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err7)}errors++- validate94.errors = vErrors+ validate86.errors = vErrorsreturn false} else {errors = _errs3@@ -8342,7 +8129,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err10)}errors++- validate94.errors = vErrors+ validate86.errors = vErrorsreturn false} else {errors = _errs21@@ -8363,12 +8150,12 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rlet data3 = data.breakdown_hide_other_aggregationconst _errs27 = errorsif (typeof data3 !== 'boolean' && data3 !== null) {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdown_hide_other_aggregation',schemaPath: '#/properties/breakdown_hide_other_aggregation/type',keyword: 'type',- params: { type: schema74.properties.breakdown_hide_other_aggregation.type },+ params: { type: schema71.properties.breakdown_hide_other_aggregation.type },message: 'must be boolean,null',},]@@ -8383,7 +8170,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rlet data4 = data.breakdown_histogram_bin_countconst _errs29 = errorsif (!(typeof data4 == 'number' && !(data4 % 1) && !isNaN(data4) && isFinite(data4))) {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdown_histogram_bin_count',schemaPath: '#/definitions/integer/type',@@ -8405,7 +8192,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rif (!(typeof data5 == 'number' && !(data5 % 1) && !isNaN(data5) && isFinite(data5))) {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdown_limit',schemaPath: '#/definitions/integer/type',@@ -8424,7 +8211,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rif (data.breakdown_normalize_url !== undefined) {const _errs35 = errorsif (typeof data.breakdown_normalize_url !== 'boolean') {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdown_normalize_url',schemaPath: '#/properties/breakdown_normalize_url/type',@@ -8443,7 +8230,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rif (data.breakdown_path_cleaning !== undefined) {const _errs37 = errorsif (typeof data.breakdown_path_cleaning !== 'boolean') {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdown_path_cleaning',schemaPath: '#/properties/breakdown_path_cleaning/type',@@ -8499,7 +8286,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rinstancePath: instancePath + '/breakdown_type',schemaPath: '#/definitions/BreakdownType/enum',keyword: 'enum',- params: { allowedValues: schema80.enum },+ params: { allowedValues: schema77.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8545,7 +8332,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err14)}errors++- validate94.errors = vErrors+ validate86.errors = vErrorsreturn false} else {errors = _errs40@@ -8568,7 +8355,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rif (errors === _errs46) {if (Array.isArray(data9)) {if (data9.length > 3) {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdowns',schemaPath: '#/properties/breakdowns/maxItems',@@ -8584,7 +8371,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rfor (let i1 = 0; i1 < len1; i1++) {const _errs48 = errorsif (- !validate95(data9[i1], {+ !validate87(data9[i1], {instancePath:instancePath + '/breakdowns/' + i1,parentData: data9,@@ -8594,8 +8381,8 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, r) {vErrors =vErrors === null- ? validate95.errors- : vErrors.concat(validate95.errors)+ ? validate87.errors+ : vErrors.concat(validate87.errors)errors = vErrors.length}var valid12 = _errs48 === errors@@ -8605,7 +8392,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate94.errors = [+ validate86.errors = [{instancePath: instancePath + '/breakdowns',schemaPath: '#/properties/breakdowns/type',@@ -8631,7 +8418,7 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate94.errors = [+ validate86.errors = [{instancePath,schemaPath: '#/type',@@ -8643,10 +8430,10 @@ function validate94(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate94.errors = vErrors+ validate86.errors = vErrorsreturn errors === 0}-const schema89 = {+const schema86 = {discriminator: { propertyName: 'kind' },oneOf: [{ $ref: '#/definitions/EventsNode' },@@ -8657,7 +8444,7 @@ const schema89 = {required: ['kind'],type: 'object',}-const schema90 = {+const schema87 = {additionalProperties: false,properties: {custom_name: { type: 'string' },@@ -8691,7 +8478,7 @@ const schema90 = {required: ['kind'],type: 'object',}-const schema92 = {+const schema89 = {anyOf: [{ $ref: '#/definitions/BaseMathType' },{ $ref: '#/definitions/FunnelMathType' },@@ -8703,7 +8490,7 @@ const schema92 = {{ $ref: '#/definitions/CalendarHeatmapMathType' },],}-const schema93 = {+const schema90 = {enum: ['total','dau',@@ -8715,9 +8502,9 @@ const schema93 = {],type: 'string',}-const schema94 = { enum: ['total', 'first_time_for_user', 'first_time_for_user_with_filters'], type: 'string' }-const schema95 = { enum: ['avg', 'sum', 'min', 'max', 'median', 'p75', 'p90', 'p95', 'p99'], type: 'string' }-const schema96 = {+const schema91 = { enum: ['total', 'first_time_for_user', 'first_time_for_user_with_filters'], type: 'string' }+const schema92 = { enum: ['avg', 'sum', 'min', 'max', 'median', 'p75', 'p90', 'p95', 'p99'], type: 'string' }+const schema93 = {enum: ['avg_count_per_actor','min_count_per_actor',@@ -8730,14 +8517,14 @@ const schema96 = {],type: 'string',}-const schema97 = { enum: ['unique_group', 'first_time_for_group', 'first_matching_event_for_group'], type: 'string' }-const schema98 = { const: 'hogql', type: 'string' }-const schema99 = {+const schema94 = { enum: ['unique_group', 'first_time_for_group', 'first_matching_event_for_group'], type: 'string' }+const schema95 = { const: 'hogql', type: 'string' }+const schema96 = {enum: ['total', 'sum', 'unique_session', 'min', 'max', 'avg', 'dau', 'unique_group', 'hogql'],type: 'string',}-const schema100 = { enum: ['total', 'dau'], type: 'string' }-function validate101(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+const schema97 = { enum: ['total', 'dau'], type: 'string' }+function validate93(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs0 = errors@@ -8773,7 +8560,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/BaseMathType/enum',keyword: 'enum',- params: { allowedValues: schema93.enum },+ params: { allowedValues: schema90.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8807,7 +8594,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/FunnelMathType/enum',keyword: 'enum',- params: { allowedValues: schema94.enum },+ params: { allowedValues: schema91.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8853,7 +8640,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/PropertyMathType/enum',keyword: 'enum',- params: { allowedValues: schema95.enum },+ params: { allowedValues: schema92.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8898,7 +8685,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/CountPerActorMathType/enum',keyword: 'enum',- params: { allowedValues: schema96.enum },+ params: { allowedValues: schema93.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -8938,7 +8725,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/GroupMathType/enum',keyword: 'enum',- params: { allowedValues: schema97.enum },+ params: { allowedValues: schema94.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -9018,7 +8805,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/ExperimentMetricMathType/enum',keyword: 'enum',- params: { allowedValues: schema99.enum },+ params: { allowedValues: schema96.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -9052,7 +8839,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,instancePath,schemaPath: '#/definitions/CalendarHeatmapMathType/enum',keyword: 'enum',- params: { allowedValues: schema100.enum },+ params: { allowedValues: schema97.enum },message: 'must be equal to one of the allowed values',}if (vErrors === null) {@@ -9085,7 +8872,7 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,vErrors.push(err16)}errors++- validate101.errors = vErrors+ validate93.errors = vErrorsreturn false} else {errors = _errs0@@ -9097,15 +8884,15 @@ function validate101(data, { instancePath = '', parentData, parentDataProperty,}}}- validate101.errors = vErrors+ validate93.errors = vErrorsreturn errors === 0}-const schema101 = {+const schema98 = {additionalProperties: false,properties: { property: { type: 'string' }, static: { $ref: '#/definitions/CurrencyCode' } },type: 'object',}-const schema102 = {+const schema99 = {enum: ['AED','AFN',@@ -9262,7 +9049,7 @@ const schema102 = {],type: 'string',}-function validate103(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate95(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -9270,7 +9057,7 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,const _errs1 = errorsfor (const key0 in data) {if (!(key0 === 'property' || key0 === 'static')) {- validate103.errors = [+ validate95.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -9287,7 +9074,7 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,if (data.property !== undefined) {const _errs2 = errorsif (typeof data.property !== 'string') {- validate103.errors = [+ validate95.errors = [{instancePath: instancePath + '/property',schemaPath: '#/properties/property/type',@@ -9307,7 +9094,7 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,let data1 = data.staticconst _errs4 = errorsif (typeof data1 !== 'string') {- validate103.errors = [+ validate95.errors = [{instancePath: instancePath + '/static',schemaPath: '#/definitions/CurrencyCode/type',@@ -9474,12 +9261,12 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,data1 === 'ZMW')) {- validate103.errors = [+ validate95.errors = [{instancePath: instancePath + '/static',schemaPath: '#/definitions/CurrencyCode/enum',keyword: 'enum',- params: { allowedValues: schema102.enum },+ params: { allowedValues: schema99.enum },message: 'must be equal to one of the allowed values',},]@@ -9492,7 +9279,7 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate103.errors = [+ validate95.errors = [{instancePath,schemaPath: '#/type',@@ -9504,17 +9291,17 @@ function validate103(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate103.errors = vErrors+ validate95.errors = vErrorsreturn errors === 0}-function validate99(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate91(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {if (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.kind === undefined && (missing0 = 'kind')) {- validate99.errors = [+ validate91.errors = [{instancePath,schemaPath: '#/required',@@ -9527,8 +9314,8 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema90.properties, key0)) {- validate99.errors = [+ if (!func2.call(schema87.properties, key0)) {+ validate91.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -9545,7 +9332,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.custom_name !== undefined) {const _errs2 = errorsif (typeof data.custom_name !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/custom_name',schemaPath: '#/properties/custom_name/type',@@ -9565,12 +9352,12 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rlet data1 = data.eventconst _errs4 = errorsif (typeof data1 !== 'string' && data1 !== null) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/event',schemaPath: '#/properties/event/type',keyword: 'type',- params: { type: schema90.properties.event.type },+ params: { type: schema87.properties.event.type },message: 'must be string,null',},]@@ -9610,7 +9397,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/fixedProperties',schemaPath: '#/properties/fixedProperties/type',@@ -9631,7 +9418,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rlet data4 = data.kindconst _errs9 = errorsif (typeof data4 !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -9643,7 +9430,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rreturn false}if ('EventsNode' !== data4) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -9670,7 +9457,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, risFinite(data5))) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/limit',schemaPath: '#/definitions/integer/type',@@ -9689,7 +9476,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.math !== undefined) {const _errs14 = errorsif (- !validate101(data.math, {+ !validate93(data.math, {instancePath: instancePath + '/math',parentData: data,parentDataProperty: 'math',@@ -9698,8 +9485,8 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r) {vErrors =vErrors === null- ? validate101.errors- : vErrors.concat(validate101.errors)+ ? validate93.errors+ : vErrors.concat(validate93.errors)errors = vErrors.length}var valid0 = _errs14 === errors@@ -9711,7 +9498,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rlet data7 = data.math_group_type_indexconst _errs15 = errorsif (!(typeof data7 == 'number' && isFinite(data7))) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/type',@@ -9731,14 +9518,14 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rdata7 === 4)) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/enum',keyword: 'enum',params: {allowedValues:- schema90.properties.math_group_type_index.enum,+ schema87.properties.math_group_type_index.enum,},message: 'must be equal to one of the allowed values',},@@ -9753,7 +9540,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.math_hogql !== undefined) {const _errs17 = errorsif (typeof data.math_hogql !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/math_hogql',schemaPath: '#/properties/math_hogql/type',@@ -9773,7 +9560,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rlet data9 = data.math_multiplierconst _errs19 = errorsif (!(typeof data9 == 'number' && isFinite(data9))) {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/math_multiplier',schemaPath: '#/properties/math_multiplier/type',@@ -9792,7 +9579,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.math_property !== undefined) {const _errs21 = errorsif (typeof data.math_property !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath: instancePath + '/math_property',schemaPath: '#/properties/math_property/type',@@ -9811,7 +9598,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.math_property_revenue_currency !== undefined) {const _errs23 = errorsif (- !validate103(data.math_property_revenue_currency, {+ !validate95(data.math_property_revenue_currency, {instancePath:instancePath +'/math_property_revenue_currency',@@ -9823,8 +9610,8 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r) {vErrors =vErrors === null- ? validate103.errors- : vErrors.concat(validate103.errors)+ ? validate95.errors+ : vErrors.concat(validate95.errors)errors = vErrors.length}var valid0 = _errs23 === errors@@ -9835,7 +9622,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.math_property_type !== undefined) {const _errs24 = errorsif (typeof data.math_property_type !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -9857,7 +9644,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rif (data.name !== undefined) {const _errs26 = errorsif (typeof data.name !== 'string') {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath + '/name',@@ -9881,7 +9668,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rtypeof data.optionalInFunnel !=='boolean') {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -9917,7 +9704,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rtypeof data15[i1] !=='string') {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -9942,7 +9729,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -10010,7 +9797,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -10044,7 +9831,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r!Array.isArray(data19))) {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -10078,7 +9865,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, risFinite(data20))) {- validate99.errors = [+ validate91.errors = [{instancePath:instancePath +@@ -10120,7 +9907,7 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate99.errors = [+ validate91.errors = [{instancePath,schemaPath: '#/type',@@ -10132,10 +9919,10 @@ function validate99(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate99.errors = vErrors+ validate91.errors = vErrorsreturn errors === 0}-const schema103 = {+const schema100 = {additionalProperties: false,properties: {custom_name: { type: 'string' },@@ -10167,14 +9954,14 @@ const schema103 = {required: ['id', 'kind'],type: 'object',}-function validate107(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate99(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {if (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if ((data.id === undefined && (missing0 = 'id')) || (data.kind === undefined && (missing0 = 'kind'))) {- validate107.errors = [+ validate99.errors = [{instancePath,schemaPath: '#/required',@@ -10187,8 +9974,8 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema103.properties, key0)) {- validate107.errors = [+ if (!func2.call(schema100.properties, key0)) {+ validate99.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -10205,7 +9992,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.custom_name !== undefined) {const _errs2 = errorsif (typeof data.custom_name !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/custom_name',schemaPath: '#/properties/custom_name/type',@@ -10248,7 +10035,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/fixedProperties',schemaPath: '#/properties/fixedProperties/type',@@ -10269,7 +10056,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,let data3 = data.idconst _errs7 = errorsif (!(typeof data3 == 'number' && !(data3 % 1) && !isNaN(data3) && isFinite(data3))) {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/id',schemaPath: '#/definitions/integer/type',@@ -10289,7 +10076,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,let data4 = data.kindconst _errs10 = errorsif (typeof data4 !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -10301,7 +10088,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ActionsNode' !== data4) {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -10320,7 +10107,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.math !== undefined) {const _errs12 = errorsif (- !validate101(data.math, {+ !validate93(data.math, {instancePath: instancePath + '/math',parentData: data,parentDataProperty: 'math',@@ -10328,9 +10115,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,})) {vErrors =- vErrors === null- ? validate101.errors- : vErrors.concat(validate101.errors)+ vErrors === null ? validate93.errors : vErrors.concat(validate93.errors)errors = vErrors.length}var valid0 = _errs12 === errors@@ -10342,7 +10127,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,let data6 = data.math_group_type_indexconst _errs13 = errorsif (!(typeof data6 == 'number' && isFinite(data6))) {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/type',@@ -10362,14 +10147,14 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,data6 === 4)) {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/enum',keyword: 'enum',params: {allowedValues:- schema103.properties.math_group_type_index.enum,+ schema100.properties.math_group_type_index.enum,},message: 'must be equal to one of the allowed values',},@@ -10384,7 +10169,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.math_hogql !== undefined) {const _errs15 = errorsif (typeof data.math_hogql !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/math_hogql',schemaPath: '#/properties/math_hogql/type',@@ -10404,7 +10189,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,let data8 = data.math_multiplierconst _errs17 = errorsif (!(typeof data8 == 'number' && isFinite(data8))) {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/math_multiplier',schemaPath: '#/properties/math_multiplier/type',@@ -10423,7 +10208,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property !== undefined) {const _errs19 = errorsif (typeof data.math_property !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/math_property',schemaPath: '#/properties/math_property/type',@@ -10442,7 +10227,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property_revenue_currency !== undefined) {const _errs21 = errorsif (- !validate103(data.math_property_revenue_currency, {+ !validate95(data.math_property_revenue_currency, {instancePath:instancePath +'/math_property_revenue_currency',@@ -10454,8 +10239,8 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate103.errors- : vErrors.concat(validate103.errors)+ ? validate95.errors+ : vErrors.concat(validate95.errors)errors = vErrors.length}var valid0 = _errs21 === errors@@ -10466,7 +10251,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property_type !== undefined) {const _errs22 = errorsif (typeof data.math_property_type !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath:instancePath + '/math_property_type',@@ -10487,7 +10272,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (data.name !== undefined) {const _errs24 = errorsif (typeof data.name !== 'string') {- validate107.errors = [+ validate99.errors = [{instancePath: instancePath + '/name',schemaPath: '#/properties/name/type',@@ -10508,7 +10293,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,if (typeof data.optionalInFunnel !== 'boolean') {- validate107.errors = [+ validate99.errors = [{instancePath:instancePath +@@ -10561,7 +10346,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate107.errors = [+ validate99.errors = [{instancePath:instancePath +@@ -10591,7 +10376,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,!Array.isArray(data16))) {- validate107.errors = [+ validate99.errors = [{instancePath:instancePath +@@ -10619,7 +10404,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,isFinite(data17))) {- validate107.errors = [+ validate99.errors = [{instancePath:instancePath +@@ -10658,7 +10443,7 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate107.errors = [+ validate99.errors = [{instancePath,schemaPath: '#/type',@@ -10670,10 +10455,10 @@ function validate107(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate107.errors = vErrors+ validate99.errors = vErrorsreturn errors === 0}-const schema105 = {+const schema102 = {additionalProperties: false,properties: {custom_name: { type: 'string' },@@ -10708,7 +10493,7 @@ const schema105 = {required: ['data_warehouse_join_key', 'events_join_key', 'kind', 'table_name', 'timestamp_field'],type: 'object',}-function validate113(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate105(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -10721,7 +10506,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,(data.table_name === undefined && (missing0 = 'table_name')) ||(data.timestamp_field === undefined && (missing0 = 'timestamp_field'))) {- validate113.errors = [+ validate105.errors = [{instancePath,schemaPath: '#/required',@@ -10734,8 +10519,8 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema105.properties, key0)) {- validate113.errors = [+ if (!func2.call(schema102.properties, key0)) {+ validate105.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -10752,7 +10537,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.custom_name !== undefined) {const _errs2 = errorsif (typeof data.custom_name !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/custom_name',schemaPath: '#/properties/custom_name/type',@@ -10771,7 +10556,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.data_warehouse_join_key !== undefined) {const _errs4 = errorsif (typeof data.data_warehouse_join_key !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/data_warehouse_join_key',schemaPath: '#/properties/data_warehouse_join_key/type',@@ -10790,7 +10575,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.events_join_key !== undefined) {const _errs6 = errorsif (typeof data.events_join_key !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/events_join_key',schemaPath: '#/properties/events_join_key/type',@@ -10835,7 +10620,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/fixedProperties',schemaPath: '#/properties/fixedProperties/type',@@ -10856,7 +10641,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,let data5 = data.kindconst _errs11 = errorsif (typeof data5 !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -10868,7 +10653,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ExperimentDataWarehouseNode' !== data5) {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -10887,7 +10672,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.math !== undefined) {const _errs13 = errorsif (- !validate101(data.math, {+ !validate93(data.math, {instancePath: instancePath + '/math',parentData: data,parentDataProperty: 'math',@@ -10896,8 +10681,8 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate101.errors- : vErrors.concat(validate101.errors)+ ? validate93.errors+ : vErrors.concat(validate93.errors)errors = vErrors.length}var valid0 = _errs13 === errors@@ -10909,7 +10694,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,let data7 = data.math_group_type_indexconst _errs14 = errorsif (!(typeof data7 == 'number' && isFinite(data7))) {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/type',@@ -10929,14 +10714,14 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,data7 === 4)) {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/math_group_type_index',schemaPath: '#/properties/math_group_type_index/enum',keyword: 'enum',params: {allowedValues:- schema105.properties.math_group_type_index.enum,+ schema102.properties.math_group_type_index.enum,},message: 'must be equal to one of the allowed values',},@@ -10951,7 +10736,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.math_hogql !== undefined) {const _errs16 = errorsif (typeof data.math_hogql !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/math_hogql',schemaPath: '#/properties/math_hogql/type',@@ -10971,7 +10756,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,let data9 = data.math_multiplierconst _errs18 = errorsif (!(typeof data9 == 'number' && isFinite(data9))) {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/math_multiplier',schemaPath: '#/properties/math_multiplier/type',@@ -10990,7 +10775,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property !== undefined) {const _errs20 = errorsif (typeof data.math_property !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath: instancePath + '/math_property',schemaPath: '#/properties/math_property/type',@@ -11009,7 +10794,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property_revenue_currency !== undefined) {const _errs22 = errorsif (- !validate103(data.math_property_revenue_currency, {+ !validate95(data.math_property_revenue_currency, {instancePath:instancePath +'/math_property_revenue_currency',@@ -11021,8 +10806,8 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate103.errors- : vErrors.concat(validate103.errors)+ ? validate95.errors+ : vErrors.concat(validate95.errors)errors = vErrors.length}var valid0 = _errs22 === errors@@ -11033,7 +10818,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property_type !== undefined) {const _errs23 = errorsif (typeof data.math_property_type !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11055,7 +10840,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,if (data.name !== undefined) {const _errs25 = errorsif (typeof data.name !== 'string') {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath + '/name',@@ -11079,7 +10864,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,typeof data.optionalInFunnel !=='boolean') {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11142,7 +10927,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11175,7 +10960,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,!Array.isArray(data17))) {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11203,7 +10988,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,typeof data.table_name !=='string') {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11234,7 +11019,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,typeof data.timestamp_field !=='string') {- validate113.errors = [+ validate105.errors = [{instancePath:instancePath +@@ -11271,7 +11056,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,isFinite(data20))) {- validate113.errors =+ validate105.errors =[{instancePath:@@ -11316,7 +11101,7 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate113.errors = [+ validate105.errors = [{instancePath,schemaPath: '#/type',@@ -11328,10 +11113,10 @@ function validate113(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate113.errors = vErrors+ validate105.errors = vErrorsreturn errors === 0}-const schema106 = {+const schema103 = {additionalProperties: false,description:"Outcome rows that live in the customer's warehouse, read through a direct connection. PostHog joins them to the experiment's exposures and aggregates them inside the warehouse, so the SQL never mentions variants or exposures and only per-variant aggregates leave the warehouse. Distinct from `ExperimentDataWarehouseNode`, which reads tables synced into PostHog. It does not extend `EntityNode`: property filters and the other event settings cannot apply to SQL PostHog does not parse, so the shape lists every supported field. Only mean and ratio metrics accept it.",@@ -11362,12 +11147,12 @@ const schema106 = {required: ['connection_id', 'kind', 'query'],type: 'object',}-const schema107 = {+const schema104 = {description: 'The subset of `ExperimentMetricMathType` a warehouse-native source supports, with the same values.',enum: ['total', 'sum'],type: 'string',}-function validate119(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate111(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -11378,7 +11163,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,(data.kind === undefined && (missing0 = 'kind')) ||(data.query === undefined && (missing0 = 'query'))) {- validate119.errors = [+ validate111.errors = [{instancePath,schemaPath: '#/required',@@ -11403,7 +11188,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,key0 === 'version')) {- validate119.errors = [+ validate111.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -11420,7 +11205,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,if (data.connection_id !== undefined) {const _errs2 = errorsif (typeof data.connection_id !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/connection_id',schemaPath: '#/properties/connection_id/type',@@ -11439,7 +11224,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,if (data.custom_name !== undefined) {const _errs4 = errorsif (typeof data.custom_name !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/custom_name',schemaPath: '#/properties/custom_name/type',@@ -11459,7 +11244,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,let data2 = data.kindconst _errs6 = errorsif (typeof data2 !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -11471,7 +11256,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ExperimentWarehouseNativeNode' !== data2) {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -11491,7 +11276,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,let data3 = data.mathconst _errs8 = errorsif (typeof data3 !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/math',schemaPath: '#/definitions/ExperimentWarehouseNativeMathType/type',@@ -11503,12 +11288,12 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,return false}if (!(data3 === 'total' || data3 === 'sum')) {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/math',schemaPath: '#/definitions/ExperimentWarehouseNativeMathType/enum',keyword: 'enum',- params: { allowedValues: schema107.enum },+ params: { allowedValues: schema104.enum },message: 'must be equal to one of the allowed values',},]@@ -11522,7 +11307,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,if (data.math_property !== undefined) {const _errs11 = errorsif (typeof data.math_property !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/math_property',schemaPath: '#/properties/math_property/type',@@ -11541,7 +11326,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,if (data.query !== undefined) {const _errs13 = errorsif (typeof data.query !== 'string') {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/query',schemaPath: '#/properties/query/type',@@ -11561,7 +11346,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,let data6 = data.responseconst _errs15 = errorsif (!(data6 && typeof data6 == 'object' && !Array.isArray(data6))) {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/response',schemaPath: '#/properties/response/type',@@ -11581,7 +11366,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,let data7 = data.versionconst _errs17 = errorsif (!(typeof data7 == 'number' && isFinite(data7))) {- validate119.errors = [+ validate111.errors = [{instancePath: instancePath + '/version',schemaPath: '#/properties/version/type',@@ -11606,7 +11391,7 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate119.errors = [+ validate111.errors = [{instancePath,schemaPath: '#/type',@@ -11618,18 +11403,18 @@ function validate119(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate119.errors = vErrors+ validate111.errors = vErrorsreturn errors === 0}-function validate98(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate90(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs1 = errorslet valid0 = falselet passing0 = nullconst _errs2 = errors- if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)+ if (!validate91(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate91.errors : vErrors.concat(validate91.errors)errors = vErrors.length}var _valid0 = _errs2 === errors@@ -11638,8 +11423,8 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 0}const _errs3 = errors- if (!validate107(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate107.errors : vErrors.concat(validate107.errors)+ if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)errors = vErrors.length}var _valid0 = _errs3 === errors@@ -11652,8 +11437,8 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 1}const _errs4 = errors- if (!validate113(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors)+ if (!validate105(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate105.errors : vErrors.concat(validate105.errors)errors = vErrors.length}var _valid0 = _errs4 === errors@@ -11666,8 +11451,8 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 2}const _errs5 = errors- if (!validate119(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate119.errors : vErrors.concat(validate119.errors)+ if (!validate111(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate111.errors : vErrors.concat(validate111.errors)errors = vErrors.length}var _valid0 = _errs5 === errors@@ -11696,7 +11481,7 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err0)}errors++- validate98.errors = vErrors+ validate90.errors = vErrorsreturn false} else {errors = _errs1@@ -11712,7 +11497,7 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rif (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.kind === undefined && (missing0 = 'kind')) {- validate98.errors = [+ validate90.errors = [{instancePath,schemaPath: '#/required',@@ -11724,7 +11509,7 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rreturn false}} else {- validate98.errors = [+ validate90.errors = [{instancePath,schemaPath: '#/type',@@ -11736,10 +11521,10 @@ function validate98(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate98.errors = vErrors+ validate90.errors = vErrorsreturn errors === 0}-function validate93(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate85(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -11750,7 +11535,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r(data.metric_type === undefined && (missing0 = 'metric_type')) ||(data.source === undefined && (missing0 = 'source'))) {- validate93.errors = [+ validate85.errors = [{instancePath,schemaPath: '#/required',@@ -11763,8 +11548,8 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema73.properties, key0)) {- validate93.errors = [+ if (!func2.call(schema70.properties, key0)) {+ validate85.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -11781,14 +11566,14 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.breakdownFilter !== undefined) {const _errs2 = errorsif (- !validate94(data.breakdownFilter, {+ !validate86(data.breakdownFilter, {instancePath: instancePath + '/breakdownFilter',parentData: data,parentDataProperty: 'breakdownFilter',rootData,})) {- vErrors = vErrors === null ? validate94.errors : vErrors.concat(validate94.errors)+ vErrors = vErrors === null ? validate86.errors : vErrors.concat(validate86.errors)errors = vErrors.length}var valid0 = _errs2 === errors@@ -11800,7 +11585,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rlet data1 = data.conversion_windowconst _errs3 = errorsif (!(typeof data1 == 'number' && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/conversion_window',schemaPath: '#/definitions/integer/type',@@ -11820,7 +11605,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rlet data2 = data.conversion_window_unitconst _errs6 = errorsif (typeof data2 !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',@@ -11841,12 +11626,12 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rdata2 === 'month')) {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',keyword: 'enum',- params: { allowedValues: schema87.enum },+ params: { allowedValues: schema84.enum },message: 'must be equal to one of the allowed values',},]@@ -11860,7 +11645,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.fingerprint !== undefined) {const _errs9 = errorsif (typeof data.fingerprint !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/fingerprint',schemaPath: '#/properties/fingerprint/type',@@ -11880,7 +11665,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rlet data4 = data.goalconst _errs11 = errorsif (typeof data4 !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/type',@@ -11892,12 +11677,12 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rreturn false}if (!(data4 === 'increase' || data4 === 'decrease')) {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/enum',keyword: 'enum',- params: { allowedValues: schema88.enum },+ params: { allowedValues: schema85.enum },message: 'must be equal to one of the allowed values',},]@@ -11911,7 +11696,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.ignore_zeros !== undefined) {const _errs14 = errorsif (typeof data.ignore_zeros !== 'boolean') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/ignore_zeros',schemaPath: '#/properties/ignore_zeros/type',@@ -11930,7 +11715,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.isSharedMetric !== undefined) {const _errs16 = errorsif (typeof data.isSharedMetric !== 'boolean') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/isSharedMetric',schemaPath: '#/properties/isSharedMetric/type',@@ -11950,7 +11735,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rlet data7 = data.kindconst _errs18 = errorsif (typeof data7 !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -11962,7 +11747,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rreturn false}if ('ExperimentMetric' !== data7) {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -11984,7 +11769,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (errors === _errs20) {if (typeof data8 == 'number' && isFinite(data8)) {if (data8 > 1 || isNaN(data8)) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -11999,7 +11784,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rreturn false} else {if (data8 < 0 || isNaN(data8)) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12015,7 +11800,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath + '/lower_bound_percentile',@@ -12038,7 +11823,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rlet data9 = data.metric_typeconst _errs22 = errorsif (typeof data9 !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/type',@@ -12050,7 +11835,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rreturn false}if ('mean' !== data9) {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/const',@@ -12069,7 +11854,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.name !== undefined) {const _errs24 = errorsif (typeof data.name !== 'string') {- validate93.errors = [+ validate85.errors = [{instancePath: instancePath + '/name',schemaPath: '#/properties/name/type',@@ -12095,7 +11880,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r!Array.isArray(data11))) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath + '/response',@@ -12122,7 +11907,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, risFinite(data12))) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12144,7 +11929,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rif (data.source !== undefined) {const _errs30 = errorsif (- !validate98(data.source, {+ !validate90(data.source, {instancePath:instancePath + '/source',parentData: data,@@ -12154,9 +11939,9 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r) {vErrors =vErrors === null- ? validate98.errors+ ? validate90.errors: vErrors.concat(- validate98.errors+ validate90.errors)errors = vErrors.length}@@ -12174,7 +11959,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, risFinite(data14))) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12209,7 +11994,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rdata15 > 1 ||isNaN(data15)) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12233,7 +12018,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rdata15 < 0 ||isNaN(data15)) {- validate93.errors =+ validate85.errors =[{instancePath:@@ -12256,7 +12041,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12285,7 +12070,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rtypeof data.uuid !=='string') {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12319,7 +12104,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, risFinite(data17))) {- validate93.errors = [+ validate85.errors = [{instancePath:instancePath +@@ -12361,7 +12146,7 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, r}}} else {- validate93.errors = [+ validate85.errors = [{instancePath,schemaPath: '#/type',@@ -12373,10 +12158,10 @@ function validate93(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate93.errors = vErrors+ validate85.errors = vErrorsreturn errors === 0}-const schema108 = {+const schema105 = {additionalProperties: false,properties: {breakdownAttributionType: {@@ -12407,9 +12192,9 @@ const schema108 = {required: ['kind', 'metric_type', 'series'],type: 'object',}-const schema109 = { enum: ['first_touch', 'last_touch', 'all_events', 'step'], type: 'string' }-const schema112 = { enum: ['strict', 'unordered', 'ordered'], type: 'string' }-const schema114 = {+const schema106 = { enum: ['first_touch', 'last_touch', 'all_events', 'step'], type: 'string' }+const schema109 = { enum: ['strict', 'unordered', 'ordered'], type: 'string' }+const schema111 = {discriminator: { propertyName: 'kind' },oneOf: [{ $ref: '#/definitions/EventsNode' },@@ -12419,15 +12204,15 @@ const schema114 = {required: ['kind'],type: 'object',}-function validate125(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate117(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs1 = errorslet valid0 = falselet passing0 = nullconst _errs2 = errors- if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)+ if (!validate91(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate91.errors : vErrors.concat(validate91.errors)errors = vErrors.length}var _valid0 = _errs2 === errors@@ -12436,8 +12221,8 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,passing0 = 0}const _errs3 = errors- if (!validate107(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate107.errors : vErrors.concat(validate107.errors)+ if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)errors = vErrors.length}var _valid0 = _errs3 === errors@@ -12450,8 +12235,8 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,passing0 = 1}const _errs4 = errors- if (!validate113(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors)+ if (!validate105(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate105.errors : vErrors.concat(validate105.errors)errors = vErrors.length}var _valid0 = _errs4 === errors@@ -12479,7 +12264,7 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,vErrors.push(err0)}errors++- validate125.errors = vErrors+ validate117.errors = vErrorsreturn false} else {errors = _errs1@@ -12495,7 +12280,7 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,if (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.kind === undefined && (missing0 = 'kind')) {- validate125.errors = [+ validate117.errors = [{instancePath,schemaPath: '#/required',@@ -12507,7 +12292,7 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,return false}} else {- validate125.errors = [+ validate117.errors = [{instancePath,schemaPath: '#/type',@@ -12519,10 +12304,10 @@ function validate125(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate125.errors = vErrors+ validate117.errors = vErrorsreturn errors === 0}-function validate123(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate115(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -12533,7 +12318,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,(data.metric_type === undefined && (missing0 = 'metric_type')) ||(data.series === undefined && (missing0 = 'series'))) {- validate123.errors = [+ validate115.errors = [{instancePath,schemaPath: '#/required',@@ -12546,8 +12331,8 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema108.properties, key0)) {- validate123.errors = [+ if (!func2.call(schema105.properties, key0)) {+ validate115.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -12565,7 +12350,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data0 = data.breakdownAttributionTypeconst _errs2 = errorsif (typeof data0 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/breakdownAttributionType',schemaPath: '#/definitions/BreakdownAttributionType/type',@@ -12584,12 +12369,12 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,data0 === 'step')) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/breakdownAttributionType',schemaPath: '#/definitions/BreakdownAttributionType/enum',keyword: 'enum',- params: { allowedValues: schema109.enum },+ params: { allowedValues: schema106.enum },message: 'must be equal to one of the allowed values',},]@@ -12604,7 +12389,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data1 = data.breakdownAttributionValueconst _errs5 = errorsif (!(typeof data1 == 'number' && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/breakdownAttributionValue',schemaPath: '#/properties/breakdownAttributionValue/type',@@ -12623,14 +12408,14 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (data.breakdownFilter !== undefined) {const _errs7 = errorsif (- !validate94(data.breakdownFilter, {+ !validate86(data.breakdownFilter, {instancePath: instancePath + '/breakdownFilter',parentData: data,parentDataProperty: 'breakdownFilter',rootData,})) {- vErrors = vErrors === null ? validate94.errors : vErrors.concat(validate94.errors)+ vErrors = vErrors === null ? validate86.errors : vErrors.concat(validate86.errors)errors = vErrors.length}var valid0 = _errs7 === errors@@ -12644,7 +12429,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (!(typeof data3 == 'number' && !(data3 % 1) && !isNaN(data3) && isFinite(data3))) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/conversion_window',schemaPath: '#/definitions/integer/type',@@ -12664,7 +12449,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data4 = data.conversion_window_unitconst _errs11 = errorsif (typeof data4 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',@@ -12685,12 +12470,12 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,data4 === 'month')) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',keyword: 'enum',- params: { allowedValues: schema87.enum },+ params: { allowedValues: schema84.enum },message: 'must be equal to one of the allowed values',},]@@ -12704,7 +12489,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (data.fingerprint !== undefined) {const _errs14 = errorsif (typeof data.fingerprint !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/fingerprint',schemaPath: '#/properties/fingerprint/type',@@ -12724,7 +12509,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data6 = data.funnel_order_typeconst _errs16 = errorsif (typeof data6 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/funnel_order_type',schemaPath: '#/definitions/StepOrderValue/type',@@ -12742,12 +12527,12 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,data6 === 'ordered')) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/funnel_order_type',schemaPath: '#/definitions/StepOrderValue/enum',keyword: 'enum',- params: { allowedValues: schema112.enum },+ params: { allowedValues: schema109.enum },message: 'must be equal to one of the allowed values',},]@@ -12762,7 +12547,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data7 = data.goalconst _errs19 = errorsif (typeof data7 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/type',@@ -12774,12 +12559,12 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,return false}if (!(data7 === 'increase' || data7 === 'decrease')) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/enum',keyword: 'enum',- params: { allowedValues: schema88.enum },+ params: { allowedValues: schema85.enum },message: 'must be equal to one of the allowed values',},]@@ -12793,7 +12578,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (data.isSharedMetric !== undefined) {const _errs22 = errorsif (typeof data.isSharedMetric !== 'boolean') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/isSharedMetric',schemaPath: '#/properties/isSharedMetric/type',@@ -12813,7 +12598,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data9 = data.kindconst _errs24 = errorsif (typeof data9 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -12825,7 +12610,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ExperimentMetric' !== data9) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -12845,7 +12630,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,let data10 = data.metric_typeconst _errs26 = errorsif (typeof data10 !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/type',@@ -12857,7 +12642,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,return false}if ('funnel' !== data10) {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/metric_type',schemaPath:@@ -12877,7 +12662,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (data.name !== undefined) {const _errs28 = errorsif (typeof data.name !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath: instancePath + '/name',schemaPath: '#/properties/name/type',@@ -12903,7 +12688,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,!Array.isArray(data12))) {- validate123.errors = [+ validate115.errors = [{instancePath:instancePath + '/response',@@ -12931,7 +12716,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,for (let i0 = 0; i0 < len0; i0++) {const _errs34 = errorsif (- !validate125(data13[i0], {+ !validate117(data13[i0], {instancePath:instancePath +'/series/' +@@ -12943,9 +12728,9 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate125.errors+ ? validate117.errors: vErrors.concat(- validate125.errors+ validate117.errors)errors = vErrors.length}@@ -12955,7 +12740,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate123.errors = [+ validate115.errors = [{instancePath:instancePath +@@ -12984,7 +12769,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,isFinite(data15))) {- validate123.errors = [+ validate115.errors = [{instancePath:instancePath +@@ -13006,7 +12791,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,if (data.uuid !== undefined) {const _errs37 = errorsif (typeof data.uuid !== 'string') {- validate123.errors = [+ validate115.errors = [{instancePath:instancePath +@@ -13038,7 +12823,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,isFinite(data17))) {- validate123.errors = [+ validate115.errors = [{instancePath:instancePath +@@ -13078,7 +12863,7 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate123.errors = [+ validate115.errors = [{instancePath,schemaPath: '#/type',@@ -13090,10 +12875,10 @@ function validate123(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate123.errors = vErrors+ validate115.errors = vErrorsreturn errors === 0}-const schema115 = {+const schema112 = {additionalProperties: false,properties: {breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },@@ -13117,7 +12902,7 @@ const schema115 = {required: ['denominator', 'kind', 'metric_type', 'numerator'],type: 'object',}-const schema118 = {+const schema115 = {additionalProperties: false,properties: {ignore_zeros: { type: 'boolean' },@@ -13138,7 +12923,7 @@ const schema118 = {},type: 'object',}-function validate131(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate123(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -13150,7 +12935,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,(data.metric_type === undefined && (missing0 = 'metric_type')) ||(data.numerator === undefined && (missing0 = 'numerator'))) {- validate131.errors = [+ validate123.errors = [{instancePath,schemaPath: '#/required',@@ -13163,8 +12948,8 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema115.properties, key0)) {- validate131.errors = [+ if (!func2.call(schema112.properties, key0)) {+ validate123.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -13181,14 +12966,14 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.breakdownFilter !== undefined) {const _errs2 = errorsif (- !validate94(data.breakdownFilter, {+ !validate86(data.breakdownFilter, {instancePath: instancePath + '/breakdownFilter',parentData: data,parentDataProperty: 'breakdownFilter',rootData,})) {- vErrors = vErrors === null ? validate94.errors : vErrors.concat(validate94.errors)+ vErrors = vErrors === null ? validate86.errors : vErrors.concat(validate86.errors)errors = vErrors.length}var valid0 = _errs2 === errors@@ -13200,7 +12985,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,let data1 = data.conversion_windowconst _errs3 = errorsif (!(typeof data1 == 'number' && !(data1 % 1) && !isNaN(data1) && isFinite(data1))) {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/conversion_window',schemaPath: '#/definitions/integer/type',@@ -13220,7 +13005,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,let data2 = data.conversion_window_unitconst _errs6 = errorsif (typeof data2 !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',@@ -13241,12 +13026,12 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,data2 === 'month')) {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',keyword: 'enum',- params: { allowedValues: schema87.enum },+ params: { allowedValues: schema84.enum },message: 'must be equal to one of the allowed values',},]@@ -13260,7 +13045,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.denominator !== undefined) {const _errs9 = errorsif (- !validate98(data.denominator, {+ !validate90(data.denominator, {instancePath: instancePath + '/denominator',parentData: data,parentDataProperty: 'denominator',@@ -13268,7 +13053,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,})) {vErrors =- vErrors === null ? validate98.errors : vErrors.concat(validate98.errors)+ vErrors === null ? validate90.errors : vErrors.concat(validate90.errors)errors = vErrors.length}var valid0 = _errs9 === errors@@ -13291,7 +13076,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,key1 === 'upper_bound_percentile')) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath + '/denominator_outlier_handling',@@ -13310,7 +13095,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data4.ignore_zeros !== undefined) {const _errs14 = errorsif (typeof data4.ignore_zeros !== 'boolean') {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13335,7 +13120,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (errors === _errs16) {if (typeof data6 == 'number' && isFinite(data6)) {if (data6 > 1 || isNaN(data6)) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13350,7 +13135,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false} else {if (data6 < 0 || isNaN(data6)) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13369,7 +13154,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13395,7 +13180,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (errors === _errs18) {if (typeof data7 == 'number' && isFinite(data7)) {if (data7 > 1 || isNaN(data7)) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13413,7 +13198,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false} else {if (data7 < 0 || isNaN(data7)) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13432,7 +13217,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13455,7 +13240,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/denominator_outlier_handling',schemaPath:@@ -13476,7 +13261,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.fingerprint !== undefined) {const _errs20 = errorsif (typeof data.fingerprint !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/fingerprint',schemaPath: '#/properties/fingerprint/type',@@ -13496,7 +13281,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,let data9 = data.goalconst _errs22 = errorsif (typeof data9 !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/type',@@ -13508,12 +13293,12 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false}if (!(data9 === 'increase' || data9 === 'decrease')) {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/enum',keyword: 'enum',- params: { allowedValues: schema88.enum },+ params: { allowedValues: schema85.enum },message: 'must be equal to one of the allowed values',},]@@ -13527,7 +13312,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.isSharedMetric !== undefined) {const _errs25 = errorsif (typeof data.isSharedMetric !== 'boolean') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/isSharedMetric',schemaPath: '#/properties/isSharedMetric/type',@@ -13547,7 +13332,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,let data11 = data.kindconst _errs27 = errorsif (typeof data11 !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -13559,7 +13344,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ExperimentMetric' !== data11) {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -13579,7 +13364,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,let data12 = data.metric_typeconst _errs29 = errorsif (typeof data12 !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/type',@@ -13591,7 +13376,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ratio' !== data12) {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/const',@@ -13610,7 +13395,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.name !== undefined) {const _errs31 = errorsif (typeof data.name !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath: instancePath + '/name',schemaPath: '#/properties/name/type',@@ -13629,7 +13414,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.numerator !== undefined) {const _errs33 = errorsif (- !validate98(data.numerator, {+ !validate90(data.numerator, {instancePath: instancePath + '/numerator',parentData: data,parentDataProperty: 'numerator',@@ -13638,8 +13423,8 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate98.errors- : vErrors.concat(validate98.errors)+ ? validate90.errors+ : vErrors.concat(validate90.errors)errors = vErrors.length}var valid0 = _errs33 === errors@@ -13668,7 +13453,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,'upper_bound_percentile')) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13699,7 +13484,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,typeof data15.ignore_zeros !=='boolean') {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13738,7 +13523,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,data17 > 1 ||isNaN(data17)) {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13766,7 +13551,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,data17)) {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13789,7 +13574,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13837,7 +13622,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,data18)) {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13865,7 +13650,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,data18)) {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13888,7 +13673,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors =+ validate123.errors =[{instancePath:@@ -13917,7 +13702,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13947,7 +13732,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,!Array.isArray(data19))) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath + '/response',@@ -13974,7 +13759,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,isFinite(data20))) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -13996,7 +13781,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,if (data.uuid !== undefined) {const _errs48 = errorsif (typeof data.uuid !== 'string') {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -14028,7 +13813,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,isFinite(data22))) {- validate131.errors = [+ validate123.errors = [{instancePath:instancePath +@@ -14068,7 +13853,7 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate131.errors = [+ validate123.errors = [{instancePath,schemaPath: '#/type',@@ -14080,10 +13865,10 @@ function validate131(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate131.errors = vErrors+ validate123.errors = vErrorsreturn errors === 0}-const schema121 = {+const schema118 = {additionalProperties: false,properties: {breakdownFilter: { $ref: '#/definitions/BreakdownFilter' },@@ -14118,7 +13903,7 @@ const schema121 = {],type: 'object',}-const schema122 = {+const schema119 = {discriminator: { propertyName: 'kind' },oneOf: [{ $ref: '#/definitions/EventsNode' },@@ -14128,15 +13913,15 @@ const schema122 = {required: ['kind'],type: 'object',}-function validate138(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate130(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs1 = errorslet valid0 = falselet passing0 = nullconst _errs2 = errors- if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)+ if (!validate91(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate91.errors : vErrors.concat(validate91.errors)errors = vErrors.length}var _valid0 = _errs2 === errors@@ -14145,8 +13930,8 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,passing0 = 0}const _errs3 = errors- if (!validate107(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate107.errors : vErrors.concat(validate107.errors)+ if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)errors = vErrors.length}var _valid0 = _errs3 === errors@@ -14159,8 +13944,8 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,passing0 = 1}const _errs4 = errors- if (!validate113(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors)+ if (!validate105(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate105.errors : vErrors.concat(validate105.errors)errors = vErrors.length}var _valid0 = _errs4 === errors@@ -14188,7 +13973,7 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,vErrors.push(err0)}errors++- validate138.errors = vErrors+ validate130.errors = vErrorsreturn false} else {errors = _errs1@@ -14204,7 +13989,7 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,if (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.kind === undefined && (missing0 = 'kind')) {- validate138.errors = [+ validate130.errors = [{instancePath,schemaPath: '#/required',@@ -14216,7 +14001,7 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,return false}} else {- validate138.errors = [+ validate130.errors = [{instancePath,schemaPath: '#/type',@@ -14228,10 +14013,10 @@ function validate138(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate138.errors = vErrors+ validate130.errors = vErrorsreturn errors === 0}-const schema129 = {+const schema126 = {discriminator: { propertyName: 'kind' },oneOf: [{ $ref: '#/definitions/EventsNode' },@@ -14242,7 +14027,7 @@ const schema129 = {required: ['kind'],type: 'object',}-const schema130 = {+const schema127 = {additionalProperties: false,description:"Sentinel start source for retention metrics. It carries no event of its own: at query time it resolves to the experiment's exposure, so one shared metric anchors correctly on any experiment regardless of that experiment's exposure event.",@@ -14254,15 +14039,15 @@ const schema130 = {required: ['kind'],type: 'object',}-function validate143(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate135(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs1 = errorslet valid0 = falselet passing0 = nullconst _errs2 = errors- if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)+ if (!validate91(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate91.errors : vErrors.concat(validate91.errors)errors = vErrors.length}var _valid0 = _errs2 === errors@@ -14271,8 +14056,8 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,passing0 = 0}const _errs3 = errors- if (!validate107(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate107.errors : vErrors.concat(validate107.errors)+ if (!validate99(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors)errors = vErrors.length}var _valid0 = _errs3 === errors@@ -14285,8 +14070,8 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,passing0 = 1}const _errs4 = errors- if (!validate113(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors)+ if (!validate105(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate105.errors : vErrors.concat(validate105.errors)errors = vErrors.length}var _valid0 = _errs4 === errors@@ -14468,7 +14253,7 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,vErrors.push(err7)}errors++- validate143.errors = vErrors+ validate135.errors = vErrorsreturn false} else {errors = _errs1@@ -14484,7 +14269,7 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,if (data && typeof data == 'object' && !Array.isArray(data)) {let missing1if (data.kind === undefined && (missing1 = 'kind')) {- validate143.errors = [+ validate135.errors = [{instancePath,schemaPath: '#/required',@@ -14496,7 +14281,7 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,return false}} else {- validate143.errors = [+ validate135.errors = [{instancePath,schemaPath: '#/type',@@ -14508,10 +14293,10 @@ function validate143(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate143.errors = vErrors+ validate135.errors = vErrorsreturn errors === 0}-function validate136(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate128(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0if (errors === 0) {@@ -14527,7 +14312,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,(data.start_event === undefined && (missing0 = 'start_event')) ||(data.start_handling === undefined && (missing0 = 'start_handling'))) {- validate136.errors = [+ validate128.errors = [{instancePath,schemaPath: '#/required',@@ -14540,8 +14325,8 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,} else {const _errs1 = errorsfor (const key0 in data) {- if (!func2.call(schema121.properties, key0)) {- validate136.errors = [+ if (!func2.call(schema118.properties, key0)) {+ validate128.errors = [{instancePath,schemaPath: '#/additionalProperties',@@ -14558,14 +14343,14 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.breakdownFilter !== undefined) {const _errs2 = errorsif (- !validate94(data.breakdownFilter, {+ !validate86(data.breakdownFilter, {instancePath: instancePath + '/breakdownFilter',parentData: data,parentDataProperty: 'breakdownFilter',rootData,})) {- vErrors = vErrors === null ? validate94.errors : vErrors.concat(validate94.errors)+ vErrors = vErrors === null ? validate86.errors : vErrors.concat(validate86.errors)errors = vErrors.length}var valid0 = _errs2 === errors@@ -14576,14 +14361,14 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.completion_event !== undefined) {const _errs3 = errorsif (- !validate138(data.completion_event, {+ !validate130(data.completion_event, {instancePath: instancePath + '/completion_event',parentData: data,parentDataProperty: 'completion_event',rootData,})) {- vErrors = vErrors === null ? validate138.errors : vErrors.concat(validate138.errors)+ vErrors = vErrors === null ? validate130.errors : vErrors.concat(validate130.errors)errors = vErrors.length}var valid0 = _errs3 === errors@@ -14595,7 +14380,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data2 = data.conversion_windowconst _errs4 = errorsif (!(typeof data2 == 'number' && !(data2 % 1) && !isNaN(data2) && isFinite(data2))) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/conversion_window',schemaPath: '#/definitions/integer/type',@@ -14615,7 +14400,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data3 = data.conversion_window_unitconst _errs7 = errorsif (typeof data3 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/type',@@ -14636,12 +14421,12 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,data3 === 'month')) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/conversion_window_unit',schemaPath: '#/definitions/FunnelConversionWindowTimeUnit/enum',keyword: 'enum',- params: { allowedValues: schema87.enum },+ params: { allowedValues: schema84.enum },message: 'must be equal to one of the allowed values',},]@@ -14655,7 +14440,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.fingerprint !== undefined) {const _errs10 = errorsif (typeof data.fingerprint !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/fingerprint',schemaPath: '#/properties/fingerprint/type',@@ -14675,7 +14460,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data5 = data.goalconst _errs12 = errorsif (typeof data5 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/type',@@ -14687,12 +14472,12 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,return false}if (!(data5 === 'increase' || data5 === 'decrease')) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/goal',schemaPath: '#/definitions/ExperimentMetricGoal/enum',keyword: 'enum',- params: { allowedValues: schema88.enum },+ params: { allowedValues: schema85.enum },message: 'must be equal to one of the allowed values',},]@@ -14706,7 +14491,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.isSharedMetric !== undefined) {const _errs15 = errorsif (typeof data.isSharedMetric !== 'boolean') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/isSharedMetric',schemaPath: '#/properties/isSharedMetric/type',@@ -14726,7 +14511,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data7 = data.kindconst _errs17 = errorsif (typeof data7 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/type',@@ -14738,7 +14523,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,return false}if ('ExperimentMetric' !== data7) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/kind',schemaPath: '#/properties/kind/const',@@ -14758,7 +14543,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data8 = data.metric_typeconst _errs19 = errorsif (typeof data8 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/type',@@ -14770,7 +14555,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,return false}if ('retention' !== data8) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/metric_type',schemaPath: '#/properties/metric_type/const',@@ -14789,7 +14574,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.name !== undefined) {const _errs21 = errorsif (typeof data.name !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/name',schemaPath: '#/properties/name/type',@@ -14815,7 +14600,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,!Array.isArray(data10))) {- validate136.errors = [+ validate128.errors = [{instancePath: instancePath + '/response',schemaPath: '#/properties/response/type',@@ -14842,7 +14627,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,isFinite(data11))) {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -14872,7 +14657,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,isFinite(data12))) {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -14895,7 +14680,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,let data13 = data.retention_window_unitconst _errs31 = errorsif (typeof data13 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -14919,7 +14704,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,data13 === 'month')) {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -14929,7 +14714,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,keyword: 'enum',params: {allowedValues:- schema87.enum,+ schema84.enum,},message:'must be equal to one of the allowed values',@@ -14951,7 +14736,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,isFinite(data14))) {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -14973,7 +14758,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (data.start_event !== undefined) {const _errs36 = errorsif (- !validate143(data.start_event, {+ !validate135(data.start_event, {instancePath:instancePath +'/start_event',@@ -14985,9 +14770,9 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,) {vErrors =vErrors === null- ? validate143.errors+ ? validate135.errors: vErrors.concat(- validate143.errors+ validate135.errors)errors = vErrors.length}@@ -15005,7 +14790,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,if (typeof data16 !== 'string') {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -15029,7 +14814,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,data16 === 'last_seen')) {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -15039,7 +14824,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,keyword: 'enum',params: {allowedValues:- schema121+ schema118.properties.start_handling.enum,@@ -15061,7 +14846,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,typeof data.uuid !=='string') {- validate136.errors = [+ validate128.errors = [{instancePath:instancePath +@@ -15098,7 +14883,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,isFinite(data18))) {- validate136.errors =+ validate128.errors =[{instancePath:@@ -15143,7 +14928,7 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,}}} else {- validate136.errors = [+ validate128.errors = [{instancePath,schemaPath: '#/type',@@ -15155,18 +14940,18 @@ function validate136(data, { instancePath = '', parentData, parentDataProperty,return false}}- validate136.errors = vErrors+ validate128.errors = vErrorsreturn errors === 0}-function validate92(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+function validate84(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {let vErrors = nulllet errors = 0const _errs1 = errorslet valid0 = falselet passing0 = nullconst _errs2 = errors- if (!validate93(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate93.errors : vErrors.concat(validate93.errors)+ if (!validate85(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate85.errors : vErrors.concat(validate85.errors)errors = vErrors.length}var _valid0 = _errs2 === errors@@ -15175,8 +14960,8 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 0}const _errs3 = errors- if (!validate123(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate123.errors : vErrors.concat(validate123.errors)+ if (!validate115(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate115.errors : vErrors.concat(validate115.errors)errors = vErrors.length}var _valid0 = _errs3 === errors@@ -15189,8 +14974,8 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 1}const _errs4 = errors- if (!validate131(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate131.errors : vErrors.concat(validate131.errors)+ if (!validate123(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate123.errors : vErrors.concat(validate123.errors)errors = vErrors.length}var _valid0 = _errs4 === errors@@ -15203,8 +14988,8 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rpassing0 = 2}const _errs5 = errors- if (!validate136(data, { instancePath, parentData, parentDataProperty, rootData })) {- vErrors = vErrors === null ? validate136.errors : vErrors.concat(validate136.errors)+ if (!validate128(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate128.errors : vErrors.concat(validate128.errors)errors = vErrors.length}var _valid0 = _errs5 === errors@@ -15233,7 +15018,7 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rvErrors.push(err0)}errors++- validate92.errors = vErrors+ validate84.errors = vErrorsreturn false} else {errors = _errs1@@ -15249,7 +15034,7 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rif (data && typeof data == 'object' && !Array.isArray(data)) {let missing0if (data.metric_type === undefined && (missing0 = 'metric_type')) {- validate92.errors = [+ validate84.errors = [{instancePath,schemaPath: '#/required',@@ -15261,7 +15046,7 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rreturn false}} else {- validate92.errors = [+ validate84.errors = [{instancePath,schemaPath: '#/type',@@ -15273,6 +15058,6 @@ function validate92(data, { instancePath = '', parentData, parentDataProperty, rreturn false}}- validate92.errors = vErrors+ validate84.errors = vErrorsreturn errors === 0}diff --git a/frontend/src/queries/web-analytics-schema-guards.test.ts b/frontend/src/queries/web-analytics-schema-guards.test.tsnew file mode 100644index 000000000000..bc4e0c0ae5e7--- /dev/null+++ b/frontend/src/queries/web-analytics-schema-guards.test.ts@@ -0,0 +1,35 @@+import { PropertyFilterType, PropertyOperator } from '~/types'++import { isCompareFilter, isWebAnalyticsPropertyFilters } from './web-analytics-schema-guards'++describe('web analytics schema guards', () => {+ it.each([+ [+ 'event and session filters',+ [+ { type: PropertyFilterType.Event, key: '$pathname', operator: PropertyOperator.Exact, value: ['/'] },+ { type: PropertyFilterType.Session, key: '$channel_type', operator: PropertyOperator.IsSet },+ ],+ true,+ ],+ ['an empty list', [], true],+ [+ 'an element filter, which web analytics does not support',+ [{ type: PropertyFilterType.Element, key: 'selector', operator: PropertyOperator.Exact, value: 'a' }],+ false,+ ],+ ['a filter with an unknown key', [{ type: 'event', key: 'x', operator: 'exact', extra: 1 }], false],+ ['a string from a hand-edited URL', 'not-a-list', false],+ ])('isWebAnalyticsPropertyFilters checks %s', (_name, data, expected) => {+ expect(isWebAnalyticsPropertyFilters(data)).toBe(expected)+ })++ it.each([+ [{ compare: true, compare_to: '-1w' }, true],+ [{}, true],+ [{ compare: 'yes' }, false],+ [{ compare: true, period: '-1w' }, false],+ ])('isCompareFilter(%j) is %s', (data, expected) => {+ expect(isCompareFilter(data)).toBe(expected)+ })+})diff --git a/frontend/src/queries/web-analytics-schema-guards.ts b/frontend/src/queries/web-analytics-schema-guards.tsnew file mode 100644index 000000000000..849ae36b2acd--- /dev/null+++ b/frontend/src/queries/web-analytics-schema-guards.ts@@ -0,0 +1,11 @@+import { CompareFilter, WebAnalyticsPropertyFilters } from '~/queries/schema/schema-general'++import * as validators from './web-analytics-validators.js'++export const isWebAnalyticsPropertyFilters = (data: unknown): data is WebAnalyticsPropertyFilters => {+ return validators.WebAnalyticsPropertyFilters(data) as boolean+}++export const isCompareFilter = (data: unknown): data is CompareFilter => {+ return validators.CompareFilter(data) as boolean+}diff --git a/frontend/src/queries/web-analytics-validators.js b/frontend/src/queries/web-analytics-validators.jsnew file mode 100644index 000000000000..286b7c8e0556--- /dev/null+++ b/frontend/src/queries/web-analytics-validators.js@@ -0,0 +1,1461 @@+// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY+'use strict'+export const WebAnalyticsPropertyFilters = validate141+const schema128 = { items: { $ref: '#/definitions/WebAnalyticsPropertyFilter' }, type: 'array' }+const schema129 = {+ anyOf: [+ { $ref: '#/definitions/EventPropertyFilter' },+ { $ref: '#/definitions/PersonPropertyFilter' },+ { $ref: '#/definitions/SessionPropertyFilter' },+ { $ref: '#/definitions/CohortPropertyFilter' },+ ],+}+const schema13 = {+ additionalProperties: false,+ description: 'Sync with nodejs/src/types.ts',+ properties: {+ key: { type: 'string' },+ label: { type: 'string' },+ operator: { $ref: '#/definitions/PropertyOperator', default: 'exact' },+ type: { const: 'event', description: 'Event properties', type: 'string' },+ value: { $ref: '#/definitions/PropertyFilterValue' },+ },+ required: ['key', 'operator', 'type'],+ type: 'object',+}+const schema14 = {+ description: 'Sync with nodejs/src/types.ts',+ enum: [+ 'exact',+ 'is_not',+ 'icontains',+ 'not_icontains',+ 'starts_with',+ 'not_starts_with',+ 'ends_with',+ 'not_ends_with',+ 'regex',+ 'not_regex',+ 'gt',+ 'gte',+ 'lt',+ 'lte',+ 'is_set',+ 'is_not_set',+ 'is_date_exact',+ 'is_date_before',+ 'is_date_after',+ 'between',+ 'not_between',+ 'min',+ 'max',+ 'in',+ 'not_in',+ 'is_cleaned_path_exact',+ 'is_cleaned_path_not_exact',+ 'flag_evaluates_to',+ 'semver_eq',+ 'semver_neq',+ 'semver_gt',+ 'semver_gte',+ 'semver_lt',+ 'semver_lte',+ 'semver_tilde',+ 'semver_caret',+ 'semver_wildcard',+ 'icontains_multi',+ 'not_icontains_multi',+ ],+ type: 'string',+}+const schema15 = {+ anyOf: [+ { $ref: '#/definitions/PropertyFilterBaseValue' },+ { items: { $ref: '#/definitions/PropertyFilterBaseValue' }, type: 'array' },+ { type: 'null' },+ ],+}+const schema16 = { type: ['string', 'number', 'boolean'] }+function validate13(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ const _errs0 = errors+ let valid0 = false+ const _errs1 = errors+ if (typeof data !== 'string' && !(typeof data == 'number' && isFinite(data)) && typeof data !== 'boolean') {+ const err0 = {+ instancePath,+ schemaPath: '#/definitions/PropertyFilterBaseValue/type',+ keyword: 'type',+ params: { type: schema16.type },+ message: 'must be string,number,boolean',+ }+ if (vErrors === null) {+ vErrors = [err0]+ } else {+ vErrors.push(err0)+ }+ errors+++ }+ var _valid0 = _errs1 === errors+ valid0 = valid0 || _valid0+ if (!valid0) {+ const _errs4 = errors+ if (errors === _errs4) {+ if (Array.isArray(data)) {+ var valid2 = true+ const len0 = data.length+ for (let i0 = 0; i0 < len0; i0++) {+ let data0 = data[i0]+ const _errs6 = errors+ if (+ typeof data0 !== 'string' &&+ !(typeof data0 == 'number' && isFinite(data0)) &&+ typeof data0 !== 'boolean'+ ) {+ const err1 = {+ instancePath: instancePath + '/' + i0,+ schemaPath: '#/definitions/PropertyFilterBaseValue/type',+ keyword: 'type',+ params: { type: schema16.type },+ message: 'must be string,number,boolean',+ }+ if (vErrors === null) {+ vErrors = [err1]+ } else {+ vErrors.push(err1)+ }+ errors+++ }+ var valid2 = _errs6 === errors+ if (!valid2) {+ break+ }+ }+ } else {+ const err2 = {+ instancePath,+ schemaPath: '#/anyOf/1/type',+ keyword: 'type',+ params: { type: 'array' },+ message: 'must be array',+ }+ if (vErrors === null) {+ vErrors = [err2]+ } else {+ vErrors.push(err2)+ }+ errors+++ }+ }+ var _valid0 = _errs4 === errors+ valid0 = valid0 || _valid0+ if (!valid0) {+ const _errs9 = errors+ if (data !== null) {+ const err3 = {+ instancePath,+ schemaPath: '#/anyOf/2/type',+ keyword: 'type',+ params: { type: 'null' },+ message: 'must be null',+ }+ if (vErrors === null) {+ vErrors = [err3]+ } else {+ vErrors.push(err3)+ }+ errors+++ }+ var _valid0 = _errs9 === errors+ valid0 = valid0 || _valid0+ }+ }+ if (!valid0) {+ const err4 = {+ instancePath,+ schemaPath: '#/anyOf',+ keyword: 'anyOf',+ params: {},+ message: 'must match a schema in anyOf',+ }+ if (vErrors === null) {+ vErrors = [err4]+ } else {+ vErrors.push(err4)+ }+ errors+++ validate13.errors = vErrors+ return false+ } else {+ errors = _errs0+ if (vErrors !== null) {+ if (_errs0) {+ vErrors.length = _errs0+ } else {+ vErrors = null+ }+ }+ }+ validate13.errors = vErrors+ return errors === 0+}+function validate12(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (data && typeof data == 'object' && !Array.isArray(data)) {+ let missing0+ if (+ (data.key === undefined && (missing0 = 'key')) ||+ (data.operator === undefined && (missing0 = 'operator')) ||+ (data.type === undefined && (missing0 = 'type'))+ ) {+ validate12.errors = [+ {+ instancePath,+ schemaPath: '#/required',+ keyword: 'required',+ params: { missingProperty: missing0 },+ message: "must have required property '" + missing0 + "'",+ },+ ]+ return false+ } else {+ const _errs1 = errors+ for (const key0 in data) {+ if (+ !(+ key0 === 'key' ||+ key0 === 'label' ||+ key0 === 'operator' ||+ key0 === 'type' ||+ key0 === 'value'+ )+ ) {+ validate12.errors = [+ {+ instancePath,+ schemaPath: '#/additionalProperties',+ keyword: 'additionalProperties',+ params: { additionalProperty: key0 },+ message: 'must NOT have additional properties',+ },+ ]+ return false+ break+ }+ }+ if (_errs1 === errors) {+ if (data.key !== undefined) {+ const _errs2 = errors+ if (typeof data.key !== 'string') {+ validate12.errors = [+ {+ instancePath: instancePath + '/key',+ schemaPath: '#/properties/key/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs2 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.label !== undefined) {+ const _errs4 = errors+ if (typeof data.label !== 'string') {+ validate12.errors = [+ {+ instancePath: instancePath + '/label',+ schemaPath: '#/properties/label/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs4 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.operator !== undefined) {+ let data2 = data.operator+ const _errs6 = errors+ if (typeof data2 !== 'string') {+ validate12.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if (+ !(+ data2 === 'exact' ||+ data2 === 'is_not' ||+ data2 === 'icontains' ||+ data2 === 'not_icontains' ||+ data2 === 'starts_with' ||+ data2 === 'not_starts_with' ||+ data2 === 'ends_with' ||+ data2 === 'not_ends_with' ||+ data2 === 'regex' ||+ data2 === 'not_regex' ||+ data2 === 'gt' ||+ data2 === 'gte' ||+ data2 === 'lt' ||+ data2 === 'lte' ||+ data2 === 'is_set' ||+ data2 === 'is_not_set' ||+ data2 === 'is_date_exact' ||+ data2 === 'is_date_before' ||+ data2 === 'is_date_after' ||+ data2 === 'between' ||+ data2 === 'not_between' ||+ data2 === 'min' ||+ data2 === 'max' ||+ data2 === 'in' ||+ data2 === 'not_in' ||+ data2 === 'is_cleaned_path_exact' ||+ data2 === 'is_cleaned_path_not_exact' ||+ data2 === 'flag_evaluates_to' ||+ data2 === 'semver_eq' ||+ data2 === 'semver_neq' ||+ data2 === 'semver_gt' ||+ data2 === 'semver_gte' ||+ data2 === 'semver_lt' ||+ data2 === 'semver_lte' ||+ data2 === 'semver_tilde' ||+ data2 === 'semver_caret' ||+ data2 === 'semver_wildcard' ||+ data2 === 'icontains_multi' ||+ data2 === 'not_icontains_multi'+ )+ ) {+ validate12.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/enum',+ keyword: 'enum',+ params: { allowedValues: schema14.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false+ }+ var valid0 = _errs6 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.type !== undefined) {+ let data3 = data.type+ const _errs9 = errors+ if (typeof data3 !== 'string') {+ validate12.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if ('event' !== data3) {+ validate12.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/const',+ keyword: 'const',+ params: { allowedValue: 'event' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs9 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.value !== undefined) {+ const _errs11 = errors+ if (+ !validate13(data.value, {+ instancePath: instancePath + '/value',+ parentData: data,+ parentDataProperty: 'value',+ rootData,+ })+ ) {+ vErrors =+ vErrors === null ? validate13.errors : vErrors.concat(validate13.errors)+ errors = vErrors.length+ }+ var valid0 = _errs11 === errors+ } else {+ var valid0 = true+ }+ }+ }+ }+ }+ }+ }+ } else {+ validate12.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'object' },+ message: 'must be object',+ },+ ]+ return false+ }+ }+ validate12.errors = vErrors+ return errors === 0+}+const schema18 = {+ additionalProperties: false,+ description: 'Sync with nodejs/src/types.ts',+ properties: {+ key: { type: 'string' },+ label: { type: 'string' },+ operator: { $ref: '#/definitions/PropertyOperator' },+ type: { const: 'person', description: 'Person properties', type: 'string' },+ value: { $ref: '#/definitions/PropertyFilterValue' },+ },+ required: ['key', 'operator', 'type'],+ type: 'object',+}+function validate16(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (data && typeof data == 'object' && !Array.isArray(data)) {+ let missing0+ if (+ (data.key === undefined && (missing0 = 'key')) ||+ (data.operator === undefined && (missing0 = 'operator')) ||+ (data.type === undefined && (missing0 = 'type'))+ ) {+ validate16.errors = [+ {+ instancePath,+ schemaPath: '#/required',+ keyword: 'required',+ params: { missingProperty: missing0 },+ message: "must have required property '" + missing0 + "'",+ },+ ]+ return false+ } else {+ const _errs1 = errors+ for (const key0 in data) {+ if (+ !(+ key0 === 'key' ||+ key0 === 'label' ||+ key0 === 'operator' ||+ key0 === 'type' ||+ key0 === 'value'+ )+ ) {+ validate16.errors = [+ {+ instancePath,+ schemaPath: '#/additionalProperties',+ keyword: 'additionalProperties',+ params: { additionalProperty: key0 },+ message: 'must NOT have additional properties',+ },+ ]+ return false+ break+ }+ }+ if (_errs1 === errors) {+ if (data.key !== undefined) {+ const _errs2 = errors+ if (typeof data.key !== 'string') {+ validate16.errors = [+ {+ instancePath: instancePath + '/key',+ schemaPath: '#/properties/key/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs2 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.label !== undefined) {+ const _errs4 = errors+ if (typeof data.label !== 'string') {+ validate16.errors = [+ {+ instancePath: instancePath + '/label',+ schemaPath: '#/properties/label/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs4 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.operator !== undefined) {+ let data2 = data.operator+ const _errs6 = errors+ if (typeof data2 !== 'string') {+ validate16.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if (+ !(+ data2 === 'exact' ||+ data2 === 'is_not' ||+ data2 === 'icontains' ||+ data2 === 'not_icontains' ||+ data2 === 'starts_with' ||+ data2 === 'not_starts_with' ||+ data2 === 'ends_with' ||+ data2 === 'not_ends_with' ||+ data2 === 'regex' ||+ data2 === 'not_regex' ||+ data2 === 'gt' ||+ data2 === 'gte' ||+ data2 === 'lt' ||+ data2 === 'lte' ||+ data2 === 'is_set' ||+ data2 === 'is_not_set' ||+ data2 === 'is_date_exact' ||+ data2 === 'is_date_before' ||+ data2 === 'is_date_after' ||+ data2 === 'between' ||+ data2 === 'not_between' ||+ data2 === 'min' ||+ data2 === 'max' ||+ data2 === 'in' ||+ data2 === 'not_in' ||+ data2 === 'is_cleaned_path_exact' ||+ data2 === 'is_cleaned_path_not_exact' ||+ data2 === 'flag_evaluates_to' ||+ data2 === 'semver_eq' ||+ data2 === 'semver_neq' ||+ data2 === 'semver_gt' ||+ data2 === 'semver_gte' ||+ data2 === 'semver_lt' ||+ data2 === 'semver_lte' ||+ data2 === 'semver_tilde' ||+ data2 === 'semver_caret' ||+ data2 === 'semver_wildcard' ||+ data2 === 'icontains_multi' ||+ data2 === 'not_icontains_multi'+ )+ ) {+ validate16.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/enum',+ keyword: 'enum',+ params: { allowedValues: schema14.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false+ }+ var valid0 = _errs6 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.type !== undefined) {+ let data3 = data.type+ const _errs9 = errors+ if (typeof data3 !== 'string') {+ validate16.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if ('person' !== data3) {+ validate16.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/const',+ keyword: 'const',+ params: { allowedValue: 'person' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs9 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.value !== undefined) {+ const _errs11 = errors+ if (+ !validate13(data.value, {+ instancePath: instancePath + '/value',+ parentData: data,+ parentDataProperty: 'value',+ rootData,+ })+ ) {+ vErrors =+ vErrors === null ? validate13.errors : vErrors.concat(validate13.errors)+ errors = vErrors.length+ }+ var valid0 = _errs11 === errors+ } else {+ var valid0 = true+ }+ }+ }+ }+ }+ }+ }+ } else {+ validate16.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'object' },+ message: 'must be object',+ },+ ]+ return false+ }+ }+ validate16.errors = vErrors+ return errors === 0+}+const schema26 = {+ additionalProperties: false,+ properties: {+ key: { type: 'string' },+ label: { type: 'string' },+ operator: { $ref: '#/definitions/PropertyOperator' },+ type: { const: 'session', type: 'string' },+ value: { $ref: '#/definitions/PropertyFilterValue' },+ },+ required: ['key', 'operator', 'type'],+ type: 'object',+}+function validate28(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (data && typeof data == 'object' && !Array.isArray(data)) {+ let missing0+ if (+ (data.key === undefined && (missing0 = 'key')) ||+ (data.operator === undefined && (missing0 = 'operator')) ||+ (data.type === undefined && (missing0 = 'type'))+ ) {+ validate28.errors = [+ {+ instancePath,+ schemaPath: '#/required',+ keyword: 'required',+ params: { missingProperty: missing0 },+ message: "must have required property '" + missing0 + "'",+ },+ ]+ return false+ } else {+ const _errs1 = errors+ for (const key0 in data) {+ if (+ !(+ key0 === 'key' ||+ key0 === 'label' ||+ key0 === 'operator' ||+ key0 === 'type' ||+ key0 === 'value'+ )+ ) {+ validate28.errors = [+ {+ instancePath,+ schemaPath: '#/additionalProperties',+ keyword: 'additionalProperties',+ params: { additionalProperty: key0 },+ message: 'must NOT have additional properties',+ },+ ]+ return false+ break+ }+ }+ if (_errs1 === errors) {+ if (data.key !== undefined) {+ const _errs2 = errors+ if (typeof data.key !== 'string') {+ validate28.errors = [+ {+ instancePath: instancePath + '/key',+ schemaPath: '#/properties/key/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs2 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.label !== undefined) {+ const _errs4 = errors+ if (typeof data.label !== 'string') {+ validate28.errors = [+ {+ instancePath: instancePath + '/label',+ schemaPath: '#/properties/label/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs4 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.operator !== undefined) {+ let data2 = data.operator+ const _errs6 = errors+ if (typeof data2 !== 'string') {+ validate28.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if (+ !(+ data2 === 'exact' ||+ data2 === 'is_not' ||+ data2 === 'icontains' ||+ data2 === 'not_icontains' ||+ data2 === 'starts_with' ||+ data2 === 'not_starts_with' ||+ data2 === 'ends_with' ||+ data2 === 'not_ends_with' ||+ data2 === 'regex' ||+ data2 === 'not_regex' ||+ data2 === 'gt' ||+ data2 === 'gte' ||+ data2 === 'lt' ||+ data2 === 'lte' ||+ data2 === 'is_set' ||+ data2 === 'is_not_set' ||+ data2 === 'is_date_exact' ||+ data2 === 'is_date_before' ||+ data2 === 'is_date_after' ||+ data2 === 'between' ||+ data2 === 'not_between' ||+ data2 === 'min' ||+ data2 === 'max' ||+ data2 === 'in' ||+ data2 === 'not_in' ||+ data2 === 'is_cleaned_path_exact' ||+ data2 === 'is_cleaned_path_not_exact' ||+ data2 === 'flag_evaluates_to' ||+ data2 === 'semver_eq' ||+ data2 === 'semver_neq' ||+ data2 === 'semver_gt' ||+ data2 === 'semver_gte' ||+ data2 === 'semver_lt' ||+ data2 === 'semver_lte' ||+ data2 === 'semver_tilde' ||+ data2 === 'semver_caret' ||+ data2 === 'semver_wildcard' ||+ data2 === 'icontains_multi' ||+ data2 === 'not_icontains_multi'+ )+ ) {+ validate28.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/enum',+ keyword: 'enum',+ params: { allowedValues: schema14.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false+ }+ var valid0 = _errs6 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.type !== undefined) {+ let data3 = data.type+ const _errs9 = errors+ if (typeof data3 !== 'string') {+ validate28.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if ('session' !== data3) {+ validate28.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/const',+ keyword: 'const',+ params: { allowedValue: 'session' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs9 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.value !== undefined) {+ const _errs11 = errors+ if (+ !validate13(data.value, {+ instancePath: instancePath + '/value',+ parentData: data,+ parentDataProperty: 'value',+ rootData,+ })+ ) {+ vErrors =+ vErrors === null ? validate13.errors : vErrors.concat(validate13.errors)+ errors = vErrors.length+ }+ var valid0 = _errs11 === errors+ } else {+ var valid0 = true+ }+ }+ }+ }+ }+ }+ }+ } else {+ validate28.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'object' },+ message: 'must be object',+ },+ ]+ return false+ }+ }+ validate28.errors = vErrors+ return errors === 0+}+const schema28 = {+ additionalProperties: false,+ description: 'Sync with nodejs/src/types.ts',+ properties: {+ cohort_deleted: {+ description: 'Set by the feature flag API when the cohort is deleted or does not exist.',+ type: 'boolean',+ },+ cohort_missing: {+ description: 'Set by the feature flag API when the cohort does not exist, so it cannot be restored.',+ type: 'boolean',+ },+ cohort_name: { type: 'string' },+ key: { const: 'id', type: 'string' },+ label: { type: 'string' },+ operator: { $ref: '#/definitions/PropertyOperator', default: 'in' },+ type: { const: 'cohort', type: 'string' },+ value: { type: 'integer' },+ },+ required: ['key', 'operator', 'type', 'value'],+ type: 'object',+}+function validate31(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (data && typeof data == 'object' && !Array.isArray(data)) {+ let missing0+ if (+ (data.key === undefined && (missing0 = 'key')) ||+ (data.operator === undefined && (missing0 = 'operator')) ||+ (data.type === undefined && (missing0 = 'type')) ||+ (data.value === undefined && (missing0 = 'value'))+ ) {+ validate31.errors = [+ {+ instancePath,+ schemaPath: '#/required',+ keyword: 'required',+ params: { missingProperty: missing0 },+ message: "must have required property '" + missing0 + "'",+ },+ ]+ return false+ } else {+ const _errs1 = errors+ for (const key0 in data) {+ if (+ !(+ key0 === 'cohort_deleted' ||+ key0 === 'cohort_missing' ||+ key0 === 'cohort_name' ||+ key0 === 'key' ||+ key0 === 'label' ||+ key0 === 'operator' ||+ key0 === 'type' ||+ key0 === 'value'+ )+ ) {+ validate31.errors = [+ {+ instancePath,+ schemaPath: '#/additionalProperties',+ keyword: 'additionalProperties',+ params: { additionalProperty: key0 },+ message: 'must NOT have additional properties',+ },+ ]+ return false+ break+ }+ }+ if (_errs1 === errors) {+ if (data.cohort_deleted !== undefined) {+ const _errs2 = errors+ if (typeof data.cohort_deleted !== 'boolean') {+ validate31.errors = [+ {+ instancePath: instancePath + '/cohort_deleted',+ schemaPath: '#/properties/cohort_deleted/type',+ keyword: 'type',+ params: { type: 'boolean' },+ message: 'must be boolean',+ },+ ]+ return false+ }+ var valid0 = _errs2 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.cohort_missing !== undefined) {+ const _errs4 = errors+ if (typeof data.cohort_missing !== 'boolean') {+ validate31.errors = [+ {+ instancePath: instancePath + '/cohort_missing',+ schemaPath: '#/properties/cohort_missing/type',+ keyword: 'type',+ params: { type: 'boolean' },+ message: 'must be boolean',+ },+ ]+ return false+ }+ var valid0 = _errs4 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.cohort_name !== undefined) {+ const _errs6 = errors+ if (typeof data.cohort_name !== 'string') {+ validate31.errors = [+ {+ instancePath: instancePath + '/cohort_name',+ schemaPath: '#/properties/cohort_name/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs6 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.key !== undefined) {+ let data3 = data.key+ const _errs8 = errors+ if (typeof data3 !== 'string') {+ validate31.errors = [+ {+ instancePath: instancePath + '/key',+ schemaPath: '#/properties/key/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if ('id' !== data3) {+ validate31.errors = [+ {+ instancePath: instancePath + '/key',+ schemaPath: '#/properties/key/const',+ keyword: 'const',+ params: { allowedValue: 'id' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs8 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.label !== undefined) {+ const _errs10 = errors+ if (typeof data.label !== 'string') {+ validate31.errors = [+ {+ instancePath: instancePath + '/label',+ schemaPath: '#/properties/label/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs10 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.operator !== undefined) {+ let data5 = data.operator+ const _errs12 = errors+ if (typeof data5 !== 'string') {+ validate31.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if (+ !(+ data5 === 'exact' ||+ data5 === 'is_not' ||+ data5 === 'icontains' ||+ data5 === 'not_icontains' ||+ data5 === 'starts_with' ||+ data5 === 'not_starts_with' ||+ data5 === 'ends_with' ||+ data5 === 'not_ends_with' ||+ data5 === 'regex' ||+ data5 === 'not_regex' ||+ data5 === 'gt' ||+ data5 === 'gte' ||+ data5 === 'lt' ||+ data5 === 'lte' ||+ data5 === 'is_set' ||+ data5 === 'is_not_set' ||+ data5 === 'is_date_exact' ||+ data5 === 'is_date_before' ||+ data5 === 'is_date_after' ||+ data5 === 'between' ||+ data5 === 'not_between' ||+ data5 === 'min' ||+ data5 === 'max' ||+ data5 === 'in' ||+ data5 === 'not_in' ||+ data5 === 'is_cleaned_path_exact' ||+ data5 === 'is_cleaned_path_not_exact' ||+ data5 === 'flag_evaluates_to' ||+ data5 === 'semver_eq' ||+ data5 === 'semver_neq' ||+ data5 === 'semver_gt' ||+ data5 === 'semver_gte' ||+ data5 === 'semver_lt' ||+ data5 === 'semver_lte' ||+ data5 === 'semver_tilde' ||+ data5 === 'semver_caret' ||+ data5 === 'semver_wildcard' ||+ data5 === 'icontains_multi' ||+ data5 === 'not_icontains_multi'+ )+ ) {+ validate31.errors = [+ {+ instancePath: instancePath + '/operator',+ schemaPath: '#/definitions/PropertyOperator/enum',+ keyword: 'enum',+ params: { allowedValues: schema14.enum },+ message: 'must be equal to one of the allowed values',+ },+ ]+ return false+ }+ var valid0 = _errs12 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.type !== undefined) {+ let data6 = data.type+ const _errs15 = errors+ if (typeof data6 !== 'string') {+ validate31.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ if ('cohort' !== data6) {+ validate31.errors = [+ {+ instancePath: instancePath + '/type',+ schemaPath: '#/properties/type/const',+ keyword: 'const',+ params: { allowedValue: 'cohort' },+ message: 'must be equal to constant',+ },+ ]+ return false+ }+ var valid0 = _errs15 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.value !== undefined) {+ let data7 = data.value+ const _errs17 = errors+ if (+ !(+ typeof data7 == 'number' &&+ !(data7 % 1) &&+ !isNaN(data7) &&+ isFinite(data7)+ )+ ) {+ validate31.errors = [+ {+ instancePath: instancePath + '/value',+ schemaPath: '#/properties/value/type',+ keyword: 'type',+ params: { type: 'integer' },+ message: 'must be integer',+ },+ ]+ return false+ }+ var valid0 = _errs17 === errors+ } else {+ var valid0 = true+ }+ }+ }+ }+ }+ }+ }+ }+ }+ }+ } else {+ validate31.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'object' },+ message: 'must be object',+ },+ ]+ return false+ }+ }+ validate31.errors = vErrors+ return errors === 0+}+function validate142(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ const _errs0 = errors+ let valid0 = false+ const _errs1 = errors+ if (!validate12(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors)+ errors = vErrors.length+ }+ var _valid0 = _errs1 === errors+ valid0 = valid0 || _valid0+ if (!valid0) {+ const _errs2 = errors+ if (!validate16(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors)+ errors = vErrors.length+ }+ var _valid0 = _errs2 === errors+ valid0 = valid0 || _valid0+ if (!valid0) {+ const _errs3 = errors+ if (!validate28(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors)+ errors = vErrors.length+ }+ var _valid0 = _errs3 === errors+ valid0 = valid0 || _valid0+ if (!valid0) {+ const _errs4 = errors+ if (!validate31(data, { instancePath, parentData, parentDataProperty, rootData })) {+ vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors)+ errors = vErrors.length+ }+ var _valid0 = _errs4 === errors+ valid0 = valid0 || _valid0+ }+ }+ }+ if (!valid0) {+ const err0 = {+ instancePath,+ schemaPath: '#/anyOf',+ keyword: 'anyOf',+ params: {},+ message: 'must match a schema in anyOf',+ }+ if (vErrors === null) {+ vErrors = [err0]+ } else {+ vErrors.push(err0)+ }+ errors+++ validate142.errors = vErrors+ return false+ } else {+ errors = _errs0+ if (vErrors !== null) {+ if (_errs0) {+ vErrors.length = _errs0+ } else {+ vErrors = null+ }+ }+ }+ validate142.errors = vErrors+ return errors === 0+}+function validate141(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (Array.isArray(data)) {+ var valid0 = true+ const len0 = data.length+ for (let i0 = 0; i0 < len0; i0++) {+ const _errs1 = errors+ if (+ !validate142(data[i0], {+ instancePath: instancePath + '/' + i0,+ parentData: data,+ parentDataProperty: i0,+ rootData,+ })+ ) {+ vErrors = vErrors === null ? validate142.errors : vErrors.concat(validate142.errors)+ errors = vErrors.length+ }+ var valid0 = _errs1 === errors+ if (!valid0) {+ break+ }+ }+ } else {+ validate141.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'array' },+ message: 'must be array',+ },+ ]+ return false+ }+ }+ validate141.errors = vErrors+ return errors === 0+}+export const CompareFilter = validate148+const schema130 = {+ additionalProperties: false,+ properties: {+ compare: {+ default: false,+ description: 'Whether to compare the current date range to a previous date range.',+ type: 'boolean',+ },+ compare_to: {+ description:+ 'The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.',+ type: 'string',+ },+ },+ type: 'object',+}+function validate148(data, { instancePath = '', parentData, parentDataProperty, rootData = data } = {}) {+ let vErrors = null+ let errors = 0+ if (errors === 0) {+ if (data && typeof data == 'object' && !Array.isArray(data)) {+ const _errs1 = errors+ for (const key0 in data) {+ if (!(key0 === 'compare' || key0 === 'compare_to')) {+ validate148.errors = [+ {+ instancePath,+ schemaPath: '#/additionalProperties',+ keyword: 'additionalProperties',+ params: { additionalProperty: key0 },+ message: 'must NOT have additional properties',+ },+ ]+ return false+ break+ }+ }+ if (_errs1 === errors) {+ if (data.compare !== undefined) {+ const _errs2 = errors+ if (typeof data.compare !== 'boolean') {+ validate148.errors = [+ {+ instancePath: instancePath + '/compare',+ schemaPath: '#/properties/compare/type',+ keyword: 'type',+ params: { type: 'boolean' },+ message: 'must be boolean',+ },+ ]+ return false+ }+ var valid0 = _errs2 === errors+ } else {+ var valid0 = true+ }+ if (valid0) {+ if (data.compare_to !== undefined) {+ const _errs4 = errors+ if (typeof data.compare_to !== 'string') {+ validate148.errors = [+ {+ instancePath: instancePath + '/compare_to',+ schemaPath: '#/properties/compare_to/type',+ keyword: 'type',+ params: { type: 'string' },+ message: 'must be string',+ },+ ]+ return false+ }+ var valid0 = _errs4 === errors+ } else {+ var valid0 = true+ }+ }+ }+ } else {+ validate148.errors = [+ {+ instancePath,+ schemaPath: '#/type',+ keyword: 'type',+ params: { type: 'object' },+ message: 'must be object',+ },+ ]+ return false+ }+ }+ validate148.errors = vErrors+ return errors === 0+}diff --git a/frontend/src/scenes/insights/insightSceneLogic.tsx b/frontend/src/scenes/insights/insightSceneLogic.tsxindex 5f5b2731b415..0c5a33a842fd 100644--- a/frontend/src/scenes/insights/insightSceneLogic.tsx+++ b/frontend/src/scenes/insights/insightSceneLogic.tsx@@ -12,7 +12,6 @@ import {} from 'kea'import type { BreakPointFunction } from 'kea'import { combineUrl, router, urlToAction } from 'kea-router'-import { objectsEqual } from 'kea-test-utils'import posthog from 'posthog-js'import api from 'lib/api'@@ -21,6 +20,7 @@ import { preflightLogic } from 'lib/logic/preflightLogic'import { trackedActionToUrl } from 'lib/logic/scenes/trackedActionToUrl'import { InsightEventSource, sanitizeQuery } from 'lib/utils/eventUsageLogic'import { isEmptyObject, isObject } from 'lib/utils/guards'+import { objectsEqual } from 'lib/utils/objects'import { analyticsBackLink } from 'scenes/analytics/analyticsBackLink'import { isDashboardFilterOverrideEmpty } from 'scenes/dashboard/dashboardFilterEmpty'import {diff --git a/frontend/src/scenes/max/maxBillingContextLogic.tsx b/frontend/src/scenes/max/maxBillingContextLogic.tsxindex a53cf36a69ff..d5c3de8f38f6 100644--- a/frontend/src/scenes/max/maxBillingContextLogic.tsx+++ b/frontend/src/scenes/max/maxBillingContextLogic.tsx@@ -1,10 +1,10 @@import { MakeLogicType, connect, kea, path, selectors } from 'kea'-import { objectsEqual } from 'kea-test-utils'import { dayjs } from 'lib/dayjs'import { billingLogic } from 'lib/logic/billing/billingLogic'import { isUsageAtOrOverLimit } from 'lib/logic/billing/usageLimits'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'+import { objectsEqual } from 'lib/utils/objects'import { isAddonVisible } from 'scenes/billing/billing-utils'import { BillingSpendResponse, billingSpendLogic } from 'scenes/billing/billingSpendLogic'import { BillingUsageResponse, billingUsageLogic } from 'scenes/billing/billingUsageLogic'diff --git a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsxindex 3d02cc494f26..0297b7338b7e 100644--- a/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx+++ b/frontend/src/scenes/session-recordings/player/inspector/PlayerInspectorList.tsx@@ -1,6 +1,6 @@import './PlayerInspectorList.scss'-import { range } from 'd3'+import { range } from 'd3-array'import { useActions, useValues } from 'kea'import { CSSProperties, useCallback, useEffect, useRef } from 'react'import { List, useDynamicRowHeight, useListRef } from 'react-window'diff --git a/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts b/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.tsindex 80fadfcfa317..65b82cdafcea 100644--- a/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts+++ b/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts@@ -15,7 +15,6 @@ import {} from 'kea'import { router, urlToAction } from 'kea-router'import { subscriptions } from 'kea-subscriptions'-import { delay } from 'kea-test-utils'import posthog from 'posthog-js'import { ReplayPlugin, Replayer, playerConfig } from 'posthog-js/rrweb'import { EventType, IncrementalSource, eventWithTime } from 'posthog-js/rrweb-types'@@ -40,6 +39,7 @@ import { dayjs, now } from 'lib/dayjs'import { featureFlagLogic } from 'lib/logic/featureFlagLogic'import { preflightLogic } from 'lib/logic/preflightLogic'import { findLastIndex } from 'lib/utils/arrays'+import { delay } from 'lib/utils/async'import { downloadFile } from 'lib/utils/dom'import { clamp } from 'lib/utils/numbers'import { objectsEqual } from 'lib/utils/objects'diff --git a/frontend/src/scenes/web-analytics/botAnalyticsLogic.ts b/frontend/src/scenes/web-analytics/botAnalyticsLogic.tsindex a9b473868b51..093c4af0265f 100644--- a/frontend/src/scenes/web-analytics/botAnalyticsLogic.ts+++ b/frontend/src/scenes/web-analytics/botAnalyticsLogic.ts@@ -5,7 +5,6 @@ import { isNotNil } from 'lib/utils/guards'import { removeProjectIdIfPresent, stripTrailingSlash } from 'lib/utils/kea-router'import { objectsEqual } from 'lib/utils/objects'-import { isWebAnalyticsPropertyFilters } from '~/queries/schema-guards'import {EventsNode,GroupNode,@@ -15,6 +14,7 @@ import {WebBotsBreakdown,WebAnalyticsPropertyFilters,} from '~/queries/schema/schema-general'+import { isWebAnalyticsPropertyFilters } from '~/queries/web-analytics-schema-guards'import {BaseMathType,BreakdownType,diff --git a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsxindex 439f4245d07c..97edec04d00b 100644--- a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx+++ b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx@@ -50,7 +50,6 @@ import { userLogic } from 'scenes/userLogic'import { dataNodeCollectionLogic } from '~/queries/nodes/DataNode/dataNodeCollectionLogic'import { WEB_VITALS_COLORS, WEB_VITALS_THRESHOLDS } from '~/queries/nodes/WebVitals/definitions'import { hogqlQuery } from '~/queries/query'-import { isCompareFilter, isWebAnalyticsPropertyFilters } from '~/queries/schema-guards'import {ActionConversionGoal,ActionsNode,@@ -73,6 +72,7 @@ import {WebStatsTableQuery,WebVitalsMetric,} from '~/queries/schema/schema-general'+import { isCompareFilter, isWebAnalyticsPropertyFilters } from '~/queries/web-analytics-schema-guards'import {AvailableFeature,BaseMathType,diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex f3952c31a8d6..8bea95d26c58 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1047,6 +1047,9 @@ importers:d3:specifier: ^7.9.0version: 7.9.0+ d3-array:+ specifier: ^3.2.4+ version: 3.2.4d3-flame-graph:specifier: ^5.0.0version: 5.0.0@@ -1348,6 +1351,9 @@ importers:'@types/d3':specifier: ^7.4.3version: 7.4.3+ '@types/d3-array':+ specifier: ^3.2.1+ version: 3.2.2'@types/d3-selection':specifier: 3.0.3version: 3.0.3@@ -4718,6 +4724,9 @@ importers:'@types/d3':specifier: '*'version: 7.4.3+ '@types/d3-array':+ specifier: '*'+ version: 3.2.2'@types/react':specifier: 18.3.27version: 18.3.27@@ -4736,6 +4745,9 @@ importers:d3:specifier: '*'version: 7.9.0+ d3-array:+ specifier: '*'+ version: 3.2.4elkjs:specifier: '*'version: 0.10.0@@ -13588,9 +13600,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==}- '@types/[email protected]':- resolution: {integrity: sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==}-'@types/[email protected]':resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==}@@ -33462,8 +33471,6 @@ snapshots:dependencies:'@types/node': 22.18.8- '@types/[email protected]': {}-'@types/[email protected]': {}'@types/[email protected]':@@ -33592,7 +33599,7 @@ snapshots:'@types/[email protected]':dependencies:- '@types/d3-array': 3.0.3+ '@types/d3-array': 3.2.2'@types/d3-axis': 3.0.1'@types/d3-brush': 3.0.1'@types/d3-chord': 3.0.1diff --git a/products/product_analytics/frontend/insights/retention/retentionLogic.ts b/products/product_analytics/frontend/insights/retention/retentionLogic.tsindex c431b7dd759e..dd3552beda7b 100644--- a/products/product_analytics/frontend/insights/retention/retentionLogic.ts+++ b/products/product_analytics/frontend/insights/retention/retentionLogic.ts@@ -1,4 +1,4 @@-import { mean, sum } from 'd3'+import { mean, sum } from 'd3-array'import { MakeLogicType, actions, connect, events, kea, key, listeners, path, props, reducers, selectors } from 'kea'import { DataColorTheme, DataColorToken } from 'lib/colors'diff --git a/products/product_analytics/package.json b/products/product_analytics/package.jsonindex 71a786267031..9043ebc06f90 100644--- a/products/product_analytics/package.json+++ b/products/product_analytics/package.json@@ -27,12 +27,14 @@"@posthog/icons": "catalog:","@posthog/quill-components": "workspace:*","@types/d3": "*",+ "@types/d3-array": "*","@types/react": "*","@types/react-dom": "*","@types/react-simple-maps": "*","@xyflow/react": "*","clsx": "*","d3": "*",+ "d3-array": "*","elkjs": "*","fuse.js": "*","natural-orderby": "*",