@ahoo-wang/wow-view-engine 9.2.1 → 9.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +12 -2
  2. package/README.zh-CN.md +12 -2
  3. package/dist/{actions-CCMywJ9Z.js → actions-HgK33Jzg.js} +1816 -1764
  4. package/dist/actions-HgK33Jzg.js.map +1 -0
  5. package/dist/analysis/queryFilter.d.ts.map +1 -1
  6. package/dist/{clickDraft-ha-JMs8X.js → clickDraft-CLkSgQNG.js} +2 -2
  7. package/dist/{clickDraft-ha-JMs8X.js.map → clickDraft-CLkSgQNG.js.map} +1 -1
  8. package/dist/filter/compile.d.ts.map +1 -1
  9. package/dist/filter/describe.d.ts.map +1 -1
  10. package/dist/filter/fieldKind.d.ts +10 -0
  11. package/dist/filter/fieldKind.d.ts.map +1 -1
  12. package/dist/filter/index.d.ts +1 -0
  13. package/dist/filter/index.d.ts.map +1 -1
  14. package/dist/filter/kinds/enum.d.ts.map +1 -1
  15. package/dist/filter/read.d.ts +17 -0
  16. package/dist/filter/read.d.ts.map +1 -0
  17. package/dist/filter/validate.d.ts.map +1 -1
  18. package/dist/index.js +43 -43
  19. package/dist/index.js.map +1 -1
  20. package/dist/{react-Cq_EFiHY.js → react-2oicrdUx.js} +774 -774
  21. package/dist/{react-Cq_EFiHY.js.map → react-2oicrdUx.js.map} +1 -1
  22. package/dist/react.js +2 -2
  23. package/dist/runtime/actionReads.d.ts +20 -0
  24. package/dist/runtime/actionReads.d.ts.map +1 -0
  25. package/dist/runtime/admission.d.ts +13 -5
  26. package/dist/runtime/admission.d.ts.map +1 -1
  27. package/dist/runtime/failure/issueReport.d.ts +2 -0
  28. package/dist/runtime/failure/issueReport.d.ts.map +1 -1
  29. package/dist/runtime/resources.d.ts +14 -0
  30. package/dist/runtime/resources.d.ts.map +1 -1
  31. package/dist/runtime/runtimeFactory.d.ts +13 -1
  32. package/dist/runtime/runtimeFactory.d.ts.map +1 -1
  33. package/dist/runtime/viewEngine.d.ts.map +1 -1
  34. package/dist/testing.js +39 -32
  35. package/dist/testing.js.map +1 -1
  36. package/dist/ui/actions/ActionSurface.d.ts.map +1 -1
  37. package/dist/ui/kit/focus.d.ts +34 -0
  38. package/dist/ui/kit/focus.d.ts.map +1 -1
  39. package/dist/ui/kit/popups.d.ts +11 -3
  40. package/dist/ui/kit/popups.d.ts.map +1 -1
  41. package/dist/ui/messages/actions.d.ts +1 -0
  42. package/dist/ui/messages/actions.d.ts.map +1 -1
  43. package/dist/ui/messages/definition.d.ts +1 -0
  44. package/dist/ui/messages/definition.d.ts.map +1 -1
  45. package/dist/ui/messages/en.d.ts +2 -0
  46. package/dist/ui/messages/en.d.ts.map +1 -1
  47. package/dist/ui/messages/zh-CN.d.ts.map +1 -1
  48. package/dist/ui/workbench/ViewEngineProvider.d.ts.map +1 -1
  49. package/dist/ui.js +8353 -8277
  50. package/dist/ui.js.map +1 -1
  51. package/dist/{viewRuntimeTypes-m9IzLozY.js → viewRuntimeTypes-JEPw0nsg.js} +1241 -1121
  52. package/dist/viewRuntimeTypes-JEPw0nsg.js.map +1 -0
  53. package/package.json +6 -6
  54. package/dist/actions-CCMywJ9Z.js.map +0 -1
  55. package/dist/viewRuntimeTypes-m9IzLozY.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"queryFilter.d.ts","sourceRoot":"","sources":["../../src/analysis/queryFilter.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,eAAe,EAEf,UAAU,EACV,KAAK,EACL,SAAS,EACT,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;GAQG;AACH,iFAAiF;AACjF,KAAK,mBAAmB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAahD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,EAAE,CAclE"}
1
+ {"version":3,"file":"queryFilter.d.ts","sourceRoot":"","sources":["../../src/analysis/queryFilter.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,eAAe,EAEf,UAAU,EACV,KAAK,EACL,SAAS,EACT,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EASL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;GAQG;AACH,iFAAiF;AACjF,KAAK,mBAAmB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAahD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,EAAE,CAclE"}
@@ -1,4 +1,4 @@
1
- import { Ht as e, Ot as t, St as n, Zr as r, an as i, ki as a, wt as o, xt as s } from "./actions-CCMywJ9Z.js";
1
+ import { Ht as e, Ot as t, St as n, Zr as r, an as i, ki as a, wt as o, xt as s } from "./actions-HgK33Jzg.js";
2
2
  //#region src/filter/fieldGroups.ts
3
3
  function c(e, t, n) {
4
4
  let r = /* @__PURE__ */ new Map();
@@ -181,4 +181,4 @@ function O(e, t) {
181
181
  //#endregion
182
182
  export { E as a, w as c, l as d, m as f, b as i, x as l, c as m, C as n, T as o, h as p, D as r, S as s, y as t, v as u };
183
183
 
184
- //# sourceMappingURL=clickDraft-ha-JMs8X.js.map
184
+ //# sourceMappingURL=clickDraft-CLkSgQNG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clickDraft-ha-JMs8X.js","names":["FieldGroupDefinition","FieldGroup","group","items","T","fieldGroups","groups","key","item","groupOf","Map","field","fields","has","set","grouped","ungrouped","name","push","listed","length","undefined","own","get","delete","RecordData","recordValue","ExportColumn","field","label","ExportFormat","value","column","C","CSV_BOM","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","CsvOptions","neutralizeFormulas","CsvCell","text","serializeCsv","rows","columns","format","options","writeCsv","map","row","header","neutralize","cell","csvField","lines","push","line","join","written","String","evaluable","test","split","readInstant","CartesianData","BucketChange","delta","ratio","bucketChange","data","key","index","timeline","undefined","at","points","before","x","value","values","was","Math","abs","BoardValueSource","DashboardField","DashboardViewConfig","FieldDefinition","PanelClick","boardFilterChoices","boardValueChoices","fillUrl","urlPlaceholders","PressableGroup","filtersOf","tabsOf","ClickChoice","ClickGoKind","CLICK_GO_KINDS","ClickDraft","choice","filter","goKind","view","url","board","values","Record","tab","clickDraftOf","stored","filters","blank","kind","includes","instanceId","withBoard","draft","urlFillable","template","Object","fromEntries","map","key","MappingSources","groups","fields","own","boardValueSources","group","dimension","field","name","valueSourceKey","source","mappedValues","Readonly","sources","kept","stale","byName","Map","entries","get","usable","some","push","label","draftedClick","undefined","boardTab","trim","clickDraftGaps","going","Pick","entry","id","filtersOf","urlPlaceholders","boardValueChoices","recordValue","tabsOf","readInstant","fillUrl","boardFilterChoices","fieldGroups","groupOf","group","groups","field","grouped","ungrouped","item","items","name","key","listed","own","CSV_BOM","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","serializeCsv","writeCsv","columns","column","rows","value","row","format","options","neutralize","csvField","cell","lines","header","label","line","written","text","evaluable","bucketChange","data","index","at","before","was","delta","CLICK_GO_KINDS","clickDraftOf","blank","filters","stored","withBoard","board","draft","urlFillable","template","boardValueSources","filter","fields","valueSourceKey","source","mappedValues","byName","kept","stale","values","sources","choice","draftedClick","boardTab","clickDraftGaps","going","tab","entry"],"sources":["../src/filter/fieldGroups.ts","../src/record/export.ts","../src/analysis/bucketChange.ts","../src/dashboard/clickDraft.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FieldGroupDefinition } from '../model/index.js';\n\n/** One group of a picker: its label, or none for the fields outside any. */\nexport interface FieldGroup<T> {\n group: FieldGroupDefinition | undefined;\n items: T[];\n}\n\n/**\n * Fields as a picker lists them: the ones no group lists first, in the\n * field list's order, then each declared group in the definition's order,\n * each in its own `fields` order. A picker often lists a subset — the fields\n * not yet a condition, the ones a column can show — so a group none of the\n * items belong to is not shown. A field two groups list, or one group lists\n * twice, is kept where it was listed first; admission reports that as a\n * definition error, so it is never the picker's to guess.\n */\nexport function fieldGroups<T>(\n items: readonly T[],\n groups: readonly FieldGroupDefinition[],\n key: (item: T) => string,\n): FieldGroup<T>[] {\n const groupOf = new Map<string, FieldGroupDefinition>();\n for (const group of groups)\n for (const field of group.fields)\n if (!groupOf.has(field)) groupOf.set(field, group);\n\n const grouped = new Map<string, T>();\n const ungrouped: T[] = [];\n for (const item of items) {\n const name = key(item);\n if (groupOf.has(name)) grouped.set(name, item);\n else ungrouped.push(item);\n }\n\n const listed: FieldGroup<T>[] = [];\n if (ungrouped.length > 0) listed.push({ group: undefined, items: ungrouped });\n for (const group of groups) {\n const own: T[] = [];\n for (const field of group.fields) {\n const item = grouped.get(field);\n if (item !== undefined && groupOf.get(field) === group) {\n own.push(item);\n grouped.delete(field);\n }\n }\n if (own.length > 0) listed.push({ group, items: own });\n }\n return listed;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RecordData } from '../model/index.js';\nimport { recordValue } from './project.js';\n\n/** The least an export needs of a column: where to read it, what to call it. */\nexport interface ExportColumn {\n /** A Wow query path, read the way a cell reads it. */\n field: string;\n /** What the header row calls this column. */\n label: string;\n}\n\n/**\n * How one value is written.\n *\n * It is injected rather than decided here, because how a value *reads* is the\n * UI's answer — an enum by its label, a time in the surface's zone, a number\n * in its field's format — and this layer has no catalogue, no locale and no\n * renderers. The column rides along with the value, so one formatter serves\n * every column of the table.\n */\nexport type ExportFormat<C extends ExportColumn = ExportColumn> = (\n value: unknown,\n column: C,\n) => string;\n\n/**\n * The byte order mark Excel needs to read a UTF-8 CSV as UTF-8.\n *\n * Without it Excel on Windows reads the file in the machine's ANSI code page\n * and every Chinese name in it arrives as mojibake — which is most of what\n * these exports carry.\n */\nexport const CSV_BOM = '';\n\n/** RFC 4180 ends every record with CRLF, the last one included. */\nconst CRLF = '\\r\\n';\n\n/** The characters that oblige a field to be quoted, the quote included. */\nconst MUST_QUOTE = /[\"\\r\\n,]/;\n\n/**\n * What a spreadsheet may read a cell as a formula by: its first character\n * (OWASP, CSV Injection). `=`, `+`, `-` and `@` start a formula or a\n * function; a tab or a carriage return in front hides one from a reader who\n * trims.\n */\nconst FORMULA_START = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text that is a number and nothing else: a sign, digits, one decimal\n * point, an exponent. No separators, no currency, no spaces — nothing a\n * spreadsheet could read as more than one number.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?$/;\n\n/** How a CSV is written. */\nexport interface CsvOptions {\n /**\n * Whether a cell a spreadsheet could evaluate is written with an\n * apostrophe in front, so it opens as the text it is. On unless set to\n * `false`.\n *\n * A file leaves the page: it is opened in Excel, often by someone other\n * than whoever exported it, and a value somebody typed into a text field\n * — `=HYPERLINK(…)`, `=cmd|' /C calc'!A0` — would run there as a formula\n * (OWASP, CSV Injection). So every cell whose text starts with `=`, `+`,\n * `-`, `@`, a tab or a carriage return gets a leading `'`, the header's\n * labels included, since a definition names them.\n *\n * Two kinds of cell are left alone, because a spreadsheet reads them as a\n * number and never as a formula: one whose value was a number (a negative\n * amount, however its field formats it — `-1,204.50`, `-$12.00`), and one\n * whose text is a plain number (`-12.5` held by a text field). Prefixing\n * either would only make the file differ from the screen.\n *\n * Turn it off only where the file never reaches a spreadsheet — a\n * pipeline that reads the CSV back as data and wants the text as stored.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** One cell of a file: the value it was read from, and the text it reads as. */\nexport interface CsvCell {\n /** What the row held; only its type is looked at: a number is never a formula. */\n value: unknown;\n /** The text written, before any escaping. */\n text: string;\n}\n\n/**\n * The rows as a CSV, RFC 4180 with a BOM in front.\n *\n * The header is the labels of the columns handed over, in the order they are\n * handed over — which is the projected order of the visible columns, so the\n * file carries the table's columns rather than the definition's fields.\n *\n * Nothing here looks at what a value *means*: `format` has already decided\n * that, and what is left is writing it (`writeCsv`) — the escaping, and the\n * formulas neutralized unless `options` says otherwise (`CsvOptions`).\n */\nexport function serializeCsv<C extends ExportColumn>(\n rows: readonly RecordData[],\n columns: readonly C[],\n format: ExportFormat<C>,\n options: CsvOptions = {},\n): string {\n return writeCsv(\n columns.map(column => column.label),\n rows.map(row =>\n columns.map(column => {\n const value = recordValue(row, column.field);\n return { value, text: format(value, column) };\n }),\n ),\n options,\n );\n}\n\n/**\n * Cells already read, as a CSV: the one writer every export goes through —\n * a record view's rows (`serializeCsv`) and an analysis's groups alike — so\n * the escaping and the formula rule (`CsvOptions.neutralizeFormulas`) are\n * one rule rather than one per export.\n */\nexport function writeCsv(\n header: readonly string[],\n rows: readonly (readonly CsvCell[])[],\n options: CsvOptions = {},\n): string {\n const neutralize = options.neutralizeFormulas !== false;\n const field = (cell: CsvCell) => csvField(cell, neutralize);\n const lines = [header.map(label => field({ value: label, text: label }))];\n for (const row of rows) lines.push(row.map(field));\n return `${CSV_BOM}${lines.map(line => line.join(',')).join(CRLF)}${CRLF}`;\n}\n\n/**\n * One field: neutralized where a spreadsheet could evaluate it, then quoted\n * where it has to be.\n *\n * The text is typed as a string, but it comes from a function a host may\n * have written, so it is coerced rather than trusted: `null` written into\n * the file as the word `null` is a value the table never showed.\n */\nfunction csvField({ value, text }: CsvCell, neutralize: boolean): string {\n let written = typeof text === 'string' ? text : String(text ?? '');\n if (neutralize && evaluable(value, written)) written = `'${written}`;\n return MUST_QUOTE.test(written)\n ? `\"${written.split('\"').join('\"\"')}\"`\n : written;\n}\n\n/** Whether a spreadsheet opening this cell could evaluate it (`CsvOptions`). */\nfunction evaluable(value: unknown, text: string): boolean {\n if (typeof value === 'number' || typeof value === 'bigint') return false;\n return FORMULA_START.test(text) && !PLAIN_NUMBER.test(text);\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readInstant } from '../filter/index.js';\nimport type { CartesianData } from './chart.js';\n\n/**\n * How one bucket's number moved from the bucket right before it: the\n * difference, and that difference as a share of the earlier number — `null`\n * where the earlier number is 0, which no share can be taken of.\n */\nexport interface BucketChange {\n delta: number;\n ratio: number | null;\n}\n\n/**\n * The change of series `key` at point `index` from the point before it, on\n * a time axis whose points are consecutive buckets (`CartesianData.timeline`)\n * — the tooltip's 「较上一期」 (docs/design/decisions.md D33, Q59).\n *\n * It asks for nothing the rows do not hold: both numbers are the chart's own,\n * so there is no second query. And it says nothing it cannot know: not on a\n * category axis, where the point before is no earlier period; not on a time\n * axis with a bucket skipped; not for the first bucket, nor for the missing\n * value's bucket or the one after it; and not where either number is missing\n * — a hole the kernel could not tell was empty, or `missing: 'gap'`. A 0 the\n * kernel filled in is a known 0 (`absenceReader`), and is compared like any.\n */\nexport function bucketChange(\n data: CartesianData,\n key: string,\n index: number,\n): BucketChange | undefined {\n if (data.timeline !== true || index < 1) return undefined;\n const at = data.points[index];\n const before = data.points[index - 1];\n if (!at || !before || !readInstant(at.x) || !readInstant(before.x))\n return undefined;\n const value = at.values[key];\n const was = before.values[key];\n if (typeof value !== 'number' || typeof was !== 'number') return undefined;\n const delta = value - was;\n return { delta, ratio: was === 0 ? null : delta / Math.abs(was) };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * 「点击时…」 as the author fills it in (D22 I, D23 Q17): every choice the\n * form holds at once — the ones not picked kept, so switching back finds\n * what was typed — and the click they make, or why they make none yet.\n * Pure: the form holds a `ClickDraft` and asks here what it says.\n */\n\nimport type {\n BoardValueSource,\n DashboardField,\n DashboardViewConfig,\n FieldDefinition,\n PanelClick,\n} from '../model/index.js';\nimport {\n boardFilterChoices,\n boardValueChoices,\n fillUrl,\n urlPlaceholders,\n type PressableGroup,\n} from './click.js';\nimport { filtersOf } from './filters.js';\nimport { tabsOf } from './panels.js';\n\n/** The three things a press can do: the follow-up menu, a filter, a destination. */\nexport type ClickChoice = 'menu' | 'filter' | 'go';\n\n/** Where a destination goes: a saved view, another board, a page. */\nexport type ClickGoKind = 'view' | 'dashboard' | 'url';\n\nexport const CLICK_GO_KINDS: readonly ClickGoKind[] = [\n 'view',\n 'dashboard',\n 'url',\n];\n\n/** Everything 「点击时…」 holds, each choice's own part kept while another is picked. */\nexport interface ClickDraft {\n choice: ClickChoice;\n /** The board filter a press sets, by name. */\n filter: string;\n goKind: ClickGoKind;\n /** The saved view a press opens; `''` while none is picked. */\n view: string;\n /** The page a press opens, as typed. */\n url: string;\n /** The board a press opens; `''` while none is picked. */\n board: string;\n /** What each of that board's filters takes. */\n values: Record<string, BoardValueSource>;\n /** The tab it opens on (D39); `''` for where its reader last read it. */\n tab: string;\n}\n\n/**\n * The form as it opens on a panel's stored click. `filters` are the names\n * of the board filters a press on this panel can set: a stored filter no\n * longer among them starts at the first that is.\n */\nexport function clickDraftOf(\n stored: PanelClick | null,\n filters: readonly string[],\n): ClickDraft {\n const blank: ClickDraft = {\n choice: 'go',\n filter: filters[0] ?? '',\n goKind: 'view',\n view: '',\n url: '',\n board: '',\n values: {},\n tab: '',\n };\n if (stored === null) return { ...blank, choice: 'menu' };\n switch (stored.kind) {\n case 'filter':\n return filters.includes(stored.filter)\n ? { ...blank, choice: 'filter', filter: stored.filter }\n : { ...blank, choice: 'filter' };\n case 'view':\n return { ...blank, view: stored.instanceId };\n case 'url':\n return { ...blank, goKind: 'url', url: stored.url };\n case 'dashboard':\n return {\n ...blank,\n goKind: 'dashboard',\n board: stored.instanceId,\n values: stored.values,\n tab: stored.tab ?? '',\n };\n }\n}\n\n/**\n * Another board picked for the destination: nothing mapped for the board\n * it replaces carries over by name, since its filters are other filters.\n */\nexport function withBoard(draft: ClickDraft, board: string): ClickDraft {\n return board === draft.board\n ? draft\n : { ...draft, board, values: {}, tab: '' };\n}\n\n/**\n * Whether a URL template fills into a URL a board may open whatever its\n * placeholders hold (`fillUrl`).\n */\nexport function urlFillable(template: string): boolean {\n return (\n fillUrl(\n template,\n Object.fromEntries(urlPlaceholders(template).map(key => [key, 'x'])),\n ) !== null\n );\n}\n\n/** What a mapping can draw on: the panel's dimensions and this board's filters. */\nexport interface MappingSources {\n groups: readonly PressableGroup[];\n fields: readonly FieldDefinition[] | null;\n own: readonly DashboardField[];\n}\n\n/**\n * Every source one of another board's filters can take its value from,\n * this panel's dimensions first (`boardValueChoices`), then this board's\n * filters (`boardFilterChoices`).\n */\nexport function boardValueSources(\n filter: DashboardField,\n { groups, fields, own }: MappingSources,\n): BoardValueSource[] {\n return [\n ...boardValueChoices(filter, groups, fields).map(group => ({\n dimension: group.field,\n })),\n ...boardFilterChoices(filter, own).map(field => ({ filter: field.name })),\n ];\n}\n\n/** One source as a key: `dimension:<field>` or `filter:<name>`. */\nexport function valueSourceKey(source: BoardValueSource): string {\n return 'dimension' in source\n ? `dimension:${source.dimension}`\n : `filter:${source.filter}`;\n}\n\n/**\n * What a press takes to the board (D23 Q17), from what the author chose:\n * each of the board's filters mapped to a source that can still give it a\n * value — a dimension of this panel, or a filter of this board's, of a type\n * it takes. Whatever else was stored (a filter gone on either board, a\n * dimension gone) is left out, and named in `stale` by the filter's label.\n * Never guessed by name: a filter the author did not map is not carried.\n */\nexport function mappedValues(\n board: DashboardViewConfig,\n values: Readonly<Record<string, BoardValueSource>>,\n sources: MappingSources,\n): { kept: Record<string, BoardValueSource>; stale: string[] } {\n const byName = new Map(filtersOf(board).map(filter => [filter.name, filter]));\n const kept: Record<string, BoardValueSource> = {};\n const stale: string[] = [];\n for (const [name, source] of Object.entries(values)) {\n const filter = byName.get(name);\n const usable =\n filter &&\n boardValueSources(filter, sources).some(\n choice => valueSourceKey(choice) === valueSourceKey(source),\n );\n if (usable) kept[name] = source;\n else stale.push(filter?.label ?? name);\n }\n return { kept, stale };\n}\n\n/**\n * The click a draft makes: `null` for the follow-up menu, `undefined`\n * while the choice picked still lacks what it needs — no filter, no view,\n * no board read yet (`board` is the destination board's config once read),\n * or a URL no board may open. A board's mapping is kept only where it still\n * holds (`mappedValues`).\n */\nexport function draftedClick(\n draft: ClickDraft,\n board: DashboardViewConfig | undefined,\n sources: MappingSources,\n): PanelClick | null | undefined {\n if (draft.choice === 'menu') return null;\n if (draft.choice === 'filter')\n return draft.filter ? { kind: 'filter', filter: draft.filter } : undefined;\n switch (draft.goKind) {\n case 'view':\n return draft.view ? { kind: 'view', instanceId: draft.view } : undefined;\n case 'dashboard':\n return board\n ? {\n kind: 'dashboard',\n instanceId: draft.board,\n values: mappedValues(board, draft.values, sources).kept,\n // Only a tab the board still has (D39): one gone since the\n // click was set is dropped here, as a stale mapping is.\n ...(boardTab(board, draft.tab) ? { tab: draft.tab } : {}),\n }\n : undefined;\n case 'url':\n return urlFillable(draft.url)\n ? { kind: 'url', url: draft.url.trim() }\n : undefined;\n }\n}\n\n/**\n * What a destination still lacks, said at its field once 完成 was pressed\n * without it: no view picked, a URL no board may open, no board picked.\n */\nexport function clickDraftGaps(draft: ClickDraft): {\n view: boolean;\n url: boolean;\n board: boolean;\n} {\n const going = draft.choice === 'go';\n return {\n view: going && draft.goKind === 'view' && !draft.view,\n url: going && draft.goKind === 'url' && !urlFillable(draft.url),\n board: going && draft.goKind === 'dashboard' && !draft.board,\n };\n}\n\n/**\n * Whether `tab` names one of the board's tabs — the one a press opens it on\n * (D39); `''` names none.\n */\nfunction boardTab(\n board: Pick<DashboardViewConfig, 'tabs'>,\n tab: string | undefined,\n): boolean {\n return !!tab && tabsOf(board).some(entry => entry.id === tab);\n}\n"],"mappings":";;AA8BA,SAAgBK,EACdF,GACAG,GACAC,GACiB;CACjB,IAAME,oBAAU,IAAIC,IAAkC;CACtD,KAAK,IAAMR,KAASI,GAClB,KAAK,IAAMK,KAAST,EAAMU,QACxB,AAAKH,EAAQI,IAAIF,CAAK,KAAGF,EAAQK,IAAIH,GAAOT,CAAK;CAErD,IAAMa,oBAAU,IAAIL,IAAe,GAC7BM,IAAiB,CAAA;CACvB,KAAK,IAAMR,KAAQL,GAAO;EACxB,IAAMc,IAAOV,EAAIC,CAAI;EACrB,AAAIC,EAAQI,IAAII,CAAI,IAAGF,EAAQD,IAAIG,GAAMT,CAAI,IACxCQ,EAAUE,KAAKV,CAAI;CAC1B;CAEA,IAAMW,IAA0B,CAAA;CAChC,AAAIH,EAAUI,SAAS,KAAGD,EAAOD,KAAK;EAAEhB,OAAOmB,KAAAA;EAAWlB,OAAOa;CAAU,CAAC;CAC5E,KAAK,IAAMd,KAASI,GAAQ;EAC1B,IAAMgB,IAAW,CAAA;EACjB,KAAK,IAAMX,KAAST,EAAMU,QAAQ;GAChC,IAAMJ,IAAOO,EAAQQ,IAAIZ,CAAK;GAC9B,AAAIH,MAASa,KAAAA,KAAaZ,EAAQc,IAAIZ,CAAK,MAAMT,MAC/CoB,EAAIJ,KAAKV,CAAI,GACbO,EAAQS,OAAOb,CAAK;EAExB;EACA,AAAIW,EAAIF,SAAS,KAAGD,EAAOD,KAAK;GAAEhB;GAAOC,OAAOmB;EAAI,CAAC;CACvD;CACA,OAAOH;AACT;;;ACjBA,IAAae,IAAU,KAGjBC,IAAO,QAGPC,IAAa,YAQbC,IAAgB,gBAOhBC,IAAe;AA+CrB,SAAgBK,EACdC,GACAC,GACAC,GACAC,IAAsB,CAAC,GACf;CACR,OAAOC,EACLH,EAAQI,KAAIjB,MAAUA,EAAOH,KAA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AEY,MAAM;EAAUZ,QAAQgB,EAAMhB;CAAO,IAAIgD,KAAAA;CACnE,QAAQhC,EAAMf,QAAd;EACE,KAAK,QACH,OAAOe,EAAMd,OAAO;GAAEU,MAAM;GAAQE,YAAYE,EAAMd;EAAK,IAAI8C,KAAAA;EACjE,KAAK,aACH,OAAO5C,IACH;GACEQ,MAAM;GACNE,YAAYE,EAAMZ;GAClBC,QAAQ6B,EAAa9B,GAAOY,EAAMX,QAAQ+B,CAAO,CAAC,CAACC;GAGnD,GAAIY,EAAS7C,GAAOY,EAAMT,GAAG,IAAI,EAAEA,KAAKS,EAAMT,IAAI,IAAI,CAAC;EACzD,IACAyC,KAAAA;EACN,KAAK,OACH,OAAO/B,EAAYD,EAAMb,GAAG,IACxB;GAAES,MAAM;GAAOT,KAAKa,EAAMb,IAAI+C,KAAK;EAAE,IACrCF,KAAAA;CACR;AACF;AAMA,SAAgBG,EAAenC,GAI7B;CACA,IAAMoC,IAAQpC,EAAMjB,WAAW;CAC/B,OAAO;EACLG,MAAMkD,KAASpC,EAAMf,WAAW,UAAU,CAACe,EAAMd;EACjDC,KAAKiD,KAASpC,EAAMf,WAAW,SAAS,CAACgB,EAAYD,EAAMb,GAAG;EAC9DC,OAAOgD,KAASpC,EAAMf,WAAW,eAAe,CAACe,EAAMZ;CACzD;AACF;AAMA,SAAS6C,EACP7C,GACAG,GACS;CACT,OAAO,CAAC,CAACA,KAAOb,EAAOU,CAAK,CAAC,CAACwC,MAAKU,MAASA,EAAMC,OAAOhD,CAAG;AAC9D"}
1
+ {"version":3,"file":"clickDraft-CLkSgQNG.js","names":["FieldGroupDefinition","FieldGroup","group","items","T","fieldGroups","groups","key","item","groupOf","Map","field","fields","has","set","grouped","ungrouped","name","push","listed","length","undefined","own","get","delete","RecordData","recordValue","ExportColumn","field","label","ExportFormat","value","column","C","CSV_BOM","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","CsvOptions","neutralizeFormulas","CsvCell","text","serializeCsv","rows","columns","format","options","writeCsv","map","row","header","neutralize","cell","csvField","lines","push","line","join","written","String","evaluable","test","split","readInstant","CartesianData","BucketChange","delta","ratio","bucketChange","data","key","index","timeline","undefined","at","points","before","x","value","values","was","Math","abs","BoardValueSource","DashboardField","DashboardViewConfig","FieldDefinition","PanelClick","boardFilterChoices","boardValueChoices","fillUrl","urlPlaceholders","PressableGroup","filtersOf","tabsOf","ClickChoice","ClickGoKind","CLICK_GO_KINDS","ClickDraft","choice","filter","goKind","view","url","board","values","Record","tab","clickDraftOf","stored","filters","blank","kind","includes","instanceId","withBoard","draft","urlFillable","template","Object","fromEntries","map","key","MappingSources","groups","fields","own","boardValueSources","group","dimension","field","name","valueSourceKey","source","mappedValues","Readonly","sources","kept","stale","byName","Map","entries","get","usable","some","push","label","draftedClick","undefined","boardTab","trim","clickDraftGaps","going","Pick","entry","id","filtersOf","urlPlaceholders","boardValueChoices","recordValue","tabsOf","readInstant","fillUrl","boardFilterChoices","fieldGroups","groupOf","group","groups","field","grouped","ungrouped","item","items","name","key","listed","own","CSV_BOM","CRLF","MUST_QUOTE","FORMULA_START","PLAIN_NUMBER","serializeCsv","writeCsv","columns","column","rows","value","row","format","options","neutralize","csvField","cell","lines","header","label","line","written","text","evaluable","bucketChange","data","index","at","before","was","delta","CLICK_GO_KINDS","clickDraftOf","blank","filters","stored","withBoard","board","draft","urlFillable","template","boardValueSources","filter","fields","valueSourceKey","source","mappedValues","byName","kept","stale","values","sources","choice","draftedClick","boardTab","clickDraftGaps","going","tab","entry"],"sources":["../src/filter/fieldGroups.ts","../src/record/export.ts","../src/analysis/bucketChange.ts","../src/dashboard/clickDraft.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { FieldGroupDefinition } from '../model/index.js';\n\n/** One group of a picker: its label, or none for the fields outside any. */\nexport interface FieldGroup<T> {\n group: FieldGroupDefinition | undefined;\n items: T[];\n}\n\n/**\n * Fields as a picker lists them: the ones no group lists first, in the\n * field list's order, then each declared group in the definition's order,\n * each in its own `fields` order. A picker often lists a subset — the fields\n * not yet a condition, the ones a column can show — so a group none of the\n * items belong to is not shown. A field two groups list, or one group lists\n * twice, is kept where it was listed first; admission reports that as a\n * definition error, so it is never the picker's to guess.\n */\nexport function fieldGroups<T>(\n items: readonly T[],\n groups: readonly FieldGroupDefinition[],\n key: (item: T) => string,\n): FieldGroup<T>[] {\n const groupOf = new Map<string, FieldGroupDefinition>();\n for (const group of groups)\n for (const field of group.fields)\n if (!groupOf.has(field)) groupOf.set(field, group);\n\n const grouped = new Map<string, T>();\n const ungrouped: T[] = [];\n for (const item of items) {\n const name = key(item);\n if (groupOf.has(name)) grouped.set(name, item);\n else ungrouped.push(item);\n }\n\n const listed: FieldGroup<T>[] = [];\n if (ungrouped.length > 0) listed.push({ group: undefined, items: ungrouped });\n for (const group of groups) {\n const own: T[] = [];\n for (const field of group.fields) {\n const item = grouped.get(field);\n if (item !== undefined && groupOf.get(field) === group) {\n own.push(item);\n grouped.delete(field);\n }\n }\n if (own.length > 0) listed.push({ group, items: own });\n }\n return listed;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RecordData } from '../model/index.js';\nimport { recordValue } from './project.js';\n\n/** The least an export needs of a column: where to read it, what to call it. */\nexport interface ExportColumn {\n /** A Wow query path, read the way a cell reads it. */\n field: string;\n /** What the header row calls this column. */\n label: string;\n}\n\n/**\n * How one value is written.\n *\n * It is injected rather than decided here, because how a value *reads* is the\n * UI's answer — an enum by its label, a time in the surface's zone, a number\n * in its field's format — and this layer has no catalogue, no locale and no\n * renderers. The column rides along with the value, so one formatter serves\n * every column of the table.\n */\nexport type ExportFormat<C extends ExportColumn = ExportColumn> = (\n value: unknown,\n column: C,\n) => string;\n\n/**\n * The byte order mark Excel needs to read a UTF-8 CSV as UTF-8.\n *\n * Without it Excel on Windows reads the file in the machine's ANSI code page\n * and every Chinese name in it arrives as mojibake — which is most of what\n * these exports carry.\n */\nexport const CSV_BOM = '';\n\n/** RFC 4180 ends every record with CRLF, the last one included. */\nconst CRLF = '\\r\\n';\n\n/** The characters that oblige a field to be quoted, the quote included. */\nconst MUST_QUOTE = /[\"\\r\\n,]/;\n\n/**\n * What a spreadsheet may read a cell as a formula by: its first character\n * (OWASP, CSV Injection). `=`, `+`, `-` and `@` start a formula or a\n * function; a tab or a carriage return in front hides one from a reader who\n * trims.\n */\nconst FORMULA_START = /^[=+\\-@\\t\\r]/;\n\n/**\n * A text that is a number and nothing else: a sign, digits, one decimal\n * point, an exponent. No separators, no currency, no spaces — nothing a\n * spreadsheet could read as more than one number.\n */\nconst PLAIN_NUMBER = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?$/;\n\n/** How a CSV is written. */\nexport interface CsvOptions {\n /**\n * Whether a cell a spreadsheet could evaluate is written with an\n * apostrophe in front, so it opens as the text it is. On unless set to\n * `false`.\n *\n * A file leaves the page: it is opened in Excel, often by someone other\n * than whoever exported it, and a value somebody typed into a text field\n * — `=HYPERLINK(…)`, `=cmd|' /C calc'!A0` — would run there as a formula\n * (OWASP, CSV Injection). So every cell whose text starts with `=`, `+`,\n * `-`, `@`, a tab or a carriage return gets a leading `'`, the header's\n * labels included, since a definition names them.\n *\n * Two kinds of cell are left alone, because a spreadsheet reads them as a\n * number and never as a formula: one whose value was a number (a negative\n * amount, however its field formats it — `-1,204.50`, `-$12.00`), and one\n * whose text is a plain number (`-12.5` held by a text field). Prefixing\n * either would only make the file differ from the screen.\n *\n * Turn it off only where the file never reaches a spreadsheet — a\n * pipeline that reads the CSV back as data and wants the text as stored.\n */\n neutralizeFormulas?: boolean;\n}\n\n/** One cell of a file: the value it was read from, and the text it reads as. */\nexport interface CsvCell {\n /** What the row held; only its type is looked at: a number is never a formula. */\n value: unknown;\n /** The text written, before any escaping. */\n text: string;\n}\n\n/**\n * The rows as a CSV, RFC 4180 with a BOM in front.\n *\n * The header is the labels of the columns handed over, in the order they are\n * handed over — which is the projected order of the visible columns, so the\n * file carries the table's columns rather than the definition's fields.\n *\n * Nothing here looks at what a value *means*: `format` has already decided\n * that, and what is left is writing it (`writeCsv`) — the escaping, and the\n * formulas neutralized unless `options` says otherwise (`CsvOptions`).\n */\nexport function serializeCsv<C extends ExportColumn>(\n rows: readonly RecordData[],\n columns: readonly C[],\n format: ExportFormat<C>,\n options: CsvOptions = {},\n): string {\n return writeCsv(\n columns.map(column => column.label),\n rows.map(row =>\n columns.map(column => {\n const value = recordValue(row, column.field);\n return { value, text: format(value, column) };\n }),\n ),\n options,\n );\n}\n\n/**\n * Cells already read, as a CSV: the one writer every export goes through —\n * a record view's rows (`serializeCsv`) and an analysis's groups alike — so\n * the escaping and the formula rule (`CsvOptions.neutralizeFormulas`) are\n * one rule rather than one per export.\n */\nexport function writeCsv(\n header: readonly string[],\n rows: readonly (readonly CsvCell[])[],\n options: CsvOptions = {},\n): string {\n const neutralize = options.neutralizeFormulas !== false;\n const field = (cell: CsvCell) => csvField(cell, neutralize);\n const lines = [header.map(label => field({ value: label, text: label }))];\n for (const row of rows) lines.push(row.map(field));\n return `${CSV_BOM}${lines.map(line => line.join(',')).join(CRLF)}${CRLF}`;\n}\n\n/**\n * One field: neutralized where a spreadsheet could evaluate it, then quoted\n * where it has to be.\n *\n * The text is typed as a string, but it comes from a function a host may\n * have written, so it is coerced rather than trusted: `null` written into\n * the file as the word `null` is a value the table never showed.\n */\nfunction csvField({ value, text }: CsvCell, neutralize: boolean): string {\n let written = typeof text === 'string' ? text : String(text ?? '');\n if (neutralize && evaluable(value, written)) written = `'${written}`;\n return MUST_QUOTE.test(written)\n ? `\"${written.split('\"').join('\"\"')}\"`\n : written;\n}\n\n/** Whether a spreadsheet opening this cell could evaluate it (`CsvOptions`). */\nfunction evaluable(value: unknown, text: string): boolean {\n if (typeof value === 'number' || typeof value === 'bigint') return false;\n return FORMULA_START.test(text) && !PLAIN_NUMBER.test(text);\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readInstant } from '../filter/index.js';\nimport type { CartesianData } from './chart.js';\n\n/**\n * How one bucket's number moved from the bucket right before it: the\n * difference, and that difference as a share of the earlier number — `null`\n * where the earlier number is 0, which no share can be taken of.\n */\nexport interface BucketChange {\n delta: number;\n ratio: number | null;\n}\n\n/**\n * The change of series `key` at point `index` from the point before it, on\n * a time axis whose points are consecutive buckets (`CartesianData.timeline`)\n * — the tooltip's 「较上一期」 (docs/design/decisions.md D33, Q59).\n *\n * It asks for nothing the rows do not hold: both numbers are the chart's own,\n * so there is no second query. And it says nothing it cannot know: not on a\n * category axis, where the point before is no earlier period; not on a time\n * axis with a bucket skipped; not for the first bucket, nor for the missing\n * value's bucket or the one after it; and not where either number is missing\n * — a hole the kernel could not tell was empty, or `missing: 'gap'`. A 0 the\n * kernel filled in is a known 0 (`absenceReader`), and is compared like any.\n */\nexport function bucketChange(\n data: CartesianData,\n key: string,\n index: number,\n): BucketChange | undefined {\n if (data.timeline !== true || index < 1) return undefined;\n const at = data.points[index];\n const before = data.points[index - 1];\n if (!at || !before || !readInstant(at.x) || !readInstant(before.x))\n return undefined;\n const value = at.values[key];\n const was = before.values[key];\n if (typeof value !== 'number' || typeof was !== 'number') return undefined;\n const delta = value - was;\n return { delta, ratio: was === 0 ? null : delta / Math.abs(was) };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * 「点击时…」 as the author fills it in (D22 I, D23 Q17): every choice the\n * form holds at once — the ones not picked kept, so switching back finds\n * what was typed — and the click they make, or why they make none yet.\n * Pure: the form holds a `ClickDraft` and asks here what it says.\n */\n\nimport type {\n BoardValueSource,\n DashboardField,\n DashboardViewConfig,\n FieldDefinition,\n PanelClick,\n} from '../model/index.js';\nimport {\n boardFilterChoices,\n boardValueChoices,\n fillUrl,\n urlPlaceholders,\n type PressableGroup,\n} from './click.js';\nimport { filtersOf } from './filters.js';\nimport { tabsOf } from './panels.js';\n\n/** The three things a press can do: the follow-up menu, a filter, a destination. */\nexport type ClickChoice = 'menu' | 'filter' | 'go';\n\n/** Where a destination goes: a saved view, another board, a page. */\nexport type ClickGoKind = 'view' | 'dashboard' | 'url';\n\nexport const CLICK_GO_KINDS: readonly ClickGoKind[] = [\n 'view',\n 'dashboard',\n 'url',\n];\n\n/** Everything 「点击时…」 holds, each choice's own part kept while another is picked. */\nexport interface ClickDraft {\n choice: ClickChoice;\n /** The board filter a press sets, by name. */\n filter: string;\n goKind: ClickGoKind;\n /** The saved view a press opens; `''` while none is picked. */\n view: string;\n /** The page a press opens, as typed. */\n url: string;\n /** The board a press opens; `''` while none is picked. */\n board: string;\n /** What each of that board's filters takes. */\n values: Record<string, BoardValueSource>;\n /** The tab it opens on (D39); `''` for where its reader last read it. */\n tab: string;\n}\n\n/**\n * The form as it opens on a panel's stored click. `filters` are the names\n * of the board filters a press on this panel can set: a stored filter no\n * longer among them starts at the first that is.\n */\nexport function clickDraftOf(\n stored: PanelClick | null,\n filters: readonly string[],\n): ClickDraft {\n const blank: ClickDraft = {\n choice: 'go',\n filter: filters[0] ?? '',\n goKind: 'view',\n view: '',\n url: '',\n board: '',\n values: {},\n tab: '',\n };\n if (stored === null) return { ...blank, choice: 'menu' };\n switch (stored.kind) {\n case 'filter':\n return filters.includes(stored.filter)\n ? { ...blank, choice: 'filter', filter: stored.filter }\n : { ...blank, choice: 'filter' };\n case 'view':\n return { ...blank, view: stored.instanceId };\n case 'url':\n return { ...blank, goKind: 'url', url: stored.url };\n case 'dashboard':\n return {\n ...blank,\n goKind: 'dashboard',\n board: stored.instanceId,\n values: stored.values,\n tab: stored.tab ?? '',\n };\n }\n}\n\n/**\n * Another board picked for the destination: nothing mapped for the board\n * it replaces carries over by name, since its filters are other filters.\n */\nexport function withBoard(draft: ClickDraft, board: string): ClickDraft {\n return board === draft.board\n ? draft\n : { ...draft, board, values: {}, tab: '' };\n}\n\n/**\n * Whether a URL template fills into a URL a board may open whatever its\n * placeholders hold (`fillUrl`).\n */\nexport function urlFillable(template: string): boolean {\n return (\n fillUrl(\n template,\n Object.fromEntries(urlPlaceholders(template).map(key => [key, 'x'])),\n ) !== null\n );\n}\n\n/** What a mapping can draw on: the panel's dimensions and this board's filters. */\nexport interface MappingSources {\n groups: readonly PressableGroup[];\n fields: readonly FieldDefinition[] | null;\n own: readonly DashboardField[];\n}\n\n/**\n * Every source one of another board's filters can take its value from,\n * this panel's dimensions first (`boardValueChoices`), then this board's\n * filters (`boardFilterChoices`).\n */\nexport function boardValueSources(\n filter: DashboardField,\n { groups, fields, own }: MappingSources,\n): BoardValueSource[] {\n return [\n ...boardValueChoices(filter, groups, fields).map(group => ({\n dimension: group.field,\n })),\n ...boardFilterChoices(filter, own).map(field => ({ filter: field.name })),\n ];\n}\n\n/** One source as a key: `dimension:<field>` or `filter:<name>`. */\nexport function valueSourceKey(source: BoardValueSource): string {\n return 'dimension' in source\n ? `dimension:${source.dimension}`\n : `filter:${source.filter}`;\n}\n\n/**\n * What a press takes to the board (D23 Q17), from what the author chose:\n * each of the board's filters mapped to a source that can still give it a\n * value — a dimension of this panel, or a filter of this board's, of a type\n * it takes. Whatever else was stored (a filter gone on either board, a\n * dimension gone) is left out, and named in `stale` by the filter's label.\n * Never guessed by name: a filter the author did not map is not carried.\n */\nexport function mappedValues(\n board: DashboardViewConfig,\n values: Readonly<Record<string, BoardValueSource>>,\n sources: MappingSources,\n): { kept: Record<string, BoardValueSource>; stale: string[] } {\n const byName = new Map(filtersOf(board).map(filter => [filter.name, filter]));\n const kept: Record<string, BoardValueSource> = {};\n const stale: string[] = [];\n for (const [name, source] of Object.entries(values)) {\n const filter = byName.get(name);\n const usable =\n filter &&\n boardValueSources(filter, sources).some(\n choice => valueSourceKey(choice) === valueSourceKey(source),\n );\n if (usable) kept[name] = source;\n else stale.push(filter?.label ?? name);\n }\n return { kept, stale };\n}\n\n/**\n * The click a draft makes: `null` for the follow-up menu, `undefined`\n * while the choice picked still lacks what it needs — no filter, no view,\n * no board read yet (`board` is the destination board's config once read),\n * or a URL no board may open. A board's mapping is kept only where it still\n * holds (`mappedValues`).\n */\nexport function draftedClick(\n draft: ClickDraft,\n board: DashboardViewConfig | undefined,\n sources: MappingSources,\n): PanelClick | null | undefined {\n if (draft.choice === 'menu') return null;\n if (draft.choice === 'filter')\n return draft.filter ? { kind: 'filter', filter: draft.filter } : undefined;\n switch (draft.goKind) {\n case 'view':\n return draft.view ? { kind: 'view', instanceId: draft.view } : undefined;\n case 'dashboard':\n return board\n ? {\n kind: 'dashboard',\n instanceId: draft.board,\n values: mappedValues(board, draft.values, sources).kept,\n // Only a tab the board still has (D39): one gone since the\n // click was set is dropped here, as a stale mapping is.\n ...(boardTab(board, draft.tab) ? { tab: draft.tab } : {}),\n }\n : undefined;\n case 'url':\n return urlFillable(draft.url)\n ? { kind: 'url', url: draft.url.trim() }\n : undefined;\n }\n}\n\n/**\n * What a destination still lacks, said at its field once 完成 was pressed\n * without it: no view picked, a URL no board may open, no board picked.\n */\nexport function clickDraftGaps(draft: ClickDraft): {\n view: boolean;\n url: boolean;\n board: boolean;\n} {\n const going = draft.choice === 'go';\n return {\n view: going && draft.goKind === 'view' && !draft.view,\n url: going && draft.goKind === 'url' && !urlFillable(draft.url),\n board: going && draft.goKind === 'dashboard' && !draft.board,\n };\n}\n\n/**\n * Whether `tab` names one of the board's tabs — the one a press opens it on\n * (D39); `''` names none.\n */\nfunction boardTab(\n board: Pick<DashboardViewConfig, 'tabs'>,\n tab: string | undefined,\n): boolean {\n return !!tab && tabsOf(board).some(entry => entry.id === tab);\n}\n"],"mappings":";;AA8BA,SAAgBK,EACdF,GACAG,GACAC,GACiB;CACjB,IAAME,oBAAU,IAAIC,IAAkC;CACtD,KAAK,IAAMR,KAASI,GAClB,KAAK,IAAMK,KAAST,EAAMU,QACxB,AAAKH,EAAQI,IAAIF,CAAK,KAAGF,EAAQK,IAAIH,GAAOT,CAAK;CAErD,IAAMa,oBAAU,IAAIL,IAAe,GAC7BM,IAAiB,CAAA;CACvB,KAAK,IAAMR,KAAQL,GAAO;EACxB,IAAMc,IAAOV,EAAIC,CAAI;EACrB,AAAIC,EAAQI,IAAII,CAAI,IAAGF,EAAQD,IAAIG,GAAMT,CAAI,IACxCQ,EAAUE,KAAKV,CAAI;CAC1B;CA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ACR;AACF;AAMA,SAAgBG,EAAenC,GAI7B;CACA,IAAMoC,IAAQpC,EAAMjB,WAAW;CAC/B,OAAO;EACLG,MAAMkD,KAASpC,EAAMf,WAAW,UAAU,CAACe,EAAMd;EACjDC,KAAKiD,KAASpC,EAAMf,WAAW,SAAS,CAACgB,EAAYD,EAAMb,GAAG;EAC9DC,OAAOgD,KAASpC,EAAMf,WAAW,eAAe,CAACe,EAAMZ;CACzD;AACF;AAMA,SAAS6C,EACP7C,GACAG,GACS;CACT,OAAO,CAAC,CAACA,KAAOb,EAAOU,CAAK,CAAC,CAACwC,MAAKU,MAASA,EAAMC,OAAOhD,CAAG;AAC9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/filter/compile.ts"],"names":[],"mappings":"AAaA,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EACV,eAAe,EAGf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAG1E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,oBAAoB,GAC5B,gBAAgB,CAOlB"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/filter/compile.ts"],"names":[],"mappings":"AAaA,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EACV,eAAe,EAGf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAI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EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,GACvB,iBAAiB,EAAE,CAcrB"}
@@ -98,6 +98,16 @@ export interface FieldKind {
98
98
  * `isFieldlessKind` reads whenever the registry has resolved the kind.
99
99
  */
100
100
  fieldless?: true;
101
+ /**
102
+ * A saved leaf as this kind reads it, for a leaf written before the
103
+ * field was of this kind: an `EQ` saved while an enum field was a string
104
+ * is its one-value `IN`. Every pass over a tree — admission, compilation,
105
+ * the summary, a runtime opening a view — reads each leaf through it
106
+ * first (`readFilter`), so the condition keeps working rather than being
107
+ * refused for an operator the kind does not offer. Return the leaf itself
108
+ * where it reads as it stands. Left out, every leaf does.
109
+ */
110
+ readLeaf?(leaf: FilterLeaf, field: FieldDefinition): FilterLeaf;
101
111
  /** Reports why a value cannot be used; an empty array admits it. */
102
112
  validate(context: FieldKindValidateContext): Issue[];
103
113
  /** Maps one admitted leaf onto the Wow protocol. */
@@ -1 +1 @@
1
- {"version":3,"file":"fieldKind.d.ts","sourceRoot":"","sources":["../../src/filter/fieldKind.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,KAAK,EACL,SAAS,EACT,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AAEvB;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,WAAW,CAAC;IAChB,8EAA8E;IAC9E,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,eAAe,EAAE,kBAAkB,CAAC;IACpC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACvE;;;;;;OAMG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GAAG,CAAC,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAEnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAST;AAED,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,EACxB,QAAQ,GAAE,KAAK,CAAC,UAAU,CAAW,GACpC,KAAK,CAEP"}
@@ -13,6 +13,7 @@ export * from './fieldKind.js';
13
13
  export * from './issuePath.js';
14
14
  export * from './kinds/index.js';
15
15
  export * from './marks.js';
16
+ export * from './read.js';
16
17
  export * from './search.js';
17
18
  export * from './time.js';
18
19
  export * from './tree.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filter/index.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filter/index.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../src/filter/kinds/enum.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAejD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,SAqD3B,CAAC"}
1
+ {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../src/filter/kinds/enum.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAejD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,SAqE3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { FieldDefinition, FilterTree } from '../model/index.js';
2
+ import { FieldKindRegistry } from './fieldKind.js';
3
+ /**
4
+ * `tree` with each leaf read as its field's kind reads it
5
+ * (`FieldKind.readLeaf`): a condition saved before its field changed kind
6
+ * — an `EQ` on a field that was a string and is now an enum — in the shape
7
+ * the kind offers. The same tree where no leaf reads differently.
8
+ *
9
+ * A tree from a store may hold anything, and may be deeper than any budget
10
+ * admits: it is walked iteratively, and only the groups above a leaf that
11
+ * reads differently are copied. An entry that is not a leaf, a field nobody
12
+ * declares or a kind nobody registered is left as it came, for
13
+ * `validateFilter` to say. A host's kind whose `readLeaf` throws leaves its
14
+ * leaf as it came too; its `validate` judges it as written.
15
+ */
16
+ export declare function readFilter(fields: readonly FieldDefinition[], tree: FilterTree, kinds: FieldKindRegistry): FilterTree;
17
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/filter/read.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,eAAe,EAGf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AASxD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,GACvB,UAAU,CAUZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/filter/validate.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,UAAU,EACf,KAAK,KAAK,EAEV,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AASxB,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;IAClE;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAA0B,GAClC,KAAK,EAAE,CA0FT;AAiMD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAYT;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAIT"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/filter/validate.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,UAAU,EACf,KAAK,KAAK,EAEV,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAUxB,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;IAClE;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAA0B,GAClC,KAAK,EAAE,CA6FT;AAiMD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAYT;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,eAAe,EAAE,EAClC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAIT"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { $a as e, $i as t, $n as n, $o as r, $r as i, $t as a, Aa as o, An as s, Ao as c, Ar as l, As as u, At as d, Ba as f, Bi as p, Bn as m, Bo as h, Bt as ee, C as te, Ca as ne, Ci as re, Cn as ie, Co as ae, Cr as oe, Cs as se, Ct as ce, Da as le, Di as ue, Dn as de, Do as fe, Dr as pe, Ds as me, Dt as he, E as ge, Ea as _e, Ei as ve, En as ye, Eo as be, Er as xe, Es as Se, Et as Ce, Fa as we, Fi as g, Fn as _, Fo as v, Fs as y, Ft as b, Ga as x, Gi as S, Gn as C, Go as w, Gr as T, Gt as E, Ha as D, Hi as O, Hn as k, Ho as Te, Hr as Ee, Ht as De, Ia as Oe, Ii as ke, In as Ae, Io as je, Is as Me, It as Ne, Ji as Pe, Jn as Fe, Jo as Ie, Jr as Le, Jt as Re, Ka as ze, Ki as Be, Kn as Ve, Ko as He, Kr as Ue, Kt as We, La as Ge, Li as Ke, Ln as qe, Lo as Je, Ls as Ye, Lt as Xe, Ma as Ze, Mi as Qe, Mn as $e, Mo as et, Mr as tt, Ms as nt, Mt as rt, Na as it, Ni as at, Nn as ot, No as st, Nr as ct, Ns as lt, Nt as ut, Oa as dt, Oi as ft, On as pt, Oo as mt, Or as ht, Os as gt, Ot as _t, Pa as vt, Pi as yt, Po as bt, Pr as xt, Ps as St, Pt as Ct, Qn as wt, Qo as Tt, Qt as Et, Ra as Dt, Ri as Ot, Rn as kt, Ro as At, Rs as jt, Rt as Mt, Sa as Nt, Si as Pt, Sn as Ft, So as It, Sr as Lt, Ss as Rt, St as zt, T as Bt, Ta as Vt, Ti as Ht, Tn as Ut, To as Wt, Tr as Gt, Ts as Kt, Tt as qt, Ua as Jt, Ui as Yt, Un as Xt, Uo as Zt, Ur as Qt, Ut as $t, Va as en, Vi as tn, Vn as nn, Vo as rn, Vr as an, Vt as on, Wa as sn, Wi as cn, Wn as ln, Wo as un, Wr as dn, Wt as fn, Xa as pn, Xi as mn, Xn as hn, Xo as A, Xr as gn, Xt as _n, Ya as vn, Yn as yn, Yo as bn, Yr as xn, Za as j, Zi as Sn, Zn as Cn, Zo as wn, Zr as Tn, Zt as En, _a as Dn, _i as On, _n as kn, _o as An, _r as jn, _s as Mn, _t as Nn, aa as Pn, an as Fn, ao as In, as as Ln, at as M, ba as Rn, bi as zn, bn as Bn, bo as Vn, br as Hn, bs as Un, bt as Wn, ci as Gn, cn as Kn, co as N, cr as qn, cs as Jn, ct as Yn, da as Xn, di as Zn, dn as Qn, do as P, ds as $n, dt as er, ea as tr, ei as nr, en as rr, eo as ir, es as ar, fa as or, fi as sr, fn as cr, fo as F, fr as lr, fs as ur, ft as dr, ga as fr, gi as pr, gn as mr, go as hr, gr, gs as _r, gt as vr, ha as yr, hi as br, hn as xr, ho as Sr, hr as Cr, ht as wr, ia as Tr, ii as Er, in as Dr, io as I, ir as Or, is as kr, it as Ar, ja as jr, jn as Mr, jo as Nr, jr as Pr, js as Fr, ka as Ir, ki as Lr, kn as Rr, ko as zr, kr as Br, ks as Vr, kt as Hr, li as Ur, ln as Wr, lo as L, ls as Gr, lt as Kr, ma as qr, mi as Jr, mn as Yr, mo as Xr, mr as Zr, ms as Qr, mt as $r, na as ei, ni as ti, nn as ni, no as ri, ns as ii, nt as ai, oa as oi, on as si, oo as ci, os as li, pa as ui, pi as R, pn as di, po as fi, pr as pi, ps as mi, pt as hi, qa as gi, qi as _i, qn as z, qo as vi, qr as yi, qt as bi, ra as xi, ri as Si, rn as Ci, ro as wi, rr as Ti, rs as Ei, rt as Di, s as Oi, sa as ki, si as Ai, sn as ji, so as Mi, ss as Ni, ta as Pi, ti as Fi, tn as Ii, to as Li, tr as Ri, ts as zi, ui as Bi, un as Vi, uo as B, us as Hi, ut as Ui, va as Wi, vi as Gi, vn as Ki, vo as qi, vr as Ji, vs as Yi, vt as Xi, w as Zi, wa as Qi, wi as $i, wn as ea, wo as ta, wr as na, ws as ra, wt as ia, x as aa, xa as oa, xi as sa, xn as ca, xo as la, xr as ua, xs as da, xt as fa, ya as pa, yi as ma, yn as ha, yo as ga, yr as _a, ys as va, yt as ya, za as ba, zi as xa, zn as Sa, zo as Ca, zs as wa, zt as Ta } from "./actions-CCMywJ9Z.js";
2
- import { $ as Ea, $t as Da, A as Oa, B as ka, Bt as Aa, C as ja, Ct as Ma, D as Na, E as Pa, Et as Fa, F as Ia, Ft as La, G as Ra, Gt as za, H as Ba, Ht as Va, I as Ha, It as Ua, J as Wa, Jt as Ga, K as Ka, Kt as qa, L as Ja, Lt as Ya, M as Xa, N as Za, O as Qa, P as $a, Q as eo, Qt as to, R as no, Rt as ro, S as io, St as ao, T as oo, Tt as so, U as co, Ut as lo, V as uo, Vt as fo, W as po, Wt as mo, X as ho, Xt as go, Y as _o, Yt as vo, Z as yo, Zt as bo, _n as xo, _t as So, a as Co, an as wo, at as To, b as Eo, bn as Do, bt as Oo, cn as ko, ct as Ao, dn as jo, dt as Mo, en as No, et as Po, fn as Fo, ft as Io, gn as Lo, gt as Ro, hn as zo, ht as Bo, i as Vo, in as Ho, it as Uo, j as Wo, jt as Go, k as Ko, kt as qo, ln as Jo, lt as Yo, mn as Xo, mt as Zo, n as Qo, nn as $o, nt as es, on as ts, ot as ns, pn as rs, pt as is, q as as, qt as os, r as ss, rn as cs, rt as ls, s as us, sn as ds, st as fs, t as ps, tn as ms, tt as hs, un as gs, ut as _s, vn as vs, vt as ys, w as bs, wt as xs, x as Ss, xt as Cs, yn as ws, yt as Ts, z as Es, zt as Ds } from "./viewRuntimeTypes-m9IzLozY.js";
3
- import { a as Os, c as ks, d as As, f as js, i as Ms, l as Ns, m as Ps, n as Fs, o as Is, r as Ls, s as Rs, t as zs, u as Bs } from "./clickDraft-ha-JMs8X.js";
1
+ import { $a as e, $i as t, $n as n, $o as r, $r as i, $t as a, Aa as o, An as s, Ao as c, Ar as l, As as u, At as d, Ba as f, Bi as p, Bn as m, Bo as h, Bs as ee, Bt as te, C as ne, Ca as re, Ci as ie, Cn as ae, Co as oe, Cr as se, Cs as ce, Ct as le, Da as ue, Di as de, Dn as fe, Do as pe, Dr as me, Ds as he, Dt as ge, E as _e, Ea as ve, Ei as ye, En as be, Eo as xe, Er as Se, Es as Ce, Et as we, Fa as g, Fi as _, Fn as v, Fo as y, Fs as b, Ft as x, Ga as S, Gi as C, Gn as w, Go as T, Gr as E, Gt as D, Ha as O, Hi as k, Hn as Te, Ho as Ee, Hr as De, Hs as Oe, Ht as ke, Ia as Ae, Ii as je, In as Me, Io as Ne, Is as Pe, It as Fe, Ja as Ie, Ji as Le, Jn as Re, Jo as ze, Jr as Be, Jt as Ve, Ka as He, Ki as Ue, Kn as We, Ko as Ge, Kr as Ke, Kt as qe, La as Je, Li as Ye, Ln as Xe, Lo as Ze, Ls as Qe, Lt as $e, Ma as et, Mi as tt, Mn as nt, Mo as rt, Mr as it, Ms as at, Mt as ot, Na as st, Ni as ct, Nn as lt, No as ut, Nr as dt, Ns as ft, Nt as pt, Oa as mt, Oi as ht, On as gt, Oo as _t, Or as vt, Os as yt, Ot as bt, Pa as xt, Pi as St, Po as Ct, Pr as wt, Ps as Tt, Pt as Et, Qa as Dt, Qn as Ot, Qo as kt, Qt as At, Ra as jt, Ri as Mt, Rn as Nt, Ro as Pt, Rs as Ft, Rt as It, Sa as Lt, Si as Rt, Sn as zt, So as Bt, Sr as Vt, Ss as Ht, St as Ut, T as Wt, Ta as Gt, Ti as Kt, Tn as qt, To as Jt, Tr as Yt, Ts as Xt, Tt as Zt, Ua as A, Ui as Qt, Un as $t, Uo as en, Ur as tn, Ut as nn, Va as rn, Vi as an, Vn as on, Vo as sn, Vr as cn, Vs as ln, Vt as un, Wa as dn, Wi as fn, Wn as pn, Wo as mn, Wr as hn, Wt as gn, Xa as _n, Xi as vn, Xn as yn, Xo as bn, Xr as xn, Xt as Sn, Ya as Cn, Yn as wn, Yo as Tn, Yr as En, Zi as Dn, Zn as On, Zo as kn, Zr as An, Zt as jn, _a as Mn, _i as Nn, _n as Pn, _o as Fn, _r as In, _s as Ln, _t as Rn, aa as zn, an as Bn, ao as Vn, as as Hn, at as j, ba as Un, bi as Wn, bn as Gn, bo as Kn, br as qn, bs as Jn, bt as Yn, ci as Xn, cn as Zn, co as Qn, cr as $n, cs as er, ct as tr, da as nr, di as rr, dn as ir, do as M, ds as ar, dt as or, ea as sr, ei as cr, en as lr, eo as N, es as ur, fi as dr, fn as fr, fo as P, fr as pr, fs as mr, ft as hr, ga as gr, gi as _r, gn as vr, go as yr, gr as br, gs as xr, gt as Sr, ha as Cr, hi as wr, hn as Tr, ho as F, hr as Er, hs as Dr, ht as Or, ia as kr, ii as Ar, in as jr, io as Mr, ir as Nr, is as Pr, it as Fr, ja as Ir, jn as Lr, jo as Rr, jr as zr, js as Br, ka as Vr, ki as Hr, kn as Ur, ko as Wr, kr as Gr, ks as Kr, kt as qr, li as Jr, ln as Yr, lo as Xr, ls as Zr, lt as Qr, ma as $r, mi as ei, mn as ti, mo as I, mr as ni, ms as ri, mt as ii, na as ai, ni as oi, nn as si, no as ci, ns as li, nt as ui, oa as di, on as fi, oo as pi, os as mi, pa as hi, pi as L, pn as gi, po as R, pr as _i, ps as z, pt as vi, qa as yi, qi as bi, qn as xi, qo as Si, qr as Ci, qt as wi, ra as Ti, ri as Ei, rn as Di, ro as Oi, rr as ki, rs as Ai, rt as ji, s as Mi, sa as Ni, si as Pi, sn as Fi, so as B, ss as Ii, ta as Li, ti as Ri, tn as zi, tr as Bi, ts as Vi, ui as Hi, un as Ui, uo as Wi, us as Gi, ut as Ki, va as qi, vi as Ji, vn as Yi, vo as Xi, vr as Zi, vt as Qi, w as $i, wa as ea, wi as ta, wn as na, wo as ra, wr as ia, ws as aa, wt as oa, x as sa, xa as ca, xi as la, xn as ua, xo as da, xr as fa, xs as pa, xt as ma, ya as ha, yi as ga, yn as _a, yo as va, yr as ya, ys as ba, yt as xa, za as Sa, zi as Ca, zn as wa, zo as Ta, zs as Ea, zt as Da } from "./actions-HgK33Jzg.js";
2
+ import { $ as Oa, $t as ka, A as Aa, At as ja, B as Ma, Bt as Na, C as Pa, Ct as Fa, D as Ia, Dt as La, E as Ra, Et as za, F as Ba, G as Va, Gt as Ha, H as Ua, Ht as Wa, I as Ga, It as Ka, J as qa, Jt as Ja, K as Ya, Kt as Xa, L as Za, Lt as Qa, M as $a, Mt as eo, N as to, O as no, P as ro, Q as io, Qt as ao, R as oo, Rt as so, S as co, St as lo, T as uo, Tt as fo, U as po, Ut as mo, V as ho, Vt as go, W as _o, Wt as vo, X as yo, Xt as bo, Y as xo, Yt as So, Z as Co, Zt as wo, _n as To, _t as Eo, a as Do, an as Oo, at as ko, bt as Ao, c as jo, cn as Mo, ct as No, dn as Po, dt as Fo, en as Io, et as Lo, fn as Ro, ft as zo, gn as Bo, gt as Vo, hn as Ho, ht as Uo, in as Wo, it as Go, j as Ko, k as qo, ln as Jo, lt as Yo, mn as Xo, mt as Zo, n as Qo, nn as $o, nt as es, o as ts, on as ns, ot as rs, pn as is, pt as as, q as os, qt as ss, r as cs, rn as ls, rt as us, sn as ds, st as fs, t as ps, tn as ms, tt as hs, un as gs, ut as _s, vn as vs, vt as ys, w as bs, wt as xs, x as Ss, xt as Cs, yn as ws, yt as Ts, z as Es, zt as Ds } from "./viewRuntimeTypes-JEPw0nsg.js";
3
+ import { a as Os, c as ks, d as As, f as js, i as Ms, l as Ns, m as Ps, n as Fs, o as Is, r as Ls, s as Rs, t as zs, u as Bs } from "./clickDraft-CLkSgQNG.js";
4
4
  //#region src/runtime/define/analysis.ts
5
5
  function Vs(e, t) {
6
6
  if (e === !1) return;
@@ -25,14 +25,14 @@ function Vs(e, t) {
25
25
  return r;
26
26
  }
27
27
  function Hs(e, t, n, r) {
28
- if (e) return Di(e, t.map((e) => e.field), n, (e, t) => r.push(e === null ? f("definition.analysis.wider", ["analysis"], { what: t }, "warning") : f("definition.field.analysis-wider", ["analysis"], {
28
+ if (e) return ji(e, t.map((e) => e.field), n, (e, t) => r.push(e === null ? A("definition.analysis.wider", ["analysis"], { what: t }, "warning") : A("definition.field.analysis-wider", ["analysis"], {
29
29
  field: e,
30
30
  what: t
31
31
  }, "warning")));
32
32
  }
33
33
  //#endregion
34
34
  //#region src/runtime/define/fields.ts
35
- var V = (e, t, n = "error") => f(e, ["fields"], t, n);
35
+ var V = (e, t, n = "error") => A(e, ["fields"], t, n);
36
36
  function H(e, t, n) {
37
37
  return Object.entries(e).flatMap(([e, r]) => {
38
38
  let i = Us(e, typeof r == "string" ? { label: r } : r, t, n);
@@ -42,7 +42,7 @@ function H(e, t, n) {
42
42
  function Us(e, t, n, r) {
43
43
  let { descriptor: i, findings: a } = r, o = n === void 0 ? e : `${n}.${e}`;
44
44
  if (t.search) return Ws(e, t, n, r);
45
- let s = M(i, o, n);
45
+ let s = j(i, o, n);
46
46
  if (!s) return a.push(V("definition.field.undescribed", { field: o })), null;
47
47
  let c = Gs(i, s.canonical ?? o, n), l = t.kind ?? Ks(c, s, t);
48
48
  if (l === null) return a.push(V("definition.field.kind-unknown", { field: o })), null;
@@ -85,7 +85,7 @@ function Ws(e, t, n, r) {
85
85
  let i = t.search ?? { fields: [] };
86
86
  for (let e of i.fields) {
87
87
  let t = n === void 0 ? e : `${n}.${e}`;
88
- M(r.descriptor, t, n) || r.findings.push(V("definition.field.undescribed", { field: t }));
88
+ j(r.descriptor, t, n) || r.findings.push(V("definition.field.undescribed", { field: t }));
89
89
  }
90
90
  let a = {
91
91
  name: e,
@@ -178,9 +178,9 @@ function Zs(e, t, n = {}) {
178
178
  };
179
179
  t.recordNoun !== void 0 && (o.recordNoun = t.recordNoun), t.fieldGroups && (o.fieldGroups = t.fieldGroups), i && (o.record = i);
180
180
  let s = Vs(t.analysis, a), c = Hs(s, a, e, r);
181
- c && Ar(c) && (o.analysis = c), t.timeField !== void 0 && (o.timeField = t.timeField), t.views && (o.views = t.views);
181
+ c && Fr(c) && (o.analysis = c), t.timeField !== void 0 && (o.timeField = t.timeField), t.views && (o.views = t.views);
182
182
  let l = a.flatMap(({ field: e, spec: t, described: n }) => n && t.sortable !== !1 ? [e.name] : []), u = W(a);
183
- return o.fields = G(o.fields, ai(o, e, n.kinds ?? R).definition.fields, new Set(u)), o.described = {
183
+ return o.fields = G(o.fields, ui(o, e, n.kinds ?? L).definition.fields, new Set(u)), o.described = {
184
184
  version: e.version,
185
185
  findings: r,
186
186
  open: {
@@ -215,7 +215,7 @@ var K = {
215
215
  function Qs(e, t, n) {
216
216
  if (e.record === !1) return;
217
217
  let r = e.record ?? {}, i = t.record.paging.flatMap((e) => K[e] ? [K[e]] : []), a = r.paging ?? (i.includes("paged") ? "paged" : "cursor");
218
- return i.includes(a) || n.push(f("definition.record.paging-wider", ["record", "paging"], { paging: a }, "warning")), {
218
+ return i.includes(a) || n.push(A("definition.record.paging-wider", ["record", "paging"], { paging: a }, "warning")), {
219
219
  ...r,
220
220
  rowKey: r.rowKey ?? t.record.identity,
221
221
  paging: a,
@@ -299,29 +299,29 @@ var ac = class {
299
299
  }
300
300
  get(e) {
301
301
  let t = this.instances.get(e);
302
- return t ? Promise.resolve($(t)) : Promise.reject(new j("NOT_FOUND", `No such view: ${e}`));
302
+ return t ? Promise.resolve($(t)) : Promise.reject(new N("NOT_FOUND", `No such view: ${e}`));
303
303
  }
304
304
  create(e, t) {
305
305
  let n = this.outcomes.get(t.requestId);
306
306
  if (n) return Promise.resolve($(n));
307
- let r = Z(e.title) ?? Q(e.config);
308
- if (r) return Promise.reject(r);
307
+ let i = Z(e.title) ?? Q(e.config);
308
+ if (i) return Promise.reject(i);
309
309
  this.reload();
310
- let i;
310
+ let a;
311
311
  do
312
- this.sequence += 1, i = `${e.definitionId}-${this.sequence}`;
313
- while (this.instances.has(i));
314
- if (A(i)) return Promise.reject(new j("INVALID", `Reserved id namespace: ${i}`));
315
- let a = $(e);
316
- delete a.stored;
317
- let o = {
318
- ...a,
312
+ this.sequence += 1, a = `${e.definitionId}-${this.sequence}`;
313
+ while (this.instances.has(a));
314
+ if (r(a)) return Promise.reject(new N("INVALID", `Reserved id namespace: ${a}`));
315
+ let o = $(e);
316
+ delete o.stored;
317
+ let s = {
318
+ ...o,
319
319
  title: e.title.trim(),
320
- id: i,
320
+ id: a,
321
321
  revision: "1",
322
- ...B(e.scope) ? { stored: !0 } : {}
322
+ ...R(e.scope) ? { stored: !0 } : {}
323
323
  };
324
- return this.instances.set(i, o), this.commit(t, o, () => this.instances.delete(i));
324
+ return this.instances.set(a, s), this.commit(t, s, () => this.instances.delete(a));
325
325
  }
326
326
  save(e, t, n, r) {
327
327
  return this.update(e, n, r, (e) => ({
@@ -337,11 +337,11 @@ var ac = class {
337
337
  }
338
338
  changeAudience(e, t, n, r) {
339
339
  return this.update(e, n, r, (n) => {
340
- if (B(n.scope)) return new j("FORBIDDEN", "System views stay system");
341
- if (N(n.scope) === t) return null;
340
+ if (R(n.scope)) return new N("FORBIDDEN", "System views stay system");
341
+ if (M(n.scope) === t) return null;
342
342
  if (t === "personal") {
343
343
  let t = this.sharedBoardsShowing(e);
344
- if (t.length > 0) return new j("INVALID", `Shared dashboards show view ${e}: ${t.join(", ")}`, { boards: t });
344
+ if (t.length > 0) return new N("INVALID", `Shared dashboards show view ${e}: ${t.join(", ")}`, { boards: t });
345
345
  }
346
346
  return {
347
347
  ...n,
@@ -353,8 +353,8 @@ var ac = class {
353
353
  if (this.outcomes.has(n.requestId)) return Promise.resolve();
354
354
  this.reload();
355
355
  let r = this.instances.get(e);
356
- if (!r) return Promise.reject(new j("NOT_FOUND", `No such view: ${e}`));
357
- if (J(r)) return Promise.reject(new j("FORBIDDEN", "System views are read-only"));
356
+ if (!r) return Promise.reject(new N("NOT_FOUND", `No such view: ${e}`));
357
+ if (J(r)) return Promise.reject(new N("FORBIDDEN", "System views are read-only"));
358
358
  let i = this.expect(r, t);
359
359
  if (i) return Promise.reject(i);
360
360
  this.instances.delete(e);
@@ -369,7 +369,7 @@ var ac = class {
369
369
  if (r) return Promise.resolve(r);
370
370
  this.reload();
371
371
  let i = this.preferences.get(e), a = i ?? q();
372
- if (a.revision !== t.revision) return Promise.reject(new j("CONFLICT", `Preferences for ${e} changed`, { preferences: a }));
372
+ if (a.revision !== t.revision) return Promise.reject(new N("CONFLICT", `Preferences for ${e} changed`, { preferences: a }));
373
373
  let o = {
374
374
  ...t,
375
375
  revision: X(a.revision)
@@ -384,12 +384,12 @@ var ac = class {
384
384
  if (i) return Promise.reject(i);
385
385
  this.reload();
386
386
  let o = this.instances.get(e);
387
- if (!o) return Promise.reject(new j("NOT_FOUND", `No such view: ${e}`));
388
- if (J(o)) return Promise.reject(new j("FORBIDDEN", "System views are read-only"));
387
+ if (!o) return Promise.reject(new N("NOT_FOUND", `No such view: ${e}`));
388
+ if (J(o)) return Promise.reject(new N("FORBIDDEN", "System views are read-only"));
389
389
  let s = this.expect(o, t);
390
390
  if (s) return Promise.reject(s);
391
391
  let c = r(o);
392
- if (c instanceof j) return Promise.reject(c);
392
+ if (c instanceof N) return Promise.reject(c);
393
393
  if (c === null) return this.outcomes.set(n.requestId, o), Promise.resolve($(o));
394
394
  let l = {
395
395
  ...c,
@@ -401,14 +401,14 @@ var ac = class {
401
401
  let t = [];
402
402
  for (let n of this.instances.values()) {
403
403
  let { config: r } = n;
404
- if (r.kind !== "dashboard" || N(n.scope) !== "shared") continue;
404
+ if (r.kind !== "dashboard" || M(n.scope) !== "shared") continue;
405
405
  let i = r.panels;
406
406
  Array.isArray(i) && i.some((t) => oc(t, e)) && t.push(n.title);
407
407
  }
408
408
  return t;
409
409
  }
410
410
  expect(e, t) {
411
- return e.revision === t ? void 0 : new j("CONFLICT", `View ${e.id} moved to revision ${e.revision}`, { instance: e });
411
+ return e.revision === t ? void 0 : new N("CONFLICT", `View ${e.id} moved to revision ${e.revision}`, { instance: e });
412
412
  }
413
413
  commit(e, t, n) {
414
414
  let r = this.persist(n);
@@ -422,7 +422,7 @@ var ac = class {
422
422
  });
423
423
  return;
424
424
  } catch (t) {
425
- return e(), new j("UNAVAILABLE", `The view store could not keep this write: ${sc(t)}`, { storage: !0 });
425
+ return e(), new N("UNAVAILABLE", `The view store could not keep this write: ${sc(t)}`, { storage: !0 });
426
426
  }
427
427
  }
428
428
  reload() {
@@ -441,7 +441,7 @@ function oc(e, t) {
441
441
  return r === void 0 && n === t || i === t || typeof a == "object" && !!a && a.instanceId === t;
442
442
  }
443
443
  function J(e) {
444
- return B(e.scope) && e.stored !== !0;
444
+ return R(e.scope) && e.stored !== !0;
445
445
  }
446
446
  var Y = {
447
447
  system: 0,
@@ -452,15 +452,15 @@ function X(e) {
452
452
  return /^(0|[1-9]\d{0,14})$/.test(e) ? String(Number(e) + 1) : "1";
453
453
  }
454
454
  function Z(e) {
455
- switch (P(e)) {
456
- case "empty": return new j("INVALID", "A view's title must not be blank.");
457
- case "too-long": return new j("INVALID", "A view's title is longer than 120 characters.");
455
+ switch (I(e)) {
456
+ case "empty": return new N("INVALID", "A view's title must not be blank.");
457
+ case "too-long": return new N("INVALID", "A view's title is longer than 120 characters.");
458
458
  default: return;
459
459
  }
460
460
  }
461
461
  function Q(e) {
462
- let t = L(e);
463
- return t > 245760 ? new j("INVALID", `A view's config is ${t} bytes; the limit is ${I}.`) : void 0;
462
+ let t = P(e);
463
+ return t > 245760 ? new N("INVALID", `A view's config is ${t} bytes; the limit is ${B}.`) : void 0;
464
464
  }
465
465
  function sc(e) {
466
466
  if (typeof e == "object" && e) {
@@ -473,6 +473,6 @@ function $(e) {
473
473
  return structuredClone(e);
474
474
  }
475
475
  //#endregion
476
- export { Eo as ALWAYS_VISIBLE, Se as ANALYSIS_AUTO_RUN_MEMBERS, me as ANALYSIS_DATE_DIFF_UNITS, gt as ANALYSIS_DATE_PARTS, Vr as ANALYSIS_DATE_UNITS, u as ANALYSIS_PRESENTATION_MEMBERS, sr as BUILTIN_FIELD_KINDS, Sr as BUILTIN_FIELD_KIND_IDS, Mn as CARTESIAN_MISSING, Yi as CHART_COLOR_SLOTS, pe as CHART_FAMILIES, va as CHART_FAMILY, Ut as CHART_PICKER_ORDER, Un as CHART_TYPES, zs as CLICK_GO_KINDS, wi as CODE_REVISION, As as CSV_BOM, hr as CURRENCY_CODE_PATTERN, ii as DASHBOARD_FILTER_KINDS, Ei as DASHBOARD_FILTER_TYPES, kr as DASHBOARD_GRID_COLUMNS, Ln as DASHBOARD_PRESENTATION_MEMBERS, li as DASHBOARD_WIDTHS, Fr as DATE_PART_DOMAINS, An as DATE_SUMMARY_FUNCTIONS, Yt as DATE_TIME_PRESETS, w as DEFAULT_APPROXIMATE_METRICS, Aa as DEFAULT_MISSING_KEY, fo as DEFAULT_PERCENTILE, ir as DEFAULT_RUNTIME_LIMITS, qi as DEFAULT_SEARCH_MODE, ga as DEFAULT_STRING_COMPARISON, Vn as DEFAULT_TEMPORAL, re as DELETION_STATES, nt as DERIVED_FORMAT_STYLES, da as DERIVED_KINDS, cn as DURATION_COMPARISONS, Oe as EDITOR_INPUTS, la as EPOCH_TIME_UNITS, Yr as EXPRESSION_OPERATORS, Co as ExportCancelledError, It as FIELDLESS_FIELD_KIND_IDS, ae as FIELD_CELL_IDS, lt as FIELD_METRIC_TYPES, ta as FIELD_TONES, fi as FILTER_GROUP_OPERATORS, rt as FILTER_TYPE_OPERATOR, Ai as FIRST_PAGE, Bo as HAVING_OPERATORS, Rt as MAX_CHART_LEVELS, Ni as MAX_DASHBOARD_FILTERS, Jn as MAX_DASHBOARD_TABS, St as MAX_DERIVED_DECIMALS, Gr as MAX_HEADING_LENGTH, Hi as MAX_MARKDOWN_LENGTH, se as MAX_MOVING_WINDOW, Wt as MAX_NUMERIC_SCALE, $n as MAX_PANEL_LINKS, S as MAX_RELATIVE_DATE_AMOUNT, Li as MAX_TIMER_DELAY_MS, I as MAX_VIEW_CONFIG_BYTES, In as MAX_VIEW_TITLE_LENGTH, Gi as METADATA_FIELD_KINDS, be as METADATA_FIELD_KIND_IDS, ra as METRIC_HEADLINES, ac as MemoryViewStore, fe as NUMERIC_TYPES, ut as ONE_DAY_PRESETS, xr as OPERATOR_SIGN, ur as PANEL_PRESENTATION_MEMBERS, ht as PEAKS_ONLY_FROM, xi as PRESENCE_OPERATORS, r as RECORD_PRESENTATION_MEMBERS, Kt as REFERENCE_STATISTICS, Be as RELATIVE_DATE_UNITS, mt as SEARCH_MODES, Ea as STACKED_COLUMNS, zr as STRING_COMPARISONS, c as SUMMARY_FUNCTIONS, He as SYSTEM_INSTANCE_ID_PREFIX, vi as SYSTEM_INSTANCE_ID_SEPARATOR, Nr as TEMPORAL_FIELD_KIND_IDS, et as TEMPORAL_TYPES, st as TIME_PRECISIONS, No as VALUE_CANDIDATE_LIMIT, ms as VALUE_CANDIDATE_OPERATORS, ci as VIEW_AUDIENCES, vs as VIEW_KINDS, Mi as VIEW_SCOPES, pn as VIEW_STORE_ERROR_CODES, te as ViewCommandError, ss as ViewEngine, j as ViewStoreError, Zi as ViewWriteError, Oi as actions, io as addFilter, uo as addPanel, er as addTab, Ct as admitFilters, bt as aggregationFunctionsOf, Va as aliasOf, s as analysisProbeLimit, Xt as analysisScope, Ie as approximateMetrics, Po as arrangePanel, Ke as arrayFieldKind, Mr as asksForWhole, N as audienceOf, $a as autoBindings, ws as autoRunMembers, Ia as bindPanel, We as bindingsOf, Xi as boardCondition, fa as boardFilterChoices, zt as boardValueChoices, Fs as boardValueSources, mi as boardWidth, ke as booleanFieldKind, hs as bottomOf, Bs as bucketChange, an as bucketRange, R as builtinFieldKinds, yi as cardField, Br as chartMarks, ye as chartPickerGroups, de as chartUnfit, i as clampPage, or as clearFilter, Ls as clickDraftGaps, Ms as clickDraftOf, bi as clickOf, Re as clicksFilter, ar as columnHidden, zi as columnPinned, Ti as comboAxis, Or as comboMark, es as compactLayout, Ba as compactTab, $e as compileAnalysis, ot as compileAnalysisTotals, Xn as compileFilter, Tr as compilePresence, Gn as compileRecord, Ur as compileSummaries, ui as conditionOf, qr as conditions, L as configBytes, yr as countLeaves, Yn as coversScope, Ge as createFieldKindRegistry, ce as crossFilterChoices, v as currencyPathOf, nr as cursorPaging, y as dateDiffUnitsOf, ue as dateFieldKind, Me as datePartsOf, ft as dateTimeFieldKind, lo as defaultAnalysisConfig, b as defaultFilters, co as defaultPanelSize, gs as defaultRecordConfig, Ss as defaultRuntimeEnvironment, Zs as defineView, $i as deletionFieldKind, mr as derivedMetric, kn as derivedText, Ot as describeFilter, Pn as describePresence, oi as describePresenceParts, Jo as detailSections, Os as draftedClick, qo as drillConditions, ro as drillFilter, Go as drillGroups, po as duplicatePanel, fr as durationFrom, Ki as durationMetric, Ra as editContent, zn as elementFields, ln as elementFilterFields, sa as elementMatchFieldKind, Zo as emptyDashboardConfig, Dn as emptyFilter, q as emptyPreferences, ma as enumFieldKind, je as epochUnitOf, Ye as expressionFieldsOf, ha as expressionText, l as familyOf, Je as fieldAliasSegment, Ps as fieldGroups, ia as fillUrl, Ne as filterCondition, Xe as filterControlValue, Mt as filterEditor, Wi as filterFields, Lo as filterIndexes, Ta as filterOperatorOf, Ha as filterReach, ee as filterStoredValue, Qr as filterTypeOf, on as filterValueIssues, De as filtersOf, Ja as filtersOnTab, mo as firstMetric, ko as fitChartSlots, pt as fitCharts, ls as fitsGrid, La as focusOn, _ as formulaFormat, Bn as formulaMetric, Qt as freeAlias, Uo as freeSpot, za as groupFacts, jt as groupFieldsOf, Ua as groupFor, xa as groupJoinWord, dn as groupKeyText, qa as groupOfType, os as groupableFields, To as grownLayout, ps as hasAsked, Qo as hasResult, Ro as havingRows, Ht as impliedDeletion, C as innermostElement, pa as insertAt, xt as isAdditiveMetric, bn as isApproximate, tr as isBlankFilter, $t as isBlankFilterValue, Dt as isBlankLeafValue, ji as isChartColor, _n as isContentPanel, At as isDateCell, _i as isDateTimeFilterValue, ve as isDeletionState, ca as isDuration, Pe as isDurationFilterValue, Rn as isEmptyFilter, Pi as isExecutableFilter, us as isExportCancelledError, Ca as isFieldName, h as isFieldlessKind, oa as isFilterGroup, Xr as isFilterGroupOperator, Nt as isFilterLeaf, ne as isFilterNode, Ft as isFormula, p as isGroupItem, ba as isKnownEditorInput, Qi as isNegation, mn as isNumberRange, fn as isOneDayValue, Sn as isOrderedRange, En as isOwnedPanel, lr as isPercentStacked, ki as isPresenceOperator, Et as isPresentationMember, Vo as isRecordRuntime, t as isReferenceFilterValue, xo as isRootFilterIssue, a as isSafeContentUrl, Vt as isSimpleTree, rn as isSingleStringField, pi as isSmooth, Zr as isStacked, A as isSystemInstanceId, B as isSystemScope, Qe as isValidTimeZone, wa as isValueMetric, Bt as isViewCommandError, rr as isViewPanel, e as isViewStoreError, ge as isViewWriteError, f as issue, Fi as lastPageInWindow, to as leadMetric, Cs as levelLabel, qn as limitBounds, $s as localStorageSnapshot, ya as mapGlobalFilter, Is as mappedValues, T as maxSortFields, Wr as measureColumns, _e as mergeFilters, Wn as mergeGlobalFilter, di as metricCondition, Ae as metricFieldOf, qe as metricFormat, kt as metricFunctionOf, Sa as metricMeasure, m as metricMeasures, Ga as metricOfSummary, ie as metricReferenceText, vo as metricWithCondition, Vi as momentColumns, nn as momentMetrics, ja as moveFilter, Ka as movePanelToTab, dr as moveTab, $o as narrowValueCandidates, Ds as narrowsTo, ri as nearestPageSize, le as negateAt, ao as nextExpansion, Ma as nextLevel, dt as nodeAt, On as numberFieldKind, Te as numberFormatOf, Cr as offersPercentStack, gr as offersStacking, en as operatorsOf, jn as optionTabs, Ve as outOfScopeNames, ns as overlaps, ti as pageAfterShrink, Le as pageSummaries, Si as pageWindow, Er as pagedPaging, E as panelFilterTree, Ii as panelTab, ni as panelsOf, wn as parseSystemInstanceId, Pr as peaksOnlyLabels, at as periodOf, Ri as periodRollover, fs as placePanel, Ao as placePanelIn, Do as presentationMembers, Ci as presentationMembersOf, qt as pressableGroups, Qn as projectAnalysis, xn as projectRecord, gn as projectSummaries, z as qualify, ys as rangeSpan, Lr as readInstant, D as readValue, cs as readValueCandidates, Yo as readingOrder, k as readsAsItsField, Ts as recommendDateUnit, jo as recordCapabilityOf, Bi as recordProjection, Tn as recordValue, as as referToSaved, pr as referenceFieldKind, Dr as referencedInstance, Fe as relativeFields, yn as relativeName, hn as relativeTree, Ir as removeAt, o as removeConditionAt, bs as removeFilter, oo as removeFixedScope, Wa as removePanel, hi as removeTab, Pa as renameFilter, _o as renamePanel, $r as renameTab, _s as reorderPanel, Mo as reorderPanelIn, ho as replacePanelView, yt as resolveDateTimeBound, g as resolveDateTimeRange, Oo as resultSpan, Na as retypeFilter, Fo as rootSearch, cr as rowCurrency, jr as sameFilterNode, Ze as sameFilterTree, _r as sameFilterType, x as say, Cn as scopePrefix, br as searchFieldKind, rs as searchFieldOf, js as serializeCsv, tt as seriesMark, yo as setBoardWidth, Qa as setFilterDefault, Ko as setFilterMultiple, Oa as setFilterOneDay, Wo as setFilterOptions, Xa as setFilterRequired, Ce as setPanelClick, eo as setPresentation, Za as setTimeGrouping, Rr as shapeChart, Ya as splitBy, Io as stackedLayout, Ji as stacks, _a as stageValues, Jr as stringFieldKind, Zn as summaryAlias, go as summaryChoices, Zt as summaryFunctionsOf, bo as summaryOf, Da as switchChartType, Tt as systemInstanceId, Fn as tabsOf, he as takesGroup, un as temporalOf, ze as text, gi as textKeyOf, P as titleProblem, F as toSummary, no as unbindPanels, wt as unknownOrOutside, zo as unmarkedErrors, it as updateAt, Rs as urlFillable, _t as urlPlaceholders, si as validateAnalysis, Hr as validateBoardClick, Kn as validateChart, Kr as validateDashboard, tn as validateDataConfigBase, aa as validateDefinition, ei as validateFilter, vr as validateFilterFields, Ui as validateLayout, d as validatePanelClick, Ue as validateRecord, wr as validateTabs, Nn as validateTimeGrouping, O as validateViewConfigBase, Ho as valueCandidateField, wo as valueCandidateLimit, ts as valueCandidateNarrowing, ds as valueCandidatesConfig, ct as valueLabelsOn, ks as valueSourceKey, Pt as variantGroups, vt as walkFilter, we as walkFilterShape, Ee as wallClockAt, Es as wireableFields, ka as wiredOptions, Ns as withBoard, xs as withElements, Jt as withFieldKinds, So as withHavingRows, is as withLayouts, so as withLevel, Hn as withMovedTo, n as withOutOfScope, ua as withPercentStack, Xo as withRootSearch, Lt as withSlot, oe as withSmooth, na as withStacked, Gt as withStageOrder, xe as withStagesFrom, vn as withText, Fa as withoutLevelsFrom, ea as wordReferences, sn as writeValue };
476
+ export { Ss as ALWAYS_VISIBLE, Kr as ANALYSIS_AUTO_RUN_MEMBERS, u as ANALYSIS_DATE_DIFF_UNITS, Br as ANALYSIS_DATE_PARTS, at as ANALYSIS_DATE_UNITS, ft as ANALYSIS_PRESENTATION_MEMBERS, dr as BUILTIN_FIELD_KINDS, Xi as BUILTIN_FIELD_KIND_IDS, Jn as CARTESIAN_MISSING, pa as CHART_COLOR_SLOTS, me as CHART_FAMILIES, Ht as CHART_FAMILY, qt as CHART_PICKER_ORDER, ce as CHART_TYPES, zs as CLICK_GO_KINDS, pi as CODE_REVISION, As as CSV_BOM, va as CURRENCY_CODE_PATTERN, Hn as DASHBOARD_FILTER_KINDS, mi as DASHBOARD_FILTER_TYPES, Ii as DASHBOARD_GRID_COLUMNS, er as DASHBOARD_PRESENTATION_MEMBERS, Zr as DASHBOARD_WIDTHS, Tt as DATE_PART_DOMAINS, Kn as DATE_SUMMARY_FUNCTIONS, Qt as DATE_TIME_PRESETS, ze as DEFAULT_APPROXIMATE_METRICS, go as DEFAULT_MISSING_KEY, Wa as DEFAULT_PERCENTILE, Oi as DEFAULT_RUNTIME_LIMITS, da as DEFAULT_SEARCH_MODE, Bt as DEFAULT_STRING_COMPARISON, oe as DEFAULT_TEMPORAL, ie as DELETION_STATES, b as DERIVED_FORMAT_STYLES, aa as DERIVED_KINDS, fn as DURATION_COMPARISONS, Sa as EDITOR_INPUTS, ra as EPOCH_TIME_UNITS, ti as EXPRESSION_OPERATORS, ts as ExportCancelledError, Jt as FIELDLESS_FIELD_KIND_IDS, xe as FIELD_CELL_IDS, Pe as FIELD_METRIC_TYPES, pe as FIELD_TONES, yr as FILTER_GROUP_OPERATORS, ot as FILTER_TYPE_OPERATOR, Pi as FIRST_PAGE, Vo as HAVING_OPERATORS, Xt as MAX_CHART_LEVELS, Gi as MAX_DASHBOARD_FILTERS, ar as MAX_DASHBOARD_TABS, Qe as MAX_DERIVED_DECIMALS, mr as MAX_HEADING_LENGTH, z as MAX_MARKDOWN_LENGTH, Ce as MAX_MOVING_WINDOW, _t as MAX_NUMERIC_SCALE, ri as MAX_PANEL_LINKS, C as MAX_RELATIVE_DATE_AMOUNT, Mr as MAX_TIMER_DELAY_MS, B as MAX_VIEW_CONFIG_BYTES, Qn as MAX_VIEW_TITLE_LENGTH, Ji as METADATA_FIELD_KINDS, Wr as METADATA_FIELD_KIND_IDS, he as METRIC_HEADLINES, ac as MemoryViewStore, c as NUMERIC_TYPES, pt as ONE_DAY_PRESETS, Tr as OPERATOR_SIGN, Dr as PANEL_PRESENTATION_MEMBERS, vt as PEAKS_ONLY_FROM, Ti as PRESENCE_OPERATORS, li as RECORD_PRESENTATION_MEMBERS, yt as REFERENCE_STATISTICS, Ue as RELATIVE_DATE_UNITS, Rr as SEARCH_MODES, Lo as STACKED_COLUMNS, rt as STRING_COMPARISONS, ut as SUMMARY_FUNCTIONS, Tn as SYSTEM_INSTANCE_ID_PREFIX, bn as SYSTEM_INSTANCE_ID_SEPARATOR, Ct as TEMPORAL_FIELD_KIND_IDS, y as TEMPORAL_TYPES, Ne as TIME_PRECISIONS, ms as VALUE_CANDIDATE_LIMIT, $o as VALUE_CANDIDATE_OPERATORS, Xr as VIEW_AUDIENCES, To as VIEW_KINDS, Wi as VIEW_SCOPES, e as VIEW_STORE_ERROR_CODES, ne as ViewCommandError, cs as ViewEngine, N as ViewStoreError, $i as ViewWriteError, Mi as actions, Pa as addFilter, Ua as addPanel, or as addTab, Et as admitFilters, Ze as aggregationFunctionsOf, mo as aliasOf, s as analysisProbeLimit, $t as analysisScope, kn as approximateMetrics, hs as arrangePanel, Ye as arrayFieldKind, Lr as asksForWhole, M as audienceOf, Ba as autoBindings, vs as autoRunMembers, Ga as bindPanel, qe as bindingsOf, Qi as boardCondition, ma as boardFilterChoices, Ut as boardValueChoices, Fs as boardValueSources, xr as boardWidth, je as booleanFieldKind, es as bottomOf, Bs as bucketChange, cn as bucketRange, L as builtinFieldKinds, Ci as cardField, Gr as chartMarks, be as chartPickerGroups, fe as chartUnfit, i as clampPage, hi as clearFilter, Ls as clickDraftGaps, Ms as clickDraftOf, wi as clickOf, Ve as clicksFilter, Ai as columnHidden, Pr as columnPinned, ki as comboAxis, Nr as comboMark, us as compactLayout, po as compactTab, nt as compileAnalysis, lt as compileAnalysisTotals, nr as compileFilter, kr as compilePresence, Xn as compileRecord, Jr as compileSummaries, $r as conditionOf, Cr as conditions, P as configBytes, gr as countLeaves, tr as coversScope, f as createFieldKindRegistry, le as crossFilterChoices, Pt as currencyPathOf, cr as cursorPaging, Ft as dateDiffUnitsOf, de as dateFieldKind, Ea as datePartsOf, ht as dateTimeFieldKind, vo as defaultAnalysisConfig, x as defaultFilters, _o as defaultPanelSize, Po as defaultRecordConfig, co as defaultRuntimeEnvironment, Zs as defineView, ta as deletionFieldKind, vr as derivedMetric, Pn as derivedText, Mt as describeFilter, zn as describePresence, di as describePresenceParts, gs as detailSections, Os as draftedClick, ja as drillConditions, Ds as drillFilter, eo as drillGroups, Va as duplicatePanel, Mn as durationFrom, Yi as durationMetric, Ya as editContent, Wn as elementFields, pn as elementFilterFields, la as elementMatchFieldKind, Uo as emptyDashboardConfig, qi as emptyFilter, q as emptyPreferences, ga as enumFieldKind, Ta as epochUnitOf, ee as expressionFieldsOf, _a as expressionText, l as familyOf, h as fieldAliasSegment, Ps as fieldGroups, oa as fillUrl, Fe as filterCondition, $e as filterControlValue, It as filterEditor, ha as filterFields, Je as filterIndexes, Da as filterOperatorOf, Za as filterReach, te as filterStoredValue, Ln as filterTypeOf, un as filterValueIssues, ke as filtersOf, oo as filtersOnTab, Ha as firstMetric, Jo as fitChartSlots, gt as fitCharts, Go as fitsGrid, Ka as focusOn, v as formulaFormat, Gn as formulaMetric, tn as freeAlias, ko as freeSpot, Xa as groupFacts, ln as groupFieldsOf, Qa as groupFor, Ca as groupJoinWord, hn as groupKeyText, ss as groupOfType, Ja as groupableFields, rs as grownLayout, ps as hasAsked, Qo as hasResult, Eo as havingRows, Kt as impliedDeletion, w as innermostElement, Un as insertAt, wt as isAdditiveMetric, kt as isApproximate, sr as isBlankFilter, nn as isBlankFilterValue, rn as isBlankLeafValue, Fi as isChartColor, Sn as isContentPanel, sn as isDateCell, bi as isDateTimeFilterValue, ye as isDeletionState, ua as isDuration, Le as isDurationFilterValue, ca as isEmptyFilter, Li as isExecutableFilter, jo as isExportCancelledError, Ee as isFieldName, en as isFieldlessKind, Lt as isFilterGroup, Fn as isFilterGroupOperator, re as isFilterLeaf, ea as isFilterNode, zt as isFormula, p as isGroupItem, O as isKnownEditorInput, Gt as isNegation, vn as isNumberRange, gn as isOneDayValue, Dn as isOrderedRange, jn as isOwnedPanel, pr as isPercentStacked, Ni as isPresenceOperator, At as isPresentationMember, Do as isRecordRuntime, t as isReferenceFilterValue, jt as isRootFilterIssue, a as isSafeContentUrl, ve as isSimpleTree, mn as isSingleStringField, _i as isSmooth, ni as isStacked, r as isSystemInstanceId, R as isSystemScope, tt as isValidTimeZone, Oe as isValueMetric, Wt as isViewCommandError, lr as isViewPanel, ci as isViewStoreError, _e as isViewWriteError, A as issue, Ri as lastPageInWindow, ka as leadMetric, lo as levelLabel, $n as limitBounds, $s as localStorageSnapshot, xa as mapGlobalFilter, Is as mappedValues, E as maxSortFields, Yr as measureColumns, ue as mergeFilters, Yn as mergeGlobalFilter, gi as metricCondition, Me as metricFieldOf, Xe as metricFormat, Nt as metricFunctionOf, wa as metricMeasure, m as metricMeasures, So as metricOfSummary, ae as metricReferenceText, bo as metricWithCondition, Ui as momentColumns, on as momentMetrics, bs as moveFilter, os as movePanelToTab, hr as moveTab, ls as narrowValueCandidates, Na as narrowsTo, Vn as nearestPageSize, mt as negateAt, Fa as nextExpansion, xs as nextLevel, Vr as nodeAt, Nn as numberFieldKind, T as numberFormatOf, Er as offersPercentStack, br as offersStacking, dn as operatorsOf, In as optionTabs, We as outOfScopeNames, fs as overlaps, oi as pageAfterShrink, Be as pageSummaries, Ei as pageWindow, Ar as pagedPaging, D as panelFilterTree, zi as panelTab, si as panelsOf, ur as parseSystemInstanceId, zr as peaksOnlyLabels, ct as periodOf, Bi as periodRollover, No as placePanel, Yo as placePanelIn, ws as presentationMembers, Di as presentationMembersOf, Zt as pressableGroups, ir as projectAnalysis, En as projectRecord, xn as projectSummaries, xi as qualify, Ts as rangeSpan, Hr as readInstant, S as readValue, Wo as readValueCandidates, _s as readingOrder, Te as readsAsItsField, Ao as recommendDateUnit, Ro as recordCapabilityOf, Hi as recordProjection, An as recordValue, qa as referToSaved, _r as referenceFieldKind, jr as referencedInstance, Re as relativeFields, wn as relativeName, yn as relativeTree, o as removeAt, Ir as removeConditionAt, uo as removeFilter, Ra as removeFixedScope, xo as removePanel, vi as removeTab, Ia as renameFilter, yo as renamePanel, ii as renameTab, Fo as reorderPanel, zo as reorderPanelIn, Co as replacePanelView, St as resolveDateTimeBound, _ as resolveDateTimeRange, Cs as resultSpan, no as retypeFilter, is as rootSearch, fr as rowCurrency, et as sameFilterNode, st as sameFilterTree, ba as sameFilterType, Ie as say, On as scopePrefix, wr as searchFieldKind, Xo as searchFieldOf, js as serializeCsv, it as seriesMark, io as setBoardWidth, qo as setFilterDefault, Aa as setFilterMultiple, Ko as setFilterOneDay, $a as setFilterOptions, to as setFilterRequired, we as setPanelClick, Oa as setPresentation, ro as setTimeGrouping, Ur as shapeChart, so as splitBy, as as stackedLayout, Zi as stacks, ya as stageValues, ei as stringFieldKind, rr as summaryAlias, wo as summaryChoices, Ge as summaryFunctionsOf, ao as summaryOf, Io as switchChartType, Vi as systemInstanceId, Bn as tabsOf, ge as takesGroup, Si as temporalOf, Cn as text, _n as textKeyOf, I as titleProblem, F as toSummary, Es as unbindPanels, Ot as unknownOrOutside, Bo as unmarkedErrors, xt as updateAt, Rs as urlFillable, bt as urlPlaceholders, fi as validateAnalysis, qr as validateBoardClick, Zn as validateChart, Qr as validateDashboard, an as validateDataConfigBase, sa as validateDefinition, ai as validateFilter, Sr as validateFilterFields, Ki as validateLayout, d as validatePanelClick, Ke as validateRecord, Or as validateTabs, Rn as validateTimeGrouping, k as validateViewConfigBase, Oo as valueCandidateField, ns as valueCandidateLimit, ds as valueCandidateNarrowing, Mo as valueCandidatesConfig, dt as valueLabelsOn, ks as valueSourceKey, Rt as variantGroups, g as walkFilter, Ae as walkFilterShape, De as wallClockAt, Ma as wireableFields, ho as wiredOptions, Ns as withBoard, fo as withElements, He as withFieldKinds, ys as withHavingRows, Zo as withLayouts, za as withLevel, qn as withMovedTo, n as withOutOfScope, fa as withPercentStack, Ho as withRootSearch, Vt as withSlot, se as withSmooth, ia as withStacked, Yt as withStageOrder, Se as withStagesFrom, Dt as withText, La as withoutLevelsFrom, na as wordReferences, yi as writeValue };
477
477
 
478
478
  //# sourceMappingURL=index.js.map