@marimo-team/islands 0.22.1-dev32 → 0.22.1-dev37

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 (47) hide show
  1. package/dist/{chat-ui-eH46RYWT.js → chat-ui-CJCTr1kq.js} +2 -2
  2. package/dist/{glide-data-editor-VgPtWvhu.js → glide-data-editor-BQPLhydy.js} +1 -1
  3. package/dist/main.js +291 -207
  4. package/dist/{process-output-BbUNe4iH.js → process-output-D0SEeV3t.js} +4 -4
  5. package/dist/{toDate-BzYZtEK7.js → toDate-CUqpEbBS.js} +1 -1
  6. package/dist/{useDeepCompareMemoize-iM1YNTEF.js → useDeepCompareMemoize-Ch-7Rk2x.js} +1 -1
  7. package/dist/{vega-component-CkpTXaRx.js → vega-component-CPhNLfZZ.js} +4 -4
  8. package/package.json +1 -1
  9. package/src/components/chat/acp/state.ts +1 -1
  10. package/src/components/chat/chat-history-popover.tsx +1 -1
  11. package/src/components/data-table/data-table.tsx +12 -12
  12. package/src/components/data-table/pagination.tsx +1 -1
  13. package/src/components/editor/cell/code/cell-editor.tsx +1 -1
  14. package/src/components/editor/chrome/panels/snippets-panel.tsx +1 -1
  15. package/src/components/editor/chrome/panels/write-secret-modal.tsx +1 -1
  16. package/src/components/editor/chrome/wrapper/storage.ts +2 -2
  17. package/src/components/editor/connections/database/as-code.ts +1 -1
  18. package/src/components/editor/connections/form-renderers.tsx +1 -1
  19. package/src/components/editor/connections/storage/as-code.ts +1 -1
  20. package/src/components/editor/links/cell-link-list.tsx +1 -1
  21. package/src/components/editor/navigation/clipboard.ts +1 -1
  22. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +2 -2
  23. package/src/components/editor/navigation/navigation.ts +2 -2
  24. package/src/components/editor/output/JsonOutput.tsx +2 -2
  25. package/src/components/editor/output/console/ConsoleOutput.tsx +1 -1
  26. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
  27. package/src/components/pages/gallery-page.tsx +1 -1
  28. package/src/components/variables/variables-table.tsx +1 -1
  29. package/src/core/cells/cells.ts +1 -1
  30. package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
  31. package/src/core/codemirror/copilot/getCodes.ts +1 -1
  32. package/src/core/codemirror/copilot/transport.ts +1 -0
  33. package/src/core/datasets/state.ts +1 -1
  34. package/src/core/network/CachingRequestRegistry.ts +1 -1
  35. package/src/core/runtime/runtime.ts +1 -0
  36. package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +1 -1
  37. package/src/plugins/impl/anywidget/__tests__/model.test.ts +2 -2
  38. package/src/plugins/impl/data-editor/glide-data-editor.tsx +1 -1
  39. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +62 -44
  40. package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +114 -0
  41. package/src/plugins/impl/plotly/__tests__/selection.test.ts +158 -196
  42. package/src/plugins/impl/plotly/selection.ts +274 -56
  43. package/src/plugins/impl/vega/make-selectable.ts +2 -2
  44. package/src/utils/__tests__/multi-map.test.ts +3 -3
  45. package/src/utils/__tests__/versions.test.ts +5 -5
  46. package/src/utils/arrays.ts +1 -1
  47. package/src/utils/mime-types.ts +1 -1
package/dist/main.js CHANGED
@@ -21,7 +21,7 @@ import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __c
21
21
  import { t as require_react } from "./react-Bs6Z0kvn.js";
22
22
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
23
23
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-B7781WJ3.js";
24
- import { $ as createActions, $t as elementContainsMarimoCellFile, A as MarimoIncomingMessageEvent, An as PaintRoller, B as DotFilledIcon, Bn as CircleX, Bt as PluralWords, Cn as Content2$1, Ct as normalizeName, D as AccordionContent, Dn as Wrench, E as Accordion, En as Trigger2, Et as MarkdownLanguageAdapter, F as BorderAllIcon, Fn as File, Ft as repl, G as base64ToDataView, H as PinRightIcon, Hn as Braces, Ht as getDataTypeColor, In as FileText, It as adaptForLocalStorage, J as extractBase64FromDataURL, Jt as getRequestClient, K as base64ToUint8Array, L as CheckIcon, Ln as Eye, Lt as jotaiJsonStorage, M as MarimoValueReadyEvent, Mn as LoaderCircle, Mt as DeferredRequestRegistry, N as MarimoValueUpdateEvent, Nn as Layers, Nt as generateUUID, O as AccordionItem, On as Trash2, Ot as PathBuilder, P as createInputEvent, Pn as Info, Pt as useChromeActions, R as ChevronDownIcon, Rn as Database, Sn as Close$1, St as isInternalCellName, Tn as Root2$4, Tt as customPythonLanguageSupport, U as deserializeBlob, Un as esm_default$1, Ut as require_client, V as PinLeftIcon, Vn as CircleAlert, Vt as DATA_TYPE_ICON, Wn as import_lib, X as safeExtractSetUIElementMessageBuffers, Xt as useRequestClient, Y as isDataURLString, Yt as requestClientAtom, Z as renderHTML, Zt as isUninstantiated, _ as useExpandedConsoleOutput, _n as jsonToTSV, _t as headingToIdentifier, a as toPng, an as parseAttrValue, at as useCellActions, b as getDatasourceContext, bn as selectAtom, bt as displayCellName, c as useCellFocusActions, cn as CellOutputId, ct as createCell, d as Spinner, dn as UIElementId, dt as initialModeAtom, en as extractAllTracebackInfo, et as getCellEditorView, f as Popover$1, fn as findCellId, ft as kioskModeAtom, g as isOutputEmpty, gn as jsonToMarkdown, gt as isErrorMime, h as PopoverTrigger, hn as jsonParseWithSpecialChar, ht as outputIsStale, i as PythonIcon, in as filenameAtom, it as reducer, j as MarimoValueInputEvent, jn as NotebookPen, jt as goToCellLine, k as AccordionTrigger, kn as Table2, kt as Paths, l as useLastFocusedCellId, ln as HTMLCellId, lt as AnsiUp, m as PopoverContent, mn as RANDOM_ID_ATTR, mt as outputIsLoading, n as blobToString, nn as NotebookScopedLocalStorage, nt as notebookAtom, o as MarkdownRenderer, on as parseDataset, ot as useCellIds, p as PopoverClose$1, pn as OBJECT_ID_ATTR, pt as viewStateAtom, q as dataViewToBase64, qt as convertStatsName, r as filesToBase64, rt as notebookOutline, s as LazyAnyLanguageCodeMirror, sn as parseInitialValue, st as useCellNames, t as processOutput, tn as getTracebackInfo, tt as getCellNames, u as maybeAddAltairImport, un as SCRATCH_CELL_ID, ut as getInitialAppMode, v as useExpandedOutput, vn as atomWithReducer, vt as DATA_CELL_ID, wn as Item$1, wt as Checkbox, xt as getValidName, yn as atomWithStorage, yt as getCellDomProps, z as ChevronRightIcon, zn as Columns2, zt as PluralWord, __tla as __tla_0 } from "./process-output-BbUNe4iH.js";
24
+ import { $ as createActions, $t as elementContainsMarimoCellFile, A as MarimoIncomingMessageEvent, An as PaintRoller, B as DotFilledIcon, Bn as CircleX, Bt as PluralWords, Cn as Content2$1, Ct as normalizeName, D as AccordionContent, Dn as Wrench, E as Accordion, En as Trigger2, Et as MarkdownLanguageAdapter, F as BorderAllIcon, Fn as File, Ft as repl, G as base64ToDataView, H as PinRightIcon, Hn as Braces, Ht as getDataTypeColor, In as FileText, It as adaptForLocalStorage, J as extractBase64FromDataURL, Jt as getRequestClient, K as base64ToUint8Array, L as CheckIcon, Ln as Eye, Lt as jotaiJsonStorage, M as MarimoValueReadyEvent, Mn as LoaderCircle, Mt as DeferredRequestRegistry, N as MarimoValueUpdateEvent, Nn as Layers, Nt as generateUUID, O as AccordionItem, On as Trash2, Ot as PathBuilder, P as createInputEvent, Pn as Info, Pt as useChromeActions, R as ChevronDownIcon, Rn as Database, Sn as Close$1, St as isInternalCellName, Tn as Root2$4, Tt as customPythonLanguageSupport, U as deserializeBlob, Un as esm_default$1, Ut as require_client, V as PinLeftIcon, Vn as CircleAlert, Vt as DATA_TYPE_ICON, Wn as import_lib, X as safeExtractSetUIElementMessageBuffers, Xt as useRequestClient, Y as isDataURLString, Yt as requestClientAtom, Z as renderHTML, Zt as isUninstantiated, _ as useExpandedConsoleOutput, _n as jsonToTSV, _t as headingToIdentifier, a as toPng, an as parseAttrValue, at as useCellActions, b as getDatasourceContext, bn as selectAtom, bt as displayCellName, c as useCellFocusActions, cn as CellOutputId, ct as createCell, d as Spinner, dn as UIElementId, dt as initialModeAtom, en as extractAllTracebackInfo, et as getCellEditorView, f as Popover$1, fn as findCellId, ft as kioskModeAtom, g as isOutputEmpty, gn as jsonToMarkdown, gt as isErrorMime, h as PopoverTrigger, hn as jsonParseWithSpecialChar, ht as outputIsStale, i as PythonIcon, in as filenameAtom, it as reducer, j as MarimoValueInputEvent, jn as NotebookPen, jt as goToCellLine, k as AccordionTrigger, kn as Table2, kt as Paths, l as useLastFocusedCellId, ln as HTMLCellId, lt as AnsiUp, m as PopoverContent, mn as RANDOM_ID_ATTR, mt as outputIsLoading, n as blobToString, nn as NotebookScopedLocalStorage, nt as notebookAtom, o as MarkdownRenderer, on as parseDataset, ot as useCellIds, p as PopoverClose$1, pn as OBJECT_ID_ATTR, pt as viewStateAtom, q as dataViewToBase64, qt as convertStatsName, r as filesToBase64, rt as notebookOutline, s as LazyAnyLanguageCodeMirror, sn as parseInitialValue, st as useCellNames, t as processOutput, tn as getTracebackInfo, tt as getCellNames, u as maybeAddAltairImport, un as SCRATCH_CELL_ID, ut as getInitialAppMode, v as useExpandedOutput, vn as atomWithReducer, vt as DATA_CELL_ID, wn as Item$1, wt as Checkbox, xt as getValidName, yn as atomWithStorage, yt as getCellDomProps, z as ChevronRightIcon, zn as Columns2, zt as PluralWord, __tla as __tla_0 } from "./process-output-D0SEeV3t.js";
25
25
  import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-C428iZBW.js";
26
26
  import { l as createLucideIcon, o as useSize, s as Root$4 } from "./dist-D_UjpfOY.js";
27
27
  import { A as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as ListFilter, I as ChartPie, L as ChartColumn, M as $5a387cc49350e6db$export$722debc0e56fea39, N as Table$1, O as TIME_UNIT_DESCRIPTIONS, P as SquareFunction, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as $fb18d541ea1ad717$export$ad991b66133851cf, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-CiHus5Bb.js";
@@ -29,7 +29,7 @@ import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as Togg
29
29
  import { t as Check } from "./check-CWUkiHmb.js";
30
30
  import { A as Icon, C as logNever, D as $18f2051aff69b9bf$export$a54013f0d02a8f82, E as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, F as createCollection, I as X, M as clamp$3, N as usePrevious$1, O as $b5e257d569688ac6$export$535bd6ca7f90a273, P as useDirection, R as ChevronDown, S as assertNever, T as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5, _ as menuControlVariants, a as SelectContent, b as menuSeparatorVariants, c as SelectLabel, d as SelectValue, f as NativeSelect, g as menuControlCheckVariants, h as menuContentCommon, i as Select, j as Trigger$3, l as SelectSeparator, m as MENU_ITEM_DISABLED, n as Strings, o as SelectGroup, p as selectStyles, r as capitalize, s as SelectItem, t as Label, u as SelectTrigger, v as menuItemVariants, w as $a916eb452884faea$export$b7a616150fdb9f44, x as menuSubTriggerVariants, y as menuLabelVariants } from "./label-DbZGAoCH.js";
31
31
  import { $ as $e5be200c675c3b3a$export$aca958c65c314e6c, $t as Portal, A as $d2b4bc8c273e7be6$export$24d547caef80ccd1, At as $c87311424ea30a05$export$fedb369cb70207f1, B as $64fa3d84918910a7$export$c62b8e45d58ddad9, Bt as $431fbd86ca7dc216$export$f21a1ffae260145a, C as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, Ct as $8ae05eaa5c114e9c$export$7f54fc3180508a52, D as $ee014567cb39d3f0$export$ff05c3ac10437e03, Dt as $c87311424ea30a05$export$78551043582a6a98, E as $ee014567cb39d3f0$export$f551688fc98f2e09, Et as $c87311424ea30a05$export$6446a186d09e379e, F as $64fa3d84918910a7$export$2881499e37b75b9a, Ft as $d4ee10de306f2510$export$b4f377a2b6254582, G as marked, Gt as Anchor2, H as $64fa3d84918910a7$export$ef03459518577ad4, Ht as $bdb11010cef70236$export$b4cc09c592e8fdb8, I as $64fa3d84918910a7$export$29f1550f4b0d4415, It as $d4ee10de306f2510$export$cd4e5573fbe2b576, J as $d2e8511e6f209edf$export$e908e06f4b8e3402, Jt as Content2$2, K as useDebounceControlledState, Kt as Arrow2, L as $64fa3d84918910a7$export$4d86445c2cf5e3, Lt as $d4ee10de306f2510$export$e58f029f0fbfdb29, M as $01b77f81d0f07f68$export$75b6ee27786ba447, Mt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, N as $01b77f81d0f07f68$export$b04be29aa201d4f5, Nt as $3ef42575df84b30b$export$9d1611c77c2fe928, O as $514c0188e459b4c0$export$5f1af8db9871e1d6, Ot as $c87311424ea30a05$export$9ac100e40613ea10, P as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Pt as $d4ee10de306f2510$export$4282f70798064fe0, Q as $e5be200c675c3b3a$export$a763b9476acd3eb, Qt as Label$2, R as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Rt as $f4e2df6bd15f8569$export$98658e8c59125e6a, S as $3985021b0ad6602f$export$f5b8910cec6cf069, St as $e9faafb641e167db$export$90fc3a17d93f704c, T as $d3e0e05bdfcf66bd$export$c24727297075ec6a, Tt as $313b98861ee5dd6c$export$d6875122194c7b44, U as $64fa3d84918910a7$export$fabf2dc03a41866e, Ut as $bdb11010cef70236$export$f680877a34711e37, V as $64fa3d84918910a7$export$df3a06d6289f983e, Vt as $ff5963eb1fccf552$export$e08e3b67e392101e, Wt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, X as $e93e671b31057976$export$b8473d3665f3a75a, Xt as Item2$2, Y as $2baaea4c71418dea$export$294aa081a6c6f55d, Yt as Group$1, Z as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, Zt as ItemIndicator, _ as DropdownMenuSub, _t as $9446cca9a3875146$export$7d15b64cf5a3a4c4, a as NumberField, an as SubContent, at as $6c7bd7858deea686$export$cd11ab140839f11d, b as DropdownMenuTrigger, bt as $b4b717babfbb907b$export$bebd5a1431fec25d, c as prettyNumber, cn as Item$2, ct as $6db58dc88e78b024$export$2f817fcdc4b89ae0, d as DropdownMenuContent, dn as Search, dt as $9ab94262bd0047c7$export$420e68273165f4ec, en as RadioGroup$2, et as $e5be200c675c3b3a$export$dad6ae84456c676a, f as DropdownMenuGroup, fn as Circle, ft as $3ad3f6e1647bc98d$export$80f3e147d781571c, g as DropdownMenuSeparator, gt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, h as DropdownMenuPortal, ht as _class_private_field_init, i as OnBlurredInput, in as Sub, it as $701a24aa0da5b062$export$ea18c227d4417cc3, j as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, jt as $7215afc6de606d6b$export$de79e2c695e052f3, k as $514c0188e459b4c0$export$9afb8bc826b033ea, kt as $c87311424ea30a05$export$a11b0059900ceec8, l as prettyScientificNumber, ln as Root$5, lt as $5b160d28a433310d$export$c17fa47878dc55b6, m as DropdownMenuLabel, mt as $f6c31cce2adf654f$export$45712eceda6fad21, n as DebouncedNumberInput, nn as Root3, nt as $319e236875307eab$export$a9b970dcc4ae71a9, o as maxFractionalDigits, on as SubTrigger, ot as $fca6afa0e843324b$export$87b761675e8eaa10, p as DropdownMenuItem, pn as ChevronRight, pt as $507fabe10e71c6fb$export$630ff653c5ada6a9, q as useDebouncedCallback, qt as CheckboxItem, r as Input, rn as Separator, rt as $f7dceffc5ad7768b$export$4e328f61c538687f, s as prettyEngineeringNumber, sn as createMenuScope, st as $fca6afa0e843324b$export$f12b703ca79dfbb1, t as DebouncedInput, tn as RadioItem, tt as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, u as DropdownMenu, un as createRovingFocusGroupScope, ut as $6179b936705e76d3$export$ae780daf29e6d456, v as DropdownMenuSubContent, vt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, w as $a049562f99e7db0e$export$f9c6924e160136d1, wt as $df56164dff5785e2$export$4338b53315abf666, x as $3985021b0ad6602f$export$37fb8590cf2c088c, xt as $99facab73266f662$export$5add1d006293d136, y as DropdownMenuSubTrigger, yt as $b4b717babfbb907b$export$4c063cf1350e6fed, z as $64fa3d84918910a7$export$c245e6201fed2f75, zt as $431fbd86ca7dc216$export$b204af158042fbac } from "./input-CFY9gApZ.js";
32
- import { a as millisecondsInMinute, c as asRemoteURL, d as isUrl, f as require_cuid2, g as CircleQuestionMark, h as isWasm, i as millisecondsInHour, m as Deferred, n as constructFrom, o as millisecondsInSecond, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, u as appendQueryParams } from "./toDate-BzYZtEK7.js";
32
+ import { a as millisecondsInMinute, c as asRemoteURL, d as isUrl, f as require_cuid2, g as CircleQuestionMark, h as isWasm, i as millisecondsInHour, m as Deferred, n as constructFrom, o as millisecondsInSecond, r as millisecondsInDay, s as millisecondsInWeek, t as toDate, u as appendQueryParams } from "./toDate-CUqpEbBS.js";
33
33
  import { a as Plus, i as Trash, n as ErrorBoundary, o as Pencil, r as require_prop_types, t as BulkEdit } from "./types-D_ntCXg0.js";
34
34
  import { n as clsx_default } from "./clsx-yW_RAw0K.js";
35
35
  import { _ as Functions, c as Objects, g as Logger, h as Events, i as NOT_SET, l as useEventListener, m as useComposedRefs, n as buttonVariants, o as isPlatformMac, p as composeRefs, r as cva, t as Button, u as Slot$1, v as throwNotImplemented, y as cn } from "./button-DNlNlZY_.js";
@@ -56,7 +56,7 @@ import "./dist-Ci0CXEFt.js";
56
56
  import "./dist-DJ9F1eHs.js";
57
57
  import { a as parser, r as python } from "./dist-DAfcmt-d.js";
58
58
  import "./purify.es-hTCfRGdl.js";
59
- import { a as AlertTitle, i as AlertDescription, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-iM1YNTEF.js";
59
+ import { a as AlertTitle, i as AlertDescription, n as arrow, o as isValid, r as Alert, t as useDeepCompareMemoize } from "./useDeepCompareMemoize-Ch-7Rk2x.js";
60
60
  import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-CJVjyntJ.js";
61
61
  import { n as formats } from "./vega-loader.browser-DqEcFOPD.js";
62
62
  import { a as getContainerWidth, n as vegaLoadData, o as getVegaFieldTypes, r as createBatchedLoader, s as tooltipHandler, t as parseCsvData } from "./loader-Bd1kgLn7.js";
@@ -23751,8 +23751,8 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
23751
23751
  if (c.some(_temp$34)) _ = "Interrupted";
23752
23752
  else if (c.some(_temp2$24)) _ = "An internal error occurred";
23753
23753
  else if (c.some(_temp3$16)) _ = "Ancestor prevented from running", v = "default", y = "text-secondary-foreground";
23754
- else if (c.some(_temp4$10)) _ = "Ancestor stopped", v = "default", y = "text-secondary-foreground";
23755
- else if (c.some(_temp5$7)) _ = "SQL error";
23754
+ else if (c.some(_temp4$9)) _ = "Ancestor stopped", v = "default", y = "text-secondary-foreground";
23755
+ else if (c.some(_temp5$6)) _ = "SQL error";
23756
23756
  else {
23757
23757
  let e2;
23758
23758
  r[0] === c ? e2 = r[1] : (e2 = c.find(_temp6$5), r[0] = c, r[1] = e2);
@@ -24124,10 +24124,10 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
24124
24124
  function _temp3$16(e) {
24125
24125
  return e.type === "ancestor-prevented";
24126
24126
  }
24127
- function _temp4$10(e) {
24127
+ function _temp4$9(e) {
24128
24128
  return e.type === "ancestor-stopped";
24129
24129
  }
24130
- function _temp5$7(e) {
24130
+ function _temp5$6(e) {
24131
24131
  return e.type === "sql-error";
24132
24132
  }
24133
24133
  function _temp6$5(e) {
@@ -24521,9 +24521,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
24521
24521
  }
24522
24522
  function sortByPrecedence(e, r) {
24523
24523
  let c = r.size;
24524
- return [
24525
- ...e
24526
- ].sort((e2, d) => (r.get(e2[0]) ?? c) - (r.get(d[0]) ?? c));
24524
+ return e.toSorted((e2, d) => (r.get(e2[0]) ?? c) - (r.get(d[0]) ?? c));
24527
24525
  }
24528
24526
  function processMimeBundle(e, r = getDefaultMimeConfig()) {
24529
24527
  if (e.length === 0) return {
@@ -34003,7 +34001,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
34003
34001
  100,
34004
34002
  _
34005
34003
  ])
34006
- ].sort((e2, r2) => e2 - r2);
34004
+ ].toSorted((e2, r2) => e2 - r2);
34007
34005
  return (0, import_jsx_runtime.jsxs)("div", {
34008
34006
  className: "flex flex-col lg:flex-row items-center gap-0.5 lg:gap-1 px-2",
34009
34007
  children: [
@@ -34906,58 +34904,56 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
34906
34904
  filters: c9,
34907
34905
  table: k9
34908
34906
  }),
34909
- (0, import_jsx_runtime.jsxs)(CellSelectionProvider, {
34910
- children: [
34911
- (0, import_jsx_runtime.jsxs)("div", {
34912
- part: "table-wrapper",
34913
- className: cn(r || "rounded-md border overflow-hidden"),
34914
- children: [
34915
- (0, import_jsx_runtime.jsx)(TableTopBar, {
34916
- enableSearch: i9,
34917
- searchQuery: a9,
34918
- onSearchQueryChange: o9,
34919
- reloading: u9,
34920
- showChartBuilder: m9,
34921
- isChartBuilderOpen: h9,
34922
- toggleDisplayHeader: p9,
34923
- showTableExplorer: _9,
34924
- togglePanel: v9,
34925
- isAnyPanelOpen: b9,
34926
- downloadAs: Q7
34927
- }),
34928
- (0, import_jsx_runtime.jsxs)(Table, {
34929
- className: "relative",
34930
- ref: M9,
34931
- children: [
34932
- C9 && (0, import_jsx_runtime.jsx)("thead", {
34933
- className: "absolute top-0 left-0 h-[3px] w-1/2 bg-primary animate-slide"
34934
- }),
34935
- renderTableHeader(k9, j9 || !!c),
34936
- (0, import_jsx_runtime.jsx)(DataTableBody, {
34937
- table: k9,
34938
- columns: d,
34939
- rowViewerPanelOpen: A9,
34940
- getRowIndex: O9,
34941
- viewedRowIdx: x9,
34942
- virtualize: j9
34943
- })
34944
- ]
34945
- })
34946
- ]
34947
- }),
34948
- (0, import_jsx_runtime.jsx)(TableBottomBar, {
34949
- part: "table-footer",
34950
- className: "border-t border-border pt-1.5 pb-0.5",
34951
- totalColumns: v,
34952
- pagination: e9,
34953
- selection: _,
34954
- onRowSelectionChange: t9,
34955
- table: k9,
34956
- getRowIds: r9,
34957
- showPageSizeSelector: g9,
34958
- tableLoading: u9
34959
- })
34960
- ]
34907
+ (0, import_jsx_runtime.jsx)(CellSelectionProvider, {
34908
+ children: (0, import_jsx_runtime.jsxs)("div", {
34909
+ part: "table-wrapper",
34910
+ className: cn(r || "rounded-md border overflow-hidden"),
34911
+ children: [
34912
+ (0, import_jsx_runtime.jsx)(TableTopBar, {
34913
+ enableSearch: i9,
34914
+ searchQuery: a9,
34915
+ onSearchQueryChange: o9,
34916
+ reloading: u9,
34917
+ showChartBuilder: m9,
34918
+ isChartBuilderOpen: h9,
34919
+ toggleDisplayHeader: p9,
34920
+ showTableExplorer: _9,
34921
+ togglePanel: v9,
34922
+ isAnyPanelOpen: b9,
34923
+ downloadAs: Q7
34924
+ }),
34925
+ (0, import_jsx_runtime.jsxs)(Table, {
34926
+ className: "relative",
34927
+ ref: M9,
34928
+ children: [
34929
+ C9 && (0, import_jsx_runtime.jsx)("thead", {
34930
+ className: "absolute top-0 left-0 h-[3px] w-1/2 bg-primary animate-slide"
34931
+ }),
34932
+ renderTableHeader(k9, j9 || !!c),
34933
+ (0, import_jsx_runtime.jsx)(DataTableBody, {
34934
+ table: k9,
34935
+ columns: d,
34936
+ rowViewerPanelOpen: A9,
34937
+ getRowIndex: O9,
34938
+ viewedRowIdx: x9,
34939
+ virtualize: j9
34940
+ })
34941
+ ]
34942
+ }),
34943
+ (0, import_jsx_runtime.jsx)(TableBottomBar, {
34944
+ part: "table-footer",
34945
+ className: "pt-1.5 pb-0.5 border-t border-border",
34946
+ totalColumns: v,
34947
+ pagination: e9,
34948
+ selection: _,
34949
+ onRowSelectionChange: t9,
34950
+ table: k9,
34951
+ getRowIds: r9,
34952
+ showPageSizeSelector: g9,
34953
+ tableLoading: u9
34954
+ })
34955
+ ]
34956
+ })
34961
34957
  })
34962
34958
  ]
34963
34959
  });
@@ -35997,14 +35993,14 @@ ${E}`,
35997
35993
  URL_TYPE,
35998
35994
  OBJECT_TYPE,
35999
35995
  FALLBACK_RENDERER
36000
- ].reverse(), JSON_VALUE_TYPES = [
35996
+ ].toReversed(), JSON_VALUE_TYPES = [
36001
35997
  INTEGER_TYPE,
36002
35998
  FLOAT_TYPE,
36003
35999
  JSON_BOOLEAN_TYPE,
36004
36000
  JSON_NONE_TYPE,
36005
36001
  JSON_OBJECT_TYPE,
36006
36002
  JSON_FALLBACK_RENDERER
36007
- ].reverse();
36003
+ ].toReversed();
36008
36004
  function leafData(e) {
36009
36005
  return leafDataAndMimeType(e)[0];
36010
36006
  }
@@ -37052,7 +37048,7 @@ ${E}`,
37052
37048
  };
37053
37049
  }
37054
37050
  };
37055
- var LazyChatbot = import_react.lazy(() => import("./chat-ui-eH46RYWT.js").then((e) => ({
37051
+ var LazyChatbot = import_react.lazy(() => import("./chat-ui-CJCTr1kq.js").then((e) => ({
37056
37052
  default: e.Chatbot
37057
37053
  }))), messageSchema = array(object({
37058
37054
  id: string(),
@@ -37137,7 +37133,7 @@ ${E}`,
37137
37133
  (0, import_jsx_runtime.jsx)(TableBody, {
37138
37134
  children: Array.from({
37139
37135
  length: h
37140
- }).map(_temp4$9)
37136
+ }).map(_temp4$8)
37141
37137
  })
37142
37138
  ]
37143
37139
  }), r[5] = h, r[6] = w);
@@ -37181,7 +37177,7 @@ ${E}`,
37181
37177
  })
37182
37178
  }, r);
37183
37179
  }
37184
- function _temp4$9(e, r) {
37180
+ function _temp4$8(e, r) {
37185
37181
  return (0, import_jsx_runtime.jsx)(TableRow, {
37186
37182
  children: Array.from({
37187
37183
  length: 8
@@ -37198,7 +37194,7 @@ ${E}`,
37198
37194
  "time",
37199
37195
  "unknown"
37200
37196
  ];
37201
- var import_compiler_runtime$84 = require_compiler_runtime(), TooltipProvider$2 = Provider$2, LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-VgPtWvhu.js").then(async (m2) => {
37197
+ var import_compiler_runtime$84 = require_compiler_runtime(), TooltipProvider$2 = Provider$2, LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-BQPLhydy.js").then(async (m2) => {
37202
37198
  await m2.__tla;
37203
37199
  return m2;
37204
37200
  }));
@@ -42944,7 +42940,7 @@ ${c}
42944
42940
  let [r3] = e3;
42945
42941
  E2(r3);
42946
42942
  },
42947
- valueMap: _temp4$8
42943
+ valueMap: _temp4$7
42948
42944
  })
42949
42945
  })
42950
42946
  ]
@@ -43042,7 +43038,7 @@ ${c}
43042
43038
  r[0] !== c || r[1] !== f ? (h = () => {
43043
43039
  f.setValue(c, "");
43044
43040
  }, r[0] = c, r[1] = f, r[2] = h) : h = r[2];
43045
- let _ = h, v = _temp5$6, y;
43041
+ let _ = h, v = _temp5$5, y;
43046
43042
  r[3] !== _ || r[4] !== d ? (y = (e2) => {
43047
43043
  let { field: r2 } = e2;
43048
43044
  return (0, import_jsx_runtime.jsxs)(FormItem, {
@@ -43314,10 +43310,10 @@ ${c}
43314
43310
  children: e.display
43315
43311
  }, e.value);
43316
43312
  }
43317
- function _temp4$8(e) {
43313
+ function _temp4$7(e) {
43318
43314
  return e;
43319
43315
  }
43320
- function _temp5$6(e) {
43316
+ function _temp5$5(e) {
43321
43317
  let [r, c] = TIME_UNIT_DESCRIPTIONS[e];
43322
43318
  return (0, import_jsx_runtime.jsx)(SelectItem, {
43323
43319
  value: e,
@@ -46115,9 +46111,9 @@ ${c}
46115
46111
  rows: await loadTableData((await f({
46116
46112
  page_number: e2,
46117
46113
  page_size: 1,
46118
- sort: v.length > 0 ? v.map(_temp4$7) : void 0,
46114
+ sort: v.length > 0 ? v.map(_temp4$6) : void 0,
46119
46115
  query: O,
46120
- filters: z.flatMap(_temp5$5),
46116
+ filters: z.flatMap(_temp5$4),
46121
46117
  max_columns: null
46122
46118
  })).data)
46123
46119
  }), r[48] = z, r[49] = f, r[50] = O, r[51] = v, r[52] = u9) : u9 = r[52];
@@ -46432,13 +46428,13 @@ ${c}
46432
46428
  function _temp3$10(e) {
46433
46429
  Logger.error(e);
46434
46430
  }
46435
- function _temp4$7(e) {
46431
+ function _temp4$6(e) {
46436
46432
  return {
46437
46433
  by: e.id,
46438
46434
  descending: e.desc
46439
46435
  };
46440
46436
  }
46441
- function _temp5$5(e) {
46437
+ function _temp5$4(e) {
46442
46438
  return filterToFilterCondition(e.id, e.value);
46443
46439
  }
46444
46440
  function _temp6$3(e) {
@@ -46598,14 +46594,14 @@ ${c}
46598
46594
  let r = (0, import_compiler_runtime$58.c)(14), c, d, f;
46599
46595
  r[0] === e ? (c = r[1], d = r[2], f = r[3]) : ({ errorMessage: d, className: c, ...f } = e, r[0] = e, r[1] = c, r[2] = d, r[3] = f);
46600
46596
  let h;
46601
- r[4] === c ? h = r[5] : (h = $64fa3d84918910a7$export$c245e6201fed2f75(c, _temp4$6), r[4] = c, r[5] = h);
46597
+ r[4] === c ? h = r[5] : (h = $64fa3d84918910a7$export$c245e6201fed2f75(c, _temp4$5), r[4] = c, r[5] = h);
46602
46598
  let _;
46603
46599
  r[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = (0, import_jsx_runtime.jsx)(CalendarHeading, {}), r[6] = _) : _ = r[6];
46604
46600
  let v;
46605
46601
  r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = (0, import_jsx_runtime.jsxs)(CalendarGrid, {
46606
46602
  children: [
46607
46603
  (0, import_jsx_runtime.jsx)(CalendarGridHeader, {
46608
- children: _temp5$4
46604
+ children: _temp5$3
46609
46605
  }),
46610
46606
  (0, import_jsx_runtime.jsx)(CalendarGridBody, {
46611
46607
  children: _temp6$2
@@ -46642,10 +46638,10 @@ ${c}
46642
46638
  date: e
46643
46639
  });
46644
46640
  }
46645
- function _temp4$6(e) {
46641
+ function _temp4$5(e) {
46646
46642
  return cn("w-fit", e);
46647
46643
  }
46648
- function _temp5$4(e) {
46644
+ function _temp5$3(e) {
46649
46645
  return (0, import_jsx_runtime.jsx)(CalendarHeaderCell, {
46650
46646
  children: e
46651
46647
  });
@@ -46820,7 +46816,7 @@ ${c}
46820
46816
  children: _temp3$8
46821
46817
  }),
46822
46818
  (0, import_jsx_runtime.jsx)(CalendarGridBody, {
46823
- children: _temp4$5
46819
+ children: _temp4$4
46824
46820
  })
46825
46821
  ]
46826
46822
  })
@@ -46845,7 +46841,7 @@ ${c}
46845
46841
  let r = (0, import_compiler_runtime$55.c)(28), c, d, f, h, _;
46846
46842
  r[0] === e ? (c = r[1], d = r[2], f = r[3], h = r[4], _ = r[5]) : ({ label: h, description: d, errorMessage: f, className: c, ..._ } = e, r[0] = e, r[1] = c, r[2] = d, r[3] = f, r[4] = h, r[5] = _);
46847
46843
  let [v, y] = (0, import_react.useState)(false), S;
46848
- r[6] === c ? S = r[7] : (S = $64fa3d84918910a7$export$c245e6201fed2f75(c, _temp5$3), r[6] = c, r[7] = S);
46844
+ r[6] === c ? S = r[7] : (S = $64fa3d84918910a7$export$c245e6201fed2f75(c, _temp5$2), r[6] = c, r[7] = S);
46849
46845
  let w;
46850
46846
  r[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (e2) => {
46851
46847
  y(e2);
@@ -46944,12 +46940,12 @@ ${c}
46944
46940
  children: e
46945
46941
  });
46946
46942
  }
46947
- function _temp4$5(e) {
46943
+ function _temp4$4(e) {
46948
46944
  return (0, import_jsx_runtime.jsx)(CalendarCell, {
46949
46945
  date: e
46950
46946
  });
46951
46947
  }
46952
- function _temp5$3(e) {
46948
+ function _temp5$2(e) {
46953
46949
  return cn("group flex flex-col gap-2", e);
46954
46950
  }
46955
46951
  function _temp6$1(e) {
@@ -55433,7 +55429,7 @@ ${c}
55433
55429
  r[2] === f ? S = r[3] : (S = (e2) => {
55434
55430
  filesToBase64(e2).then((e3) => {
55435
55431
  f(e3);
55436
- }).catch(_temp5$2);
55432
+ }).catch(_temp5$1);
55437
55433
  }, r[2] = f, r[3] = S);
55438
55434
  let w;
55439
55435
  r[4] !== d || r[5] !== y || r[6] !== _ || r[7] !== S ? (w = {
@@ -55441,7 +55437,7 @@ ${c}
55441
55437
  multiple: _,
55442
55438
  maxSize: y,
55443
55439
  onError: _temp$10,
55444
- onDropRejected: _temp4$4,
55440
+ onDropRejected: _temp4$3,
55445
55441
  onDrop: S
55446
55442
  }, r[4] = d, r[5] = y, r[6] = _, r[7] = S, r[8] = w) : w = r[8];
55447
55443
  let { getRootProps: E, getInputProps: O, isFocused: M, isDragAccept: I, isDragReject: z } = useDropzone(w), G;
@@ -55661,7 +55657,7 @@ ${c}
55661
55657
  ]
55662
55658
  }, e.file.name);
55663
55659
  }
55664
- function _temp4$4(e) {
55660
+ function _temp4$3(e) {
55665
55661
  toast({
55666
55662
  title: "File upload failed",
55667
55663
  description: (0, import_jsx_runtime.jsx)("div", {
@@ -55671,7 +55667,7 @@ ${c}
55671
55667
  variant: "danger"
55672
55668
  });
55673
55669
  }
55674
- function _temp5$2(e) {
55670
+ function _temp5$1(e) {
55675
55671
  Logger.error(e), toast({
55676
55672
  title: "File upload failed",
55677
55673
  description: "Failed to convert file to base64.",
@@ -57171,9 +57167,23 @@ ${c}
57171
57167
  }
57172
57168
  };
57173
57169
  }
57174
- var CLICK_SELECTABLE_TRACE_TYPES = /* @__PURE__ */ new Set([
57175
- "heatmap",
57176
- "histogram"
57170
+ var SUNBURST_DATA_KEYS = [
57171
+ "color",
57172
+ "curveNumber",
57173
+ "entry",
57174
+ "hovertext",
57175
+ "id",
57176
+ "label",
57177
+ "parent",
57178
+ "percentEntry",
57179
+ "percentParent",
57180
+ "percentRoot",
57181
+ "pointNumber",
57182
+ "root",
57183
+ "value"
57184
+ ], LINE_CLICK_TRACE_TYPES = /* @__PURE__ */ new Set([
57185
+ "scatter",
57186
+ "scattergl"
57177
57187
  ]), STANDARD_POINT_KEYS = [
57178
57188
  "x",
57179
57189
  "y",
@@ -57185,46 +57195,123 @@ ${c}
57185
57195
  "pointNumbers",
57186
57196
  "pointIndex"
57187
57197
  ];
57198
+ function coalesceField(e, r) {
57199
+ return e ?? r;
57200
+ }
57201
+ function getTraceSource(e) {
57202
+ let r = e, c = e.data ?? {}, d = r.fullData ?? {};
57203
+ return {
57204
+ type: coalesceField(c.type, d.type),
57205
+ mode: coalesceField(c.mode, d.mode),
57206
+ x: coalesceField(c.x, d.x),
57207
+ y: coalesceField(c.y, d.y),
57208
+ hovertemplate: coalesceField(c.hovertemplate, d.hovertemplate)
57209
+ };
57210
+ }
57211
+ function asFiniteNumber(e) {
57212
+ return typeof e == "number" && Number.isFinite(e) ? e : void 0;
57213
+ }
57188
57214
  function getPointIndex(e) {
57189
- if (typeof e.pointIndex == "number") return e.pointIndex;
57190
- if (typeof e.pointNumber == "number") return e.pointNumber;
57215
+ let r = asFiniteNumber(e.pointIndex);
57216
+ if (r !== void 0) return r;
57217
+ let c = asFiniteNumber(e.pointNumber);
57218
+ if (c !== void 0) return c;
57219
+ let d = e.pointNumbers;
57220
+ if (Array.isArray(d)) return d.map(asFiniteNumber).find((e2) => e2 !== void 0);
57221
+ }
57222
+ function isLinePoint(e) {
57223
+ let r = getTraceSource(e);
57224
+ if (!LINE_CLICK_TRACE_TYPES.has(String(r.type))) return false;
57225
+ let c = r.mode;
57226
+ return typeof c == "string" ? c.split("+").includes("lines") : true;
57227
+ }
57228
+ function isPureLineMode(e) {
57229
+ if (typeof e != "string") return false;
57230
+ let r = e.split("+");
57231
+ return r.includes("lines") && !r.includes("markers");
57232
+ }
57233
+ function hasPureLineTrace(e) {
57234
+ return e ? e.some((e2) => {
57235
+ let r = e2.type;
57236
+ return r === void 0 || LINE_CLICK_TRACE_TYPES.has(String(r)) ? isPureLineMode(e2.mode) : false;
57237
+ }) : false;
57238
+ }
57239
+ function createDragmodeButton(e, r, c, d, f) {
57240
+ return {
57241
+ name: e,
57242
+ title: r,
57243
+ icon: {
57244
+ svg: c
57245
+ },
57246
+ click: () => f(d)
57247
+ };
57191
57248
  }
57192
- function isClickSelectablePoint(e) {
57193
- var _a3;
57194
- let r = (_a3 = e.data) == null ? void 0 : _a3.type;
57195
- return typeof r == "string" ? CLICK_SELECTABLE_TRACE_TYPES.has(r) : false;
57249
+ function lineSelectionButtons(e) {
57250
+ return [
57251
+ createDragmodeButton("line-box-select", "Box select", '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"\n stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <rect x="4" y="4" width="16" height="16" stroke-dasharray="2 2" />\n </svg>', "select", e),
57252
+ createDragmodeButton("line-lasso-select", "Lasso select", '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"\n stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M6 8c0-2.2 2.2-4 5-4s5 1.8 5 4-2.2 4-5 4-5 1.8-5 4 2.2 4 5 4" />\n <circle cx="17.5" cy="16.5" r="1.5" />\n </svg>', "lasso", e)
57253
+ ];
57196
57254
  }
57197
- function extractIndices(e) {
57198
- return e.flatMap((e2) => {
57199
- let r = getPointIndex(e2);
57200
- return typeof r == "number" ? [
57201
- r
57202
- ] : [];
57255
+ function mergeModeBarButtonsToAdd(e, r) {
57256
+ let c = [], d = /* @__PURE__ */ new Set(), f = (e2) => {
57257
+ if (typeof e2 == "string") {
57258
+ if (d.has(e2)) return;
57259
+ d.add(e2), c.push(e2);
57260
+ return;
57261
+ }
57262
+ c.push(e2);
57263
+ };
57264
+ return e.forEach(f), r == null ? void 0 : r.forEach(f), c;
57265
+ }
57266
+ function shouldHandleClickSelection(e) {
57267
+ return e.some((e2) => {
57268
+ let r = getTraceSource(e2).type;
57269
+ return r === "bar" || r === "heatmap" || r === "histogram" || isLinePoint(e2);
57203
57270
  });
57204
57271
  }
57272
+ function extractIndices(e) {
57273
+ return e.map(getPointIndex).filter((e2) => e2 !== void 0);
57274
+ }
57275
+ function getIndexedValue(e, r) {
57276
+ if (Array.isArray(e) || ArrayBuffer.isView(e)) return e[r];
57277
+ if (typeof e == "object" && e && "length" in e) {
57278
+ let c = Number(e.length ?? NaN);
57279
+ if (Number.isFinite(c) && r >= 0 && r < c) return e[r];
57280
+ }
57281
+ }
57282
+ function withInferredXY(e, r) {
57283
+ if (r.x !== void 0 && r.y !== void 0) return r;
57284
+ let c = getPointIndex(e);
57285
+ if (c === void 0) return r;
57286
+ let d = {
57287
+ ...r
57288
+ };
57289
+ d.pointIndex === void 0 && (d.pointIndex = c);
57290
+ let f = getTraceSource(e);
57291
+ if (d.x === void 0) {
57292
+ let e2 = getIndexedValue(f.x, c);
57293
+ e2 !== void 0 && (d.x = e2);
57294
+ }
57295
+ if (d.y === void 0) {
57296
+ let e2 = getIndexedValue(f.y, c);
57297
+ e2 !== void 0 && (d.y = e2);
57298
+ }
57299
+ return d;
57300
+ }
57205
57301
  function extractPoints(e) {
57206
- if (!e) return [];
57207
57302
  let r;
57208
57303
  return e.map((e2) => {
57209
- var _a3;
57210
- let c = pick_default(e2, STANDARD_POINT_KEYS), d = Array.isArray(e2.data.hovertemplate) ? e2.data.hovertemplate[0] : e2.data.hovertemplate;
57211
- return !d || ((_a3 = e2.data) == null ? void 0 : _a3.type) === "heatmap" ? c : (r = r ? r.update(d) : createParser(d), {
57304
+ let c = withInferredXY(e2, pick_default(e2, STANDARD_POINT_KEYS)), d = getTraceSource(e2), f = Array.isArray(d.hovertemplate) ? d.hovertemplate[0] : d.hovertemplate;
57305
+ return !f || d.type === "heatmap" ? c : (r = r ? r.update(f) : createParser(f), {
57212
57306
  ...c,
57213
57307
  ...r.parse(e2)
57214
57308
  });
57215
57309
  });
57216
57310
  }
57217
- function extractClickSelection(e) {
57218
- var _a3;
57219
- if (!((_a3 = e.points) == null ? void 0 : _a3.length)) return;
57220
- let r = e.points.filter(isClickSelectablePoint);
57221
- if (r.length !== 0) return {
57222
- selections: Arrays.EMPTY,
57223
- points: extractPoints(r),
57224
- indices: extractIndices(r),
57225
- range: void 0
57226
- };
57311
+ function extractSunburstPoints(e) {
57312
+ return e.map((e2) => pick_default(e2, SUNBURST_DATA_KEYS));
57227
57313
  }
57314
+ const extractTreemapPoints = extractSunburstPoints;
57228
57315
  var import_compiler_runtime$32 = require_compiler_runtime();
57229
57316
  const PERSISTED_LAYOUT_KEYS = [
57230
57317
  "dragmode",
@@ -57318,53 +57405,52 @@ ${c}
57318
57405
  }
57319
57406
  }, LazyPlot = (0, import_react.lazy)(() => import("./Plot-WhbJAbBh.js").then((e) => ({
57320
57407
  default: e.Plot
57321
- }))), SUNBURST_DATA_KEYS = [
57322
- "color",
57323
- "curveNumber",
57324
- "entry",
57325
- "hovertext",
57326
- "id",
57327
- "label",
57328
- "parent",
57329
- "percentEntry",
57330
- "percentParent",
57331
- "percentRoot",
57332
- "pointNumber",
57333
- "root",
57334
- "value"
57335
- ], TREE_MAP_DATA_KEYS = SUNBURST_DATA_KEYS;
57408
+ })));
57336
57409
  const PlotlyComponent = (0, import_react.memo)((e) => {
57337
- let r = (0, import_compiler_runtime$31.c)(37), { figure: c, value: d, setValue: f, config: h } = e, _ = useScript("https://cdn.jsdelivr.net/npm/mathjax-full@3.2.2/es5/tex-mml-svg.min.js") === "ready", v;
57410
+ let r = (0, import_compiler_runtime$31.c)(47), { figure: c, value: d, setValue: f, config: h } = e, _ = useScript("https://cdn.jsdelivr.net/npm/mathjax-full@3.2.2/es5/tex-mml-svg.min.js") === "ready", v;
57338
57411
  r[0] !== _ || r[1] !== c || r[2] !== d ? (v = {
57339
57412
  originalFigure: c,
57340
57413
  initialValue: d,
57341
57414
  isScriptLoaded: _
57342
57415
  }, r[0] = _, r[1] = c, r[2] = d, r[3] = v) : v = r[3];
57343
- let { figure: y, layout: S, handleReset: w } = usePlotlyLayout(v), E;
57344
- r[4] !== w || r[5] !== f ? (E = () => {
57345
- w(), f({});
57346
- }, r[4] = w, r[5] = f, r[6] = E) : E = r[6];
57347
- let O = useEvent_default(E), M = useDeepCompareMemoize(h), I;
57348
- r[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
57349
- svg: '\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"\n stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw">\n <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />\n <path d="M3 3v5h5" />\n </svg>'
57350
- }, r[7] = I) : I = r[7];
57351
- let z;
57352
- r[8] === O ? z = r[9] : (z = [
57353
- {
57354
- name: "reset",
57355
- title: "Reset state",
57356
- icon: I,
57357
- click: O
57358
- }
57359
- ], r[8] = O, r[9] = z);
57360
- let G;
57361
- r[10] !== M || r[11] !== z ? (G = {
57362
- displaylogo: false,
57363
- modeBarButtonsToAdd: z,
57364
- ...M
57365
- }, r[10] = M, r[11] = z, r[12] = G) : G = r[12];
57366
- let q = G, Z7;
57367
- r[13] === f ? Z7 = r[14] : (Z7 = (e2) => {
57416
+ let { figure: y, layout: S, setLayout: w, handleReset: E } = usePlotlyLayout(v), O;
57417
+ r[4] !== E || r[5] !== f ? (O = () => {
57418
+ E(), f({});
57419
+ }, r[4] = E, r[5] = f, r[6] = O) : O = r[6];
57420
+ let M = useEvent_default(O), I;
57421
+ r[7] !== w || r[8] !== f ? (I = (e2) => {
57422
+ w((r2) => ({
57423
+ ...r2,
57424
+ dragmode: e2
57425
+ })), f((r2) => ({
57426
+ ...r2,
57427
+ dragmode: e2
57428
+ }));
57429
+ }, r[7] = w, r[8] = f, r[9] = I) : I = r[9];
57430
+ let z = useEvent_default(I), G = useDeepCompareMemoize(h), q;
57431
+ r[10] === y.data ? q = r[11] : (q = hasPureLineTrace(y.data), r[10] = y.data, r[11] = q);
57432
+ let Z7 = q, Q7, $7, e9;
57433
+ if (r[12] !== G || r[13] !== M || r[14] !== z || r[15] !== Z7) {
57434
+ let e2 = [
57435
+ {
57436
+ name: "reset",
57437
+ title: "Reset state",
57438
+ icon: {
57439
+ svg: '\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"\n stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw">\n <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />\n <path d="M3 3v5h5" />\n </svg>'
57440
+ },
57441
+ click: M
57442
+ }
57443
+ ];
57444
+ Z7 && e2.push(...lineSelectionButtons(z)), Q7 = false, $7 = G, e9 = mergeModeBarButtonsToAdd(e2, G.modeBarButtonsToAdd), r[12] = G, r[13] = M, r[14] = z, r[15] = Z7, r[16] = Q7, r[17] = $7, r[18] = e9;
57445
+ } else Q7 = r[16], $7 = r[17], e9 = r[18];
57446
+ let t9;
57447
+ r[19] !== Q7 || r[20] !== $7 || r[21] !== e9 ? (t9 = {
57448
+ displaylogo: Q7,
57449
+ ...$7,
57450
+ modeBarButtonsToAdd: e9
57451
+ }, r[19] = Q7, r[20] = $7, r[21] = e9, r[22] = t9) : t9 = r[22];
57452
+ let n9 = t9, r9;
57453
+ r[23] === f ? r9 = r[24] : (r9 = (e2) => {
57368
57454
  if ("dragmode" in e2 && f((r2) => ({
57369
57455
  ...r2,
57370
57456
  dragmode: e2.dragmode
@@ -57378,60 +57464,65 @@ ${c}
57378
57464
  ...r2
57379
57465
  }));
57380
57466
  }
57381
- }, r[13] = f, r[14] = Z7);
57382
- let Q7;
57383
- r[15] === f ? Q7 = r[16] : (Q7 = () => {
57467
+ }, r[23] = f, r[24] = r9);
57468
+ let i9;
57469
+ r[25] === f ? i9 = r[26] : (i9 = () => {
57384
57470
  f(_temp2$5);
57385
- }, r[15] = f, r[16] = Q7);
57386
- let $7 = useEvent_default(Q7), e9;
57387
- r[17] === f ? e9 = r[18] : (e9 = (e2) => {
57471
+ }, r[25] = f, r[26] = i9);
57472
+ let a9 = useEvent_default(i9), o9;
57473
+ r[27] === f ? o9 = r[28] : (o9 = (e2) => {
57388
57474
  e2 && f((r2) => ({
57389
57475
  ...r2,
57390
- points: e2.points.map(_temp3$3)
57476
+ points: extractTreemapPoints(e2.points)
57391
57477
  }));
57392
- }, r[17] = f, r[18] = e9);
57393
- let t9 = useEvent_default(e9), n9;
57394
- r[19] === f ? n9 = r[20] : (n9 = (e2) => {
57478
+ }, r[27] = f, r[28] = o9);
57479
+ let s9 = useEvent_default(o9), c9;
57480
+ r[29] === f ? c9 = r[30] : (c9 = (e2) => {
57395
57481
  e2 && f((r2) => ({
57396
57482
  ...r2,
57397
- points: e2.points.map(_temp4$3)
57483
+ points: extractSunburstPoints(e2.points)
57398
57484
  }));
57399
- }, r[19] = f, r[20] = n9);
57400
- let r9 = useEvent_default(n9), i9;
57401
- r[21] === f ? i9 = r[22] : (i9 = (e2) => {
57402
- if (!e2) return;
57403
- let r2 = extractClickSelection(e2);
57404
- r2 && f((e3) => ({
57485
+ }, r[29] = f, r[30] = c9);
57486
+ let l9 = useEvent_default(c9), u9;
57487
+ r[31] === f ? u9 = r[32] : (u9 = (e2) => {
57488
+ if (!e2 || !shouldHandleClickSelection(e2.points)) return;
57489
+ let r2 = extractPoints(e2.points), c2 = extractIndices(e2.points);
57490
+ f((e3) => ({
57405
57491
  ...e3,
57406
- ...r2
57492
+ selections: Arrays.EMPTY,
57493
+ range: void 0,
57494
+ lasso: void 0,
57495
+ points: r2,
57496
+ indices: c2
57407
57497
  }));
57408
- }, r[21] = f, r[22] = i9);
57409
- let a9 = useEvent_default(i9), o9;
57410
- r[23] === f ? o9 = r[24] : (o9 = (e2) => {
57498
+ }, r[31] = f, r[32] = u9);
57499
+ let d9 = useEvent_default(u9), f9;
57500
+ r[33] === f ? f9 = r[34] : (f9 = (e2) => {
57411
57501
  e2 && f((r2) => ({
57412
57502
  ...r2,
57413
57503
  selections: "selections" in e2 ? e2.selections : [],
57414
57504
  points: extractPoints(e2.points),
57415
57505
  indices: extractIndices(e2.points),
57416
- range: e2.range
57506
+ range: e2.range,
57507
+ lasso: "lassoPoints" in e2 ? e2.lassoPoints : void 0
57417
57508
  }));
57418
- }, r[23] = f, r[24] = o9);
57419
- let s9 = useEvent_default(o9), c9 = y.frames ?? void 0, l9 = useEvent_default(_temp5$1), u9;
57420
- return r[25] !== y || r[26] !== S || r[27] !== q || r[28] !== t9 || r[29] !== r9 || r[30] !== a9 || r[31] !== s9 || r[32] !== c9 || r[33] !== l9 || r[34] !== Z7 || r[35] !== $7 ? (u9 = (0, import_jsx_runtime.jsx)(LazyPlot, {
57509
+ }, r[33] = f, r[34] = f9);
57510
+ let p9 = useEvent_default(f9), m9 = y.frames ?? void 0, h9 = useEvent_default(_temp3$3), g9;
57511
+ return r[35] !== y || r[36] !== S || r[37] !== n9 || r[38] !== a9 || r[39] !== s9 || r[40] !== l9 || r[41] !== d9 || r[42] !== p9 || r[43] !== m9 || r[44] !== h9 || r[45] !== r9 ? (g9 = (0, import_jsx_runtime.jsx)(LazyPlot, {
57421
57512
  ...y,
57422
57513
  layout: S,
57423
- onRelayout: Z7,
57424
- onDeselect: $7,
57425
- onTreemapClick: t9,
57426
- onSunburstClick: r9,
57427
- config: q,
57428
- onClick: a9,
57429
- onSelected: s9,
57514
+ onRelayout: r9,
57515
+ onDeselect: a9,
57516
+ onTreemapClick: s9,
57517
+ onSunburstClick: l9,
57518
+ config: n9,
57519
+ onClick: d9,
57520
+ onSelected: p9,
57430
57521
  className: "w-full",
57431
57522
  useResizeHandler: true,
57432
- frames: c9,
57433
- onError: l9
57434
- }), r[25] = y, r[26] = S, r[27] = q, r[28] = t9, r[29] = r9, r[30] = a9, r[31] = s9, r[32] = c9, r[33] = l9, r[34] = Z7, r[35] = $7, r[36] = u9) : u9 = r[36], u9;
57523
+ frames: m9,
57524
+ onError: h9
57525
+ }), r[35] = y, r[36] = S, r[37] = n9, r[38] = a9, r[39] = s9, r[40] = l9, r[41] = d9, r[42] = p9, r[43] = m9, r[44] = h9, r[45] = r9, r[46] = g9) : g9 = r[46], g9;
57435
57526
  });
57436
57527
  PlotlyComponent.displayName = "PlotlyComponent";
57437
57528
  function _temp$7(e) {
@@ -57443,16 +57534,11 @@ ${c}
57443
57534
  selections: Arrays.EMPTY,
57444
57535
  points: Arrays.EMPTY,
57445
57536
  indices: Arrays.EMPTY,
57446
- range: void 0
57537
+ range: void 0,
57538
+ lasso: void 0
57447
57539
  };
57448
57540
  }
57449
57541
  function _temp3$3(e) {
57450
- return Objects.pick(e, TREE_MAP_DATA_KEYS);
57451
- }
57452
- function _temp4$3(e) {
57453
- return Objects.pick(e, SUNBURST_DATA_KEYS);
57454
- }
57455
- function _temp5$1(e) {
57456
57542
  Logger.error("PlotlyPlugin: ", e);
57457
57543
  }
57458
57544
  var import_compiler_runtime$30 = require_compiler_runtime(), RadioPlugin = class {
@@ -58442,7 +58528,7 @@ ${c}
58442
58528
  return true;
58443
58529
  }
58444
58530
  }
58445
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-CkpTXaRx.js")), VegaPlugin = class {
58531
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-CPhNLfZZ.js")), VegaPlugin = class {
58446
58532
  constructor() {
58447
58533
  __publicField(this, "tagName", "marimo-vega");
58448
58534
  __publicField(this, "validator", object({
@@ -65224,9 +65310,7 @@ ${c}
65224
65310
  }, r[2] = n9) : n9 = r[2], (0, import_react.useLayoutEffect)(n9), !$7 && isInternalCellName(M)) return null;
65225
65311
  let r9, i9, a9, o9, s9, c9, l9, u9, d9, f9;
65226
65312
  if (r[3] !== I || r[4] !== Z7 || r[5] !== Q7 || r[6] !== $7 || r[7] !== w || r[8] !== h || r[9] !== t9 || r[10] !== G || r[11] !== q || r[12] !== z || r[13] !== e9 || r[14] !== _ || r[15] !== f || r[16] !== O || r[17] !== v || r[18] !== d) {
65227
- let e2 = [
65228
- ...Q7
65229
- ].reverse(), S2 = e2.some(_temp$2), E2 = e2.findIndex(_temp2$2), M2;
65313
+ let e2 = Q7.toReversed(), S2 = e2.some(_temp$2), E2 = e2.findIndex(_temp2$2), M2;
65230
65314
  r[29] === Q7 ? M2 = r[30] : (M2 = () => Q7.filter(_temp3$1).map(_temp4$1).join("\n"), r[29] = Q7, r[30] = M2);
65231
65315
  let n92 = M2;
65232
65316
  r9 = "relative group", r[31] !== n92 || r[32] !== $7 || r[33] !== h || r[34] !== t9 || r[35] !== _ || r[36] !== f || r[37] !== d ? (i9 = $7 && (0, import_jsx_runtime.jsxs)("div", {
@@ -65423,7 +65507,7 @@ ${c}
65423
65507
  return Logger.warn("Failed to get version from mount config"), null;
65424
65508
  }
65425
65509
  }
65426
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.1-dev32"), showCodeInRunModeAtom = atom(true);
65510
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.22.1-dev37"), showCodeInRunModeAtom = atom(true);
65427
65511
  atom(null);
65428
65512
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
65429
65513
  constructor() {
@@ -65836,7 +65920,7 @@ ${c}
65836
65920
  c = d, r.has(d) || r.set(d, []), (_a3 = r.get(d)) == null ? void 0 : _a3.push(e2);
65837
65921
  }), [
65838
65922
  ...r.entries()
65839
- ].sort(([e2], [r2]) => e2 - r2);
65923
+ ].toSorted(([e2], [r2]) => e2 - r2);
65840
65924
  }
65841
65925
  function shouldHideCode(e, r) {
65842
65926
  let c = new MarkdownLanguageAdapter().isSupported(e), d = r !== null && !isOutputEmpty(r);