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AuB,iBAAIA,KAAuB,kBAAK,GAChF8iE,EAAmB//D,QAAQ2/D,EAAqBK,KAAK,KAAM,IAC3DD,EAAmB9vE,KAAO0vE,EAAqBK,KAAK,KAAMD,EAAmB9vE,KAAK+vE,KAAKD,G,IClDvFpC,EAAoBsC,QAAKtlE,ECGzB,IAAIulE,EAAsBvC,EAAoBM,OAAEtjE,EAAW,CAAC,KAAK,WAAa,OAAOgjE,EAAoB,KAAO,IAChHuC,EAAsBvC,EAAoBM,EAAEiC,E","sources":["webpack://xltb/webpack/runtime/chunk loaded","webpack://xltb/webpack/runtime/create fake namespace object","webpack://xltb/./src/excel/components/AddressChooser.scss","webpack://xltb/./src/taskpane/components/App.scss","webpack://xltb/./src/taskpane/components/CatalogCard.scss","webpack://xltb/./src/taskpane/components/CustomDatePicker.scss","webpack://xltb/./src/taskpane/components/FeedbackMenu.scss","webpack://xltb/./src/taskpane/components/Icon.scss","webpack://xltb/./src/taskpane/components/Initial.scss","webpack://xltb/./src/taskpane/components/Layout/NavMenu.scss","webpack://xltb/./src/taskpane/components/Layout/Space.scss","webpack://xltb/./src/taskpane/components/Layout/TopBar.scss","webpack://xltb/./src/taskpane/components/Lists.scss","webpack://xltb/./src/taskpane/components/Logo.scss","webpack://xltb/./src/taskpane/components/Notification.scss","webpack://xltb/./src/taskpane/components/PlaceholderItem.scss","webpack://xltb/./src/taskpane/components/PreviewTable.scss","webpack://xltb/./src/taskpane/components/SearchDropdown.scss","webpack://xltb/./src/taskpane/components/TooltipTab.scss","webpack://xltb/./src/taskpane/components/Typography.scss","webpack://xltb/./src/taskpane/index.scss","webpack://xltb/./src/taskpane/pages/AIAssistant/AIAssistant.scss","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConflictDialog.scss","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectToWorkbook.scss","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectionItem.scss","webpack://xltb/./src/taskpane/pages/EduBlocks/Edublocks.scss","webpack://xltb/./src/taskpane/pages/Profile.scss","webpack://xltb/./src/taskpane/pages/Projects/Filter.scss","webpack://xltb/./src/taskpane/pages/Projects/NewProject.scss","webpack://xltb/./src/taskpane/pages/Projects/Projects.scss","webpack://xltb/./src/taskpane/pages/Settings.scss","webpack://xltb/./src/taskpane/pages/Snippets/ExportSnippet.scss","webpack://xltb/./src/taskpane/pages/Snippets/SnippetItem.scss","webpack://xltb/./src/taskpane/pages/Start.scss","webpack://xltb/./src/taskpane/pages/Visualization/Code.scss","webpack://xltb/./src/taskpane/pages/Visualization/Viz.scss","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/SpinButton.scss","webpack://xltb/./src/taskpane/styles.module.scss","webpack://xltb/./src/taskpane/theme.ts","webpack://xltb/./src/taskpane/components/Typography.scss?a80a","webpack://xltb/./src/taskpane/components/Typography.tsx","webpack://xltb/./src/taskpane/components/Notification.scss?c353","webpack://xltb/./src/taskpane/components/Layout/Space.scss?fc62","webpack://xltb/./src/taskpane/components/Layout/Space.tsx","webpack://xltb/../common/src/environ.ts","webpack://xltb/./src/taskpane/components/Dialogs/SignInDialog.tsx","webpack://xltb/./src/taskpane/components/Lists.scss?a0b6","webpack://xltb/./src/taskpane/components/Lists.tsx","webpack://xltb/./src/taskpane/styles.module.scss?c55d","webpack://xltb/./src/taskpane/components/Icon.scss?42df","webpack://xltb/./src/taskpane/components/Icon.tsx","webpack://xltb/./src/taskpane/components/Layout/NavMenu.scss?fea8","webpack://xltb/./src/taskpane/components/Layout/nav-models.tsx","webpack://xltb/./src/auth/broadcast.ts","webpack://xltb/../common/src/broadcast/interface.ts","webpack://xltb/../common/src/global.ts","webpack://xltb/../common/src/excel/excel-date-utils.ts","webpack://xltb/../common/src/pyscript/utils.ts","webpack://xltb/../common/src/excel/excel-grid-utils.ts","webpack://xltb/./src/taskpane/hooks/usePython.tsx","webpack://xltb/./src/analytics/snake-eyes.ts","webpack://xltb/./src/auth/fetch.ts","webpack://xltb/./src/auth/auth-api.ts","webpack://xltb/./src/taskpane/pages/Start.scss?a383","webpack://xltb/./src/taskpane/pages/Start.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/utils.tsx","webpack://xltb/./src/taskpane/pages/Visualization/MVCShared/types.ts","webpack://xltb/./src/data/plot-types.ts","webpack://xltb/../common/src/pyscript/types.ts","webpack://xltb/./src/excel/types.ts","webpack://xltb/./src/excel/grid-utils.ts","webpack://xltb/./src/taskpane/pages/Visualization/MVCShared/CodeBuilder.tsx","webpack://xltb/./src/data/plot-api.ts","webpack://xltb/./src/taskpane/hooks/plots/useBar.tsx","webpack://xltb/./src/taskpane/hooks/plots/useBox.tsx","webpack://xltb/./src/taskpane/hooks/plots/useCount.tsx","webpack://xltb/./src/taskpane/hooks/plots/useLine.tsx","webpack://xltb/./src/taskpane/hooks/plots/useRegression.tsx","webpack://xltb/./src/taskpane/hooks/plots/useScatter.tsx","webpack://xltb/./src/taskpane/hooks/plots/useViolin.tsx","webpack://xltb/./src/taskpane/hooks/plots/usePair.tsx","webpack://xltb/./src/taskpane/hooks/plots/useDisplot.tsx","webpack://xltb/./src/taskpane/hooks/plots/useCentralViz.tsx","webpack://xltb/./src/data/projects/projects-api.ts","webpack://xltb/./src/taskpane/components/CatalogCard.scss?f906","webpack://xltb/./src/taskpane/components/Dialogs/ConfirmationDialog.tsx","webpack://xltb/./src/taskpane/components/PopoverMenuButton.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Visualizations.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Viz.scss?bdd6","webpack://xltb/./src/taskpane/pages/Visualization/VizTooltip.tsx","webpack://xltb/./src/taskpane/pages/Visualization/PlotCard.tsx","webpack://xltb/./src/taskpane/pages/Visualization/CreateVisualization.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/AIAssistant.scss?6a76","webpack://xltb/./src/taskpane/pages/AIAssistant/BackButton.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/ChatMessages.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/config.ts","webpack://xltb/./src/taskpane/pages/AIAssistant/utils/assistantSdk.ts","webpack://xltb/./src/taskpane/pages/AIAssistant/ChatPanel.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/ErrorScreen.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/SettingsWrapper.tsx","webpack://xltb/./src/taskpane/components/SearchDropdown.scss?1fc1","webpack://xltb/./src/taskpane/components/SearchDropdown.tsx","webpack://xltb/./src/excel/components/TableChooser.tsx","webpack://xltb/./src/data/models.ts","webpack://xltb/./src/data/data-api-upload.ts","webpack://xltb/./src/taskpane/pages/AIAssistant/TableRangeChooserPage.tsx","webpack://xltb/./src/queryclient/request.ts","webpack://xltb/./src/queryclient/account/account.ts","webpack://xltb/./src/taskpane/pages/AIAssistant/utils/ChatStarters.ts","webpack://xltb/./src/taskpane/pages/AIAssistant/AIAssistant.tsx","webpack://xltb/./src/taskpane/pages/AIAssistant/utils/initializeAssistant.ts","webpack://xltb/./src/taskpane/hooks/useBlocks.tsx","webpack://xltb/./src/taskpane/pages/EduBlocks/Edublocks.scss?b762","webpack://xltb/./src/excel/components/AddressChooser.scss?579d","webpack://xltb/./src/excel/components/AddressChooser.tsx","webpack://xltb/./src/taskpane/pages/EduBlocks/Edublocks.tsx","webpack://xltb/./src/taskpane/components/PrivacyPolicy.tsx","webpack://xltb/./src/taskpane/components/Initial.scss?f0db","webpack://xltb/./src/taskpane/components/Initial.tsx","webpack://xltb/./src/auth/models.ts","webpack://xltb/./src/taskpane/pages/Profile.scss?1419","webpack://xltb/./src/taskpane/pages/Profile.tsx","webpack://xltb/./src/taskpane/components/PlaceholderItem.scss?1150","webpack://xltb/./src/taskpane/components/PlaceholderItem.tsx","webpack://xltb/./src/queryclient/projects/request.ts","webpack://xltb/./src/queryclient/projects/projects.ts","webpack://xltb/./src/taskpane/hooks/useDataFilters.tsx","webpack://xltb/./src/queryclient/settings/types.ts","webpack://xltb/./src/data/projects/utils.ts","webpack://xltb/./src/taskpane/components/CustomDatePicker.scss?6a4b","webpack://xltb/./src/taskpane/components/CustomDatePicker.tsx","webpack://xltb/./src/taskpane/pages/Projects/Filter.scss?cf14","webpack://xltb/./src/taskpane/pages/Projects/Filter.tsx","webpack://xltb/./src/taskpane/pages/Projects/ProjectFolder.tsx","webpack://xltb/./src/taskpane/pages/Projects/ProjectGroups.tsx","webpack://xltb/./src/taskpane/components/Conditional.tsx","webpack://xltb/./src/taskpane/components/ValueCircle.tsx","webpack://xltb/./src/taskpane/pages/Projects/FilterButton.tsx","webpack://xltb/./src/queryclient/settings/settings.ts","webpack://xltb/./src/taskpane/pages/Projects/GettingStartedDialog.tsx","webpack://xltb/./src/taskpane/pages/Projects/Projects.scss?35c8","webpack://xltb/./src/taskpane/pages/Projects/ProjectsExplorer.tsx","webpack://xltb/./src/data/data-api.ts","webpack://xltb/./src/taskpane/components/Dialogs/CustomDialog.tsx","webpack://xltb/./src/taskpane/components/PreviewTable.scss?873a","webpack://xltb/./src/taskpane/components/PreviewTable.tsx","webpack://xltb/./src/data/data-api-download.ts","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectToWorkbook.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/MessageBlock.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ImportPythonObject.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectToWorkbook.scss?3fc7","webpack://xltb/../common/src/pyscript/local-data.ts","webpack://xltb/./src/data/components/ProjectChooser.tsx","webpack://xltb/./src/taskpane/types.ts","webpack://xltb/./src/taskpane/utils.ts","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectToCloud.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConflictDialog.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConflictDialog.scss?f7a1","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectionItem.scss?22e9","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/ConnectionItem.tsx","webpack://xltb/./src/taskpane/pages/DataCatalogs/Connections/DataConnections.tsx","webpack://xltb/./src/taskpane/pages/Projects/RoleSelector.tsx","webpack://xltb/./src/taskpane/pages/Projects/NewProject.scss?661e","webpack://xltb/./src/taskpane/pages/Projects/NewProject.tsx","webpack://xltb/../common/src/pyscript/editor.ts","webpack://xltb/./src/taskpane/pages/Snippets/SnippetViewer.tsx","webpack://xltb/./src/taskpane/pages/Snippets/SnippetItem.scss?1f98","webpack://xltb/./src/taskpane/pages/Snippets/SnippetItem.tsx","webpack://xltb/./src/taskpane/pages/Snippets/Snippets.tsx","webpack://xltb/./src/taskpane/pages/Snippets/ExportSnippet.scss?0c26","webpack://xltb/./src/taskpane/pages/Snippets/ExportSnippet.tsx","webpack://xltb/./src/taskpane/pages/Settings.scss?b42d","webpack://xltb/./src/taskpane/pages/Settings.tsx","webpack://xltb/./src/taskpane/components/Logo.scss?b23a","webpack://xltb/./src/taskpane/components/Logo.tsx","webpack://xltb/./src/taskpane/components/TooltipTab.scss?3109","webpack://xltb/./src/taskpane/components/TooltipTab.tsx","webpack://xltb/./src/taskpane/components/Layout/NavMenu.tsx","webpack://xltb/./src/taskpane/components/Layout/TopBar.scss?75b3","webpack://xltb/./src/taskpane/components/Layout/TopBar.tsx","webpack://xltb/./src/taskpane/components/App.scss?2082","webpack://xltb/./src/taskpane/components/App.tsx","webpack://xltb/./src/taskpane/components/FeedbackMenu.scss?ded1","webpack://xltb/./src/taskpane/components/FeedbackMenu.tsx","webpack://xltb/./src/taskpane/pages/Visualization/ActionButtons.tsx","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/Themes.ts","webpack://xltb/./src/taskpane/pages/Visualization/DialogLabels.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Code.scss?67e4","webpack://xltb/./src/taskpane/pages/Visualization/Code.tsx","webpack://xltb/./src/taskpane/pages/Visualization/MVCShared/PlotGeneratorUtils.ts","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/VizUIShared.tsx","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/Palette.tsx","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/SpinButton.scss?40ce","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/SpinButton.tsx","webpack://xltb/./src/taskpane/pages/Visualization/VizSharedComponents/ColorPicker.tsx","webpack://xltb/./src/taskpane/pages/Visualization/MVCShared/PlotAttributes.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/CountPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/BarPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/BoxPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/ScatterPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/LinePlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/RegressionPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/ViolinPlotMVC.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/PairPlotKws.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/PairPlot.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/FacetGridAttr.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Plots/Displot.tsx","webpack://xltb/./src/taskpane/pages/Visualization/BaseDesign.tsx","webpack://xltb/./src/taskpane/pages/Visualization/BaseSetup.tsx","webpack://xltb/../common/src/pyscript/worker.ts","webpack://xltb/./src/taskpane/pages/Visualization/viz-preview.ts","webpack://xltb/./src/taskpane/pages/Visualization/Trace.tsx","webpack://xltb/./src/taskpane/pages/Visualization/Preview.tsx","webpack://xltb/./src/taskpane/pages/Visualization/CoreViz.tsx","webpack://xltb/./src/taskpane/pages/Error.tsx","webpack://xltb/./src/analytics/heap.ts","webpack://xltb/./src/analytics/sentry.ts","webpack://xltb/./src/taskpane/index.scss?bba0","webpack://xltb/./src/taskpane/index.tsx","webpack://xltb/webpack/bootstrap","webpack://xltb/webpack/runtime/compat get default export","webpack://xltb/webpack/runtime/define property getters","webpack://xltb/webpack/runtime/global","webpack://xltb/webpack/runtime/harmony module decorator","webpack://xltb/webpack/runtime/hasOwnProperty shorthand","webpack://xltb/webpack/runtime/make namespace object","webpack://xltb/webpack/runtime/node module decorator","webpack://xltb/webpack/runtime/runtimeId","webpack://xltb/webpack/runtime/publicPath","webpack://xltb/webpack/runtime/jsonp chunk loading","webpack://xltb/webpack/runtime/nonce","webpack://xltb/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".address-chooser{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;width:100%}.address-chooser label{font-weight:600;font-size:11px;color:#2c303a}.address-chooser .field-content{font-size:11px;display:flex;flex-direction:row;align-items:center;gap:5px;height:30px;width:100%;border-radius:6px}.address-chooser .field-content svg{color:#0cca4a}.address-chooser .location{border:1px solid #dfe3e7;background-color:#f3f4f6;font-size:14px;color:#2c303a;font-weight:500;padding:0 4px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/excel/components/AddressChooser.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAIA,iBACI,2JAAA,CAEA,UAAA,CACA,uBACI,eAAA,CACA,cAAA,CACA,aCHK,CDKT,gCACI,cAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,OAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,oCACI,aCvBI,CD0BZ,2BACI,wBAAA,CACA,wBAAA,CACA,cAAA,CACA,aCtBK,CDuBL,eAAA,CACA,aAAA\",\"sourcesContent\":[\"\\n\\n@import \\\"../../taskpane/theme-variables.scss\\\";\\n\\n.address-chooser {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n width: 100%;\\n label {\\n font-weight: 600;\\n font-size: 11px;\\n color: $text-color;\\n }\\n .field-content {\\n font-size: 11px;\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 5px;\\n height: 30px;\\n width: 100%;\\n border-radius: 6px;\\n svg {\\n color: $primary-color;\\n }\\n }\\n .location {\\n border: 1px solid $component-border;\\n background-color: #F3F4F6;\\n font-size: 14px;\\n color: $text-color;\\n font-weight: 500;\\n padding: 0 4px;\\n }\\n}\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app{height:100%;font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif}.app h4{color:#2c303a;margin:6px}.app .content{height:calc(100% - 65px);padding:8px 10px 12px 10px;min-width:290px;overflow-y:auto}.app .tab-content{height:calc(100% - 89px);padding:12px 10px 12px 10px;min-width:290px;overflow-y:auto}.app .center{text-align:center}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/App.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,KACE,WAAA,CAEA,2JAAA,CAGA,QACE,aCDS,CDET,UAAA,CAEF,cACE,wBAAA,CACA,0BAAA,CACA,eAAA,CACA,eAAA,CAEF,kBACE,wBAAA,CACA,2BAAA,CACA,eAAA,CACA,eAAA,CAGF,aACE,iBAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.app {\\n height: 100%;\\n\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n\\n h4 {\\n color: $text-color;\\n margin: 6px;\\n }\\n .content {\\n height: calc(100% - 65px); // Account for header height and padding\\n padding: 8px 10px 12px 10px;\\n min-width: 290px; // Padding increases the width to a total of 310px\\n overflow-y: auto;\\n }\\n .tab-content {\\n height: calc(100% - 89px); // Account for header height and padding\\n padding: 12px 10px 12px 10px;\\n min-width: 290px; // Padding increases the width to a total of 310px\\n overflow-y: auto;\\n }\\n\\n .center {\\n text-align: center;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".catalog-card{border:1px solid #dfe3e7}.catalog-accordion .fui-AccordionItem{border:1px solid #dfe3e7;border-radius:8px;margin:5px 0}.catalog-accordion button{font-weight:bold}.catalog-accordion span svg{color:#0cca4a}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/CatalogCard.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,cACE,wBAAA,CAIA,sCACE,wBAAA,CACA,iBAAA,CACA,YAAA,CAEF,0BACE,gBAAA,CAEF,4BACE,aChBY\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.catalog-card {\\n border: 1px solid $component-border;\\n}\\n\\n.catalog-accordion {\\n .fui-AccordionItem {\\n border: 1px solid $component-border;\\n border-radius: 8px;\\n margin: 5px 0;\\n }\\n button {\\n font-weight: bold;\\n }\\n span svg {\\n color: $primary-color;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".date-picker-container-row{display:flex;align-items:center;flex-wrap:wrap;gap:5px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/CustomDatePicker.scss\"],\"names\":[],\"mappings\":\"AAAA,2BACE,YAAA,CACA,kBAAA,CAEA,cAAA,CACA,OAAA\",\"sourcesContent\":[\".date-picker-container-row {\\n display: flex;\\n align-items: center;\\n // justify-content: flex-start;\\n flex-wrap: wrap;\\n gap: 5px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"button.fui-Button.feedback-button{justify-content:flex-start;border-radius:18px;padding:8px 12px;box-shadow:#ddd 1px 3px 10px 1px;color:#6859f0;width:-webkit-fit-content}button.fui-Button.fixed-button{position:fixed;bottom:20px;right:20px;z-index:5;color:#fff}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/FeedbackMenu.scss\"],\"names\":[],\"mappings\":\"AAAA,kCACE,0BAAA,CACA,kBAAA,CACA,gBAAA,CACA,gCAAA,CACA,aAAA,CACA,yBAAA,CAEF,+BACE,cAAA,CACA,WAAA,CACA,UAAA,CACA,SAAA,CACA,UAAA\",\"sourcesContent\":[\"button.fui-Button.feedback-button {\\n justify-content: flex-start;\\n border-radius: 18px;\\n padding: 8px 12px;\\n box-shadow: #ddd 1px 3px 10px 1px;\\n color: #6859f0;\\n width: -webkit-fit-content;\\n}\\nbutton.fui-Button.fixed-button {\\n position: fixed;\\n bottom: 20px;\\n right: 20px;\\n z-index: 5;\\n color: #fff;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"svg.custom-icon{fill:#6a718a}svg.custom-icon.disabled{fill:#bdbdbd}svg.custom-icon.disabled:hover,svg.custom-icon.disabled path:hover{fill:#bdbdbd}svg.custom-icon:hover,svg.custom-icon path:hover{fill:#0cca4a}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Icon.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,gBACE,YCeS,CDdT,yBACE,YCOO,CDNP,mEAEE,YCIK,CDDT,iDAEE,YCbY\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\nsvg.custom-icon {\\n fill: $gray-500;\\n &.disabled {\\n fill: $disabled;\\n &:hover,\\n path:hover {\\n fill: $disabled;\\n }\\n }\\n &:hover,\\n path:hover {\\n fill: $primary-color;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".initials-list .circle:nth-child(odd){position:absolute;left:34px;bottom:1px}.initials-list .circle:nth-child(odd){position:relative;background-color:#10ccf2;border:1px solid #fff}.circle{width:44px;height:44px;border-radius:50%;background-color:#0cca4a;display:flex;align-items:center;justify-content:center;color:#06262d;font-size:24px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Initial.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,sCACE,iBAAA,CACA,SAAA,CACA,UAAA,CAEF,sCACE,iBAAA,CACA,wBAAA,CACA,qBAAA,CAIJ,QACE,UAAA,CACA,WAAA,CACA,iBAAA,CACA,wBCnBc,CDoBd,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,aAAA,CACA,cAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.initials-list {\\n .circle:nth-child(odd) {\\n position: absolute;\\n left: 34px;\\n bottom: 1px; // Account for border\\n }\\n .circle:nth-child(odd) {\\n position: relative;\\n background-color: #10ccf2;\\n border: 1px solid #fff;\\n }\\n}\\n\\n.circle {\\n width: 44px;\\n height: 44px;\\n border-radius: 50%;\\n background-color: $primary-color;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n color: #06262d;\\n font-size: 24px;\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"svg.active path{fill:#0cca4a}svg.disabled path{fill:#bdbdbd}.fui-MenuItem.active{font-weight:bold}@media screen and (min-width: 501px){.nav-menu{display:none}}@media screen and (min-width: 320px){.navmenuitem.priority{display:none}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Layout/NavMenu.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,gBACE,YCJY,CDSd,kBACE,YCEO,CDGT,qBACE,gBAAA,CAKF,qCADF,UAEI,YAAA,CAAA,CAKF,qCADF,sBAEI,YAAA,CAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\nsvg.active {\\n path {\\n fill: $primary-color;\\n }\\n}\\n\\nsvg.disabled {\\n path {\\n fill: $disabled;\\n }\\n}\\n\\n.fui-MenuItem {\\n &.active {\\n font-weight: bold;\\n }\\n}\\n\\n.nav-menu {\\n @media screen and (min-width: 501px) {\\n display: none;\\n }\\n}\\n\\n.navmenuitem.priority {\\n @media screen and (min-width: 320px) {\\n display: none;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".col{display:flex;flex-direction:column;gap:15px}.row{display:flex;flex-direction:row;gap:15px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Layout/Space.scss\"],\"names\":[],\"mappings\":\"AAAA,KACE,YAAA,CACA,qBAAA,CACA,QAAA,CAEF,KACE,YAAA,CACA,kBAAA,CACA,QAAA\",\"sourcesContent\":[\".col {\\n display: flex;\\n flex-direction: column;\\n gap: 15px;\\n}\\n.row {\\n display: flex;\\n flex-direction: row;\\n gap: 15px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".toolbar{display:flex;height:36px;justify-content:space-between;flex-wrap:wrap;border-bottom:1px solid #dfe3e7}.toolbar button.active svg path{fill:#0cca4a}.toolbar button:not(.disabled):not(.active):hover svg path{fill:#242424}@media screen and (max-width: 319px){.toolbar .tab-list{display:none}}@media screen and (max-width: 500px){.toolbar .tab-list .tab:not(.priority){display:none}}.toolbar button.tab span{font-size:11px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Layout/TopBar.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,SACE,YAAA,CACA,WAAA,CACA,6BAAA,CACA,cAAA,CACA,+BAAA,CAGI,gCACE,YCXQ,CDiBV,2DACE,YAAA,CAKJ,qCADF,mBAEI,YAAA,CAAA,CAIA,qCADF,uCAEI,YAAA,CAAA,CAIN,yBACE,cAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.toolbar {\\n display: flex;\\n height: 36px;\\n justify-content: space-between;\\n flex-wrap: wrap;\\n border-bottom: 1px solid $component-border;\\n button.active {\\n svg {\\n path {\\n fill: $primary-color;\\n }\\n }\\n }\\n button:not(.disabled):not(.active):hover {\\n svg {\\n path {\\n fill: rgb(36, 36, 36);\\n }\\n }\\n }\\n .tab-list {\\n @media screen and (max-width: 319px) {\\n display: none;\\n }\\n\\n .tab:not(.priority) {\\n @media screen and (max-width: 500px) {\\n display: none;\\n }\\n }\\n }\\n button.tab span {\\n font-size: 11px;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".list-item{border:1px solid #e6e6e6;border-radius:8px;padding:10px 12px;font-size:14px;display:flex;flex-direction:row;justify-content:space-between;cursor:pointer}.list-item.selected{border-left:5px solid #0cca4a;border-top-left-radius:5px;border-bottom-left-radius:5px}.list-item.disabled{cursor:not-allowed;color:#999}.list{margin:8px 0 8px 0;gap:8px;display:flex;flex-direction:column}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Lists.scss\"],\"names\":[],\"mappings\":\"AAEA,WACE,wBAAA,CACA,iBAAA,CACA,iBAAA,CACA,cAAA,CACA,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,cAAA,CACA,oBACE,6BAAA,CACA,0BAAA,CACA,6BAAA,CAEF,oBACE,kBAAA,CACA,UAAA,CAIJ,MACE,kBAAA,CACA,OAAA,CACA,YAAA,CACA,qBAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.list-item {\\n border: 1px solid #e6e6e6;\\n border-radius: 8px;\\n padding: 10px 12px;\\n font-size: 14px;\\n display: flex;\\n flex-direction: row;\\n justify-content: space-between;\\n cursor: pointer;\\n &.selected {\\n border-left: 5px solid $primary-color;\\n border-top-left-radius: 5px;\\n border-bottom-left-radius: 5px;\\n }\\n &.disabled {\\n cursor: not-allowed;\\n color: #999;\\n }\\n}\\n\\n.list {\\n margin: 8px 0 8px 0;\\n gap: 8px;\\n display: flex;\\n flex-direction: column;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".logo{display:flex;flex-direction:row;align-items:center;gap:2px;cursor:pointer;font-size:14px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Logo.scss\"],\"names\":[],\"mappings\":\"AAAA,MACE,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,OAAA,CACA,cAAA,CACA,cAAA\",\"sourcesContent\":[\".logo {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 2px;\\n cursor: pointer;\\n font-size: 14px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".custom-dialog-surface{top:30%;bottom:unset;font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;width:75%}.custom-dialog-surface .fui-DialogTitle,.custom-dialog-surface .fui-DialogBody{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif}.custom-dialog-surface .warning{background-color:#d00100;color:#fff}.error-message{color:var(--colorPaletteRedForeground1);text-align:center}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Notification.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,uBACE,OAAA,CACA,YAAA,CACA,2JAAA,CAEA,SAAA,CACA,+EAEE,2JAAA,CAGF,gCACE,wBCHgB,CDIhB,UAAA,CAGJ,eACE,uCAAA,CACA,iBAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.custom-dialog-surface {\\n top: 30%;\\n bottom: unset;\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n width: 75%;\\n .fui-DialogTitle,\\n .fui-DialogBody {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n }\\n .warning {\\n background-color: $button-warning-bg;\\n color: #ffffff;\\n }\\n}\\n.error-message {\\n color: var(--colorPaletteRedForeground1);\\n text-align: center;\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ph-item{position:relative;display:flex;flex-wrap:wrap;padding:30px 15px 15px 15px;margin-bottom:30px;overflow:hidden;direction:ltr;background-color:#fff;border:1px solid #e6e6e6;border-radius:2px}.ph-item,.ph-item *,.ph-item ::after,.ph-item ::before{box-sizing:border-box}.ph-item::before{position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;pointer-events:none;content:\\\" \\\";background:linear-gradient(to right, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 54%) 50% 50%;animation:ph-animation .8s linear infinite}.ph-item>*{display:flex;flex:1 1 auto;flex-flow:column;padding-right:15px;padding-left:15px;margin-bottom:15px}.ph-row{display:flex;flex-wrap:wrap;margin-top:-7.5px}.ph-row div{height:10px;margin-top:7.5px;background-color:#ced4da}.ph-row .big,.ph-row.big div{height:20px}.ph-row .empty{background-color:rgba(255,255,255,0)}.ph-col-2{flex:0 0 16.6666666667%}.ph-col-4{flex:0 0 33.3333333333%}.ph-col-6{flex:0 0 50%}.ph-col-8{flex:0 0 66.6666666667%}.ph-col-10{flex:0 0 83.3333333333%}.ph-col-12{flex:0 0 100%}[class*=ph-col]{direction:ltr}[class*=ph-col]>*+.ph-row{margin-top:0}[class*=ph-col]>*+*{margin-top:7.5px}.ph-avatar{position:relative;width:100%;min-width:60px;overflow:hidden;background-color:#ced4da;border-radius:50%}.ph-avatar::before{display:block;padding-top:100%;content:\\\" \\\"}.ph-picture{width:100%;height:120px;background-color:#ced4da}@keyframes ph-animation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}.ph-item{padding:0;margin:0;border:0;width:100%;background-color:rgba(0,0,0,0)}.ph-item>*{padding:0}.ph-item .ph-col-12{border-radius:8px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/placeholder-loading/src/scss/_layout.scss\",\"webpack://./node_modules/placeholder-loading/src/scss/_variables.scss\",\"webpack://./src/taskpane/components/PlaceholderItem.scss\"],\"names\":[],\"mappings\":\"AAEA,SAQI,iBAAA,CACA,YAAA,CACA,cAAA,CACA,2BAAA,CACA,kBCJsB,CDKtB,eAAA,CACA,aCdsB,CDetB,qBCdsB,CDetB,wBCbsB,CDctB,iBCbsB,CDHtB,uDAII,qBAAA,CAcJ,iBACI,iBAAA,CACA,KAAA,CACA,OAAA,CACA,QAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,iBAAA,CACA,mBAAA,CACA,WAAA,CACA,mIAAA,CACA,0CAAA,CAGJ,WACI,YAAA,CACA,aAAA,CACA,gBAAA,CACA,kBAAA,CACA,iBAAA,CACA,kBC/BkB,CDmC1B,QACI,YAAA,CACA,cAAA,CACA,iBAAA,CAEA,YACI,WAAA,CACA,gBAAA,CACA,wBClDkB,CDqDtB,6BAEI,WAAA,CAGJ,eACI,oCAAA,CAKJ,UACI,uBAAA,CADJ,UACI,uBAAA,CADJ,UACI,YAAA,CADJ,UACI,uBAAA,CADJ,WACI,uBAAA,CADJ,WACI,aAAA,CAgBR,gBACI,aCpFsB,CDuFlB,0BACI,YAAA,CAGJ,oBACI,gBAAA,CAKZ,WACI,iBAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,wBCpGsB,CDqGtB,iBC5FsB,CD8FtB,mBACI,aAAA,CACA,gBAAA,CACA,WAAA,CAIR,YACI,UAAA,CACA,YAAA,CACA,wBCjHsB,CDoH1B,wBACI,GACI,iCAAA,CAGJ,KACI,gCAAA,CAAA,CE3HR,SACE,SAAA,CACA,QAAA,CACA,QAAA,CACA,UAAA,CACA,8BAAA,CACA,WACE,SAAA,CAEF,oBACE,iBAAA\",\"sourcesContent\":[\"@use \\\"sass:math\\\";\\n\\n.ph-item {\\n &,\\n *,\\n ::after,\\n ::before {\\n box-sizing: border-box;\\n }\\n\\n position: relative;\\n display: flex;\\n flex-wrap: wrap;\\n padding: $ph-gutter ($ph-gutter * 0.5) ($ph-gutter - $ph-spacer) ($ph-gutter * 0.5);\\n margin-bottom: $ph-gutter;\\n overflow: hidden;\\n direction: $ph-direction;\\n background-color: $ph-bg;\\n border: $ph-border;\\n border-radius: $ph-border-radius;\\n\\n &::before {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 50%;\\n z-index: 1;\\n width: 500%;\\n margin-left: -250%;\\n pointer-events: none;\\n content: \\\" \\\";\\n background: linear-gradient(to right, rgba($ph-bg, 0) 46%, rgba($ph-bg, 0.35) 50%, rgba($ph-bg, 0) 54%) 50% 50%;\\n animation: ph-animation $ph-animation-duration linear infinite;\\n }\\n\\n > * {\\n display: flex;\\n flex: 1 1 auto;\\n flex-flow: column;\\n padding-right: ($ph-gutter * 0.5);\\n padding-left: ($ph-gutter * 0.5);\\n margin-bottom: $ph-spacer;\\n }\\n}\\n\\n.ph-row {\\n display: flex;\\n flex-wrap: wrap;\\n margin-top: -($ph-spacer * 0.5);\\n\\n div {\\n height: 10px;\\n margin-top: ($ph-spacer * 0.5);\\n background-color: $ph-color;\\n }\\n\\n .big,\\n &.big div {\\n height: 20px;\\n }\\n\\n .empty {\\n background-color: rgba($ph-bg, 0);\\n }\\n}\\n\\n@mixin ph-make-col($size, $columns) {\\n .ph-col-#{$size} {\\n flex: 0 0 math.percentage(math.div($size, $columns));\\n }\\n}\\n\\n@for $i from 1 through $ph-cols {\\n @if $ph-cols-remove-odd and $i % 2 == 0 {\\n @include ph-make-col($i, $ph-cols);\\n }\\n\\n @else if not $ph-cols-remove-odd {\\n @include ph-make-col($i, $ph-cols);\\n }\\n}\\n\\n// TODO make this a `.ph-wrap` class for no padding, no background, no animation,\\n// and remove direction from `.ph-item`. This is a breaking change\\n[class*=\\\"ph-col\\\"] {\\n direction: $ph-direction;\\n\\n > * {\\n + .ph-row {\\n margin-top: 0;\\n }\\n\\n + * {\\n margin-top: ($ph-spacer * 0.5);\\n }\\n }\\n}\\n\\n.ph-avatar {\\n position: relative;\\n width: 100%;\\n min-width: 60px;\\n overflow: hidden;\\n background-color: $ph-color;\\n border-radius: $ph-avatar-border-radius;\\n\\n &::before {\\n display: block;\\n padding-top: 100%;\\n content: \\\" \\\";\\n }\\n}\\n\\n.ph-picture {\\n width: 100%;\\n height: 120px;\\n background-color: $ph-color;\\n}\\n\\n@keyframes ph-animation {\\n 0% {\\n transform: translate3d(-30%, 0, 0);\\n }\\n\\n 100% {\\n transform: translate3d(30%, 0, 0);\\n }\\n}\\n\",\"@use \\\"sass:color\\\";\\n\\n$ph-direction: ltr !default;\\n$ph-bg: #fff !default;\\n$ph-color: #ced4da !default;\\n$ph-border: 1px solid color.scale($ph-bg, $lightness: -10%) !default;\\n$ph-border-radius: 2px !default;\\n\\n$ph-cols: 12 !default;\\n$ph-cols-remove-odd: true !default;\\n$ph-gutter: 30px !default;\\n$ph-spacer: 15px !default;\\n\\n$ph-avatar-border-radius: 50% !default;\\n\\n$ph-animation-duration: 0.8s !default;\\n\",\"@import \\\"~/node_modules/placeholder-loading/src/scss/placeholder-loading\\\";\\n\\n// Placeholder style overrides\\n.ph-item {\\n padding: 0;\\n margin: 0;\\n border: 0;\\n width: 100%;\\n background-color: transparent;\\n & > * {\\n padding: 0;\\n }\\n .ph-col-12 {\\n border-radius: 8px;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".table-label{font-family:inherit;color:#2c303a;font-size:14px;line-height:16px;margin-bottom:4px}.fui-Table.auto-table-layout{table-layout:auto}.column-header{word-wrap:break-word;color:#2c303a}.table-row .fui-TableCell{padding:2px 0 2px 8px;height:24px;white-space:nowrap}.table-row .fui-TableCell:first-child{border-top-left-radius:8px;border-bottom-left-radius:8px}.table-row .fui-TableCell:last-child{border-top-right-radius:8px;border-bottom-right-radius:8px}.table-scroller{overflow-x:auto;overflow-y:hidden}.table-scroller::-webkit-scrollbar{width:10px !important;height:10px !important}.table-scroller::-webkit-scrollbar-track{background:#d5d5d5}.table-scroller::-webkit-scrollbar-thumb{background:#7a7a7a}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/PreviewTable.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AACA,aACE,mBAAA,CACA,aCKW,CDJX,cAAA,CACA,gBAAA,CACA,iBAAA,CAIA,6BACE,iBAAA,CAIJ,eACE,oBAAA,CACA,aCTW,CDYX,0BACE,qBAAA,CACA,WAAA,CACA,kBAAA,CACA,sCACE,0BAAA,CACA,6BAAA,CAEF,qCACE,2BAAA,CACA,8BAAA,CAIN,gBACE,eAAA,CACA,iBAAA,CAEA,mCACE,qBAAA,CACA,sBAAA,CAEF,yCACE,kBAAA,CAEF,yCACE,kBAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n.table-label {\\n font-family: inherit;\\n color: $text-color;\\n font-size: 14px;\\n line-height: 16px;\\n margin-bottom: 4px;\\n}\\n\\n.fui-Table {\\n &.auto-table-layout {\\n table-layout: auto;\\n }\\n}\\n\\n.column-header {\\n word-wrap: break-word;\\n color: $text-color;\\n}\\n.table-row {\\n .fui-TableCell {\\n padding: 2px 0 2px 8px;\\n height: 24px;\\n white-space: nowrap;\\n &:first-child {\\n border-top-left-radius: 8px;\\n border-bottom-left-radius: 8px;\\n }\\n &:last-child {\\n border-top-right-radius: 8px;\\n border-bottom-right-radius: 8px;\\n }\\n }\\n}\\n.table-scroller {\\n overflow-x: auto;\\n overflow-y: hidden;\\n\\n &::-webkit-scrollbar {\\n width: 10px !important;\\n height: 10px !important;\\n }\\n &::-webkit-scrollbar-track {\\n background: #d5d5d5;\\n }\\n &::-webkit-scrollbar-thumb {\\n background: #7a7a7a;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://rsms.me/inter/inter.css);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".search-dropdown{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;position:relative}.search-dropdown svg{margin-left:4px;position:absolute;left:2px;z-index:2}.search-dropdown.light .select-search-input{background-color:rgba(0,0,0,0)}.search-dropdown.small .select-search-input{padding:8px 28px}.select-search-container{--select-search-background: #fff;--select-search-border: #dce0e8;--select-search-selected: #43b049;--select-search-text: #000;--select-search-subtle-text: #6c6f85;--select-search-inverted-text: var(--select-search-background);--select-search-highlight: #eff1f5;--select-search-font: \\\"Inter\\\", sans-serif;width:100%;position:relative;font-family:var(--select-search-font);color:var(--select-search-text);box-sizing:border-box}@supports(font-variation-settings: normal){.select-search-container{--select-search-font: \\\"Inter var\\\", sans-serif}}body.is-dark-mode .select-search-container{--select-search-background: #000;--select-search-border: #313244;--select-search-selected: #89b4fa;--select-search-text: #fff;--select-search-subtle-text: #a6adc8;--select-search-highlight: #1e1e2e}body.is-light-mode .select-search-container{--select-search-background: #fff;--select-search-border: #dce0e8;--select-search-selected: #1e66f5;--select-search-text: #000;--select-search-subtle-text: #6c6f85;--select-search-highlight: #eff1f5}.select-search-container *,.select-search-container *::after,.select-search-container *::before{box-sizing:inherit}.select-search-input{position:relative;z-index:1;display:block;height:40px;line-height:32px;width:100%;padding:10px 40px 10px 32px;background:var(--select-search-background);border:1px solid var(--select-search-border);color:var(--select-search-text);border-radius:6px;outline:none;font-family:var(--select-search-font);font-size:14px;text-align:left;text-overflow:ellipsis;letter-spacing:.01rem;-webkit-font-smoothing:antialiased}.select-search-is-multiple .select-search-input{margin-bottom:-2px}.select-search-is-multiple .select-search-input{border-radius:6px 6px 0 0}.select-search-input::-webkit-search-decoration,.select-search-input::-webkit-search-cancel-button,.select-search-input::-webkit-search-results-button,.select-search-input::-webkit-search-results-decoration{-webkit-appearance:none}.select-search-input[readonly]{cursor:pointer}.select-search-is-disabled .select-search-input{cursor:not-allowed}.select-search-container:not(.select-search-is-disabled).select-search-has-focus .select-search-input,.select-search-container:not(.select-search-is-disabled) .select-search-input:hover{border-color:var(--select-search-selected)}.select-search-select{background:var(--select-search-background);box-shadow:0 .0625rem .125rem rgba(0,0,0,.15);border:1px solid var(--select-search-border);overflow:auto;max-height:360px}.select-search-container:not(.select-search-is-multiple) .select-search-select{position:absolute;z-index:3;top:41px;right:0;left:0;border-radius:6px;display:none}.select-search-container:not(.select-search-is-multiple).select-search-has-focus .select-search-select{display:block}.select-search-has-focus .select-search-select{border-color:var(--select-search-selected)}.select-search-options{list-style:none;padding-left:0;margin-top:0}.select-search-option,.select-search-not-found{display:block;height:42px;width:100%;padding:0 16px;background:var(--select-search-background);border:none;outline:none;font-family:var(--select-search-font);color:var(--select-search-text);font-size:14px;text-align:left;letter-spacing:.01rem;cursor:pointer;-webkit-font-smoothing:antialiased}.select-search-option:disabled{opacity:.5;cursor:not-allowed;background:rgba(0,0,0,0) !important}.select-search-is-highlighted,.select-search-option:not(.select-search-is-selected):hover{background:var(--select-search-highlight)}.select-search-is-selected{font-weight:600;color:var(--select-search-selected)}.select-search-group-header{font-size:12px;text-transform:uppercase;background:var(--select-search-border);color:var(--select-search-subtle-text);letter-spacing:.1rem;padding:8px 16px}.select-search-row:not(:first-child) .select-search-group-header{margin-top:0}.select-search-row:not(:last-child) .select-search-group-header{margin-bottom:0}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/SearchDropdown.scss\"],\"names\":[],\"mappings\":\"AAMA,iBACE,2JAAA,CAEA,iBAAA,CACA,qBACE,eAAA,CACA,iBAAA,CACA,QAAA,CACA,SAAA,CAIA,4CACE,8BAAA,CAKF,4CACE,gBAAA,CAQN,yBACE,gCAAA,CACA,+BAAA,CAGA,iCAAA,CACA,0BAAA,CACA,oCAAA,CACA,8DAAA,CACA,kCAAA,CACA,yCAAA,CAIA,UAAA,CAEA,iBAAA,CACA,qCAAA,CACA,+BAAA,CACA,qBAAA,CAGF,2CACE,yBACE,6CAAA,CAAA,CAeJ,2CACE,gCAAA,CACA,+BAAA,CACA,iCAAA,CACA,0BAAA,CACA,oCAAA,CACA,kCAAA,CAGF,4CACE,gCAAA,CACA,+BAAA,CACA,iCAAA,CACA,0BAAA,CACA,oCAAA,CACA,kCAAA,CAGF,gGAGE,kBAAA,CAGF,qBACE,iBAAA,CACA,SAAA,CACA,aAAA,CACA,WAAA,CACA,gBAAA,CACA,UAAA,CACA,2BAAA,CACA,0CAAA,CAEA,4CAAA,CACA,+BAAA,CACA,iBAAA,CACA,YAAA,CACA,qCAAA,CACA,cAAA,CACA,eAAA,CACA,sBAAA,CACA,qBAAA,CACA,kCAAA,CAGF,gDACE,kBAAA,CAGF,gDACE,yBAAA,CAGF,+MAIE,uBAAA,CAGF,+BACE,cAAA,CAGF,gDACE,kBAAA,CAGF,0LAEE,0CAAA,CAGF,sBACE,0CAAA,CACA,6CAAA,CACA,4CAAA,CACA,aAAA,CACA,gBAAA,CAGF,+EACE,iBAAA,CACA,SAAA,CACA,QAAA,CACA,OAAA,CACA,MAAA,CACA,iBAAA,CACA,YAAA,CAGF,uGACE,aAAA,CAGF,+CACE,0CAAA,CAGF,uBACE,eAAA,CAEA,cAAA,CACA,YAAA,CAGF,+CAEE,aAAA,CACA,WAAA,CACA,UAAA,CACA,cAAA,CACA,0CAAA,CACA,WAAA,CACA,YAAA,CACA,qCAAA,CACA,+BAAA,CACA,cAAA,CACA,eAAA,CACA,qBAAA,CACA,cAAA,CACA,kCAAA,CAGF,+BACE,UAAA,CACA,kBAAA,CACA,mCAAA,CAGF,0FAEE,yCAAA,CAGF,2BACE,eAAA,CACA,mCAAA,CAGF,4BACE,cAAA,CACA,wBAAA,CACA,sCAAA,CACA,sCAAA,CACA,oBAAA,CACA,gBAAA,CAGF,iEACE,YAAA,CAGF,gEACE,eAAA\",\"sourcesContent\":[\"@import url(\\\"https://rsms.me/inter/inter.css\\\");\\n@import \\\"../theme-variables.scss\\\";\\n\\n/**\\n * Custom wrapper class\\n */\\n.search-dropdown {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n position: relative;\\n svg {\\n margin-left: 4px;\\n position: absolute;\\n left: 2px;\\n z-index: 2;\\n }\\n\\n &.light {\\n .select-search-input {\\n background-color: transparent;\\n }\\n }\\n\\n &.small {\\n .select-search-input {\\n padding: 8px 28px;\\n }\\n }\\n}\\n\\n/**\\n * Main wrapper\\n */\\n.select-search-container {\\n --select-search-background: #fff;\\n --select-search-border: #dce0e8;\\n // Note: Adjusted theme variable from blue to anaconda green\\n // --select-search-selected: #1e66f5;\\n --select-search-selected: #43b049;\\n --select-search-text: #000;\\n --select-search-subtle-text: #6c6f85;\\n --select-search-inverted-text: var(--select-search-background);\\n --select-search-highlight: #eff1f5;\\n --select-search-font: \\\"Inter\\\", sans-serif;\\n\\n // Note: Adjusted default width\\n // width: 300px;\\n width: 100%;\\n\\n position: relative;\\n font-family: var(--select-search-font);\\n color: var(--select-search-text);\\n box-sizing: border-box;\\n}\\n\\n@supports (font-variation-settings: normal) {\\n .select-search-container {\\n --select-search-font: \\\"Inter var\\\", sans-serif;\\n }\\n}\\n\\n// @media (prefers-color-scheme: dark) {\\n// .select-search-container {\\n// --select-search-background: #000;\\n// --select-search-border: #313244;\\n// --select-search-selected: #89b4fa;\\n// --select-search-text: #fff;\\n// --select-search-subtle-text: #a6adc8;\\n// --select-search-highlight: #1e1e2e;\\n// }\\n// }\\n\\nbody.is-dark-mode .select-search-container {\\n --select-search-background: #000;\\n --select-search-border: #313244;\\n --select-search-selected: #89b4fa;\\n --select-search-text: #fff;\\n --select-search-subtle-text: #a6adc8;\\n --select-search-highlight: #1e1e2e;\\n}\\n\\nbody.is-light-mode .select-search-container {\\n --select-search-background: #fff;\\n --select-search-border: #dce0e8;\\n --select-search-selected: #1e66f5;\\n --select-search-text: #000;\\n --select-search-subtle-text: #6c6f85;\\n --select-search-highlight: #eff1f5;\\n}\\n\\n.select-search-container *,\\n.select-search-container *::after,\\n.select-search-container *::before {\\n box-sizing: inherit;\\n}\\n\\n.select-search-input {\\n position: relative;\\n z-index: 1;\\n display: block;\\n height: 40px;\\n line-height: 32px;\\n width: 100%;\\n padding: 10px 40px 10px 32px;\\n background: var(--select-search-background);\\n // background-color: $base-bg;\\n border: 1px solid var(--select-search-border);\\n color: var(--select-search-text);\\n border-radius: 6px;\\n outline: none;\\n font-family: var(--select-search-font);\\n font-size: 14px;\\n text-align: left;\\n text-overflow: ellipsis;\\n letter-spacing: 0.01rem;\\n -webkit-font-smoothing: antialiased;\\n}\\n\\n.select-search-is-multiple .select-search-input {\\n margin-bottom: -2px;\\n}\\n\\n.select-search-is-multiple .select-search-input {\\n border-radius: 6px 6px 0 0;\\n}\\n\\n.select-search-input::-webkit-search-decoration,\\n.select-search-input::-webkit-search-cancel-button,\\n.select-search-input::-webkit-search-results-button,\\n.select-search-input::-webkit-search-results-decoration {\\n -webkit-appearance: none;\\n}\\n\\n.select-search-input[readonly] {\\n cursor: pointer;\\n}\\n\\n.select-search-is-disabled .select-search-input {\\n cursor: not-allowed;\\n}\\n\\n.select-search-container:not(.select-search-is-disabled).select-search-has-focus .select-search-input,\\n.select-search-container:not(.select-search-is-disabled) .select-search-input:hover {\\n border-color: var(--select-search-selected);\\n}\\n\\n.select-search-select {\\n background: var(--select-search-background);\\n box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.15);\\n border: 1px solid var(--select-search-border);\\n overflow: auto;\\n max-height: 360px;\\n}\\n\\n.select-search-container:not(.select-search-is-multiple) .select-search-select {\\n position: absolute;\\n z-index: 3;\\n top: 41px;\\n right: 0;\\n left: 0;\\n border-radius: 6px;\\n display: none;\\n}\\n\\n.select-search-container:not(.select-search-is-multiple).select-search-has-focus .select-search-select {\\n display: block;\\n}\\n\\n.select-search-has-focus .select-search-select {\\n border-color: var(--select-search-selected);\\n}\\n\\n.select-search-options {\\n list-style: none;\\n // Note: Subtracted padding and margin\\n padding-left: 0;\\n margin-top: 0;\\n}\\n\\n.select-search-option,\\n.select-search-not-found {\\n display: block;\\n height: 42px;\\n width: 100%;\\n padding: 0 16px;\\n background: var(--select-search-background);\\n border: none;\\n outline: none;\\n font-family: var(--select-search-font);\\n color: var(--select-search-text);\\n font-size: 14px;\\n text-align: left;\\n letter-spacing: 0.01rem;\\n cursor: pointer;\\n -webkit-font-smoothing: antialiased;\\n}\\n\\n.select-search-option:disabled {\\n opacity: 0.5;\\n cursor: not-allowed;\\n background: transparent !important;\\n}\\n\\n.select-search-is-highlighted,\\n.select-search-option:not(.select-search-is-selected):hover {\\n background: var(--select-search-highlight);\\n}\\n\\n.select-search-is-selected {\\n font-weight: 600;\\n color: var(--select-search-selected);\\n}\\n\\n.select-search-group-header {\\n font-size: 12px;\\n text-transform: uppercase;\\n background: var(--select-search-border);\\n color: var(--select-search-subtle-text);\\n letter-spacing: 0.1rem;\\n padding: 8px 16px;\\n}\\n\\n.select-search-row:not(:first-child) .select-search-group-header {\\n margin-top: 0;\\n}\\n\\n.select-search-row:not(:last-child) .select-search-group-header {\\n margin-bottom: 0;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".tab{padding:8px !important}.tab.fui-Tab::before,.tab.fui-Tab::after{height:0;width:0;border:0}@media screen and (max-width: 900px){.tab>*{display:none}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/TooltipTab.scss\"],\"names\":[],\"mappings\":\"AAAA,KAEE,sBAAA,CAEA,yCAEE,QAAA,CACA,OAAA,CACA,QAAA,CAIA,qCADF,OAEI,YAAA,CAAA\",\"sourcesContent\":[\".tab {\\n // TODO: Abstract spacing to theme to override Fluent UI style\\n padding: 8px !important;\\n // Removes underline from tabs\\n &.fui-Tab::before,\\n &.fui-Tab::after {\\n height: 0;\\n width: 0;\\n border: 0;\\n }\\n // Only display children of the tab at > 900px width\\n & > * {\\n @media screen and (max-width: 900px) {\\n display: none;\\n }\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".introduction{background-color:rgba(67,176,73,.08);border-radius:8px;color:#2c303a;text-align:center;padding:14px;display:flex;flex-direction:column;align-items:center}.icon-header{display:flex;flex-direction:row;align-items:center;gap:12px;font-size:14px;line-height:20px}.icon-header svg{border-radius:0}.icon-header svg.primary{color:#0cca4a}.icon-header svg.secondary{color:#6d5bf6}.icon-header svg.tertiary{background-color:rgba(0,0,0,0);color:#2c303a}.icon-header span{font-family:inherit}.icon-header.secondary{color:#6d5bf6}.icon-header.tertiary{color:#2c303a}.breadcrumb{display:flex;flex-direction:row;align-items:center;gap:4px;font-size:10px;line-height:18px;font-weight:500;cursor:pointer;color:#6d5bf6}.breadcrumb svg{color:#6d5bf6;height:12px;width:12px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/components/Typography.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,cACE,oCAAA,CACA,iBAAA,CACA,aCGW,CDFX,iBAAA,CACA,YAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CAGF,aACE,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,QAAA,CACA,cAAA,CACA,gBAAA,CACA,iBACE,eAAA,CACA,yBACE,aCvBU,CDyBZ,2BACE,aCvBY,CDyBd,0BACE,8BAAA,CACA,aCtBO,CDyBX,kBACE,mBAAA,CAEF,uBACE,aClCc,CDoChB,sBACE,aChCS,CDoCb,YACE,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,OAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,aClDgB,CDmDhB,gBACE,aCpDc,CDqDd,WAAA,CACA,UAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.introduction {\\n background-color: rgb(67, 176, 73, 0.08);\\n border-radius: 8px;\\n color: $text-color;\\n text-align: center;\\n padding: 14px;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n}\\n\\n.icon-header {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 12px;\\n font-size: 14px;\\n line-height: 20px;\\n svg {\\n border-radius: 0;\\n &.primary {\\n color: $primary-color;\\n }\\n &.secondary {\\n color: $secondary-color;\\n }\\n &.tertiary {\\n background-color: transparent;\\n color: $text-color;\\n }\\n }\\n span {\\n font-family: inherit;\\n }\\n &.secondary {\\n color: $secondary-color;\\n }\\n &.tertiary {\\n color: $text-color;\\n }\\n}\\n\\n.breadcrumb {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n gap: 4px;\\n font-size: 10px;\\n line-height: 18px;\\n font-weight: 500;\\n cursor: pointer;\\n color: $secondary-color;\\n svg {\\n color: $secondary-color;\\n height: 12px;\\n width: 12px;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./assets/fonts/Inter/Inter-VariableFont_slnt,wght.ttf\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"./assets/fonts/Inter/static/Inter-Bold.ttf\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"./assets/fonts/Source-Code-Pro/SourceCodePro-VariableFont_wght.ttf\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"@font-face{font-family:\\\"Inter\\\";src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \") format(\\\"truetype\\\");font-display:swap}@font-face{font-family:\\\"Inter\\\";src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \") format(\\\"truetype\\\");font-display:swap;font-weight:bold}@font-face{font-family:\\\"Source Code Pro\\\";src:url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \") format(\\\"truetype\\\");font-display:swap}body,html,#root{height:100%;width:100%;margin:0;font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff}code{font-family:source-code-pro,Menlo,Monaco,Consolas,\\\"Courier New\\\",monospace}.action-button{padding:8px;font-size:16px}.action-button.secondary{padding:8px;color:#6d5bf6;border-color:#6d5bf6}.action-button.saving svg{padding:1px}button.fui-Tab{padding-top:10px;padding-bottom:10px}button.secondary,.fui-Button.secondary{color:#6d5bf6;background-color:#e5e8eb;min-width:54px;padding:6px}button.secondary:hover,button.secondary:active,button.secondary:hover:active,.fui-Button.secondary:hover,.fui-Button.secondary:active,.fui-Button.secondary:hover:active{color:inherit}button.secondary.inactive,.fui-Button.secondary.inactive{background-color:rgba(0,0,0,0);font-weight:normal}button.error,.fui-Button.error{color:#dc3246;font-weight:400}footer{position:fixed;left:0;bottom:0;width:100%;width:-webkit-fill-available;border-top:1px solid #dfe3e7;z-index:1}.themed-link{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;color:#43b049;font-weight:700;font-size:12px}.themed-link.secondary{color:#6c5af6}.bottom-border{border-bottom:1px solid #dfe3e7}.text-overflow{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/index.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,WACE,mBAAA,CACA,8DAAA,CACA,iBAAA,CAGF,WACE,mBAAA,CACA,8DAAA,CACA,iBAAA,CACA,gBAAA,CAGF,WACE,6BAAA,CACA,8DAAA,CACA,iBAAA,CAGF,gBAGE,WAAA,CACA,UAAA,CACA,QAAA,CACA,2JAAA,CAEA,kCAAA,CACA,iCAAA,CAEA,qBC1BO,CD6BT,KACE,yEAAA,CAGF,eACE,WAAA,CACA,cAAA,CACA,yBACE,WAAA,CACA,aCzCc,CD0Cd,oBC1Cc,CD6Cd,0BACE,WAAA,CAKN,eACE,gBAAA,CACA,mBAAA,CAGF,uCAEE,aC1DgB,CD2DhB,wBCzDqB,CD0DrB,cAAA,CACA,WAAA,CACA,yKAGE,aAAA,CAEF,yDACE,8BAAA,CACA,kBAAA,CAIJ,+BAEE,aCpEsB,CDqEtB,eAAA,CAGF,OACE,cAAA,CACA,MAAA,CACA,QAAA,CACA,UAAA,CACA,4BAAA,CACA,4BAAA,CACA,SAAA,CAGF,aACE,2JAAA,CAEA,aC9Fa,CD+Fb,eAAA,CACA,cAAA,CAEA,uBACE,aChGa,CDoGjB,eACE,+BAAA,CAGF,eACE,sBAAA,CACA,eAAA,CACA,kBAAA\",\"sourcesContent\":[\"@import \\\"./theme-variables.scss\\\";\\n\\n@font-face {\\n font-family: \\\"Inter\\\";\\n src: url(\\\"./assets/fonts/Inter/Inter-VariableFont_slnt,wght.ttf\\\") format(\\\"truetype\\\");\\n font-display: swap;\\n}\\n\\n@font-face {\\n font-family: \\\"Inter\\\";\\n src: url(\\\"./assets/fonts/Inter/static/Inter-Bold.ttf\\\") format(\\\"truetype\\\");\\n font-display: swap;\\n font-weight: bold;\\n}\\n\\n@font-face {\\n font-family: \\\"Source Code Pro\\\";\\n src: url(\\\"./assets/fonts/Source-Code-Pro/SourceCodePro-VariableFont_wght.ttf\\\") format(\\\"truetype\\\");\\n font-display: swap;\\n}\\n\\nbody,\\nhtml,\\n#root {\\n height: 100%;\\n width: 100%;\\n margin: 0;\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n\\n background-color: $app-bg;\\n}\\n\\ncode {\\n font-family: source-code-pro, Menlo, Monaco, Consolas, \\\"Courier New\\\", monospace;\\n}\\n\\n.action-button {\\n padding: 8px;\\n font-size: 16px;\\n &.secondary {\\n padding: 8px;\\n color: $secondary-color;\\n border-color: $secondary-color;\\n }\\n &.saving {\\n svg {\\n padding: 1px;\\n }\\n }\\n}\\n\\nbutton.fui-Tab {\\n padding-top: 10px;\\n padding-bottom: 10px;\\n}\\n\\nbutton.secondary,\\n.fui-Button.secondary {\\n color: $secondary-color;\\n background-color: $secondary-background;\\n min-width: 54px;\\n padding: 6px;\\n &:hover,\\n &:active,\\n &:hover:active {\\n color: inherit;\\n }\\n &.inactive {\\n background-color: transparent;\\n font-weight: normal;\\n }\\n}\\n\\nbutton.error,\\n.fui-Button.error {\\n color: $notification-error-bg;\\n font-weight: 400;\\n}\\n\\nfooter {\\n position: fixed;\\n left: 0;\\n bottom: 0;\\n width: 100%;\\n width: -webkit-fill-available;\\n border-top: 1px solid $component-border;\\n z-index: 1;\\n}\\n\\n.themed-link {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n color: $primary-link;\\n font-weight: 700;\\n font-size: 12px;\\n\\n &.secondary {\\n color: $secondary-link;\\n }\\n}\\n\\n.bottom-border {\\n border-bottom: 1px solid $component-border;\\n}\\n\\n.text-overflow {\\n text-overflow: ellipsis;\\n overflow: hidden;\\n white-space: nowrap;\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".feedback-menu button.fui-Button.fixed-button{z-index:100}.as-container{margin:-8px -10px 0 -10px;height:100%;display:flex;flex-direction:column}.as-container .anaconda-assistant-header-title *{display:none}.as-container .anaconda-assistant-home-screen-header{display:none}.as-container .anaconda-assistant-select-chat-starter-section{padding-top:15px}.as-container .anaconda-assistant-code-option-label{text-align:left !important}.as-container .anaconda-assistant-code-option-icon{width:30px !important;height:30px !important}.as-container .anaconda-assistant-chat-input-submit-button{width:30px !important;height:30px !important;padding:7px 8px !important}.as-container .anaconda-assistant-chat-input-submit-button .anaconda-assistant-chat-input-submit-button-send-icon{width:14px !important;height:14px !important}.content .anaconda-assistant-settings-page,.content .anaconda-assistant-history-page{height:calc(100% - 72px)}.anaconda-assistant-settings-page-run-code-control{display:none}.as-chat-main-section{overflow-y:auto;flex:1;padding:16px;flex-direction:column-reverse}.as-chat-main-section .anaconda-assistant-message-buttons-export-button,.as-chat-main-section .anaconda-assistant-user-message-message-buttons-export-button{display:none}.as-chat-main-section .anaconda-assistant-code-buttons .anaconda-assistant-code-buttons-replace-button-disabled{display:none}.as-export-chat-container{display:flex;align-items:center;padding:0 20px;min-height:26px;justify-content:center;color:#6c5af6;gap:10px;cursor:pointer;margin-top:auto;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.as-export-chat-container svg{height:12px}.as-back-button-container{height:30px;padding:0 18px;display:flex;align-items:center;color:#778;margin-bottom:10px}.as-back-button-container .as-back-button-icon{width:14px;padding-top:4px;padding-left:2px;padding-right:2px;color:#6c5af6;cursor:pointer}.as-back-button-container .as-back-button-title-container{width:100%;display:grid;text-align:center}.as-back-button-container .as-back-button-title{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.as-chat-footer-container{background-color:#fff;border-top:3px solid #ced2d9;padding:10px 10px 0px 5px;z-index:10}.as-chat-footer-container .anaconda-assistant-chat-input{margin:0 6px 8px 6px}.as-chat-footer-container .anaconda-assistant-chat-input form textarea{margin-bottom:.5em}.as-chat-footer-container .anaconda-assistant-chat-footer{margin:0 18px}.as-chat-footer-container .anaconda-assistant-chat-footer .anaconda-assistant-chat-footer-attach-context{display:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/AIAssistant/AIAssistant.scss\"],\"names\":[],\"mappings\":\"AACE,8CACE,WAAA,CAIJ,cAEE,yBAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CAGA,iDACE,YAAA,CAGF,qDACE,YAAA,CAGF,8DACE,gBAAA,CAGF,oDACE,0BAAA,CAGF,mDACE,qBAAA,CACA,sBAAA,CAGF,2DACE,qBAAA,CACA,sBAAA,CACA,0BAAA,CAEA,kHACE,qBAAA,CACA,sBAAA,CAMN,qFAEE,wBAAA,CAIF,mDACE,YAAA,CAGF,sBACE,eAAA,CACA,MAAA,CACA,YAAA,CACA,6BAAA,CAEA,6JAEE,YAAA,CAIA,gHACE,YAAA,CAKN,0BACE,YAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CACA,sBAAA,CACA,aAAA,CACA,QAAA,CACA,cAAA,CACA,eAAA,CACA,cAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CAEA,8BACE,WAAA,CAIJ,0BACE,WAAA,CACA,cAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,kBAAA,CAEA,+CACE,UAAA,CACA,eAAA,CACA,gBAAA,CACA,iBAAA,CACA,aAAA,CACA,cAAA,CAGF,0DACE,UAAA,CACA,YAAA,CACA,iBAAA,CAGF,gDACE,cAAA,CACA,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAIJ,0BACE,qBAAA,CACA,4BAAA,CACA,yBAAA,CACA,UAAA,CAEA,yDACE,oBAAA,CAEA,uEACE,kBAAA,CAIJ,0DACE,aAAA,CAGA,yGACE,YAAA\",\"sourcesContent\":[\".feedback-menu {\\n button.fui-Button.fixed-button {\\n z-index: 100;\\n }\\n}\\n\\n.as-container {\\n // Compansating for the parent .content padding\\n margin: -8px -10px 0 -10px;\\n height: 100%;\\n display: flex;\\n flex-direction: column;\\n\\n // Hiding the logo and title from assistant header\\n .anaconda-assistant-header-title * {\\n display: none;\\n }\\n\\n .anaconda-assistant-home-screen-header {\\n display: none;\\n }\\n\\n .anaconda-assistant-select-chat-starter-section {\\n padding-top: 15px;\\n }\\n\\n .anaconda-assistant-code-option-label {\\n text-align: left !important;\\n }\\n\\n .anaconda-assistant-code-option-icon {\\n width: 30px !important;\\n height: 30px !important;\\n }\\n\\n .anaconda-assistant-chat-input-submit-button {\\n width: 30px !important;\\n height: 30px !important;\\n padding: 7px 8px !important;\\n\\n .anaconda-assistant-chat-input-submit-button-send-icon {\\n width: 14px !important;\\n height: 14px !important;\\n }\\n }\\n}\\n\\n// Sync with parent.content height\\n.content .anaconda-assistant-settings-page,\\n.content .anaconda-assistant-history-page {\\n height: calc(100% - 72px);\\n}\\n\\n// Hide settings page run code control\\n.anaconda-assistant-settings-page-run-code-control {\\n display: none;\\n}\\n\\n.as-chat-main-section {\\n overflow-y: auto;\\n flex: 1;\\n padding: 16px;\\n flex-direction: column-reverse;\\n\\n .anaconda-assistant-message-buttons-export-button,\\n .anaconda-assistant-user-message-message-buttons-export-button {\\n display: none;\\n }\\n\\n .anaconda-assistant-code-buttons {\\n .anaconda-assistant-code-buttons-replace-button-disabled {\\n display: none;\\n }\\n }\\n}\\n\\n.as-export-chat-container {\\n display: flex;\\n align-items: center;\\n padding: 0 20px;\\n min-height: 26px;\\n justify-content: center;\\n color: #6c5af6;\\n gap: 10px;\\n cursor: pointer;\\n margin-top: auto;\\n font-size: 14px;\\n font-style: normal;\\n font-weight: 400;\\n line-height: 20px;\\n\\n svg {\\n height: 12px;\\n }\\n}\\n\\n.as-back-button-container {\\n height: 30px;\\n padding: 0 18px;\\n display: flex;\\n align-items: center;\\n color: #778;\\n margin-bottom: 10px;\\n\\n .as-back-button-icon {\\n width: 14px;\\n padding-top: 4px;\\n padding-left: 2px;\\n padding-right: 2px;\\n color: #6c5af6;\\n cursor: pointer;\\n }\\n\\n .as-back-button-title-container {\\n width: 100%;\\n display: grid;\\n text-align: center;\\n }\\n\\n .as-back-button-title {\\n font-size: 12px;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n min-width: 0;\\n }\\n}\\n\\n.as-chat-footer-container {\\n background-color: #fff;\\n border-top: 3px solid #ced2d9;\\n padding: 10px 10px 0px 5px;\\n z-index: 10;\\n\\n .anaconda-assistant-chat-input {\\n margin: 0 6px 8px 6px;\\n\\n form textarea {\\n margin-bottom: 0.5em;\\n }\\n }\\n\\n .anaconda-assistant-chat-footer {\\n margin: 0 18px;\\n\\n // Hiding attach-context button\\n .anaconda-assistant-chat-footer-attach-context {\\n display: none;\\n }\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".custom-dialog-surface .fui-DialogBody,.custom-dialog-surface .fui-DialogActions{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif}.custom-dialog-surface .fui-DialogActions{justify-self:stretch;flex-direction:column;grid-column-start:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/DataCatalogs/Connections/ConflictDialog.scss\"],\"names\":[],\"mappings\":\"AACE,iFAEE,2JAAA,CAGF,0CACE,oBAAA,CACA,qBAAA,CACA,mBAAA\",\"sourcesContent\":[\".custom-dialog-surface {\\n .fui-DialogBody,\\n .fui-DialogActions {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n }\\n .fui-DialogActions {\\n justify-self: stretch;\\n flex-direction: column;\\n grid-column-start: 1;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ph-item{position:relative;display:flex;flex-wrap:wrap;padding:30px 15px 15px 15px;margin-bottom:30px;overflow:hidden;direction:ltr;background-color:#fff;border:1px solid #e6e6e6;border-radius:2px}.ph-item,.ph-item *,.ph-item ::after,.ph-item ::before{box-sizing:border-box}.ph-item::before{position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;pointer-events:none;content:\\\" \\\";background:linear-gradient(to right, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 54%) 50% 50%;animation:ph-animation .8s linear infinite}.ph-item>*{display:flex;flex:1 1 auto;flex-flow:column;padding-right:15px;padding-left:15px;margin-bottom:15px}.ph-row{display:flex;flex-wrap:wrap;margin-top:-7.5px}.ph-row div{height:10px;margin-top:7.5px;background-color:#ced4da}.ph-row .big,.ph-row.big div{height:20px}.ph-row .empty{background-color:rgba(255,255,255,0)}.ph-col-2{flex:0 0 16.6666666667%}.ph-col-4{flex:0 0 33.3333333333%}.ph-col-6{flex:0 0 50%}.ph-col-8{flex:0 0 66.6666666667%}.ph-col-10{flex:0 0 83.3333333333%}.ph-col-12{flex:0 0 100%}[class*=ph-col]{direction:ltr}[class*=ph-col]>*+.ph-row{margin-top:0}[class*=ph-col]>*+*{margin-top:7.5px}.ph-avatar{position:relative;width:100%;min-width:60px;overflow:hidden;background-color:#ced4da;border-radius:50%}.ph-avatar::before{display:block;padding-top:100%;content:\\\" \\\"}.ph-picture{width:100%;height:120px;background-color:#ced4da}@keyframes ph-animation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}.connections{display:flex;flex-direction:column;gap:16px;padding:0 10px 120px 10px}.connections .source-header{font-size:14px;gap:2px}.connections .source-header svg{color:#2c303a}.connections .fui-Field textarea,.connections textarea{height:70px;font-family:monospace;font-size:12px;border-color:#8c94a6;border-radius:6px;padding:10px}.connections label{color:#2c303a;font-weight:bold;margin-left:4px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/placeholder-loading/src/scss/_layout.scss\",\"webpack://./node_modules/placeholder-loading/src/scss/_variables.scss\",\"webpack://./src/taskpane/pages/DataCatalogs/Connections/ConnectToWorkbook.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,SAQI,iBAAA,CACA,YAAA,CACA,cAAA,CACA,2BAAA,CACA,kBCJsB,CDKtB,eAAA,CACA,aCdsB,CDetB,qBCdsB,CDetB,wBCbsB,CDctB,iBCbsB,CDHtB,uDAII,qBAAA,CAcJ,iBACI,iBAAA,CACA,KAAA,CACA,OAAA,CACA,QAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,iBAAA,CACA,mBAAA,CACA,WAAA,CACA,mIAAA,CACA,0CAAA,CAGJ,WACI,YAAA,CACA,aAAA,CACA,gBAAA,CACA,kBAAA,CACA,iBAAA,CACA,kBC/BkB,CDmC1B,QACI,YAAA,CACA,cAAA,CACA,iBAAA,CAEA,YACI,WAAA,CACA,gBAAA,CACA,wBClDkB,CDqDtB,6BAEI,WAAA,CAGJ,eACI,oCAAA,CAKJ,UACI,uBAAA,CADJ,UACI,uBAAA,CADJ,UACI,YAAA,CADJ,UACI,uBAAA,CADJ,WACI,uBAAA,CADJ,WACI,aAAA,CAgBR,gBACI,aCpFsB,CDuFlB,0BACI,YAAA,CAGJ,oBACI,gBAAA,CAKZ,WACI,iBAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,wBCpGsB,CDqGtB,iBC5FsB,CD8FtB,mBACI,aAAA,CACA,gBAAA,CACA,WAAA,CAIR,YACI,UAAA,CACA,YAAA,CACA,wBCjHsB,CDoH1B,wBACI,GACI,iCAAA,CAGJ,KACI,gCAAA,CAAA,CE1HR,aACE,YAAA,CACA,qBAAA,CACA,QAAA,CACA,yBAAA,CAEA,4BACE,cAAA,CACA,OAAA,CACA,gCACE,aCNO,CDUX,uDAEE,WAAA,CACA,qBAAA,CACA,cAAA,CACA,oBAAA,CACA,iBAAA,CACA,YAAA,CAGF,mBACE,aCrBS,CDsBT,gBAAA,CACA,eAAA\",\"sourcesContent\":[\"@use \\\"sass:math\\\";\\n\\n.ph-item {\\n &,\\n *,\\n ::after,\\n ::before {\\n box-sizing: border-box;\\n }\\n\\n position: relative;\\n display: flex;\\n flex-wrap: wrap;\\n padding: $ph-gutter ($ph-gutter * 0.5) ($ph-gutter - $ph-spacer) ($ph-gutter * 0.5);\\n margin-bottom: $ph-gutter;\\n overflow: hidden;\\n direction: $ph-direction;\\n background-color: $ph-bg;\\n border: $ph-border;\\n border-radius: $ph-border-radius;\\n\\n &::before {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 50%;\\n z-index: 1;\\n width: 500%;\\n margin-left: -250%;\\n pointer-events: none;\\n content: \\\" \\\";\\n background: linear-gradient(to right, rgba($ph-bg, 0) 46%, rgba($ph-bg, 0.35) 50%, rgba($ph-bg, 0) 54%) 50% 50%;\\n animation: ph-animation $ph-animation-duration linear infinite;\\n }\\n\\n > * {\\n display: flex;\\n flex: 1 1 auto;\\n flex-flow: column;\\n padding-right: ($ph-gutter * 0.5);\\n padding-left: ($ph-gutter * 0.5);\\n margin-bottom: $ph-spacer;\\n }\\n}\\n\\n.ph-row {\\n display: flex;\\n flex-wrap: wrap;\\n margin-top: -($ph-spacer * 0.5);\\n\\n div {\\n height: 10px;\\n margin-top: ($ph-spacer * 0.5);\\n background-color: $ph-color;\\n }\\n\\n .big,\\n &.big div {\\n height: 20px;\\n }\\n\\n .empty {\\n background-color: rgba($ph-bg, 0);\\n }\\n}\\n\\n@mixin ph-make-col($size, $columns) {\\n .ph-col-#{$size} {\\n flex: 0 0 math.percentage(math.div($size, $columns));\\n }\\n}\\n\\n@for $i from 1 through $ph-cols {\\n @if $ph-cols-remove-odd and $i % 2 == 0 {\\n @include ph-make-col($i, $ph-cols);\\n }\\n\\n @else if not $ph-cols-remove-odd {\\n @include ph-make-col($i, $ph-cols);\\n }\\n}\\n\\n// TODO make this a `.ph-wrap` class for no padding, no background, no animation,\\n// and remove direction from `.ph-item`. This is a breaking change\\n[class*=\\\"ph-col\\\"] {\\n direction: $ph-direction;\\n\\n > * {\\n + .ph-row {\\n margin-top: 0;\\n }\\n\\n + * {\\n margin-top: ($ph-spacer * 0.5);\\n }\\n }\\n}\\n\\n.ph-avatar {\\n position: relative;\\n width: 100%;\\n min-width: 60px;\\n overflow: hidden;\\n background-color: $ph-color;\\n border-radius: $ph-avatar-border-radius;\\n\\n &::before {\\n display: block;\\n padding-top: 100%;\\n content: \\\" \\\";\\n }\\n}\\n\\n.ph-picture {\\n width: 100%;\\n height: 120px;\\n background-color: $ph-color;\\n}\\n\\n@keyframes ph-animation {\\n 0% {\\n transform: translate3d(-30%, 0, 0);\\n }\\n\\n 100% {\\n transform: translate3d(30%, 0, 0);\\n }\\n}\\n\",\"@use \\\"sass:color\\\";\\n\\n$ph-direction: ltr !default;\\n$ph-bg: #fff !default;\\n$ph-color: #ced4da !default;\\n$ph-border: 1px solid color.scale($ph-bg, $lightness: -10%) !default;\\n$ph-border-radius: 2px !default;\\n\\n$ph-cols: 12 !default;\\n$ph-cols-remove-odd: true !default;\\n$ph-gutter: 30px !default;\\n$ph-spacer: 15px !default;\\n\\n$ph-avatar-border-radius: 50% !default;\\n\\n$ph-animation-duration: 0.8s !default;\\n\",\"@import \\\"~/node_modules/placeholder-loading/src/scss/placeholder-loading\\\";\\n@import \\\"../../../theme-variables.scss\\\";\\n\\n// Data connections\\n.connections {\\n display: flex;\\n flex-direction: column;\\n gap: 16px;\\n padding: 0 10px 120px 10px;\\n\\n .source-header {\\n font-size: 14px;\\n gap: 2px;\\n svg {\\n color: $text-color;\\n }\\n }\\n\\n .fui-Field textarea,\\n textarea {\\n height: 70px;\\n font-family: monospace;\\n font-size: 12px;\\n border-color: #8c94a6;\\n border-radius: 6px;\\n padding: 10px;\\n }\\n\\n label {\\n color: $text-color;\\n font-weight: bold;\\n margin-left: 4px;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ph-item{position:relative;display:flex;flex-wrap:wrap;padding:30px 15px 15px 15px;margin-bottom:30px;overflow:hidden;direction:ltr;background-color:#fff;border:1px solid #e6e6e6;border-radius:2px}.ph-item,.ph-item *,.ph-item ::after,.ph-item ::before{box-sizing:border-box}.ph-item::before{position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;pointer-events:none;content:\\\" \\\";background:linear-gradient(to right, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 54%) 50% 50%;animation:ph-animation .8s linear infinite}.ph-item>*{display:flex;flex:1 1 auto;flex-flow:column;padding-right:15px;padding-left:15px;margin-bottom:15px}.ph-row{display:flex;flex-wrap:wrap;margin-top:-7.5px}.ph-row div{height:10px;margin-top:7.5px;background-color:#ced4da}.ph-row .big,.ph-row.big div{height:20px}.ph-row .empty{background-color:rgba(255,255,255,0)}.ph-col-2{flex:0 0 16.6666666667%}.ph-col-4{flex:0 0 33.3333333333%}.ph-col-6{flex:0 0 50%}.ph-col-8{flex:0 0 66.6666666667%}.ph-col-10{flex:0 0 83.3333333333%}.ph-col-12{flex:0 0 100%}[class*=ph-col]{direction:ltr}[class*=ph-col]>*+.ph-row{margin-top:0}[class*=ph-col]>*+*{margin-top:7.5px}.ph-avatar{position:relative;width:100%;min-width:60px;overflow:hidden;background-color:#ced4da;border-radius:50%}.ph-avatar::before{display:block;padding-top:100%;content:\\\" \\\"}.ph-picture{width:100%;height:120px;background-color:#ced4da}@keyframes ph-animation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}.connection-item{display:flex;align-items:center;padding:8px 8px 8px 18px;height:24px;border-top:1px solid #dfe3e7}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/placeholder-loading/src/scss/_layout.scss\",\"webpack://./node_modules/placeholder-loading/src/scss/_variables.scss\",\"webpack://./src/taskpane/pages/DataCatalogs/Connections/ConnectionItem.scss\"],\"names\":[],\"mappings\":\"AAEA,SAQI,iBAAA,CACA,YAAA,CACA,cAAA,CACA,2BAAA,CACA,kBCJsB,CDKtB,eAAA,CACA,aCdsB,CDetB,qBCdsB,CDetB,wBCbsB,CDctB,iBCbsB,CDHtB,uDAII,qBAAA,CAcJ,iBACI,iBAAA,CACA,KAAA,CACA,OAAA,CACA,QAAA,CACA,QAAA,CACA,SAAA,CACA,UAAA,CACA,iBAAA,CACA,mBAAA,CACA,WAAA,CACA,mIAAA,CACA,0CAAA,CAGJ,WACI,YAAA,CACA,aAAA,CACA,gBAAA,CACA,kBAAA,CACA,iBAAA,CACA,kBC/BkB,CDmC1B,QACI,YAAA,CACA,cAAA,CACA,iBAAA,CAEA,YACI,WAAA,CACA,gBAAA,CACA,wBClDkB,CDqDtB,6BAEI,WAAA,CAGJ,eACI,oCAAA,CAKJ,UACI,uBAAA,CADJ,UACI,uBAAA,CADJ,UACI,YAAA,CADJ,UACI,uBAAA,CADJ,WACI,uBAAA,CADJ,WACI,aAAA,CAgBR,gBACI,aCpFsB,CDuFlB,0BACI,YAAA,CAGJ,oBACI,gBAAA,CAKZ,WACI,iBAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,wBCpGsB,CDqGtB,iBC5FsB,CD8FtB,mBACI,aAAA,CACA,gBAAA,CACA,WAAA,CAIR,YACI,UAAA,CACA,YAAA,CACA,wBCjHsB,CDoH1B,wBACI,GACI,iCAAA,CAGJ,KACI,gCAAA,CAAA,CE3HR,iBACE,YAAA,CACA,kBAAA,CACA,wBAAA,CACA,WAAA,CACA,4BAAA\",\"sourcesContent\":[\"@use \\\"sass:math\\\";\\n\\n.ph-item {\\n &,\\n *,\\n ::after,\\n ::before {\\n box-sizing: border-box;\\n }\\n\\n position: relative;\\n display: flex;\\n flex-wrap: wrap;\\n padding: $ph-gutter ($ph-gutter * 0.5) ($ph-gutter - $ph-spacer) ($ph-gutter * 0.5);\\n margin-bottom: $ph-gutter;\\n overflow: hidden;\\n direction: $ph-direction;\\n background-color: $ph-bg;\\n border: $ph-border;\\n border-radius: $ph-border-radius;\\n\\n &::before {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 50%;\\n z-index: 1;\\n width: 500%;\\n margin-left: -250%;\\n pointer-events: none;\\n content: \\\" \\\";\\n background: linear-gradient(to right, rgba($ph-bg, 0) 46%, rgba($ph-bg, 0.35) 50%, rgba($ph-bg, 0) 54%) 50% 50%;\\n animation: ph-animation $ph-animation-duration linear infinite;\\n }\\n\\n > * {\\n display: flex;\\n flex: 1 1 auto;\\n flex-flow: column;\\n padding-right: ($ph-gutter * 0.5);\\n padding-left: ($ph-gutter * 0.5);\\n margin-bottom: $ph-spacer;\\n }\\n}\\n\\n.ph-row {\\n display: flex;\\n flex-wrap: wrap;\\n margin-top: -($ph-spacer * 0.5);\\n\\n div {\\n height: 10px;\\n margin-top: ($ph-spacer * 0.5);\\n background-color: $ph-color;\\n }\\n\\n .big,\\n &.big div {\\n height: 20px;\\n }\\n\\n .empty {\\n background-color: rgba($ph-bg, 0);\\n }\\n}\\n\\n@mixin ph-make-col($size, $columns) {\\n .ph-col-#{$size} {\\n flex: 0 0 math.percentage(math.div($size, $columns));\\n }\\n}\\n\\n@for $i from 1 through $ph-cols {\\n @if $ph-cols-remove-odd and $i % 2 == 0 {\\n @include ph-make-col($i, $ph-cols);\\n }\\n\\n @else if not $ph-cols-remove-odd {\\n @include ph-make-col($i, $ph-cols);\\n }\\n}\\n\\n// TODO make this a `.ph-wrap` class for no padding, no background, no animation,\\n// and remove direction from `.ph-item`. This is a breaking change\\n[class*=\\\"ph-col\\\"] {\\n direction: $ph-direction;\\n\\n > * {\\n + .ph-row {\\n margin-top: 0;\\n }\\n\\n + * {\\n margin-top: ($ph-spacer * 0.5);\\n }\\n }\\n}\\n\\n.ph-avatar {\\n position: relative;\\n width: 100%;\\n min-width: 60px;\\n overflow: hidden;\\n background-color: $ph-color;\\n border-radius: $ph-avatar-border-radius;\\n\\n &::before {\\n display: block;\\n padding-top: 100%;\\n content: \\\" \\\";\\n }\\n}\\n\\n.ph-picture {\\n width: 100%;\\n height: 120px;\\n background-color: $ph-color;\\n}\\n\\n@keyframes ph-animation {\\n 0% {\\n transform: translate3d(-30%, 0, 0);\\n }\\n\\n 100% {\\n transform: translate3d(30%, 0, 0);\\n }\\n}\\n\",\"@use \\\"sass:color\\\";\\n\\n$ph-direction: ltr !default;\\n$ph-bg: #fff !default;\\n$ph-color: #ced4da !default;\\n$ph-border: 1px solid color.scale($ph-bg, $lightness: -10%) !default;\\n$ph-border-radius: 2px !default;\\n\\n$ph-cols: 12 !default;\\n$ph-cols-remove-odd: true !default;\\n$ph-gutter: 30px !default;\\n$ph-spacer: 15px !default;\\n\\n$ph-avatar-border-radius: 50% !default;\\n\\n$ph-animation-duration: 0.8s !default;\\n\",\"@import \\\"~/node_modules/placeholder-loading/src/scss/placeholder-loading\\\";\\n@import \\\"../../../theme-variables.scss\\\";\\n\\n.connection-item {\\n display: flex;\\n align-items: center;\\n padding: 8px 8px 8px 18px;\\n height: 24px;\\n border-top: 1px solid $component-border;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".edublocks{height:100%;width:100%;display:flex;flex-direction:column}.edublocks .run-button{min-width:70px}.edublocks button.secondary-button,.edublocks button.secondary-button:hover,.edublockssvg{height:30px;background-color:#e5e8eb;color:#6d5bf6}.edublocks button:hover .fui-Button__icon{color:#6d5bf6}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/EduBlocks/Edublocks.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,WACE,WAAA,CACA,UAAA,CACA,YAAA,CACA,qBAAA,CAEA,uBACE,cAAA,CAGF,0FAGE,WAAA,CACA,wBCXmB,CDYnB,aCdc,CDgBhB,0CACE,aCjBc\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.edublocks {\\n height: 100%;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n\\n .run-button {\\n min-width: 70px;\\n }\\n\\n button.secondary-button,\\n button.secondary-button:hover,\\n &svg {\\n height: 30px;\\n background-color: $secondary-background;\\n color: $secondary-color;\\n }\\n button:hover .fui-Button__icon {\\n color: $secondary-color;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".profile{margin:12px;font-size:13px}.profile .bright{background-color:#0cca4a}.profile h3{font-size:14px;font-weight:600;color:#52596b}.profile h4{font-size:12px}.profile section{margin:16px 6px}.profile ul{list-style-type:none;padding-left:8px}.profile ul li:first-child{font-weight:700;font-size:16px}.profile button a{font-family:\\\"Inter\\\",-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Fira Sans\\\",\\\"Droid Sans\\\",\\\"Helvetica Neue\\\",sans-serif;color:#2c303a;text-decoration:none;font-size:13px}.profile button a:hover{color:#fff}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Profile.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,SACE,WAAA,CACA,cAAA,CAEA,iBACE,wBCPY,CDUd,YACE,cAAA,CACA,eAAA,CACA,aCMO,CDJT,YACE,cAAA,CAGF,iBACE,eAAA,CAGF,YACE,oBAAA,CACA,gBAAA,CAEA,2BACE,eAAA,CACA,cAAA,CAKF,kBACE,2JAAA,CAEA,aC7BO,CD8BP,oBAAA,CACA,cAAA,CACA,wBACE,UAAA\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\n.profile {\\n margin: 12px;\\n font-size: 13px;\\n\\n .bright {\\n background-color: $primary-color;\\n }\\n\\n h3 {\\n font-size: 14px;\\n font-weight: 600;\\n color: $gray-600;\\n }\\n h4 {\\n font-size: 12px;\\n }\\n\\n section {\\n margin: 16px 6px;\\n }\\n\\n ul {\\n list-style-type: none;\\n padding-left: 8px;\\n\\n li:first-child {\\n font-weight: 700;\\n font-size: 16px;\\n }\\n }\\n\\n button {\\n a {\\n font-family: \\\"Inter\\\", -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\",\\n \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n color: $text-color;\\n text-decoration: none;\\n font-size: 13px;\\n &:hover {\\n color: #fff;\\n }\\n }\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".filter-page{height:calc(100% - 125px);overflow-y:auto}.filter-page .filter-label{text-decoration:underline;color:#6d5bf6;cursor:pointer;display:flex;justify-content:flex-end;margin-right:10px;font-weight:400}.filter-page .circle{width:30px;height:30px;border-radius:50%;background-color:#6d5bf6;margin-top:2px;color:#fff;font-size:24px}.filter-page .secondary{color:#6d5bf6;border-color:#6d5bf6}.filter-page label{color:#2c303a;font-weight:bold;margin-left:4px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Projects/Filter.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,aACE,yBAAA,CACA,eAAA,CAEA,2BACE,yBAAA,CACA,aCLc,CDMd,cAAA,CACA,YAAA,CACA,wBAAA,CACA,iBAAA,CACA,eAAA,CAGF,qBACE,UAAA,CACA,WAAA,CACA,iBAAA,CACA,wBCjBc,CDkBd,cAAA,CACA,UAAA,CACA,cAAA,CAGF,wBACE,aCxBc,CDyBd,oBCzBc,CD4BhB,mBACE,aCxBS,CDyBT,gBAAA,CACA,eAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.filter-page {\\n height: calc(100% - 125px);\\n overflow-y: auto;\\n\\n .filter-label {\\n text-decoration: underline;\\n color: $secondary-color;\\n cursor: pointer;\\n display: flex;\\n justify-content: flex-end;\\n margin-right: 10px;\\n font-weight: 400;\\n }\\n\\n .circle {\\n width: 30px;\\n height: 30px;\\n border-radius: 50%;\\n background-color: $secondary-color;\\n margin-top: 2px;\\n color: #ffffff;\\n font-size: 24px;\\n }\\n\\n .secondary {\\n color: $secondary-color;\\n border-color: $secondary-color;\\n }\\n\\n label {\\n color: $text-color;\\n font-weight: bold;\\n margin-left: 4px;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".new-project label.fui-Label{margin-bottom:6px}.new-project .subtitle{font-size:11px;color:#8c94a6}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Projects/NewProject.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,6BACE,iBAAA,CAEF,uBACE,cAAA,CACA,aCSO\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.new-project {\\n label.fui-Label {\\n margin-bottom: 6px;\\n }\\n .subtitle {\\n font-size: 11px;\\n color: $gray-400;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".projects-explorer label{font-size:13px}.projects-explorer .fui-AccordionHeader__button,.projects-explorer .fui-Text{font-size:14px;white-space:nowrap;padding-left:0px}.projects-explorer .first-connection h2{text-align:center;font-size:16px;font-weight:bold}.projects-explorer .first-connection button{margin-top:20px}.projects-explorer .first-connection button:hover{color:#6c5af6;border-color:#6c5af6}.projects-explorer label{color:#2c303a;font-weight:bold}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Projects/Projects.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,yBACE,cAAA,CAEF,6EAEE,cAAA,CACA,kBAAA,CACA,gBAAA,CAGA,wCACE,iBAAA,CACA,cAAA,CACA,gBAAA,CAEF,4CACE,eAAA,CACA,kDACE,aCjBS,CDkBT,oBClBS,CDsBf,yBACE,aCnBS,CDoBT,gBAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.projects-explorer {\\n label {\\n font-size: 13px;\\n }\\n .fui-AccordionHeader__button,\\n .fui-Text {\\n font-size: 14px;\\n white-space: nowrap;\\n padding-left: 0px;\\n }\\n .first-connection {\\n h2 {\\n text-align: center;\\n font-size: 16px;\\n font-weight: bold;\\n }\\n button {\\n margin-top: 20px;\\n &:hover {\\n color: $secondary-link;\\n border-color: $secondary-link;\\n }\\n }\\n }\\n label {\\n color: $text-color;\\n font-weight: bold;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".settings h2{font-size:16px}.settings .fui-Field__label{font-weight:700}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Settings.scss\"],\"names\":[],\"mappings\":\"AACE,aACE,cAAA,CAEF,4BACE,eAAA\",\"sourcesContent\":[\".settings {\\n h2 {\\n font-size: 16px;\\n }\\n .fui-Field__label {\\n font-weight: 700;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".code-snippet-editor .cm-content,.code-snippet-editor .cm-gutter{min-height:200px}.code-snippet-editor .cm-gutters{margin:1px}.code-snippet-editor .cm-scroller{overflow:auto}.code-snippet-editor .cm-wrap{border:1px solid #dfe3e7}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Snippets/ExportSnippet.scss\"],\"names\":[],\"mappings\":\"AAGE,iEAEE,gBAAA,CAEF,iCACE,UAAA,CAEF,kCACE,aAAA,CAEF,8BACE,wBAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.code-snippet-editor {\\n .cm-content,\\n .cm-gutter {\\n min-height: 200px;\\n }\\n .cm-gutters {\\n margin: 1px;\\n }\\n .cm-scroller {\\n overflow: auto;\\n }\\n .cm-wrap {\\n border: 1px solid $component-border;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".snippet-item .fui-Card.cell-card{background-color:rgba(0,0,0,0);border-color:#dfe3e7;padding:2px 0px 2px 8px;row-gap:0px}.snippet-item .fui-Card.cell-card .header-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;font-weight:normal}.snippet-item .fui-Card.cell-card.expanded{padding:2px 0px 2px 8px;background-color:#f9fafb}.snippet-item .fui-Card.cell-card:last-child{margin-bottom:15px}.snippet-item .fui-Card.cell-card .fui-CardHeader__action{margin-left:0}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Snippets/SnippetItem.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,kCACE,8BAAA,CACA,oBCIe,CDHf,uBAAA,CACA,WAAA,CACA,8CACE,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,6BAAA,CACA,kBAAA,CAEF,2CACE,uBAAA,CACA,wBCJK,CDMP,6CACE,kBAAA,CAEF,0DACE,aAAA\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.snippet-item {\\n .fui-Card.cell-card {\\n background-color: transparent;\\n border-color: $component-border;\\n padding: 2px 0px 2px 8px;\\n row-gap: 0px;\\n .header-row {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n justify-content: space-between;\\n font-weight: normal;\\n }\\n &.expanded {\\n padding: 2px 0px 2px 8px;\\n background-color: $gray-100;\\n }\\n &:last-child {\\n margin-bottom: 15px;\\n }\\n .fui-CardHeader__action {\\n margin-left: 0;\\n }\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"div.list-item:not(.disabled):hover{background-color:#eee}.start-menu svg{color:#0cca4a}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Start.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAEA,mCACE,qBAAA,CAIA,gBACE,aCRY\",\"sourcesContent\":[\"@import \\\"../theme-variables.scss\\\";\\n\\ndiv.list-item:not(.disabled):hover {\\n background-color: #eee;\\n}\\n\\n.start-menu {\\n svg {\\n color: $primary-color;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".cm-scroller::-webkit-scrollbar{width:8px !important;height:8px !important}.cm-scroller::-webkit-scrollbar-track{background:#f9fafb}.cm-scroller::-webkit-scrollbar-thumb{background:#ced2d9}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Visualization/Code.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGE,gCACE,oBAAA,CACA,qBAAA,CAEF,sCACE,kBCKO,CDHT,sCACE,kBCIO\",\"sourcesContent\":[\"@import \\\"../../theme-variables.scss\\\";\\n\\n.cm-scroller {\\n &::-webkit-scrollbar {\\n width: 8px !important;\\n height: 8px !important;\\n }\\n &::-webkit-scrollbar-track {\\n background: $gray-100;\\n }\\n &::-webkit-scrollbar-thumb {\\n background: $gray-200;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".plot-card{border:1px solid;border-color:#e6e6e6;border-radius:8px}.plot-card:hover{background:#f3f4f6}.plot-card:focus{border:1px solid #8c94a6}.label{margin-top:5px;font-size:14px}.action-root{position:fixed;width:100%;height:100%;background-color:rgba(0,0,0,.2);z-index:3}.viz-action{position:absolute;left:0;bottom:0;width:100%;width:-webkit-fill-available;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:10px;border-top:1px solid #ccc;padding:12px;z-index:2}.tooltip-form{height:100%;width:100%;max-width:160px;color:#fff;margin:0}.tooltip-plots{height:100%;width:100%;max-height:55;max-width:195px;color:#fff;margin:0}.icon-154{color:#52596b}.collapsible-content{margin-top:10px}.palette-label{font-size:14px;font-weight:400}.color-blocks{display:flex;justify-content:center;margin-top:6px;padding-bottom:7px}.color-blocks .color-block{width:10px;height:10px;margin:0 2px}.base-setup{height:calc(100% - 45px);overflow-y:auto}.base-setup .fui-Divider{margin-top:10px}.base-design{height:calc(100% - 45px);overflow-y:auto}.base-design .fui-Divider{margin-top:10px}.code{color:#2c303a}.preview{height:calc(100% - 45px);overflow-y:auto}.preview img{width:100%}span.clickable{text-decoration:underline;font-weight:bold;cursor:pointer;color:#6c5af6}code.trace{font-family:\\\"Source Code Pro\\\",\\\"Courier New\\\",Courier,monospace;align-self:flex-start;color:#2c303a;background-color:#fcebec;border:1px solid #efa4a4;border-radius:4px;padding:10px;margin-bottom:10px}.cm-editor{border:1px solid #dfe3e7}.core-viz label{color:#2c303a;font-weight:bold;margin-left:4px}.core-viz h2{font-size:18px;margin:8px 0}.custom-dropdown{position:relative}.custom-dropdown .fui-Dropdown__button{display:block;height:28px;width:calc(100% - 20px);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.custom-dropdown .fui-Dropdown__expandIcon{background-color:#fff;position:absolute;top:5px;right:7px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Visualization/Viz.scss\",\"webpack://./src/taskpane/theme-variables.scss\"],\"names\":[],\"mappings\":\"AAGA,WACE,gBAAA,CACA,oBAAA,CACA,iBAAA,CACA,iBACE,kBAAA,CAEF,iBACE,wBAAA,CAIJ,OACE,cAAA,CACA,cAAA,CAIF,aACE,cAAA,CACA,UAAA,CACA,WAAA,CACA,+BAAA,CACA,SAAA,CAGF,YACE,iBAAA,CACA,MAAA,CACA,QAAA,CACA,UAAA,CACA,4BAAA,CACA,qBAAA,CACA,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,QAAA,CACA,yBAAA,CACA,YAAA,CACA,SAAA,CAGF,cACE,WAAA,CACA,UAAA,CACA,eAAA,CACA,UAAA,CACA,QAAA,CAGF,eACE,WAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CACA,UAAA,CACA,QAAA,CAGF,UACE,aAAA,CAGF,qBACE,eAAA,CAIF,eACE,cAAA,CACA,eAAA,CAEF,cACE,YAAA,CACA,sBAAA,CACA,cAAA,CACA,kBAAA,CAEA,2BACE,UAAA,CACA,WAAA,CACA,YAAA,CAIJ,YACE,wBAAA,CACA,eAAA,CACA,yBACE,eAAA,CAGJ,aACE,wBAAA,CACA,eAAA,CACA,0BACE,eAAA,CAIJ,MACE,aChGW,CDkGb,SACE,wBAAA,CACA,eAAA,CACA,aACE,UAAA,CAIJ,eACE,yBAAA,CACA,gBAAA,CACA,cAAA,CACA,aClHe,CDqHjB,WACE,6DAAA,CACA,qBAAA,CACA,aCpHW,CDqHX,wBAAA,CACA,wBAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CAGF,WACE,wBAAA,CAIA,gBACE,aClIS,CDmIT,gBAAA,CACA,eAAA,CAEF,aACE,cAAA,CACA,YAAA,CAIJ,iBACE,iBAAA,CACA,uCACE,aAAA,CACA,WAAA,CACA,uBAAA,CACA,kBAAA,CACA,sBAAA,CACA,eAAA,CAEF,2CACE,qBCzJK,CD0JL,iBAAA,CACA,OAAA,CACA,SAAA\",\"sourcesContent\":[\"// used for all of the input labels in setup & design\\n@import \\\"../../theme-variables.scss\\\";\\n\\n.plot-card {\\n border: 1px solid;\\n border-color: #e6e6e6;\\n border-radius: 8px;\\n &:hover {\\n background: #f3f4f6;\\n }\\n &:focus {\\n border: 1px solid #8c94a6;\\n }\\n}\\n\\n.label {\\n margin-top: 5px;\\n font-size: 14px;\\n}\\n\\n// Action button root & content styles\\n.action-root {\\n position: fixed;\\n width: 100%;\\n height: 100%;\\n background-color: rgba(0, 0, 0, 0.2);\\n z-index: 3;\\n}\\n\\n.viz-action {\\n position: absolute;\\n left: 0;\\n bottom: 0;\\n width: 100%; /* fallback */\\n width: -webkit-fill-available;\\n background-color: white;\\n display: flex;\\n flex-direction: column;\\n justify-content: space-between;\\n gap: 10px;\\n border-top: 1px solid #ccc;\\n padding: 12px;\\n z-index: 2;\\n}\\n\\n.tooltip-form {\\n height: 100%;\\n width: 100%;\\n max-width: 160px;\\n color: white;\\n margin: 0;\\n}\\n\\n.tooltip-plots {\\n height: 100%;\\n width: 100%;\\n max-height: 55;\\n max-width: 195px;\\n color: white;\\n margin: 0;\\n}\\n\\n.icon-154 {\\n color: #52596b;\\n}\\n\\n.collapsible-content {\\n margin-top: 10px;\\n}\\n\\n// Palette styles\\n.palette-label {\\n font-size: 14px;\\n font-weight: 400;\\n}\\n.color-blocks {\\n display: flex;\\n justify-content: center;\\n margin-top: 6px;\\n padding-bottom: 7px;\\n\\n .color-block {\\n width: 10px;\\n height: 10px;\\n margin: 0 2px;\\n }\\n}\\n\\n.base-setup {\\n height: calc(100% - 45px);\\n overflow-y: auto;\\n .fui-Divider {\\n margin-top: 10px;\\n }\\n}\\n.base-design {\\n height: calc(100% - 45px);\\n overflow-y: auto;\\n .fui-Divider {\\n margin-top: 10px;\\n }\\n}\\n\\n.code {\\n color: $text-color;\\n}\\n.preview {\\n height: calc(100% - 45px);\\n overflow-y: auto;\\n img {\\n width: 100%;\\n }\\n}\\n\\nspan.clickable {\\n text-decoration: underline;\\n font-weight: bold;\\n cursor: pointer;\\n color: $secondary-link;\\n}\\n\\ncode.trace {\\n font-family: \\\"Source Code Pro\\\", \\\"Courier New\\\", Courier, monospace;\\n align-self: flex-start;\\n color: $text-color;\\n background-color: #fcebec;\\n border: 1px solid #efa4a4;\\n border-radius: 4px;\\n padding: 10px;\\n margin-bottom: 10px;\\n}\\n\\n.cm-editor {\\n border: 1px solid $component-border;\\n}\\n\\n.core-viz {\\n label {\\n color: $text-color;\\n font-weight: bold;\\n margin-left: 4px;\\n }\\n h2 {\\n font-size: 18px;\\n margin: 8px 0;\\n }\\n}\\n\\n.custom-dropdown {\\n position: relative;\\n .fui-Dropdown__button {\\n display: block;\\n height: 28px;\\n width: calc(100% - 20px);\\n white-space: nowrap;\\n text-overflow: ellipsis;\\n overflow: hidden;\\n }\\n .fui-Dropdown__expandIcon {\\n background-color: $app-bg;\\n position: absolute;\\n top: 5px;\\n right: 7px;\\n }\\n}\\n\",\"$primary-color: #0cca4a;\\n$primary-link: #43b049;\\n$primary-button: #0cca4a; // Was: #4fab4f\\n$secondary-color: #6d5bf6;\\n$secondary-link: #6c5af6;\\n$secondary-background: #e5e8eb;\\n$app-bg: #ffffff;\\n$base-bg: #f3f4f6;\\n$text-color: #2c303a;\\n$component-border: #dfe3e7;\\n$notification-error-bg: #dc3246;\\n$button-warning-bg: #d00100;\\n$disabled: #bdbdbd;\\n$gray-100: #f9fafb;\\n\\n$gray-200: #ced2d9;\\n$gray-300: #abb1bf;\\n$gray-400: #8c94a6;\\n$gray-500: #6a718a;\\n$gray-600: #52596b;\\n$gray-800: #353b41;\\n\\n$seaborn-default: #1f77b4;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".editable-spinner{display:flex;align-items:center;gap:5px;position:relative;width:100%}.editable-spinner input{height:17px;width:100%;text-align:left;border:1px solid #dfe3e7;border-bottom:1px solid #353b41;border-radius:4px;padding:8px 28px 8px 8px;font-size:13px;font-family:inherit}.editable-spinner input:focus-visible{outline:unset;border-bottom:2px solid #0cca4a}.editable-spinner .column{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px}.editable-spinner button{height:16px;padding:0;font-size:12px;border:0;background-color:rgba(0,0,0,0);cursor:pointer}.editable-spinner button:hover{background-color:var(--colorSubtleBackgroundHover)}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/taskpane/pages/Visualization/VizSharedComponents/SpinButton.scss\"],\"names\":[],\"mappings\":\"AAEA,kBACE,YAAA,CACA,kBAAA,CACA,OAAA,CACA,iBAAA,CACA,UAAA,CAEA,wBACE,WAAA,CACA,UAAA,CACA,eAAA,CACA,wBAAA,CACA,+BAAA,CACA,iBAAA,CACA,wBAAA,CACA,cAAA,CACA,mBAAA,CACA,sCACE,aAAA,CACA,+BAAA,CAIJ,0BACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,OAAA,CAGF,yBACE,WAAA,CACA,SAAA,CACA,cAAA,CACA,QAAA,CACA,8BAAA,CACA,cAAA,CACA,+BACE,kDAAA\",\"sourcesContent\":[\"@import \\\"../../../theme-variables.scss\\\";\\n\\n.editable-spinner {\\n display: flex;\\n align-items: center;\\n gap: 5px;\\n position: relative;\\n width: 100%;\\n\\n input {\\n height: 17px;\\n width: 100%;\\n text-align: left;\\n border: 1px solid $component-border;\\n border-bottom: 1px solid $gray-800;\\n border-radius: 4px;\\n padding: 8px 28px 8px 8px;\\n font-size: 13px;\\n font-family: inherit;\\n &:focus-visible {\\n outline: unset;\\n border-bottom: 2px solid $primary-color;\\n }\\n }\\n\\n .column {\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n align-items: center;\\n gap: 2px;\\n }\\n\\n button {\\n height: 16px;\\n padding: 0;\\n font-size: 12px;\\n border: 0;\\n background-color: transparent;\\n cursor: pointer;\\n &:hover {\\n background-color: var(--colorSubtleBackgroundHover);\\n }\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"\", \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"primary\": \"#0cca4a\",\n\t\"secondary\": \"#6d5bf6\",\n\t\"notificationErrorBg\": \"#dc3246\",\n\t\"appBg\": \"#fff\",\n\t\"baseBg\": \"#f3f4f6\",\n\t\"baseText\": \"#2c303a\",\n\t\"disabled\": \"#bdbdbd\",\n\t\"gray100\": \"#f9fafb\",\n\t\"gray200\": \"#ced2d9\",\n\t\"gray300\": \"#abb1bf\",\n\t\"gray400\": \"#8c94a6\",\n\t\"gray500\": \"#6a718a\",\n\t\"gray600\": \"#52596b\",\n\t\"gray800\": \"#353b41\",\n\t\"seabornDefault\": \"#1f77b4\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n","import { createDarkTheme, createLightTheme } from \"@fluentui/react-components\";\nimport { createTheme } from \"@uiw/codemirror-themes\";\nimport { tags as t } from \"@lezer/highlight\";\n\nimport type { BrandVariants, Theme } from \"@fluentui/react-components\";\n\nexport const anaconda: BrandVariants = {\n 10: \"#020402\",\n 20: \"#121B10\",\n 30: \"#1A2E19\",\n 40: \"#1F3C1E\",\n 50: \"#244A23\",\n 60: \"#295829\",\n 70: \"#2E672E\",\n 80: \"#327634\",\n 90: \"#37863A\",\n 100: \"#3C963F\",\n 110: \"#40A645\",\n 120: \"#51B553\",\n 130: \"#71C16F\",\n 140: \"#8ECE8A\",\n 150: \"#AADAA5\",\n 160: \"#C5E6C1\",\n};\n\nconst lightTheme: Theme = {\n ...createLightTheme(anaconda),\n fontFamilyBase: `\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\",\n \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif`,\n colorBrandBackground: \"#0CCA4A\",\n colorBrandForeground1: anaconda[130],\n colorBrandForeground2: anaconda[110],\n colorNeutralBackground1Hover: \"rgb(0,0,0,0.05)\",\n colorNeutralForeground2BrandSelected: \"#0CCA4A\",\n colorNeutralForeground1: \"#2C303A\",\n colorNeutralForeground2: \"#6A718A\",\n colorNeutralForegroundOnBrand: \"#2C303A\",\n colorNeutralStroke1: \"#E6E6E6\",\n colorCompoundBrandForeground1: \"#0CCA4A\",\n colorCompoundBrandForeground1Hover: \"#0CCA4A\",\n colorCompoundBrandStroke: \"#0CCA4A\",\n colorCompoundBrandStrokeHover: \"#0CCA4A\",\n};\n\nconst darkTheme: Theme = {\n ...createDarkTheme(anaconda),\n};\n\ndarkTheme.colorBrandForeground1 = anaconda[110];\n\nconst codeDarkTheme = createTheme({\n theme: \"dark\",\n settings: {\n background: \"#1e1e1e\",\n foreground: \"#9cdcfe\",\n caret: \"#c6c6c6\",\n selection: \"#6199ff2f\",\n selectionMatch: \"#72a1ff59\",\n lineHighlight: \"#ffffff0f\",\n gutterBackground: \"#1e1e1e\",\n gutterForeground: \"#838383\",\n gutterActiveForeground: \"#fff\",\n fontFamily: 'Menlo, Monaco, Consolas, \"Andale Mono\", \"Ubuntu Mono\", \"Courier New\", monospace',\n },\n styles: [\n {\n // def, class, as, None, True\n tag: [t.keyword, t.bool],\n fontWeight: \"bold\",\n color: \"#569cd6\",\n },\n {\n // if, else, return, import, try, except\n tag: [t.controlKeyword, t.moduleKeyword],\n color: \"#c586c0\",\n },\n {\n // function params, decorators, variables\n tag: [t.name, t.variableName],\n color: \"#69faf7\",\n },\n {\n // class name\n tag: [t.className],\n fontWeight: \"550\",\n color: \"#c42fb8\",\n },\n {\n // calling a function\n tag: [t.function(t.variableName)],\n color: \"#3dae2b\",\n },\n {\n // defining a function\n tag: [t.definition(t.variableName)],\n color: \"#dcdcaa\",\n },\n {\n // number\n tag: [t.number],\n color: \"#b5cea8\",\n },\n {\n // operators, comma, dot, escaped characters\n tag: [t.operator, t.punctuation, t.separator, t.escape],\n color: \"#d4d4d4\",\n },\n {\n // string\n tag: [t.special(t.string), t.string],\n color: \"#ce9178\",\n },\n {\n // brackets\n tag: [t.squareBracket, t.paren, t.brace],\n color: \"#e0e0e0\",\n },\n {\n // comment\n tag: [t.comment],\n fontStyle: \"italic\",\n color: \"#656e62\",\n },\n ],\n});\n\nexport { darkTheme, lightTheme, codeDarkTheme };\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Typography.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Typography.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { CSSProperties, ReactNode } from \"react\";\nimport { Body1Stronger, Text } from \"@fluentui/react-components\";\nimport { ChevronLeft16Filled } from \"@fluentui/react-icons\";\nimport \"./Typography.scss\";\n\nexport const Introduction: React.FC<{ children: ReactNode; size?: number }> = ({ children, size = 12 }) => (\n
\n {children}\n
\n);\n\nexport const IconHeader = ({\n Icon,\n text,\n className = \"\",\n style,\n onClick,\n}: {\n Icon: React.ReactElement;\n text: string | React.ReactElement;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}) => (\n
\n {Icon}\n {text}\n
\n);\n\nexport const Breadcrumb = ({\n Icon,\n text,\n style,\n onClick,\n dataTestId,\n}: {\n Icon?: React.ReactElement;\n text: string;\n style?: CSSProperties;\n onClick?: () => void;\n dataTestId?: string;\n}) => (\n
\n {Icon ?? }\n \n {text}\n \n
\n);\n\nexport default IconHeader;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Notification.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Notification.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Space.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Space.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { CSSProperties, ReactNode } from \"react\";\nimport \"./Space.scss\";\n\nexport const Col = ({\n children,\n gap,\n alignItems,\n justifyContent,\n height,\n}: {\n children: ReactNode;\n gap?: number;\n alignItems?: string;\n justifyContent?: string;\n height?: string | number;\n}) => (\n
\n {children}\n
\n);\nexport const Row = ({\n children,\n gap,\n alignItems,\n justifyContent,\n flexWrap,\n}: {\n children: ReactNode;\n gap?: number;\n alignItems?: string;\n justifyContent?: string;\n flexWrap?: CSSProperties[\"flexWrap\"];\n}) => (\n
\n {children}\n
\n);\n\nexport const ActionButtonRow = ({\n children,\n alignItems,\n justifyContent,\n backgroundColor = \"#fff\",\n}: {\n children: ReactNode;\n alignItems?: string;\n justifyContent?: string;\n backgroundColor?: string;\n}) => (\n \n);\n","const PREFIX = \"_xltb__\";\n\nclass Environment {\n has(name: string): boolean {\n return `${PREFIX}${name}` in sessionStorage;\n }\n read(name: string): string {\n const value = sessionStorage.getItem(`${PREFIX}${name}`);\n return value ?? \"\";\n }\n write(name: string, value: string) {\n sessionStorage.setItem(`${PREFIX}${name}`, value);\n }\n delete(name: string) {\n sessionStorage.removeItem(`${PREFIX}${name}`);\n }\n\n // These are set in apps/xltb/api/xltb/routes/root_xxx.py:inject_environment_variables\n get ASSISTANT_CLIENT_SOURCE(): string {\n return this.read(\"ASSISTANT_CLIENT_SOURCE\");\n }\n get ASSISTANT_ROUTE_PATH_PREFIX(): string {\n return this.read(\"ASSISTANT_ROUTE_PATH_PREFIX\");\n }\n get BASE_URL(): string {\n return this.read(\"BASE_URL\");\n }\n get CLOUD_URL(): string {\n return this.read(\"CLOUD_URL\");\n }\n get HEAP_ID(): number {\n return parseInt(this.read(\"HEAP_ID\"));\n }\n get CODE_NAMESPACE_SUFFIX(): string {\n return this.read(\"CODE_NAMESPACE_SUFFIX\");\n }\n get UNLOCKED(): boolean {\n return this.read(\"UNLOCKED\") === \"true\";\n }\n\n get signedIn(): boolean {\n if (!this.has(\"signedIn\")) return false;\n return this.read(\"signedIn\") === \"true\";\n }\n\n set signedIn(state: boolean) {\n this.write(\"signedIn\", state ? \"true\" : \"false\");\n }\n\n get pyscriptEnabled(): boolean {\n if (!this.has(\"pyscriptEnabled\")) return false;\n return this.read(\"pyscriptEnabled\") === \"true\";\n }\n set pyscriptEnabled(state: boolean) {\n this.write(\"pyscriptEnabled\", state ? \"true\" : \"false\");\n }\n}\n\nconst Env = new Environment();\nexport default Env;\n","import React, { useState } from \"react\";\nimport {\n Dialog,\n DialogSurface,\n DialogTitle,\n DialogBody,\n DialogContent,\n DialogActions,\n Button,\n DialogTrigger,\n Divider,\n Spinner,\n} from \"@fluentui/react-components\";\nimport \"../Notification.scss\";\nimport { Col } from \"../Layout/Space\";\nimport Env from \"xlcommon/src/environ\";\n\nexport const SignInDialog: React.FC<{\n title: string;\n content: string;\n children?: React.ReactElement;\n onContinue?: () => Promise;\n defaultOpen?: boolean;\n initializing?: boolean;\n}> = ({ title, content, children, onContinue, defaultOpen = false, initializing = false }) => {\n const [open, setIsOpen] = useState(defaultOpen);\n async function onContinueClick() {\n // Change z-index to allow Web Excel dialog to be visible\n // Note: Fluent UI doesn't expose properties to style the Dialog component in a React-y way\n const dialogSurface = document.getElementsByClassName(\"custom-dialog-surface\")[0] as HTMLDivElement;\n dialogSurface.parentElement.style.zIndex = \"99998\";\n\n await onContinue();\n setIsOpen(!open);\n }\n\n return (\n setIsOpen(data.open)} aria-label=\"Sign In Dialog\">\n {children && {children}}\n \n \n {title}\n {content}\n \n {/* \n \n */}\n \n \n \n \n \n

\n Visit Anaconda Cloud to{\" \"}\n \n learn more\n \n {` and `}\n \n sign up\n \n .\n

\n \n
\n
\n );\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Lists.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Lists.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { ReactNode } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Tooltip } from \"@fluentui/react-components\";\nimport { ChevronRight16Regular } from \"@fluentui/react-icons\";\nimport \"./Lists.scss\";\n\nexport const ListItem: React.FC<{\n selected?: boolean;\n onClick: () => void;\n children: ReactNode;\n disabled?: boolean;\n disabledText?: string;\n iconColor?: string;\n}> = ({ selected, onClick, children, disabled, disabledText, iconColor = \"#212121\" }) =>\n disabled && disabledText ? (\n \n
\n {children}\n \n
\n
\n ) : disabled ? (\n
\n {children}\n \n
\n ) : (\n
\n {children}\n \n
\n );\n\nexport const NavigationList: React.FC<{\n testID?: string;\n items: {\n text: string;\n to: string;\n selected?: boolean;\n disabled?: boolean;\n disabledText?: string;\n }[];\n}> = ({ items, testID }) => {\n const navigate = useNavigate();\n\n function onClick(path: string) {\n if (path.startsWith(\"http://\") || path.startsWith(\"https://\")) {\n window.open(path, \"_blank\");\n } else {\n navigate(path);\n }\n }\n\n return (\n
\n {items.map((item) => (\n onClick(item.to)}\n selected={item.selected}\n disabled={item.disabled}\n disabledText={item.disabledText}\n >\n {item.text}\n \n ))}\n
\n );\n};\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./styles.module.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./styles.module.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Icon.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Icon.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport styles from \"../styles.module.scss\";\nimport \"./Icon.scss\";\n\nexport const Sparkles: React.FC<{ className?: string; fill?: string }> = ({\n className = \"\",\n fill = styles.primary,\n}) => {\n return (\n \n \n \n );\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./NavMenu.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./NavMenu.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport {\n FluentIcon,\n Home16Filled,\n Home24Filled,\n Cloud16Filled,\n TableFilled,\n CodeBlock24Filled,\n DataBarVerticalAscending16Filled,\n Person16Filled,\n Person24Filled,\n Settings16Filled,\n Settings24Filled,\n SignOut24Filled,\n} from \"@fluentui/react-icons\";\nimport { Sparkles } from \"../Icon\";\nimport styles from \"../../styles.module.scss\";\nimport \"./NavMenu.scss\";\n\nexport type NavMenuItem = {\n title: string;\n Icon: FluentIcon;\n path: string;\n disabled?: boolean;\n requiresPython?: boolean; // TODO: remove this as Anaconda Code is always available\n newSection?: boolean;\n priority?: boolean;\n};\n\n/****************************\n * Nav Menu (vertical dropdown)\n ****************************/\nexport const NavMenuItems: NavMenuItem[] = [\n {\n title: \"Home\",\n Icon: Home24Filled,\n path: \"/\",\n },\n\n {\n title: \"Visualizations\",\n Icon: (props) => ,\n path: \"/viz\",\n priority: true,\n },\n {\n title: \"Assistant\",\n Icon: (props) => ,\n path: \"/ai\",\n priority: true,\n },\n {\n title: \"Datasets\",\n Icon: () => ,\n path: \"/data\",\n },\n {\n title: \"Code Snippets\",\n Icon: CodeBlock24Filled,\n path: \"/snippets\",\n },\n {\n title: \"Settings\",\n Icon: Settings24Filled,\n path: \"/settings\",\n newSection: true,\n },\n {\n title: \"Account\",\n Icon: Person24Filled,\n path: \"/profile\",\n },\n {\n title: \"Sign out\",\n Icon: SignOut24Filled,\n path: \"/profile\",\n },\n];\n\n/****************************\n * Nav Bar (horizontal)\n ****************************/\nexport type NavBarItem = {\n title: string;\n Icon: FluentIcon;\n path: string;\n disabled?: boolean;\n requiresPython?: boolean;\n priority?: boolean;\n};\n\nexport const NavBarItems: NavBarItem[] = [\n {\n title: \"Home\",\n Icon: Home16Filled,\n path: \"/\",\n },\n {\n title: \"Visualizations\",\n Icon: DataBarVerticalAscending16Filled,\n path: \"/viz\",\n priority: true,\n },\n {\n title: \"Assistant\",\n Icon: (props) => ,\n path: \"/ai\",\n priority: true,\n },\n {\n title: \"Datasets\",\n Icon: () => ,\n path: \"/data\",\n },\n {\n title: \"Code Snippets\",\n Icon: CodeBlock24Filled,\n path: \"/snippets\",\n },\n {\n title: \"Settings\",\n Icon: Settings16Filled,\n path: \"/settings\",\n },\n {\n title: \"Account\",\n Icon: Person16Filled,\n path: \"/profile\",\n },\n];\n\n/****************************\n * Start Page Menu\n ****************************/\n\nexport type StartMenuHeading = {\n title: string;\n Icon: FluentIcon;\n items: StartMenuItem[];\n};\n\nexport type StartMenuItem = {\n text: string;\n path: string;\n disabled?: boolean;\n requiresPython?: boolean;\n};\n\nexport const StartMenuItems: StartMenuHeading[] = [\n {\n title: \"Visualizations\",\n Icon: DataBarVerticalAscending16Filled,\n items: [\n {\n text: \"Visualize with Python\",\n path: \"/viz\",\n },\n ],\n },\n {\n title: \"Anaconda Assistant\",\n Icon: (props) => ,\n items: [\n {\n text: \"AI Chat-based Python Help\",\n path: \"/ai\",\n },\n ],\n },\n {\n title: \"Anaconda Cloud\",\n Icon: Cloud16Filled,\n items: [\n {\n text: \"Datasets\",\n path: \"/data\",\n },\n {\n text: \"Code Snippets\",\n path: \"/snippets\",\n },\n ],\n },\n];\n","import { CHANNEL_NAME } from \"xlcommon/src/broadcast/interface\";\nimport Env from \"xlcommon/src/environ\";\n\nconst DEBUG = false;\n\nconst callbacks = {\n isLoggedIn: [],\n pyscriptSettings: [],\n};\n\nlet channel = null;\ntry {\n channel = new BroadcastChannel(CHANNEL_NAME);\n\n channel.onmessage = async (ev: MessageEvent) => {\n if (DEBUG && ev?.data) console.log(`Toolbox BroadcastChannel received ${ev.data.action}`);\n switch (ev?.data?.action) {\n case \"requestIsLoggedIn\":\n if (Env.signedIn) {\n await broadcastLogin();\n }\n break;\n case \"login\":\n Env.signedIn = true;\n while (callbacks.isLoggedIn.length > 0) {\n const cb = callbacks.isLoggedIn.pop();\n cb();\n }\n break;\n case \"logout\":\n Env.signedIn = false;\n window.location.href = \"/\";\n break;\n case \"responsePyScriptSettings\":\n while (callbacks.pyscriptSettings.length > 0) {\n const cb = callbacks.pyscriptSettings.pop();\n cb(ev.data.settings);\n }\n break;\n default:\n console.log(`Invalid message: ${JSON.stringify(ev)}`);\n }\n };\n\n channel.onmessageerror = (err: MessageEvent) => {\n console.error(err.data);\n };\n} catch (err) {\n console.error(\"UNABLE TO CREATE BROADCAST CHANNEL!\");\n}\n\nexport function pingForLogin(cb: () => void) {\n if (DEBUG) console.log(`Toolbox BroadcastChannel pingForLogin()`);\n callbacks.isLoggedIn.push(cb);\n channel?.postMessage({ action: \"requestIsLoggedIn\" });\n}\n\nexport function broadcastLogout() {\n if (DEBUG) console.log(`Toolbox BroadcastChannel broadcastLogout()`);\n channel?.postMessage({ action: \"logout\" });\n}\n\nexport async function broadcastLogin() {\n if (DEBUG) console.log(`Toolbox BroadcastChannel broadcastSignedIn()`);\n channel?.postMessage({ action: \"login\" });\n}\n\nexport function requestPyScriptSettings(cb: (settings: object) => void) {\n callbacks.pyscriptSettings.push(cb);\n channel?.postMessage({ action: \"requestPyScriptSettings\" });\n}\n","export const CHANNEL_NAME = \"AnacondaToolboxBroadcast\";\n","export function getGlobal() {\n return typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : undefined;\n}\n","export const EXCEL_BASE = 25569; // Jan 1, 1970 in Excel date representation\nexport const MILLISECONDS_PER_DAY = 86400000; // 24*60*60*1000\n\nexport function convertEpochToExcel(epochMilliseconds: number): number {\n return EXCEL_BASE + epochMilliseconds / MILLISECONDS_PER_DAY;\n}\n\nexport function convertExcelToEpoch(excelTimestamp: number): number {\n return (excelTimestamp - EXCEL_BASE) * MILLISECONDS_PER_DAY;\n}\n\nexport function convertDateToExcel(date: Date): number {\n return convertEpochToExcel(date.getTime());\n}\n\nexport function convertExcelToDate(excelTimestamp: number): Date {\n if (typeof excelTimestamp !== \"number\") throw Error(\"Convert to Date requires number\");\n return new Date(convertExcelToEpoch(excelTimestamp));\n}\n\nexport function convertExcelToISO(excelTimestamp: number): string {\n return isoNormalize(convertExcelToDate(excelTimestamp));\n}\n\nexport function isoNormalize(d: Date): string {\n const isoString = d.toISOString();\n if (d.getMilliseconds() > 0) return isoString.slice(0, -1);\n else return `${isoString.slice(0, -5)}`; // remove milliseconds\n}\n\nexport function updateValueType(valueAsJson: any, valueType: string, category: string, format: string): string {\n // Dates and Times are stored as doubles with formatting that comes from\n // one of three possible formatting categories\n if (valueType !== \"Double\") return valueType;\n\n // Check for formatting which usually indicates a datetime\n if (category === \"Custom\" || category === \"Date\" || category === \"Time\") {\n return determineValueType(format, valueType);\n }\n\n // Check for formatted date\n if (valueAsJson?.type === \"FormattedNumber\") {\n return determineValueType(valueAsJson.numberFormat, valueType);\n }\n // Check for Python-in-Excel formatted date (ExternalCodeServiceObject with a FormattedNumber hiding as preview)\n if (valueAsJson?.type === \"ExternalCodeServiceObject\" && valueAsJson.preview?.type === \"FormattedNumber\") {\n return determineValueType(valueAsJson.preview.numberFormat, valueType);\n }\n\n return valueType;\n}\n\nfunction determineValueType(fmt: string, fallback: string): string {\n // Determining whether something is a Date, Time, or Datetime vs a Double\n // is way harder than it should be.\n // Excel stores dates as Doubles, and the only way to tell is to look at\n // the numberFormat string, which is... not straightforward at all.\n //\n // Some examples:\n // -------------\n // m/d/yy\n // [$-x-sysdate]dddd, mmmm dd, yyyy\n // yyyy-mm-dd;@\n // m/d;@\n // m/d/yy;@\n // mm/dd/yy;@\n // [$-en-US]d-mmm;@\n // [$-en-US]d-mmm-yy;@\n // [$-en-US]dd-mmm-yy;@\n // [$-en-US]mmm-yy;@\n // [$-en-US]mmmm-yy;@\n // [$-en-US]mmmm d, yyyy;@\n // [$-en-US]m/d/yy h:mm AM/PM;@\n // m/d/yy h:mm;@\n // [$-en-US]mmmmm;@\n // [$-en-US]mmmmm-yy;@\n // m/d/yyyy;@\n // [$-en-US]d-mmm-yyyy;@\n // [$-x-systime]h:mm:ss AM/PM\n // h:mm;@\n // [$-en-US]h:mm AM/PM;@\n // h:mm:ss;@\n // [$-en-US]h:mm:ss AM/PM;@\n // mm:ss.0;@\n // [h]:mm:ss;@\n // [$-en-US]m/d/yy h:mm AM/PM;@\n // m/d/yy h:mm;@\n // yyyy-mm-dd hh:mm:ss\n // [$-en-US]mmmmm-yy;@\n // [$-en-US]m/d/yy h:mm AM/PM;@\n // m/d/yy\n // [$-en-US]h:mm:ss AM/PM\n // d.m.yy;@\n // [$-zh-HK]dddd, d mmmm, yyyy;@\n\n // Step 1: Ignore the initial [$-county-format] piece\n if (fmt.startsWith(\"[$-\")) {\n fmt = fmt.slice(fmt.indexOf(\"]\") + 1);\n }\n // Step 2: Look for \"h\" or \"m:s\" in fmt -- indicates a time\n const isTime = fmt.includes(\"h\") || fmt.includes(\"m:s\");\n // Step 3: Look for \"yy\" or \"d\" or \"m\" which occurs prior to an \"h\" -- indicates a date\n const isDate =\n fmt.includes(\"yy\") ||\n fmt.includes(\"d\") ||\n (!isTime && fmt.includes(\"m\")) ||\n (isTime && fmt.includes(\"m\") && fmt.indexOf(\"m\") < fmt.indexOf(\"h\"));\n\n if (isDate && isTime) return \"Datetime\";\n if (isDate) return \"Date\";\n if (isTime) return \"Time\";\n\n return fallback;\n}\n","import { PyScriptMode, PyScriptOutput, PyScriptLinkage, PyScriptInterpreter } from \"./types\";\nimport Env from \"../environ\";\n\nconst VALID_INTERPRETERS = [\"py\"];\n\ntype RegExpMatchArrayWithIndices = RegExpMatchArray & { indices: Array<[number, number]> };\n\n// Matches\n// - initial whitespace\n// - opening single quote, followed by\n// - any characters, followed by\n// - `'!` but not `''!`, followed by\n// - any characters\nconst endOfSheetRef = /\\s*'.*(? {\n newCode.push(code.slice(idx, ref.addressStart));\n // If ref has already been seen, reuse it\n const refIdx = refAddrs.indexOf(ref.address);\n if (refIdx === -1) {\n newCode.push(`$P${3 + refAddrs.length}$`); // first three parameters are interpreter + code + mode, so params start at 3\n refAddrs.push(ref.address);\n } else {\n newCode.push(`$P${3 + refIdx}$`);\n }\n idx = ref.addressEnd;\n });\n newCode.push(code.slice(idx));\n // Escape double-quotes for use in a formula string\n let mergedCode = newCode.join(\"\").replace(/\"/g, '\"\"');\n // Split code into <255 chunks to avoid Excel formula string size limitation\n if (mergedCode.length > 255) {\n const chunks = [];\n let allChunks = 0;\n // eslint-disable-next-line\n while (true) {\n // When remaining code is small enough, add it as the last chunk\n if (mergedCode.length - allChunks < 255) {\n chunks.push(mergedCode.slice(allChunks));\n break;\n }\n // Otherwise find a chunk that is as large as possible without ending in `\"`\n for (let i = 255; i > 0; i--) {\n if (mergedCode[allChunks + i - 1] !== '\"') {\n chunks.push(mergedCode.slice(allChunks, allChunks + i));\n allChunks += i;\n break;\n }\n }\n }\n mergedCode = chunks.join('\"&\"');\n }\n // Build the custom function call with all the pieces\n let r = [`=ANACONDA${Env.CODE_NAMESPACE_SUFFIX}.CODE(\"${interpreter}\", \"${mergedCode}\", ${mode}`];\n refAddrs.forEach((refAddr) => {\n r.push(`, ${refAddr}`);\n });\n extra.forEach((x) => {\n r.push(`, ${x}`);\n });\n r.push(\")\");\n return r.join(\"\");\n}\n\n// Matches string concatenation characters: \"&\", but not \"\"&\"\"\nconst pattCat255 = /(? 0 || addr === '\"link\"') {\n extras.push(addr);\n } else {\n pyCode = pyCode.replaceAll(`$P${i + 3}$`, `\"${addr.replaceAll('\"', '\\\\\"')}\"`);\n }\n }\n\n return [interp, pyCode, parseInt(mode), extras];\n}\n\n/**\n * Extracts and removes initial headers in the Python code.\n *\n * Removes the DO NOT EDIT comment\n *\n * @param code string\n * @returns trimmed code\n */\nexport function extractEmbeddedCodeHeaders(code: string): string {\n // Strip off DO NOT EDIT comment\n if (code.startsWith(\"###\") && code.includes(\"\\n\")) {\n code = code.slice(code.indexOf(\"\\n\") + 1);\n }\n return code;\n}\n\nexport function splitMode(mode: number): PyScriptMode {\n // mode is a bitpattern containing both return mode (bit 0) and isolation mode (bit 1)\n return {\n output: mode & (0b01 as PyScriptOutput),\n linkage: mode & (0b10 as PyScriptLinkage),\n };\n}\n\nexport function combineMode(mode: PyScriptMode): number {\n // Convert modes back into single bitpattern\n return mode.output + mode.linkage;\n}\n\n// 5 -> 0.005\n// 1500 -> 1.500\n// 62123 -> 1:02.123\nexport function formatMilliseconds(m: number): string {\n if (m < 0) return \"\";\n const totalSeconds = m / 1000;\n const seconds = totalSeconds % 60;\n const minutes = m / 60_000;\n const builder = [];\n if (minutes >= 1) {\n builder.push(Math.floor(minutes));\n builder.push(\":\");\n // If we have minutes, we need seconds to always be two digits\n if (seconds < 10) {\n builder.push(\"0\");\n }\n }\n builder.push(seconds.toFixed(3));\n return builder.join(\"\");\n}\n\nfunction findBasicType(s: string): \"string\" | \"number\" | \"boolean\" {\n if (!isNaN(parseFloat(s))) return \"number\";\n s = s.toLowerCase();\n if (s === \"true\" || s === \"false\") return \"boolean\";\n return \"string\";\n}\n\n// Figure out if data has headers (first row contains string with 2nd row containing non-string)\nexport function determineHasHeaders(data: any[][]): boolean {\n let hasHeaders = false;\n if (data.length > 1) {\n for (let j = 0; j < data[0].length; j++) {\n const first = findBasicType(data[0][j]);\n const second = findBasicType(data[1][j]);\n // If types in column are not consistent and first is a string, we have headers\n if (first === \"string\" && second !== \"string\") {\n hasHeaders = true;\n break;\n }\n }\n }\n return hasHeaders;\n}\n\n/**\n * Package version parser based on requirements specifiers documentation\n * https://pip.pypa.io/en/stable/reference/requirement-specifiers/#examples\n * @param packageString : Name of package with specifier, including the version\n * @returns package name and version found\n */\nexport function parsePackageVersion(packageString: string): { packageName: string | null; version: string | null } {\n const regex = /([^<=>!~]+)(?:([<>=!~]+)([^,]+))?/g;\n const matches = regex.exec(packageString);\n\n if (matches && matches.length >= 4) {\n const packageName = matches[1].trim();\n const version = matches[3] ? matches[3].trim() : null;\n return { packageName, version };\n } else {\n return { packageName: null, version: null };\n }\n}\n","import { getGlobal } from \"../global\";\nimport { updateValueType, convertExcelToISO, convertExcelToDate } from \"./excel-date-utils\";\nimport { convertGridCodeToUserCode } from \"../pyscript/utils\";\nimport Env from \"../environ\";\n\nconst DEBUG = false;\n\nexport const EXCEL_ROW_MAX = 1048576;\nexport const EXCEL_COLUMN_MAX = 16348;\nexport const NONE_NUMBER_FORMAT = '0;-0;\"None\"';\n\nconst g = getGlobal();\n\n// Sets the calculation mode and returns the previous mode setting\nexport async function setCalculationMode(mode: Excel.CalculationMode): Promise {\n // Save previous calculation mode\n // This needs to be a separate invocation from setting\n // the calc mode in case of errors which cause it to be\n // run multiple times.\n const prevMode = await runExcelSafeContext(async (context) => {\n context.application.load(\"calculationMode\");\n await context.sync();\n return context.application.calculationMode;\n });\n // Set new mode\n await runExcelSafeContext(async (context) => {\n context.application.calculationMode = mode;\n await context.sync();\n });\n return prevMode;\n}\n\nexport interface SplitNameAddr {\n sheetName: string;\n addr: string;\n}\n\nexport interface SplitIdAddr {\n sheetId: string;\n addr: string;\n}\n\nexport enum RangeType {\n Table = \"Table\",\n Sheet = \"Sheet\",\n Named = \"Named\",\n CellBinding = \"CellBinding\",\n RangeBinding = \"RangeBinding\",\n SpillBinding = \"SpillBinding\",\n}\n\nexport type RangeSelection = {\n rangeType: RangeType;\n identifier: string;\n displayName?: string;\n bindingAutoDelete?: boolean;\n};\n\nexport function isBinding(rs: RangeSelection): boolean {\n switch (rs?.rangeType) {\n case RangeType.CellBinding:\n case RangeType.RangeBinding:\n case RangeType.SpillBinding:\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Safer replacement than manually calling `await Excel.run(async (context) => { ... });`\n *\n * Handles errors for invalid bindings (automatically deleting them).\n * Handles generic RichAPI.errors and retries the batch.\n * Handles when the user is in cell edit mode.\n *\n * NOTE: We might want to have a tool-wide overlay that tells the user to exit cell edit mode\n * and somehow link that to every call.\n *\n * @param batch async function taking Excel.RequestContext as input\n * @param bindId optional (for faster removal of invalid binding)\n */\nexport async function runExcelSafeContext(\n batch: (context: Excel.RequestContext) => Promise,\n {\n bindId,\n retryCount = 25, // 5 seconds of retry\n }: {\n bindId?: string;\n retryCount?: number;\n } = {}\n): Promise {\n return await Excel.run({ delayForCellEdit: true }, async (context) => {\n try {\n return await batch(context);\n } catch (err) {\n if (err.code === \"InvalidBinding\") {\n // At least one binding is invalid\n // We have to manually walk thru each one to find the bad one and delete it\n // https://stackoverflow.com/questions/61801038/getting-rid-of-invalid-bindings-in-a-workbook\n context.workbook.bindings.load(\"items/id\");\n await context.sync();\n if (bindId) {\n context.workbook.bindings.getItemOrNullObject(bindId);\n try {\n await context.sync();\n } catch (err) {\n console.log(`Removing provided bindId as invalid: ${bindId}`);\n await removeBindingById(bindId);\n }\n } else {\n for (const b of context.workbook.bindings.items) {\n b.load(\"isNullObject\");\n try {\n await context.sync();\n } catch (err) {\n // Found an invalid binding\n console.log(`Removing invalid binding: ${b.id}`);\n await removeBindingById(b.id);\n }\n }\n }\n console.error(err);\n return await runExcelSafeContext(batch);\n } else if (err.code === \"RichAPI.Error\") {\n if (retryCount > 0) {\n // Wait, then try again\n await new Promise((resolve) => setTimeout(resolve, 200));\n console.log(\"Ran into RichAPI.Error -- trying again \", retryCount);\n return await runExcelSafeContext(batch, { retryCount: retryCount-- });\n } else {\n throw err;\n }\n }\n }\n });\n}\n\nfunction removeBindingById(bindId: string) {\n return new Promise((resolve, reject) => {\n // Use the old API to remove it\n Office.context.document.bindings.releaseByIdAsync(bindId, (result) => {\n if (result.status === Office.AsyncResultStatus.Succeeded) {\n resolve(result.value);\n } else {\n reject(result.error);\n }\n });\n });\n}\n\nexport async function convertToRangeSelection(name: string): Promise {\n return await runExcelSafeContext(async (context) => {\n const worksheet = context.workbook.worksheets.getItemOrNullObject(name);\n const table = context.workbook.tables.getItemOrNullObject(name);\n const binding = context.workbook.bindings.getItemOrNullObject(name);\n await context.sync();\n\n if (!worksheet.isNullObject) {\n worksheet.load(\"id\");\n await context.sync();\n return {\n rangeType: RangeType.Sheet,\n identifier: worksheet.id,\n displayName: name,\n };\n } else if (!table.isNullObject) {\n table.load(\"id\");\n await context.sync();\n return {\n rangeType: RangeType.Table,\n identifier: table.id,\n displayName: name,\n };\n } else if (!binding.isNullObject) {\n binding.load(\"id\");\n await context.sync();\n return {\n rangeType: RangeType.RangeBinding,\n identifier: binding.id,\n displayName: name,\n };\n }\n\n throw new Error(`Worksheet, table, or binding with name '${name}' not found.`);\n });\n}\n\nexport function displayRangeSelection(rs: RangeSelection, includeBrackets = true): string {\n if (!rs || !rs.rangeType) {\n return \"\";\n }\n const brackets = includeBrackets ? `[${rs.rangeType}] ` : \"\";\n switch (rs.rangeType) {\n case RangeType.Sheet:\n case RangeType.Table:\n return `${brackets}${rs.displayName}`;\n case RangeType.CellBinding:\n case RangeType.RangeBinding:\n case RangeType.SpillBinding:\n return rs.displayName || \"\";\n default:\n return `${brackets}${rs.identifier}`;\n }\n}\n\nasync function getBindingAddress(rs: RangeSelection): Promise {\n if (!isBinding(rs) || !rs.identifier) {\n return \"\";\n }\n\n let address = await runExcelSafeContext(async (context) => {\n let b = context.workbook.bindings.getItem(rs.identifier);\n try {\n await context.sync();\n } catch (e) {\n throw Error(`Binding ${rs.identifier} not found in spreadsheet.`);\n }\n let rng = b.getRange();\n rng.load(\"address\");\n await context.sync();\n return rng.address;\n });\n if (rs.rangeType === RangeType.RangeBinding) return address;\n // Trim address to top-left cell\n address = address.split(\":\")[0];\n if (rs.rangeType === RangeType.CellBinding) return address;\n if (rs.rangeType === RangeType.SpillBinding) return `${address}#`;\n return \"\";\n}\n\nasync function findByIdOrDisplayName(\n context: Excel.RequestContext,\n rs: RangeSelection\n): Promise {\n let func: (key: string) => Excel.Table | Excel.Worksheet;\n switch (rs.rangeType) {\n case RangeType.Sheet:\n func = (id: string) => context.workbook.worksheets.getItem(id);\n break;\n case RangeType.Table:\n func = (id: string) => context.workbook.tables.getItem(id);\n break;\n default:\n throw Error(`Invalid RangeType for findByIdOrDisplayName: ${rs.rangeType}`);\n }\n let obj = func(rs.identifier);\n try {\n await context.sync();\n return obj;\n } catch (e) {\n // Check if the displayName is found. If it is, we can assume the user deleted\n // the previous table, then renamed another one with this name, assuming\n // the link would hold. This is probably a safe assumption more often than not.\n if (rs.displayName) {\n obj = func(rs.displayName);\n try {\n await context.sync();\n return obj;\n } catch (e) {\n throw Error(`${rs.rangeType} ${rs.displayName} not found in spreadsheet.`);\n }\n } else {\n throw Error(`${rs.rangeType} ${rs.identifier} not found in spreadsheet.`);\n }\n }\n}\n\nexport async function refreshRangeSelection(rs: RangeSelection): Promise {\n switch (rs?.rangeType) {\n case RangeType.Table:\n return await runExcelSafeContext(async (context) => {\n let t = await findByIdOrDisplayName(context, rs);\n t.load(\"id\");\n t.load(\"name\");\n await context.sync();\n return { ...rs, identifier: t.id, displayName: t.name };\n });\n case RangeType.Sheet:\n return await runExcelSafeContext(async (context) => {\n let s = await findByIdOrDisplayName(context, rs);\n s.load(\"id\");\n s.load(\"name\");\n await context.sync();\n return { ...rs, identifier: s.id, displayName: s.name };\n });\n case RangeType.CellBinding:\n case RangeType.RangeBinding:\n case RangeType.SpillBinding:\n return { ...rs, displayName: await getBindingAddress(rs) };\n default:\n return rs;\n }\n}\n\n// TODO: change return type to SplitNameAddr\n/**\n * Takes a full address (ex. Sheet1!A4:B15) and\n * returns separated sheet name and range\n *\n * @param fullAddress\n * @returns [sheetName, rangeAddress]\n */\nexport function splitFullAddress(fullAddress: string): [string, string] {\n // Javascript -- why no rsplit?!?\n let sheetName = fullAddress.split(\"!\").slice(0, -1).join(\"!\");\n let addr = fullAddress.split(\"!\").slice(-1)[0];\n\n if (sheetName === undefined || addr === undefined) {\n throw Error(`Unresolvable fullAddress: ${fullAddress}`);\n }\n\n // Remove any string delimiters (happens for spaces and symbols in the sheet name)\n if (sheetName.startsWith(\"'\")) {\n sheetName = sheetName.slice(1, -1);\n }\n\n // De-duplicate double-apostrophe\n sheetName = sheetName.replaceAll(\"''\", \"'\");\n\n return [sheetName, addr];\n}\n\nexport function joinFullAddress(sheetName: string, addr: string): string {\n // Escape single quotes\n sheetName = sheetName.replaceAll(\"'\", \"''\");\n\n // Always add surrounding single-quotes; Excel will remove them if needed\n return `'${sheetName}'!${addr}`;\n}\n\nexport async function worksheetIdFromSheetName(sheetName: string): Promise {\n return await runExcelSafeContext(async (context) => {\n const sheet = context.workbook.worksheets.getItem(sheetName);\n sheet.load(\"id\");\n await context.sync();\n return sheet.id;\n });\n}\n\nexport async function sheetNameFromWorksheetId(worksheetId: string): Promise {\n return await runExcelSafeContext(async (context) => {\n const sheet = context.workbook.worksheets.getItem(worksheetId);\n sheet.load(\"name\");\n await context.sync();\n return sheet.name;\n });\n}\n\n// TODO: Revisit the linting here\n/* eslint-disable office-addins/call-sync-before-read */\nexport async function readFromRange(fullAddress: string, numRows = -1, numColumns = -1): Promise {\n let [sheetName, addr] = splitFullAddress(fullAddress);\n\n let result: string[][] = [];\n await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let rng = sheet.getRange(addr);\n if (numRows > 0 || numColumns > 0) {\n rng.load(\"rowIndex\");\n rng.load(\"columnIndex\");\n rng.load(\"rowCount\");\n rng.load(\"columnCount\");\n await context.sync();\n\n // Set the of rows and columns selected, or default to the min number of rows for optimization\n const rowCount = numRows > 0 ? Math.min(numRows, rng.rowCount) : rng.rowCount;\n const colCount = numColumns > 0 ? Math.min(numColumns, rng.columnCount) : rng.columnCount;\n rng = sheet.getRangeByIndexes(rng.rowIndex, rng.columnIndex, rowCount, colCount);\n }\n rng.load(\"values\");\n await context.sync();\n result = rng.values;\n });\n return result;\n}\n\nexport async function getValueTypesOfRange(fullAddress: string, colLimit: number = -1): Promise {\n // Returns a list of value types for each column\n // Valid value types are: \"String\", \"Double\", \"Boolean\", \"Date\", \"Time\", \"Datetime\"\n const [sheetName, addr] = splitFullAddress(fullAddress);\n\n let result: string[] = [];\n await runExcelSafeContext(async (context) => {\n const sheet = context.workbook.worksheets.getItem(sheetName);\n const rng = sheet.getRange(addr);\n rng.load(\"rowIndex,rowCount,columnIndex,columnCount\");\n await context.sync();\n // Inspect the format of the 2nd row (ignores formatting of header)\n if (colLimit === -1) colLimit = rng.columnCount;\n const rng2 = sheet.getRangeByIndexes(\n rng.rowIndex,\n rng.columnIndex,\n Math.min(rng.rowCount, 2),\n Math.min(rng.columnCount, colLimit)\n );\n rng2.load(\"valuesAsJson,valueTypes,numberFormat,numberFormatCategories\");\n await context.sync();\n const valuesAsJson = rng2.valuesAsJson.slice(-1)[0];\n const formats = rng2.numberFormat.slice(-1)[0];\n const categories = rng2.numberFormatCategories.slice(-1)[0];\n result = rng2.valueTypes.slice(-1)[0].map((x, i) => updateValueType(valuesAsJson[i], x, categories[i], formats[i]));\n });\n return result;\n}\n\nexport function convertDataToTyped(data: any[][], valueTypes: string[], convertAllToString: boolean = false): any[][] {\n if (DEBUG) console.log(`convertDataToTyped\\nvalueTypes=${JSON.stringify(valueTypes)}\\ndata=${JSON.stringify(data)}`);\n\n // Convert content to proper types (mutates data in place)\n data.forEach((row, rowIdx) => {\n row.forEach((value, colIdx) => {\n let val = value;\n if (rowIdx > 0 || typeof val !== \"string\") {\n if (typeof value === \"object\") {\n // Extract formatted dates and nulls\n if (value?.type === \"FormattedNumber\") {\n if (value.numberFormat === NONE_NUMBER_FORMAT) {\n val = null;\n } else {\n val = value.basicValue;\n }\n }\n // Extract formatted date out of a ExternalCodeServiceObject\n if (value?.type === \"ExternalCodeServiceObject\" && value.preview?.type === \"FormattedNumber\") {\n val = value.preview.basicValue;\n }\n }\n try {\n if (val === null) {\n val = convertAllToString ? \"None\" : null;\n } else if (convertAllToString) {\n switch (valueTypes[colIdx]) {\n case \"Boolean\":\n val = val ? \"TRUE\" : \"FALSE\";\n break;\n case \"Double\":\n val = String(val);\n break;\n case \"Datetime\":\n val = convertExcelToISO(val);\n break;\n case \"Date\":\n val = convertExcelToISO(val);\n val = val.slice(0, val.indexOf(\"T\"));\n break;\n case \"Time\":\n val = convertExcelToISO(val);\n val = val.slice(val.indexOf(\"T\") + 1);\n break;\n }\n } else {\n switch (valueTypes[colIdx]) {\n case \"Datetime\":\n case \"Date\":\n case \"Time\":\n val = convertExcelToDate(val);\n break;\n }\n }\n } catch (e) {\n if (DEBUG) console.log(`Error parsing value: ${value} [row=${rowIdx} col=${colIdx}]`);\n val = val.toString();\n }\n }\n data[rowIdx][colIdx] = val;\n });\n });\n return data;\n}\n\nexport async function shapeOfRange(fullAddress: string): Promise {\n let [sheetName, addr] = splitFullAddress(fullAddress);\n\n let result: number[] = [];\n await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let rng = sheet.getRange(addr);\n rng.load(\"rowCount\");\n rng.load(\"columnCount\");\n await context.sync();\n result = [rng.rowCount, rng.columnCount];\n });\n return result;\n}\n\nexport async function writeToRange(fullAddress: string, data: any[][], formula = true) {\n let [sheetName, addr] = splitFullAddress(fullAddress);\n\n await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let rng = sheet.getRange(addr);\n if (formula) {\n rng.formulas = data;\n } else {\n rng.values = data;\n }\n await context.sync();\n });\n}\n\nexport async function writeToCell(fullAddress: string, data: any, python = true, asPyObject = false) {\n let [sheetName, addr] = splitFullAddress(fullAddress);\n\n // Guard against Ranges\n if (addr.includes(\":\")) {\n throw Error(\"Expected single Cell, not Range\");\n }\n\n await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let rng = sheet.getRange(addr);\n if (python) {\n rng.formulas = [[`=PY(\"${data.replace(/\"/g, '\"\"')}\", ${asPyObject ? 1 : 0})`]];\n } else {\n rng.values = [[data]];\n }\n try {\n await context.sync();\n } catch (e) {\n console.log(\"Error caught. Writing as text instead.\");\n console.log(e);\n // Write the output as text\n rng = sheet.getRange(addr);\n if (python) {\n data = `=PY(${data})`;\n }\n rng.values = [[`'${data}`]];\n rng.format.wrapText = true;\n try {\n await context.sync();\n } catch (e) {\n console.log(`Unable to write to cell ${fullAddress}`);\n console.log(data);\n console.log(e);\n }\n }\n });\n}\n\nexport async function overwriteSheet(sheetName: string, data: any[][], numberFormat?: string[]) {\n await runExcelSafeContext(async (context) => {\n try {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n\n // Clear existing data from sheet\n sheet.getUsedRange().clear();\n await context.sync();\n\n // Write output\n let newRange = sheet.getRangeByIndexes(0, 0, data.length, data[0].length);\n newRange.values = data;\n await context.sync();\n\n // Apply number formatting\n if (numberFormat) {\n numberFormat.forEach((fmt, col) => {\n let numfmt: any = fmt ?? \"General\";\n sheet.getRangeByIndexes(0, col, data.length, 1).numberFormat = numfmt;\n });\n }\n\n // Add filters to columns (if any are non-numeric)\n sheet.autoFilter.apply(newRange);\n await context.sync();\n } catch (error) {\n throw new Error(`OverwriteSheetError: ${error instanceof Error ? error.message : error}`);\n }\n });\n}\n\nexport async function overwriteTable(tableName: string, data: any[][], numberFormat?: string[]) {\n await runExcelSafeContext(async (context) => {\n try {\n // Read table shape\n\n // TODO: Enable eslint here and fix explicit load call\n /* eslint-disable office-addins/call-sync-before-read, office-addins/load-object-before-read */\n let table = context.workbook.tables.getItem(tableName);\n let sheet = table.worksheet;\n let range = table.getRange();\n let headRange = table.getHeaderRowRange();\n let bodyRange = table.getDataBodyRange();\n /* eslint-enable office-addins/call-sync-before-read, office-addins/load-object-before-read */\n\n range.load(\"columnIndex\");\n range.load(\"rowIndex\");\n range.load(\"address\");\n range.load(\"columnCount\");\n range.load(\"rowCount\");\n headRange.load(\"address\");\n bodyRange.load(\"address\");\n await context.sync();\n\n // Guard against the table expanding into existing data\n let overwrite = \"\";\n if (data.length > range.rowCount) {\n // Read directly below table\n let rng = sheet.getRangeByIndexes(\n range.rowIndex + range.rowCount,\n range.columnIndex,\n data.length - range.rowCount,\n range.columnCount\n );\n let usedRng = rng.getUsedRangeOrNullObject();\n usedRng.load(\"address\");\n await context.sync();\n if (!usedRng.isNullObject) overwrite = usedRng.address;\n }\n if (data[0].length > range.columnCount) {\n // Read to the right of table (and below)\n let rng = sheet.getRangeByIndexes(\n range.rowIndex,\n range.columnIndex + range.columnCount,\n data.length,\n data[0].length - range.columnCount\n );\n let usedRng = rng.getUsedRangeOrNullObject();\n usedRng.load(\"address\");\n await context.sync();\n if (!usedRng.isNullObject) {\n if (overwrite) overwrite += \" and \";\n overwrite += usedRng.address;\n }\n }\n if (overwrite) throw new Error(`Table will expand and overwrite data in ${overwrite}`);\n\n // Resize table\n let newRange = sheet.getRangeByIndexes(range.rowIndex, range.columnIndex, data.length, data[0].length);\n table.resize(newRange);\n await context.sync();\n\n // Clear previous table area\n sheet.getRange(headRange.address).clear();\n sheet.getRange(bodyRange.address).clear();\n await context.sync();\n\n // Write output\n newRange.values = data;\n\n // Apply number formatting\n if (numberFormat) {\n numberFormat.forEach((fmt, col) => {\n let numfmt: any = fmt ?? \"General\";\n sheet.getRangeByIndexes(range.rowIndex, range.columnIndex + col, data.length, 1).numberFormat = numfmt;\n });\n }\n\n await context.sync();\n } catch (error) {\n throw new Error(`OverwriteTableError: ${error instanceof Error ? error.message : error}`);\n }\n });\n}\n\nexport async function getAliasFromRangeSelection(rs: RangeSelection): Promise {\n switch (rs.rangeType) {\n case RangeType.Sheet:\n return await getFullAddressFromRangeSelection(rs);\n case RangeType.Table:\n rs = await refreshRangeSelection(rs);\n return `${rs.displayName}[#All]`;\n case RangeType.Named:\n return rs.identifier;\n case RangeType.RangeBinding:\n case RangeType.CellBinding:\n case RangeType.SpillBinding:\n return await getFullAddressFromRangeSelection(rs);\n }\n}\n\nexport async function getFullAddressFromRangeSelection(rs: RangeSelection): Promise {\n switch (rs?.rangeType) {\n case RangeType.Sheet:\n return await runExcelSafeContext(async (context) => {\n let sheet = (await findByIdOrDisplayName(context, rs)) as Excel.Worksheet;\n let rng = sheet.getUsedRange().getBoundingRect(\"A1\");\n rng.load(\"address\");\n await context.sync();\n return rng.address;\n });\n case RangeType.Table:\n return await runExcelSafeContext(async (context) => {\n let table = (await findByIdOrDisplayName(context, rs)) as Excel.Table;\n let rng = table.getRange();\n rng.load(\"address\");\n await context.sync();\n return rng.address;\n });\n case RangeType.Named:\n return await runExcelSafeContext(async (context) => {\n let range = context.workbook.names.getItem(rs.identifier);\n try {\n await context.sync();\n } catch (e) {\n throw Error(`Named Range ${rs.identifier} not found in spreadsheet.`);\n }\n let rng = range.getRange();\n rng.load(\"address\");\n\n await context.sync();\n return rng.address;\n });\n case RangeType.CellBinding:\n case RangeType.RangeBinding:\n case RangeType.SpillBinding:\n return await getBindingAddress(rs);\n }\n}\n\n/**\n * Determine whether an Excel range object is a spill selection\n *\n * The selection must be either:\n * - the whole spill range\n * - the single top-left cell of the spill range\n *\n * @param context\n * @param range\n * @returns boolean\n */\nexport async function isSpillSelection(context: Excel.RequestContext, range: Excel.Range): Promise {\n range.load(\"address\");\n const cell = range.getCell(0, 0);\n cell.load(\"address\");\n const anchor = cell.getSpillParentOrNullObject();\n await context.sync();\n\n if (!anchor.isNullObject) {\n anchor.load(\"address\");\n const spill = anchor.getSpillingToRangeOrNullObject();\n spill.load(\"address\");\n await context.sync();\n\n return spill.address === range.address || anchor.address === range.address;\n }\n return false;\n}\n\n/**\n * Determine whether an Excel range object is a table selection\n *\n * The selection must be either:\n * - the whole table\n * - the single top-left cell of the table\n *\n * @param context\n * @param range\n * @returns string | null\n */\nexport async function isTableSelection(context: Excel.RequestContext, range: Excel.Range): Promise {\n range.load(\"address\");\n range.load(\"rowCount\");\n range.load(\"columnCount\");\n await context.sync();\n // If a single cell is selected, look for any table\n // But if a range is selected, the table must be fully contained within the selection\n const fullyContained = range.rowCount > 1 || range.columnCount > 1;\n const tables = range.getTables(fullyContained);\n tables.load(\"items\");\n await context.sync();\n // Look for tables exactly overlapping selection\n for (let tbl of tables.items) {\n const tblRange = tbl.getRange();\n if (fullyContained) {\n tblRange.load(\"address\");\n await context.sync();\n if (tblRange.address == range.address) return tbl.id;\n } else {\n const topLeft = range.getCell(0, 0);\n topLeft.load(\"address\");\n await context.sync();\n if (topLeft.address == range.address) return tbl.id;\n }\n }\n return null;\n}\n\n// TODO: we need isTableSelection method to detect a range selection which happens to be a table\n// and integrate it into TableChooser\n\nenum WorkbookStructureElements {\n tables = \"tables\",\n names = \"names\",\n sheets = \"sheets\",\n sheetsWithoutTables = \"sheetsWithoutTables\",\n}\n\nexport interface WorkbookStructure extends Record {}\n\n/**\n * Returns an object like:\n * {\n * tables: [\"table1\", \"table2\"],\n * named: [\"range1\", \"customrange\"],\n * sheets: [\"Sheet1\", \"Sheet2\", \"Fun & Fancy Sheet\"],\n * sheetsWithoutTables: [\"Sheet2\"],\n * }\n */\nexport async function readWorkbookStructure(): Promise {\n // Get list of sheets, tables, and named ranges in the workbook\n let wbStruct: Record = {\n tables: [],\n names: [],\n sheets: [],\n sheetsWithoutTables: [],\n };\n await runExcelSafeContext(async (context) => {\n // Fetch the named ranges (workbook scope only)\n context.workbook.load(\"names\");\n await context.sync();\n context.workbook.names.items.forEach((n) => {\n if (n.type === \"Range\") {\n wbStruct.names.push(n.name);\n }\n });\n\n // Fetch tables for each sheet\n let sheets = context.workbook.worksheets;\n sheets.load(\"items/tables/items/name\");\n await context.sync();\n // Fetch sheet names\n sheets.items.forEach((s) => s.load(\"name\"));\n await context.sync();\n // Load tables and sheet info into wbStruct\n context.workbook.worksheets.items.forEach((s) => {\n wbStruct.sheets.push(s.name);\n if (s.tables.count > 0) {\n s.tables.items.forEach((t) => {\n wbStruct.tables.push(t.name);\n });\n } else {\n wbStruct.sheetsWithoutTables.push(s.name);\n }\n });\n });\n return wbStruct;\n}\n\nexport async function createNewSheet(name: string): Promise {\n await runExcelSafeContext(async (context) => {\n context.workbook.worksheets.add(name);\n await context.sync();\n });\n}\n\nconst letters = Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\nexport function indexToCol(idx: number): string {\n const col = [];\n while (idx) {\n idx -= 1; // this is done for every loop\n const remainder = idx % 26;\n col.push(letters[remainder]);\n idx = Math.floor(idx / 26);\n }\n return col.reverse().join(\"\");\n}\n\nconst letterMap = new Map(letters.map((x, i) => [x, i + 1]));\nexport function colToIndex(col: string): number {\n let i: number,\n j: number,\n idx = 0,\n numChars = col.length;\n for (i = 0, j = numChars - 1; i < numChars; i += 1, j -= 1) {\n idx += Math.pow(26, j) * letterMap.get(col[i]);\n }\n return idx;\n}\n\nconst addrPatt = /([A-Z]+)(\\d+)/;\n\n// Goes from A1-style addr to [row, col] 0-based indexes\nexport function addrToIndexes(addr: string): [number, number] {\n const [, colStr, rowStr] = addr.match(addrPatt);\n const col = colToIndex(colStr);\n const row = parseInt(rowStr);\n return [row - 1, col - 1];\n}\n\nexport function indexesToAddr(row: number, col: number): string {\n return `${indexToCol(col + 1)}${row + 1}`;\n}\n\nexport async function getCurrentSplitIdAddr(): Promise {\n try {\n return await runExcelSafeContext(async (context) => {\n const rng = context.workbook.getSelectedRange();\n rng.load(\"address\");\n rng.load(\"worksheet/id\");\n await context.sync();\n const [, addr] = splitFullAddress(rng.address);\n return {\n sheetId: rng.worksheet.id,\n addr: addr,\n };\n });\n } catch (err) {\n console.log(`Error getting current split address: ${err}`);\n return null;\n }\n}\n\nexport async function getSplitIdAddrFromBinding(bindingId: string, deleteId = false): Promise {\n /* eslint-disable office-addins/call-sync-before-read */\n /* eslint-disable office-addins/load-object-before-read */\n return await runExcelSafeContext(async (context) => {\n const binding = context.workbook.bindings.getItem(bindingId);\n const range = binding.getRange();\n const worksheet = range.worksheet;\n worksheet.load(\"id\");\n range.load(\"address\");\n if (deleteId) binding.delete();\n await context.sync();\n\n return {\n sheetId: worksheet.id,\n addr: splitFullAddress(range.address)[1],\n };\n });\n}\n\nlet _pythonEnabled: boolean | undefined = undefined;\nexport async function isPythonEnabled() {\n if (_pythonEnabled === undefined) {\n // 2024-09-09 This hack no longer works\n // // Until an official API is created, this is the best hack\n // // to find out if Python is enabled in the workbook.\n // // - Attempt to create a named range with value \"=PY()\"\n // // - If it failed, this indicates that Python is enabled because Python functions\n // // cannot be used as a named formula.\n // // - Return true\n // // - If it succeeded, this indicates that Python is *not* enabled.\n // // Excel doesn't seem to care if you declare an unknown function.\n // // - Delete the named range\n // // - Return false\n // await runExcelSafeContext(async (context) => {\n // const TEMP_NAME = `__pyxlchecker${Math.random()}__`;\n // context.workbook.names.add(TEMP_NAME, \"=PY()\");\n // try {\n // await context.sync();\n // _pythonEnabled = false;\n // // Clean up\n // context.workbook.names.getItem(TEMP_NAME).delete();\n // try {\n // await context.sync();\n // } catch (e) {\n // console.log(`Error caught while deleting TEMP_NAME: ${e}`);\n // }\n // } catch (e) {\n // _pythonEnabled = true;\n // }\n // });\n return Office.context.platform === Office.PlatformType.PC;\n }\n return _pythonEnabled;\n}\n\nexport async function getFormulaFromGrid(fullAddress: string): Promise {\n let [sheetName, addr] = splitFullAddress(fullAddress);\n return await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let range = sheet.getRange(addr);\n range.load([\"formulas\"]);\n await context.sync();\n\n return range.formulas[0][0];\n });\n}\n\nexport enum FormulaLanguage {\n excel = \"excel\",\n python = \"py\",\n r = \"r\",\n}\n\nexport function parseFormula(formula: string): { language: FormulaLanguage; formula: string } {\n if (!formula) return { language: null, formula };\n if (formula.startsWith(`=ANACONDA${Env.CODE_NAMESPACE_SUFFIX}.CODE(`)) {\n const code = convertGridCodeToUserCode(formula);\n return { language: String(code[0]) as FormulaLanguage, formula: code[1] };\n } else if (formula.startsWith(\"=PY(\")) {\n let code = formula.slice(5, -4); // `=PY(\"...\",0)` extract only `...`\n const pyCode = code.replaceAll('\"\"', '\"');\n return { language: FormulaLanguage.python, formula: pyCode };\n } else {\n return { language: FormulaLanguage.excel, formula };\n }\n}\n\nexport function associateCustomFunction(name: string, func: any) {\n try {\n delete CustomFunctions[\"_association\"].mappings[name];\n } catch (err) {\n console.warn(`// Please ignore the [DuplicatedName] warning about ${name}`);\n }\n CustomFunctions.associate(name, func);\n}\n\nexport function throwErrorInGrid(err: string) {\n if (Office.context.platform !== Office.PlatformType.PC) {\n // Mac is only able to show 254 characters of err\n if (err.length > 254) {\n err = err.slice(0, 9) + \"......\\n\" + err.slice(-238);\n }\n }\n throw new CustomFunctions.Error(CustomFunctions.ErrorCode.invalidValue, err);\n}\n\n/**********************************************************\n * Utilities used for Testing\n **********************************************************/\n\nasync function testUtilResetWorkbook() {\n // Delete all sheets except Sheet1\n await runExcelSafeContext(async (context) => {\n context.workbook.load(\"worksheets\");\n await context.sync();\n context.workbook.worksheets.items.forEach((sheet) => {\n if (sheet.name !== \"Sheet1\") sheet.delete();\n });\n await context.sync();\n });\n // Delete any content in Sheet1\n const sheet1Rng = await getFullAddressFromRangeSelection({\n rangeType: RangeType.Sheet,\n identifier: \"Sheet1\",\n });\n let [sheetName, addr] = splitFullAddress(sheet1Rng);\n await runExcelSafeContext(async (context) => {\n let sheet = context.workbook.worksheets.getItem(sheetName);\n let rng = sheet.getRange(addr);\n rng.delete(\"Up\");\n await context.sync();\n });\n}\n(g as any).testUtilResetWorkbook = testUtilResetWorkbook;\n\n// Expose common functions\n(g as any).testUtilGetFullAddressFromRangeSelection = getFullAddressFromRangeSelection;\n(g as any).testUtilShapeOfRange = shapeOfRange;\n(g as any).testUtilSplitFullAddress = splitFullAddress;\n(g as any).testUtilOverwriteSheet = overwriteSheet;\n(g as any).testUtilReadFromRange = readFromRange;\n(g as any).testUtilCreateNewSheet = createNewSheet;\n","import React, { useEffect, useState, createContext, useContext, ReactNode } from \"react\";\nimport { isPythonEnabled } from \"xlcommon/src/excel/excel-grid-utils\";\nimport Env from \"xlcommon/src/environ\";\n\nconst DEBUG = false;\n\nexport type PythonContextType = {\n hasPython: boolean;\n};\n\nexport const PythonContext = createContext({\n hasPython: false,\n});\n\nexport const usePython = () => {\n const context = useContext(PythonContext);\n return context;\n};\n\nexport const PythonContextProvider = ({ children }: { children: ReactNode }) => {\n const [hasPython, setHasPython] = useState(false);\n\n useEffect(() => {\n (async () => {\n const pythonEnabled = (await isPythonEnabled()) || Env.UNLOCKED;\n setHasPython(pythonEnabled);\n if (DEBUG) console.log(`hasPython=${pythonEnabled}`);\n })();\n }, []);\n\n return (\n \n {children}\n \n );\n};\n","import Env from \"xlcommon/src/environ\";\nimport { authenticatedFetch } from \"../auth/fetch\";\n\nconst DEBUG = false;\n\nconst BASE_URL = Env.BASE_URL;\nconst RECORD_URL = `${BASE_URL}/api/cloud/snake-eyes/record`;\nconst NOTE_URL = `${BASE_URL}/api/cloud/snake-eyes/note`;\n\nexport interface SnakeEyesParameters {\n event: string;\n eventParams?: object;\n}\n\n// Record event associated with the user\nexport async function snakeEyesRecord({ event, eventParams }: SnakeEyesParameters) {\n if (DEBUG) console.log(`[SnakeEyesRecord] event=${event} params=${JSON.stringify(eventParams)}`);\n await snakeEyesRequest({ event, eventParams, url: RECORD_URL, needsAuth: true });\n}\n\n// Record anonymous event NOT associated with the user\nexport async function snakeEyesNote({ event, eventParams }: SnakeEyesParameters) {\n if (DEBUG) console.log(`[SnakeEyesNote] event=${event} params=${JSON.stringify(eventParams)}`);\n await snakeEyesRequest({ event, eventParams, url: NOTE_URL, needsAuth: false });\n}\n\nasync function snakeEyesRequest({\n event,\n eventParams,\n url,\n needsAuth,\n}: SnakeEyesParameters & { url: string; needsAuth: boolean }): Promise {\n try {\n const body = {\n service_id: \"XLTB\",\n event,\n };\n if (eventParams) {\n body[\"event_params\"] = eventParams;\n }\n let options = {\n method: \"POST\",\n headers: { \"Content-type\": \"application/json\" },\n body: JSON.stringify(body),\n };\n let response: Response;\n if (needsAuth) {\n response = await authenticatedFetch(url, options);\n } else {\n response = await fetch(url, options);\n }\n if (!response.ok) {\n throw new Error(`${response.status} ${response.statusText}`);\n }\n return await response.json();\n } catch (e) {\n if (DEBUG) console.error(`SnakeEyes error: ${e}`);\n }\n}\n","import { snakeEyesRecord } from \"../analytics/snake-eyes\";\nimport Env from \"xlcommon/src/environ\";\nimport { broadcastLogin } from \"./broadcast\";\n\n/*\n * Flag to let authenticated calls know that another\n * call is already attempting to refresh the token,\n * avoiding a potential swarm of refresh calls when\n * the current auth token expires.\n */\nlet isRefreshing = false;\n\n/*\n * Standard `fetch` API with automatic handling of\n * authentication tokens.\n */\nexport async function authenticatedFetch(resource: RequestInfo, options?: RequestInit, retry = true) {\n const opts: RequestInit = options ? { ...options } : { method: \"GET\" };\n\n if (isRefreshing) {\n // Wait until other caller finishes the token refresh\n while (isRefreshing) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n }\n\n // Retry call with new auth token (without retry)\n return await authenticatedFetch(resource, options, false);\n } else {\n const resp = await fetch(resource, opts);\n\n if (resp.status >= 400 && resp.status < 500 && retry) {\n if (!isRefreshing) {\n // Claim the refresh flag\n isRefreshing = true;\n\n try {\n // Check if auth token is expired\n const sessionCheckResponse = await fetch(`${Env.BASE_URL}/api/auth/check-token`, { method: \"GET\" });\n if (sessionCheckResponse.status === 401) {\n // Auth token is expired; attempt to refresh\n const refreshResponse = await fetch(`${Env.BASE_URL}/api/auth/refresh`, { method: \"GET\" });\n if (refreshResponse.status === 200) {\n // TODO: do we need these two lines?\n Env.signedIn = true;\n broadcastLogin();\n snakeEyesRecord({ event: \"tokenRefresh\" });\n } else {\n console.log(`Refresh failed! code=${refreshResponse.status}`);\n Env.signedIn = false;\n throw Error(\"AuthRequiredException\");\n }\n } else if (sessionCheckResponse.status === 403) {\n // Auth cookie is missing or expired\n console.log(`Refresh failed! Missing auth cookie.`);\n Env.signedIn = false;\n throw Error(\"AuthRequiredException\");\n }\n } finally {\n isRefreshing = false;\n }\n }\n\n return await authenticatedFetch(resource, options, false);\n }\n\n return resp;\n }\n}\n","import Env from \"xlcommon/src/environ\";\nimport { authenticatedFetch } from \"./fetch\";\nimport { Account, AuthSessionInit, OrganizationUser, OrganizationUsers, Organizations } from \"./models\";\nimport { snakeEyesRecord, snakeEyesNote } from \"../analytics/snake-eyes\";\nimport { broadcastLogout, broadcastLogin } from \"./broadcast\";\n\nexport const BASE_URL = Env.BASE_URL;\n\nexport function isLoggedIn() {\n return Env.signedIn;\n}\n\n// Flag to avoid duplicate refresh calls in attemptSilentLogin\nlet isAttemptingSilentLogin = false;\n\nexport async function attemptSilentLogin() {\n if (!isAttemptingSilentLogin) {\n isAttemptingSilentLogin = true;\n\n try {\n const res = await fetch(`${BASE_URL}/api/auth/check-token`, { method: \"GET\" });\n if (res.status === 200) {\n Env.signedIn = true;\n broadcastLogin();\n snakeEyesLogin(true, false); // automatic, no refresh\n } else if (res.status === 403) {\n // No cookie is set or cookie has expired or session has been removed\n // Require full login\n console.log(`Silent login failed. Auth cookie not set or is expired.`);\n } else if (res.status === 401) {\n // Auth token found, but is invalid or has expired; Attempt to refresh\n const refreshResponse = await fetch(`${Env.BASE_URL}/api/auth/refresh`, { method: \"GET\" });\n if (refreshResponse.status === 200) {\n Env.signedIn = true;\n broadcastLogin();\n snakeEyesLogin(true, true); // automatic, required refresh\n }\n } else {\n console.log(`Silent login failed!`);\n }\n } finally {\n isAttemptingSilentLogin = false;\n }\n } else {\n // Wait for other attempt to finish, then return\n while (isAttemptingSilentLogin) await new Promise((resolve) => setTimeout(resolve, 500));\n }\n}\n\nlet dialogRef: Office.Dialog;\nexport async function login() {\n // Log in if needed\n if (!Env.signedIn) {\n try {\n const sessionInit: AuthSessionInit = await new Promise((resolve, reject) => {\n promptUserLogin((data) => {\n if (data === null || !(\"session_id\" in data)) {\n console.log(`promptUserLogin returned data=${JSON.stringify(data)}`);\n reject();\n } else {\n resolve(data);\n }\n });\n });\n // Verify session id\n const vResp = await fetch(`${BASE_URL}/api/auth/validate-session`, {\n method: \"POST\",\n headers: { \"Content-type\": \"application/json\" },\n body: JSON.stringify(sessionInit),\n });\n if (vResp.ok) {\n Env.signedIn = true;\n // Broadcast logged in state\n broadcastLogin();\n snakeEyesLogin(false, false);\n } else {\n throw new Error(`validate-session returned ${vResp.status}`);\n }\n } catch (e) {\n console.error(`Error during login: ${e}`);\n await snakeEyesNote({\n event: \"login-failure\",\n eventParams: {\n automatic: false,\n platform: Office.context.platform,\n app: \"toolbox\",\n },\n });\n }\n }\n}\n\nasync function snakeEyesLogin(automatic: boolean, refreshed: boolean) {\n // Get domain and tier from anaconda account\n const account = await getAccount();\n const anaorg = account.user?.email?.split(\"@\")[1] || \"\";\n const tier = account.metadata?.is_pro_tier ? \"pro\" : account.metadata?.is_starter_tier ? \"starter\" : \"free\";\n // Send login event to snake eyes\n await snakeEyesRecord({\n event: \"login\",\n eventParams: {\n automatic: automatic,\n refreshed: refreshed,\n platform: Office.context.platform,\n cloud_user_domain: anaorg,\n tier: tier,\n app: \"toolbox\",\n },\n });\n}\n\n/**\n * Double Jump Dialog Approach\n *\n * 1. Use the normal Office.context.ui.displayDialogAsync call to display the first page.\n * 2. The first page establishes a BroadcastChannel and listens for messages.\n * 3. The first page calls window.open to open the second page.\n * 4. The second page does the Ory dance -- a bunch of cross-origin redirects and finally redirects to our OIDC handler.\n * 5. The second page has the auth code served from our domain.\n * 6. The second page establishes a BroadcastChannel and posts the auth code back to the first page.\n * 7. The first page was opened by the add-in, so it is able to talk with the add-in via Office.context.ui.messageParent callbacks. It sends the auth code to the add-in. It also closes the second dialog by posting a close() broadcast message.\n * 8. The add-in receives the auth code and closes the dialog.\n *\n * This seems super complicated, but it's the only thing that works to get the auth code to the\n * add-in-within-an-iframe for Excel Online. It also gives us a standard location for the \"Remember Me\" checkbox.\n */\nfunction promptUserLogin(callback: (data: AuthSessionInit | null) => void) {\n const loginUrl: URL = new URL(\"api/auth/login-redirect\", BASE_URL);\n let dialog: Office.Dialog;\n Office.context.ui.displayDialogAsync(\n loginUrl.href,\n { height: 25, width: 20, promptBeforeOpen: false }, // We can avoid the prompt because user clicks a button already\n\n function (asyncResult: Office.AsyncResult): void {\n if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n console.log(\"Successful dialog prompt\");\n // Force it to wait until the dialog value is available, since we can't await\n // Not my favorite solution but open to other ideas - we can't re-prompt without a reference\n // eslint-disable-next-line\n while (asyncResult.value == ({} as Office.Dialog)) {}\n dialogRef = asyncResult.value;\n\n dialog = asyncResult.value;\n dialog.addEventHandler(Office.EventType.DialogMessageReceived, (arg: any) => {\n dialog.close();\n callback(JSON.parse(arg[\"message\"]));\n });\n } else if (asyncResult.status === Office.AsyncResultStatus.Failed) {\n // https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-best-practices#open-another-dialog-immediately-after-closing-one\n const HAS_ACTIVE_DIALOG_ERROR = 12007;\n if (asyncResult.error.code === HAS_ACTIVE_DIALOG_ERROR) {\n console.log({ dialogRef });\n dialogRef.close();\n setTimeout(() => {\n promptUserLogin(callback); // Recursive call suggested by MSFT until closed\n }, 1000);\n } else {\n console.log(`Dialog returned an error: ${asyncResult.error.code}`);\n console.error(asyncResult.error);\n }\n } else {\n console.log(\"Error occurred when attempting to prompt: \");\n const err = asyncResult.error;\n console.log(err.name + \": \" + err.message);\n }\n }\n );\n}\n\nexport async function logout() {\n snakeEyesRecord({ event: \"logout\" }); // must happen before user is actually logged out\n await fetch(`${BASE_URL}/api/auth/logout`, { method: \"POST\" });\n Env.signedIn = false;\n broadcastLogout();\n}\n\nexport function addSubscriptionMetadata(data: Account): Account {\n const PRO_TIER_SUBSCRIPTIONS = [\"commercial_subscription\", \"security_subscription\", \"enterprise_subscription\"];\n const STARTER_TIER_SUBSCRIPTION = \"starter_subscription\";\n\n let isStarterTier = false;\n let isProTier = false;\n\n const subscription = data.subscriptions;\n\n if (subscription?.length) {\n const productCodes = subscription.map((sub) => sub.product_code);\n isStarterTier = productCodes.some((code) => code === STARTER_TIER_SUBSCRIPTION);\n isProTier = productCodes.some((code) => PRO_TIER_SUBSCRIPTIONS.includes(code));\n }\n\n data = {\n ...data,\n metadata: {\n is_starter_tier: isStarterTier,\n is_pro_tier: isProTier,\n },\n };\n return data;\n}\n\nexport async function getAccount(): Promise {\n let userUrl = `${BASE_URL}/api/cloud/account`;\n let res = await authenticatedFetch(userUrl, {\n method: \"GET\",\n });\n let userInfo = await res.json();\n return addSubscriptionMetadata(userInfo);\n}\n\nexport async function getOrganizations(): Promise {\n let orgUrl = `${BASE_URL}/api/cloud/organizations/my`;\n let res = await authenticatedFetch(orgUrl, {\n method: \"GET\",\n });\n let data = await res.json();\n return data;\n}\n\nexport async function getOrganizationUsers(orgName: string): Promise {\n let orgUrl = `${BASE_URL}/api/cloud/organizations/${orgName}/users`;\n let res = await authenticatedFetch(orgUrl, {\n method: \"GET\",\n });\n let data = await res.json();\n return data;\n}\n\n/*\n* TODO/NOTE: \n This is a hacky way to get all user objects with id, name, and email, since the API does not support\n returning permissions with user data other than the user IDs. Without this data, we cannot manage permissions in the UI.\n\n For now, we are aggregating users per organization, and we anticipate each user to be in a small amount of organizations.\n We are anticipating the Projects API functionality to be expanded in the future.\n*/\nexport async function getAllOrgUsers(organizationNameList: string[]): Promise {\n let userIdToMaxRole: Record = {};\n let userObjects: OrganizationUser[] = [];\n\n let promises = organizationNameList.map(async (organization) => {\n const users: OrganizationUsers = await getOrganizationUsers(organization);\n users?.items.forEach((user) => {\n if (!userIdToMaxRole[user.id]) {\n // Only add the user if they aren't already in users list\n userIdToMaxRole[user.id] = user.role;\n userObjects.push({ ...user });\n } else if (userIdToMaxRole[user.id] === \"member\") {\n // Reset rendered privlege if same user found to potentially higher privlege\n userIdToMaxRole[user.id] = user.role;\n userObjects.map((userObj) => {\n if (userObj.id === user.id) {\n return {\n ...userObj,\n role: user.role,\n };\n }\n });\n }\n });\n return users;\n });\n await Promise.all(promises);\n\n return userObjects;\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Start.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Start.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect } from \"react\";\nimport IconHeader from \"../components/Typography\";\nimport { SignInDialog } from \"../components/Dialogs/SignInDialog\";\nimport { NavigationList } from \"../components/Lists\";\nimport { StartMenuItems } from \"../components/Layout/nav-models\";\nimport { Col } from \"../components/Layout/Space\";\nimport { pingForLogin } from \"../../auth/broadcast\";\nimport { usePython } from \"../hooks/usePython\";\nimport Env from \"xlcommon/src/environ\";\nimport * as AuthAPI from \"../../auth/auth-api\";\nimport { resetTermsAndConditions } from \"./AIAssistant/utils\";\nimport \"./Start.scss\";\n\nfunction Start() {\n const { hasPython } = usePython();\n\n // User must login when the add-in first opens\n const [isLoggedIn, setLoggedIn] = useState(true); // initial condition to avoid showing login dialog when cross-linked\n const [isAutoLogIn, setIsAutoLogIn] = useState(false);\n async function triggerSignIn() {\n if (!Env.signedIn) await AuthAPI.login();\n setLoggedIn(Env.signedIn);\n resetTermsAndConditions();\n }\n\n useEffect(() => {\n (async () => {\n // Attempt linked-login from PyScript page\n if (!AuthAPI.isLoggedIn()) pingForLogin(triggerSignIn);\n\n // Check for login status (after delay)\n setTimeout(async () => {\n if (!AuthAPI.isLoggedIn()) {\n // Linked login failed, so show login dialog\n setLoggedIn(false);\n // Attempt auto-login using microsoft token\n setIsAutoLogIn(true);\n await AuthAPI.attemptSilentLogin();\n if (AuthAPI.isLoggedIn()) setLoggedIn(true);\n setIsAutoLogIn(false);\n }\n }, 250);\n })();\n }, []);\n\n return (\n
\n {!isLoggedIn && (\n await triggerSignIn()}\n initializing={isAutoLogIn}\n />\n )}\n
\n \n {StartMenuItems.map((heading) => {\n return (\n
\n } text={heading.title} />\n {\n const disabled = item.disabled || (item.requiresPython && !hasPython && !Env.UNLOCKED);\n return {\n text: item.text,\n to: item.path,\n disabled: disabled,\n disabledText: disabled ? \"Requires Python in Excel\" : \"\",\n };\n })}\n />\n
\n );\n })}\n \n
\n {Office.context.platform === Office.PlatformType.Mac && (\n \n )}\n
\n );\n}\n\nexport default Start;\n","import React from \"react\";\nimport { AssistantState } from \"./types\";\nimport { humaneDate } from \"./humaneDates\";\n\n// eslint-disable-next-line react/display-name\nexport const divWithClassName =\n (className: string): ((props: React.PropsWithChildren) => React.ReactElement) =>\n // eslint-disable-next-line react/display-name\n (props: React.PropsWithChildren): React.ReactElement => {\n return (\n
\n {props.children}\n
\n );\n };\n\n// eslint-disable-next-line react/display-name\nexport const buttonWithClassName =\n (className: string): ((props: React.ButtonHTMLAttributes) => React.ReactElement) =>\n // eslint-disable-next-line react/display-name\n (props: React.ButtonHTMLAttributes): React.ReactElement => {\n return (\n \n );\n };\n\nexport function getLocalStorageValue(key: string, defaultValue: T): T {\n try {\n // eslint-disable-next-line no-undef\n const value = localStorage.getItem(key);\n return value ? JSON.parse(value) : defaultValue;\n } catch (e) {\n // eslint-disable-next-line no-undef\n console.error(\"Failed to get local storage value\", e);\n return defaultValue;\n }\n}\n\nexport function useLocalState(key: string, defaultValue: T): readonly [T, React.Dispatch>] {\n const savedState = getLocalStorageValue(key, defaultValue);\n const [state, setState] = React.useState(savedState);\n React.useEffect(() => {\n // eslint-disable-next-line no-undef\n // console.log(\"Saving state\", key, state);\n // eslint-disable-next-line no-undef\n localStorage.setItem(key, JSON.stringify(state));\n }, [state]);\n return [state, setState] as const;\n}\n\nexport function calculateContextPercentage(contextLength: number, contextMaxLength = 4096): number {\n return Math.ceil((contextLength / contextMaxLength) * 100);\n}\n\nexport type GetChatTitleOptions = {\n contextType?: AssistantState[\"contextType\"];\n updatedAt?: AssistantState[\"updatedAt\"];\n};\n\nexport function getChatTitle({ contextType, updatedAt }: GetChatTitleOptions): string {\n let title = \"\";\n switch (contextType) {\n case \"excel-default-python\":\n title = \"Working with Python code\";\n break;\n case \"excel-graph-dataframe\":\n title = \"Generating graphs from a table or range\";\n break;\n case \"excel-aggregate-dataframe\":\n title = \"Aggregate or summarize a table or range\";\n break;\n default:\n title = \"New chat\";\n }\n const date = updatedAt ? ` (${humaneDate(new Date(updatedAt))})` : \"\";\n return `${title}${date}`;\n}\n\nexport function safeJsonParse(json: string): T | null {\n try {\n return JSON.parse(json);\n } catch (error) {\n return null;\n }\n}\n\nexport function resetTermsAndConditions(): void {\n localStorage.setItem(\"assistant-accept-terms\", JSON.stringify({ accepted: false, version: \"\" }));\n localStorage.setItem(\"assistant-enable-data-collection\", \"false\");\n localStorage.setItem(\"assistant-older-than-13\", \"false\");\n}\n","import React from \"react\";\nimport { CodeBuilder } from \"./CodeBuilder\";\n\nexport class ValueTracker {\n initialValue: T;\n value: T;\n isUpdated: boolean;\n\n constructor(val: T) {\n this.initialValue = val;\n this.value = val;\n this.isUpdated = false;\n }\n\n update(val: T): ValueTracker {\n const newVal = new ValueTracker(val);\n newVal.initialValue = this.initialValue;\n newVal.isUpdated = true;\n return newVal;\n }\n\n reset(): ValueTracker {\n return new ValueTracker(this.initialValue);\n }\n}\n\nexport interface UIAttr {\n visibleDependencies?: Dependency[];\n getReact: (labelWidth: number) => React.ReactNode;\n getCode?: (code: CodeBuilder) => void;\n}\n\nexport interface ChartAttr extends UIAttr {\n component: React.ReactNode;\n enabledDependencies?: Dependency[];\n getCode: (code: CodeBuilder) => void; // CodeBuilder is modified inplace\n codeKey?: string;\n callKey?: string;\n codeValueMap?: Record;\n}\n\nexport interface Dependency {\n object: ChartAttr;\n isSatisfied?: () => boolean;\n}\n\nexport interface Chart {\n baseAttrs: UIAttr[];\n designAttrs: UIAttr[];\n}\n\nexport function areDependenciesSatisfied(dependencies: Dependency[]) {\n if (dependencies) {\n const depVals = dependencies.map((dep: Dependency) => dep?.isSatisfied?.());\n const allDepsSatisfied = depVals.reduce((accum, curVal) => accum && curVal, true);\n return allDepsSatisfied;\n }\n return true;\n}\n\nexport const Orientation = { Horizontal: \"h\", Vertical: \"v\" };\n\nexport const colorOrder = [\"Column Order\", \"Reverse Column Order\", \"Alphabetical A-Z\", \"Alphabetical Z-A\"];\n\nexport const IntervalOptions = [\n \"No error bars\",\n \"Confidence Interval\",\n \"Percentage Interval\",\n \"Standard Error\",\n \"Standard Deviation\",\n];\n\nexport const IntervalValueMap = {\n \"No error bars\": \"None\",\n \"Confidence Interval\": \"ci\",\n \"Percentage Interval\": \"pi\",\n \"Standard Error\": \"se\",\n \"Standard Deviation\": \"sd\",\n};\n\nexport const Estimators = {\n Mean: \"mean\",\n Median: \"median\",\n Max: \"max\",\n Min: \"min\",\n Sum: \"sum\",\n};\n\nexport const RegEstimators = {\n Mean: \"np.mean\",\n Median: \"np.median\",\n Max: \"np.max\",\n Min: \"np.min\",\n};\n\nexport const Axes = {\n Linear: \"linear\",\n Log: \"log\",\n};\n\nexport const Markers = {\n Point: \".\",\n Circle: \"o\",\n Square: \"s\",\n Plus: \"+\",\n Diamond: \"D\",\n TriangleUp: \"^\",\n TriangleDown: \"v\",\n Star: \"*\",\n X: \"x\",\n};\n\nexport const LineStyle = {\n Solid: \"-\",\n Dashed: \"--\",\n};\n\nexport const RegFunction = {\n Logistic: \"logistic\",\n Lowess: \"lowess\",\n Robust: \"robust\",\n Logx: \"logx\",\n};\n\nexport const BinStats = {\n Count: \"count\",\n Frequency: \"frequency\",\n Probability: \"probability\",\n Percent: \"percent\",\n Density: \"density\",\n};\n\nexport const Elements = { Bars: \"bars\", Step: \"step\", Poly: \"poly\" };\n\nexport const LegendPosition: Record = {\n Best: { location: \"best\" },\n \"Upper Left\": { location: \"upper left\" },\n \"Upper Center\": { location: \"upper center\" },\n \"Upper Right\": { location: \"upper right\" },\n \"Middle Left\": { location: \"center left\" },\n \"Middle Center\": { location: \"center\" },\n \"Middle Right\": { location: \"center right\" },\n \"Lower Left\": { location: \"lower left\" },\n \"Lower Center\": { location: \"lower center\" },\n \"Lower Right\": { location: \"lower right\" },\n Right: { location: \"center left\", extra: \", bbox_to_anchor=(1.0, 0.5)\" },\n Top: { location: \"lower center\", extra: \", bbox_to_anchor=(0.5, 1.0)\" },\n \"Top (3 Columns)\": { location: \"lower center\", extra: \", bbox_to_anchor=(0.5, 1.0), ncol=3, frameon=False\" },\n};\n","export enum PlotLibrary {\n seaborn = \"seaborn\",\n plotly = \"plotly\",\n}\n\nexport enum PlotType {\n bar = \"sns_bar\",\n line = \"sns_line\",\n box = \"sns_box\",\n regression = \"sns_regression\",\n scatter = \"sns_scatter\",\n violin = \"sns_violin\",\n count = \"sns_count\",\n pairwise = \"sns_pairwise\",\n distribution = \"sns_distribution\",\n}\n\nexport type PlotTypeDetails = {\n name: string;\n plotType: PlotType;\n library: PlotLibrary;\n imgIcon: string;\n tooltipInfo: string;\n img: string;\n description: string;\n};\n\nexport const plotsList: PlotTypeDetails[] = [\n {\n name: \"Bar\",\n plotType: PlotType.bar,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/bar-clustered.svg\",\n tooltipInfo: `Show point estimates and errors as rectangle bars.\\nClick for more information.`,\n img: \"/static/assets/bar-plot.png\",\n description: \"Show point estimates and errors as rectangle bars.\",\n },\n {\n name: \"Box\",\n plotType: PlotType.box,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/box.svg\",\n tooltipInfo: `Draw a box plot to show distributions with respect to categories.\\nClick for more information.`,\n img: \"/static/assets/box-plot.png\",\n description: \"Draw a box plot to show distributions with respect to categories.\",\n },\n {\n name: \"Count\",\n plotType: PlotType.count,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/count.svg\",\n tooltipInfo: `Show the counts of observations in each categorical bin using bars.\\nClick for more information.`,\n img: \"/static/assets/count-plot.png\",\n description: \"Show the counts of observations in each categorical bin using bars.\",\n },\n {\n name: \"Distribution\",\n plotType: PlotType.distribution,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/displot-green.svg\",\n tooltipInfo: `Visualize the univariate or bivariate distribution of data.\\nClick for more information.`,\n img: \"/static/assets/distribution.png\",\n description: \"Visualize the univariate or bivariate distribution of data.\",\n },\n {\n name: \"Line\",\n plotType: PlotType.line,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/line.svg\",\n tooltipInfo: `Draw a line plot with possibility of several semantic groupings.\\nClick for more information.`,\n img: \"/static/assets/lineplot.png\",\n description: \"Draw a line plot with possibility of several semantic groupings.\",\n },\n {\n name: \"Pairwise\",\n plotType: PlotType.pairwise,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/pairplot-green.svg\",\n tooltipInfo: `Plot pairwise relationships in a dataset.\\nClick for more information.`,\n img: \"/static/assets/pairwise.png\",\n description: \"Plot pairwise relationships in a dataset.\",\n },\n {\n name: \"Regression\",\n plotType: PlotType.regression,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/regression.svg\",\n tooltipInfo: `Plot data and a linear regression model fit.\\nClick for more information.`,\n img: \"/static/assets/regression-plot.png\",\n description: \"Plot data and a linear regression model fit.\",\n },\n {\n name: \"Scatter\",\n plotType: PlotType.scatter,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/scatter.svg\",\n tooltipInfo: `Draw a scatter plot with possibility of several semantic groupings.\\nClick for more information.`,\n img: \"/static/assets/scatter-plot.png\",\n description: \"Draw a scatter plot with possibility of several semantic groupings.\",\n },\n {\n name: \"Violin\",\n plotType: PlotType.violin,\n library: PlotLibrary.seaborn,\n imgIcon: \"/static/assets/violin.svg\",\n tooltipInfo: `Plot data and a linear regression model fit.\\nClick for more information.`,\n img: \"/static/assets/violin-plot.png\",\n description: \"Draw a combination of boxplot and kernel density estimate\",\n },\n];\n\n// Lookup object to avoid searching for entry containing plotType\nexport const plotsLookup = Object.fromEntries(\n plotsList.map((p) => {\n return [p.plotType, p];\n })\n);\n","export enum PyScriptOutput {\n Excel = 0, // Spill to Excel grid\n PythonObject = 1, // Card view\n}\n\nexport enum PyScriptLinkage {\n ImportsAndDefinitions = -2, // No ability to reference other cells, used only in Imports and Definitions\n Linked = 0, // Run one cell runs them all, have access to local variables from previous cells\n Isolated = 2, // Each cell is independent, no access to local variables from other cells\n}\n\nexport interface PyScriptMode {\n output: PyScriptOutput;\n linkage: PyScriptLinkage;\n}\n\nexport enum PyScriptInterpreter {\n pyodide = \"py\",\n webr = \"r\",\n}\n\nexport enum SupportedDataTableActions {\n Delete = \"delete\",\n Deleted = \"deleted\",\n Add = \"add\",\n Added = \"added\",\n None = \"none\",\n}\n\nexport type PackageRow = {\n package: string;\n version: string;\n // Manage request to add package state\n action?: SupportedDataTableActions;\n};\n\nexport const viewColumns = [\n { columnKey: \"package\", label: \"Package\" },\n { columnKey: \"version\", label: \"Version\" },\n];\n\nexport const columns = [\n { columnKey: \"package\", label: \"Package\" },\n { columnKey: \"version\", label: \"Version\" },\n { columnKey: \"actions\", label: \"Actions\" },\n];\n\nexport type PackageDetails = {\n summary: string;\n home_page: string;\n authors: string;\n description: string;\n requires: string;\n maintainer_email: string;\n version: string;\n yanked: boolean;\n};\n\nexport type PyodidePackages = {\n key: string;\n package: string;\n version: string;\n};\n\nexport type PyodidePackageConflictRequest = {\n updated_version: string;\n current_version: string;\n packages: string[];\n};\n\nexport enum PackageConflictType {\n Version = \"Version\",\n DoesNotExist = \"DoesNotExist\",\n}\n\nexport type PyodidePackageConflict = {\n conflict_type: PackageConflictType;\n previous_version: string;\n // This is the package version associated with the newly selected pyodide version\n // This field is optional because the package may not exist in the updated pyodide version\n updated_version?: string;\n};\n\n// { [packageName]: PyodidePackageConflict, ... }\nexport type PyodidePackageConflictResponse = Record;\n\nexport enum ReturnFormat {\n List = \"list\",\n Dict = \"dict\",\n}\n\nexport enum PackageSource {\n Url = \"url\",\n Pypi = \"pypi\",\n PyscriptApp = \"pyscriptapp\",\n}\n","export const PYTHON_SETTINGS_DEFINITION = \"pythonSettings\";\n\nexport enum PythonExecutionLocation {\n Azure = \"Azure\",\n Local = \"Local\",\n}\n\nexport interface PythonSettings {\n executionLocation: PythonExecutionLocation;\n}\n","import { combineMode, convertUserCodeToGridCode } from \"xlcommon/src/pyscript/utils\";\nimport {\n runExcelSafeContext,\n splitFullAddress,\n worksheetIdFromSheetName,\n writeToCell,\n isPythonEnabled,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport { PyScriptLinkage, PyScriptOutput } from \"xlcommon/src/pyscript/types\";\nimport { PYTHON_SETTINGS_DEFINITION, PythonExecutionLocation, PythonSettings } from \"./types\";\n\nasync function writePyScriptCode(worksheetId: string, addr: string, interp: string, userCode: string, mode: number) {\n await runExcelSafeContext(async (context) => {\n const sheet = context.workbook.worksheets.getItem(worksheetId);\n const rng = sheet.getRange(addr);\n rng.formulas = [[convertUserCodeToGridCode(interp, userCode, mode, [])]];\n await context.sync();\n });\n}\n\nexport async function writeToExecutionLocation(fullAddress: string, data: any) {\n const executionLocation = await getPythonLocation();\n if (executionLocation === PythonExecutionLocation.Azure) {\n return await writeToCell(fullAddress, data);\n } else if (executionLocation === PythonExecutionLocation.Local) {\n // Choose isolated mode since code does not depend on previously defined local variables.\n const mode = combineMode({ output: PyScriptOutput.Excel, linkage: PyScriptLinkage.Isolated });\n const [sheetName, addr] = splitFullAddress(fullAddress);\n const sheetId = await worksheetIdFromSheetName(sheetName);\n return await writePyScriptCode(sheetId, addr, \"py\", data, mode);\n }\n}\n\nexport async function getPythonLocation(): Promise {\n return await runExcelSafeContext(async (context) => {\n const savedSettings = context.workbook.settings.getItemOrNullObject(PYTHON_SETTINGS_DEFINITION);\n savedSettings.load(\"value\");\n await context.sync();\n\n if (savedSettings.isNullObject) {\n // Check if Python in Excel is enabled in the workbook\n if (await isPythonEnabled()) {\n console.log(\"No settings found - Defaulting to Azure (Python in Excel is available).\");\n return PythonExecutionLocation.Azure;\n } else {\n console.log(\"No settings found - Defaulting to PyScript (Python in Excel is not available).\");\n return PythonExecutionLocation.Local;\n }\n } else {\n const savedSettingsObject = JSON.parse(savedSettings.value);\n return savedSettingsObject.executionLocation as PythonExecutionLocation;\n }\n });\n}\n\nexport async function savePythonSettings({ executionLocation }: PythonSettings) {\n await runExcelSafeContext(async (context) => {\n let serialized = JSON.stringify({ executionLocation });\n context.workbook.settings.add(PYTHON_SETTINGS_DEFINITION, serialized);\n await context.sync();\n });\n}\n\nexport async function clearBindingDataFromExcel(bindId: string) {\n return await runExcelSafeContext(async (context) => {\n const binding = context.workbook.bindings.getItem(bindId);\n\n // Get the range associated with the binding\n const range = binding.getRange();\n\n // Clear the contents of the range / cell\n range.clear(Excel.ClearApplyTo.contents);\n\n await context.sync();\n });\n}\n","import React from \"react\";\nimport { RangeSelection, getAliasFromRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { UIAttr, areDependenciesSatisfied, Dependency } from \"./types\";\nimport { BaseCommon } from \"../../../hooks/plots/PlotTypes\";\nimport { PlotType, PlotLibrary } from \"../../../../data/plot-types\";\nimport { getPythonLocation } from \"../../../../excel/grid-utils\";\nimport { PythonExecutionLocation } from \"../../../../excel/types\";\n\nexport interface CodeBuilder {\n chartType: PlotType;\n extraImports: string[];\n source: RangeSelection;\n plotAttrs: string[]; // comma-separated attributes inside the plot call, i.e. `hue='Species'`\n plotCalls: string[]; // items like `plt.ylabel('Year')` which come after the initial plot call\n hasHeaders?: boolean;\n}\n\nconst SeabornChartTypeMap: Record = {\n [PlotType.bar]: \"barplot\",\n [PlotType.line]: \"lineplot\",\n [PlotType.box]: \"boxplot\",\n [PlotType.regression]: \"regplot\",\n [PlotType.scatter]: \"scatterplot\",\n [PlotType.violin]: \"violinplot\",\n [PlotType.count]: \"countplot\",\n [PlotType.pairwise]: \"pairplot\",\n [PlotType.distribution]: \"displot\",\n};\n\nconst PlotLibraryMap: Record = {\n [PlotType.bar]: PlotLibrary.seaborn,\n [PlotType.line]: PlotLibrary.seaborn,\n [PlotType.box]: PlotLibrary.seaborn,\n [PlotType.regression]: PlotLibrary.seaborn,\n [PlotType.scatter]: PlotLibrary.seaborn,\n [PlotType.violin]: PlotLibrary.seaborn,\n [PlotType.count]: PlotLibrary.seaborn,\n [PlotType.pairwise]: PlotLibrary.seaborn,\n [PlotType.distribution]: PlotLibrary.seaborn,\n};\n\nexport function buildReactFromAttrs(attrs: UIAttr[], labelWidth: number) {\n return (\n <>\n
\n {attrs.map((attr: UIAttr, index: number) => {\n if (areDependenciesSatisfied(attr.visibleDependencies)) {\n return
{attr.getReact(labelWidth)}
;\n }\n })}\n
\n \n );\n}\n\nexport function buildCodeFromAttrs(attrs: UIAttr[], cb: CodeBuilder) {\n attrs.forEach((attr) => {\n if (!attr.getCode) return;\n if (!areDependenciesSatisfied(attr.visibleDependencies)) return;\n if (\"enabledDependencies\" in attr && !areDependenciesSatisfied(attr.enabledDependencies as Dependency[])) return;\n // All checks pass; include the attr in the code\n attr.getCode(cb);\n });\n}\n\nexport async function buildCode(common: BaseCommon, attrs: UIAttr[]): Promise {\n const cb: CodeBuilder = {\n chartType: common.plotType,\n extraImports: [],\n source: common.inputData,\n plotAttrs: [],\n plotCalls: [],\n hasHeaders: common.hasHeaders,\n };\n\n // TODO: move these once multiple plot libraries are in use\n if (PlotLibraryMap[common.plotType] === PlotLibrary.seaborn) {\n if (common.plotType === PlotType.regression) {\n cb.extraImports.push(\"import numpy as np\");\n cb.extraImports.push(\"import statsmodels\");\n }\n }\n\n buildCodeFromAttrs(attrs, cb);\n\n return cb;\n}\n\nexport async function buildPythonInExcelCode(cb: CodeBuilder): Promise {\n const library = PlotLibraryMap[cb.chartType];\n if (library === PlotLibrary.seaborn) return buildSeabornPythonInExcelCode(cb);\n throw Error(`Unsupported library: ${library}`);\n}\n\nfunction handleHeaders(executionLocation: PythonExecutionLocation, code: string[], cb: CodeBuilder, dfAlias: string) {\n if (executionLocation === PythonExecutionLocation.Local) {\n if (cb.hasHeaders) {\n code.push(`data = REF(\"${dfAlias}\")\\ndf = pd.DataFrame(data[1:], columns=data[0])\\n\\n`);\n } else {\n code.push(`data = REF(\"${dfAlias}\")\\ndf = pd.DataFrame(data)\\n\\n`);\n }\n } else {\n let headers = cb.hasHeaders.toString().charAt(0).toUpperCase() + cb.hasHeaders.toString().slice(1);\n code.push(`df = xl(\"${dfAlias}\", headers=${headers})\\n\\n`);\n }\n}\n\nasync function buildSeabornPythonInExcelCode(cb: CodeBuilder): Promise {\n let code = [];\n // Extra imports\n cb.extraImports.forEach((imp: string) => {\n code.push(`${imp}\\n`);\n });\n // Standard imports\n code.push(\"import seaborn as sns\\nimport matplotlib.pyplot as plt\\n\\n\");\n // Data source\n const dfAlias = await getAliasFromRangeSelection(cb.source);\n\n handleHeaders(await getPythonLocation(), code, cb, dfAlias);\n // Start of plot object\n code.push(`ax = sns.${SeabornChartTypeMap[cb.chartType]}(\\n data=df,`);\n // Add plot attrs\n cb.plotAttrs.forEach((pa: string) => {\n code.push(`\\n ${pa},`);\n });\n code.push(\"\\n)\\n\");\n // Add plot calls\n cb.plotCalls.forEach((pc: string) => {\n code.push(`\\n${pc}`);\n });\n\n if (cb.chartType !== PlotType.pairwise) {\n code.push(\"\\nplt.tight_layout()\");\n }\n code.push(\"\\n\\nplt.show()\");\n\n return code.join(\"\");\n}\n","import { runExcelSafeContext, RangeType, parseFormula, FormulaLanguage } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { BaseChart, BaseSetup, BaseDesign } from \"../taskpane/hooks/plots/PlotTypes\";\nimport { PlotType } from \"../data/plot-types\";\nimport { ValueTracker } from \"../taskpane/pages/Visualization/MVCShared/types\";\nimport { buildPythonInExcelCode } from \"../taskpane/pages/Visualization/MVCShared/CodeBuilder\";\nimport { splitFullAddress, addrToIndexes } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { clearBindingDataFromExcel } from \"../excel/grid-utils\";\n\nconst DEBUG = false;\n\nconst VIZDEF_PREFIX = \"VIZDEF:\";\n\nexport interface VizDefIdentifier {\n bindId: string;\n sheetName: string;\n addr: string;\n isoTimestamp: string;\n plotType: PlotType;\n formula: string;\n}\n\nexport interface VizDef {\n setup: Record;\n design: Record;\n common: Record;\n writtenFormula: string;\n isoTimestamp: string;\n}\n\nasync function writeVizDefSetting(bindId: string, vizdef: VizDef): Promise {\n return await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n let serialized = JSON.stringify(vizdef);\n if (DEBUG) console.log(`writing vizdef: ${JSON.stringify(serialized)}`);\n settings.add(`${VIZDEF_PREFIX}${bindId}`, serialized);\n await context.sync();\n });\n}\n\nasync function deleteVizDefSetting(bindId: string): Promise {\n return await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n const savedVizDef = settings.getItemOrNullObject(`${VIZDEF_PREFIX}${bindId}`);\n await context.sync();\n\n if (!savedVizDef.isNullObject) {\n savedVizDef.delete();\n await context.sync();\n }\n });\n}\n\nasync function sortVizDefIds(vdi: VizDefIdentifier[]) {\n await runExcelSafeContext(async (context) => {\n // Get sheet names in order\n const sheets = context.workbook.worksheets;\n sheets.load(\"items/name\");\n await context.sync();\n const sheetLookup = Object.fromEntries(\n sheets.items.map((sheet, i) => {\n return [sheet.name, i];\n })\n );\n // Sort based on sheet position, then row, then column\n vdi.sort((a, b) => {\n if (a.sheetName === b.sheetName) {\n // Sort based on row, then column\n const [aRow, aCol] = addrToIndexes(a.addr);\n const [bRow, bCol] = addrToIndexes(b.addr);\n return aRow < bRow ? -1 : aRow > bRow ? +1 : aCol < bCol ? -1 : +1;\n } else {\n // Sort based on sheet position\n return sheetLookup[a.sheetName] < sheetLookup[b.sheetName] ? -1 : +1;\n }\n });\n });\n}\n\nexport default class PlotService {\n // TODO: Error handling done at UI level\n // Note: Each vizdef is stored as a separate setting, each with a common prefix to identify them\n\n static async listVizDefs(): Promise {\n if (DEBUG) console.log(\"listVizDef\");\n const vizinfo: VizDefIdentifier[] = [];\n await runExcelSafeContext(async (context) => {\n // Make all settings keys available\n const settings = context.workbook.settings;\n settings.load(\"items/key\");\n await context.sync();\n // Find all settings which start with VIZDEF_PREFIX\n const temp: [string, Excel.Setting, Excel.Binding][] = [];\n settings.items.forEach((setting) => {\n if (setting.key.startsWith(VIZDEF_PREFIX)) {\n // Extract bindId from setting key and attempt to get the associated binding\n const bindId = setting.key.slice(VIZDEF_PREFIX.length);\n const binding = context.workbook.bindings.getItemOrNullObject(bindId);\n temp.push([bindId, setting, binding]);\n }\n });\n await context.sync();\n\n // Get range associated with binding\n const vizdefs: [string, Excel.Setting, Excel.Range][] = [];\n for (let [bindId, setting, binding] of temp) {\n if (binding.isNullObject) {\n if (DEBUG) console.log(`Binding for saved vizdef is null -- deleting setting`);\n // Remove viz def setting\n await deleteVizDefSetting(bindId);\n } else {\n // Get range associated with binding\n const rng = binding.getRange();\n rng.load(\"address,formulas\");\n // Load the value for setting so it can be read and parsed in the next step\n setting.load(\"value\");\n vizdefs.push([bindId, setting, rng]);\n }\n }\n await context.sync();\n\n // Extract info from viz defs\n vizdefs.forEach(([bindId, setting, range]) => {\n try {\n const [sheetName, addr] = splitFullAddress(range.address);\n const data = JSON.parse(setting.value) as VizDef;\n const rawFormula = range.formulas[0][0];\n const { language, formula } = parseFormula(rawFormula);\n if (language !== FormulaLanguage.python) {\n // Vizdef has been deleted or modified to something unrecognizable\n deleteVizDefSetting(bindId);\n } else {\n vizinfo.push({\n bindId,\n sheetName,\n addr,\n isoTimestamp: data.isoTimestamp,\n plotType: data.common.plotType,\n formula,\n });\n }\n } catch (err) {\n console.log(`Unable to parse saved viz defintion: ${setting.value}`);\n }\n });\n });\n await sortVizDefIds(vizinfo); // sorts inplace\n return vizinfo;\n }\n\n static async getVizDef(bindId: string): Promise {\n if (DEBUG) console.log(`getVizDef for ${bindId}`);\n return await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n const savedVizDef = settings.getItemOrNullObject(`${VIZDEF_PREFIX}${bindId}`);\n savedVizDef.load(\"value\"); // Represents the value stored for this setting\n await context.sync();\n\n if (savedVizDef.isNullObject) {\n return null;\n } else {\n return JSON.parse(savedVizDef.value) as VizDef;\n }\n });\n }\n\n static async saveVizDef(chart: BaseChart): Promise {\n if (DEBUG) console.log(`saveVizDef: ${JSON.stringify(chart)}`);\n // Verify that output cell exists and is a Binding\n const outputCell = chart.common.outputCell;\n if (!outputCell || outputCell.rangeType !== RangeType.CellBinding) {\n if (DEBUG) console.log(`Output cell is not defined or is wrong type: ${JSON.stringify(outputCell)}`);\n return;\n }\n // Construct RawVizDef, removing any ValueTracker items which haven't been modified\n const vizdef: VizDef = {\n setup: {},\n design: {},\n common: {},\n writtenFormula: chart.common.typedCode ?? (await buildPythonInExcelCode(chart.codeFragments)),\n isoTimestamp: new Date().toISOString(),\n };\n for (let kind of [\"setup\", \"design\", \"common\"]) {\n Object.entries(chart[kind]).forEach(([key, value]) => {\n if (value instanceof ValueTracker) {\n if (value.isUpdated) {\n vizdef[kind][key] = value.value;\n }\n } else {\n vizdef[kind][key] = value;\n }\n });\n }\n await writeVizDefSetting(outputCell.identifier, vizdef);\n }\n\n static async areBindingAddressesSame(binding1Id, binding2Id) {\n try {\n return await runExcelSafeContext(async (context) => {\n // Get the first address by its ID\n let binding1 = context.workbook.bindings.getItem(binding1Id);\n let range1 = binding1.getRange();\n range1.load(\"address\");\n\n // Get the second address by its ID\n let binding2 = context.workbook.bindings.getItem(binding2Id);\n let range2 = binding2.getRange();\n range2.load(\"address\");\n\n await context.sync();\n\n // Compare the addresses of both bindings\n return range1.address === range2.address;\n });\n } catch (error) {\n console.error(\"Error comparing binding addresses: \", error);\n return false;\n }\n }\n\n static async cloneVizDef(newBindId: VizDefIdentifier[\"bindId\"], currentBindId: VizDefIdentifier[\"bindId\"]) {\n if (DEBUG) console.log(`cloneVizDef for ${currentBindId} to ${newBindId}`);\n if (await this.areBindingAddressesSame(newBindId, currentBindId)) {\n throw new Error(\"Address Error: The new binding address is the same as the current binding address.\");\n }\n const vizdef: VizDef = await PlotService.getVizDef(currentBindId);\n if (vizdef) {\n // Update output cell identifier\n vizdef.common.outputCell.identifier = newBindId;\n await writeVizDefSetting(newBindId, vizdef);\n }\n }\n\n static async deleteVizDef(bindId: string): Promise {\n if (DEBUG) console.log(`deleteVizDef for ${bindId}`);\n await deleteVizDefSetting(bindId);\n await clearBindingDataFromExcel(bindId);\n }\n}\n\n// Make PlotService available in the console when debugging\nif (DEBUG) {\n (window as any).PlotService = PlotService;\n}\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface BarSetup extends BaseSetup {\n // TODO: specifics\n primaryInterval?: number;\n secondInterval?: number;\n bootstrapSamples?: ValueTracker;\n seed?: ValueTracker;\n estimator?: string;\n errorBar?: string;\n isCollapsed: boolean;\n}\n\nexport interface BarDesign extends BaseDesign {\n // TODO: specifics\n colorOrder?: string;\n width: ValueTracker;\n errorBarWidth: ValueTracker;\n errorBarCapWidth: ValueTracker;\n errorColor: ValueTracker;\n dodge: ValueTracker;\n isCollapsed: boolean;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n alpha: ValueTracker;\n}\n\nexport const barSetup: BarSetup = {\n orientation: new ValueTracker(\"Vertical\"),\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n xAxisScale: \"\",\n yAxisScale: \"\",\n primaryInterval: 95,\n secondInterval: 1,\n bootstrapSamples: new ValueTracker(1000),\n seed: new ValueTracker(0),\n estimator: \"Mean\",\n errorBar: \"No error bars\",\n isCollapsed: true,\n};\n\nexport const barDesign: BarDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n fill: new ValueTracker(true),\n color: new ValueTracker(styles.seabornDefault),\n fillStyle: \"One Color\",\n palette: new ValueTracker(\"Tab10\"),\n colorOrder: \"\",\n width: new ValueTracker(0.8),\n errorBarWidth: new ValueTracker(2),\n errorBarCapWidth: new ValueTracker(0.5),\n errorColor: new ValueTracker(\"#000000\"),\n dodge: new ValueTracker(false),\n isCollapsed: true,\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n alpha: new ValueTracker(1),\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface BoxSetup extends BaseSetup {\n // TODO: specifics\n orientation: ValueTracker;\n whiskersRange: ValueTracker;\n}\n\nexport interface BoxDesign extends BaseDesign {\n // TODO: specifics\n marker: ValueTracker; // This should show the options for the marker \"some1\" | \"some2\"\n markerSize: ValueTracker;\n width: ValueTracker;\n saturation: ValueTracker;\n lineWidth: ValueTracker;\n colorOrder?: string;\n dodge: ValueTracker;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n isCollapsed: boolean;\n alpha: ValueTracker;\n}\n\nexport const boxSetup: BoxSetup = {\n orientation: new ValueTracker(\"Vertical\"),\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n whiskersRange: new ValueTracker(1.5),\n};\n\nexport const boxDesign: BoxDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n color: new ValueTracker(styles.seabornDefault),\n fill: new ValueTracker(true),\n palette: new ValueTracker(\"Accent\"),\n marker: new ValueTracker(\"Point\"),\n width: new ValueTracker(0.8),\n saturation: new ValueTracker(0.75),\n lineWidth: new ValueTracker(0),\n markerSize: new ValueTracker(5),\n dodge: new ValueTracker(false),\n colorOrder: \"\",\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n isCollapsed: true,\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n alpha: new ValueTracker(1),\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface CountSetup extends BaseSetup {\n // TODO: specifics\n}\n\nexport interface CountDesign extends BaseDesign {\n // TODO: specifics\n marker: string; // This should show the options for the marker \"some1\" | \"some2\"\n width: ValueTracker;\n saturation: ValueTracker;\n colorOrder: string;\n dodge: ValueTracker;\n yticks: ValueTracker;\n xticks: ValueTracker;\n legendPosition: string;\n isCollapsed: boolean;\n alpha: ValueTracker;\n}\n\nexport const countSetup: CountSetup = {\n orientation: new ValueTracker(\"Vertical\"),\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n};\n\nexport const countDesign: CountDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n fill: new ValueTracker(true),\n color: new ValueTracker(styles.seabornDefault),\n palette: new ValueTracker(\"Accent\"),\n marker: \"\",\n width: new ValueTracker(0.8),\n saturation: new ValueTracker(0.75),\n colorOrder: \"\",\n dodge: new ValueTracker(false),\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n legendPosition: \"\",\n isCollapsed: true,\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n alpha: new ValueTracker(1),\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\n\nexport interface LineSetup extends BaseSetup {\n styleMarkersBy?: string;\n styleLinesBy?: string;\n sizeByLines?: string;\n primaryInterval: number;\n secondInterval: number;\n bootstrapSamples: ValueTracker;\n seed: ValueTracker;\n sort: ValueTracker;\n estimator?: string;\n errorBar?: string;\n isCollapsed: boolean;\n}\n\nexport interface LineDesign extends BaseDesign {\n // TODO: specifics\n marker: string;\n lineStyle: ValueTracker;\n errorStyle: string;\n lineWidth: ValueTracker;\n errorBarColor: ValueTracker;\n errorBarWidth: ValueTracker;\n errorBarCapWidth: ValueTracker;\n isDesignCollapsed: boolean;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n}\n\nexport const lineSetup: LineSetup = {\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n xAxisScale: \"\",\n yAxisScale: \"\",\n estimator: \"Mean\",\n errorBar: \"No error bars\",\n primaryInterval: 95,\n secondInterval: 1,\n bootstrapSamples: new ValueTracker(1000),\n seed: new ValueTracker(0),\n sort: new ValueTracker(true),\n isCollapsed: true,\n styleMarkersBy: \"\",\n styleLinesBy: \"\",\n sizeByLines: \"\",\n};\n\nexport const lineDesign: LineDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n fillStyle: \"\",\n marker: \"None\",\n palette: new ValueTracker(\"Tab10\"),\n errorStyle: \"\",\n lineStyle: new ValueTracker(\"Solid\"),\n lineWidth: new ValueTracker(3),\n errorBarColor: new ValueTracker(\"#000000\"),\n errorBarWidth: new ValueTracker(2),\n errorBarCapWidth: new ValueTracker(0.5),\n isDesignCollapsed: true,\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface RegressionSetup extends BaseSetup {\n // TODO: specifics\n interval: ValueTracker;\n bootstrapSamples: ValueTracker;\n seed: ValueTracker;\n newXAxisScale: ValueTracker;\n newYAxisScale: ValueTracker;\n xPartial: string;\n yPartial: string;\n xJitter: ValueTracker;\n yJitter: ValueTracker;\n function: ValueTracker;\n order: ValueTracker;\n truncate: ValueTracker;\n estimator: string;\n errorBar: ValueTracker;\n isCollapsed: boolean;\n}\n\nexport interface RegressionDesign extends BaseDesign {\n // TODO: specifics\n lineWidth: ValueTracker;\n lineStyle: ValueTracker;\n lineLabel: string;\n legendPosition: string;\n marker: ValueTracker;\n stroke: ValueTracker;\n gap: ValueTracker;\n errorBarColor: ValueTracker;\n errorBarWidth: ValueTracker;\n errorBarCapWidth: ValueTracker;\n isDesignCollapsed: boolean;\n yticks: ValueTracker;\n xticks: ValueTracker;\n}\n\nexport const regplotSetup: RegressionSetup = {\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n newXAxisScale: new ValueTracker(\"Linear\"),\n newYAxisScale: new ValueTracker(\"Linear\"),\n xAxisScale: \"\",\n yAxisScale: \"\",\n estimator: \"Mean\",\n errorBar: new ValueTracker(\"No error bars\"),\n interval: new ValueTracker(95),\n bootstrapSamples: new ValueTracker(1000),\n seed: new ValueTracker(0),\n xPartial: \"\",\n yPartial: \"\",\n xJitter: new ValueTracker(0),\n yJitter: new ValueTracker(0),\n function: new ValueTracker(\"Linear\"),\n order: new ValueTracker(2),\n truncate: new ValueTracker(true),\n isCollapsed: true,\n};\n\nexport const regplotDesign: RegressionDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n color: new ValueTracker(styles.seabornDefault),\n marker: new ValueTracker(\"Circle\"),\n stroke: new ValueTracker(5),\n gap: new ValueTracker(0),\n // In the original figma, cannot find documentation for these\n lineStyle: new ValueTracker(\"Solid\"),\n lineWidth: new ValueTracker(3),\n lineLabel: \"\",\n legendPosition: \"\",\n errorBarColor: new ValueTracker(\"black\"),\n errorBarWidth: new ValueTracker(2),\n errorBarCapWidth: new ValueTracker(0.5),\n isDesignCollapsed: true,\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\n\nexport interface ScatterSetup extends BaseSetup {\n // TODO: specifics\n sizeBy: string;\n styleBy: string;\n newXAxisScale: ValueTracker;\n newYAxisScale: ValueTracker;\n isCollapsed: boolean;\n}\n\nexport interface ScatterDesign extends BaseDesign {\n // TODO: specifics\n marker: ValueTracker;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n isCollapsed: boolean;\n}\n\nexport const scatterSetup: ScatterSetup = {\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n sizeBy: \"\",\n styleBy: \"\",\n newXAxisScale: new ValueTracker(\"Linear\"),\n newYAxisScale: new ValueTracker(\"Linear\"),\n isCollapsed: true,\n};\n\nexport const scatterDesign: ScatterDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n marker: new ValueTracker(\"Point\"),\n palette: new ValueTracker(\"Tab10\"),\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n isCollapsed: true,\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface ViolinSetup extends BaseSetup {\n // TODO: specifics\n bandwidth: ValueTracker;\n custom: ValueTracker;\n cut: ValueTracker;\n gridSize: ValueTracker;\n densityNorm: ValueTracker;\n isCollapsed: boolean;\n}\n\nexport interface ViolinDesign extends BaseDesign {\n // TODO: specifics\n width: ValueTracker;\n saturation: ValueTracker;\n lineWidth: ValueTracker;\n split: ValueTracker;\n dodge: ValueTracker;\n violinInner: ValueTracker;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n isCollapsed: boolean;\n alpha: ValueTracker;\n}\n\nexport const violinSetup: ViolinSetup = {\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n colorBy: \"\",\n orientation: new ValueTracker(\"Vertical\"),\n bandwidth: new ValueTracker(\"Scott\"),\n custom: new ValueTracker(0.1),\n cut: new ValueTracker(2),\n gridSize: new ValueTracker(100),\n densityNorm: new ValueTracker(\"Area\"),\n isCollapsed: true,\n // if color by scale color should be true\n};\n\nexport const violinDesign: ViolinDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n fill: new ValueTracker(true),\n color: new ValueTracker(styles.seabornDefault),\n palette: new ValueTracker(\"Tab10\"),\n saturation: new ValueTracker(0.75),\n lineWidth: new ValueTracker(0),\n width: new ValueTracker(0.8),\n split: new ValueTracker(false),\n dodge: new ValueTracker(false),\n // true by default unless color by is selected otherwise set to false\n violinInner: new ValueTracker(\"Box\"),\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n isCollapsed: true,\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n alpha: new ValueTracker(1),\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\n\nexport interface PairSetup extends BaseSetup {\n kind: ValueTracker;\n diagKind: ValueTracker;\n xVars: string[];\n yVars: string[];\n vars: string[];\n isCollapsed: boolean;\n}\n\nexport interface PairDesign extends BaseDesign {\n // TODO: specifics\n palette: ValueTracker;\n // Can be single or mulitple\n markers: string[];\n markerSize: ValueTracker;\n lineStyle: ValueTracker;\n lineWidth: ValueTracker;\n height: ValueTracker;\n aspect: ValueTracker;\n bin: ValueTracker;\n element: ValueTracker;\n stat: string;\n isCollapsed: boolean;\n legendPosition: string;\n}\n\nexport const pairwiseSetup: PairSetup = {\n headers: [],\n xVars: [],\n yVars: [],\n vars: [],\n dropna: new ValueTracker(false),\n colorBy: \"\",\n kind: new ValueTracker(\"Scatter\"),\n diagKind: new ValueTracker(\"Auto\"),\n isCollapsed: true,\n};\n\nexport const pairwiseDesign: PairDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n palette: new ValueTracker(\"Accent\"),\n markers: [],\n // I don't think matplotlib sets a default marker size\n markerSize: new ValueTracker(6),\n lineStyle: new ValueTracker(\"Solid\"),\n lineWidth: new ValueTracker(3),\n height: new ValueTracker(2.5),\n aspect: new ValueTracker(1),\n bin: new ValueTracker(10),\n element: new ValueTracker(\"Bars\"),\n stat: \"\",\n isCollapsed: true,\n legendPosition: \"\",\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n};\n","import { BaseDesign, BaseSetup } from \"./PlotTypes\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface DisplotSetup extends BaseSetup {\n // TODO: specifics\n kind: ValueTracker;\n row: string;\n col: string;\n isCollapsed: boolean;\n}\n\nexport interface DisplotDesign extends BaseDesign {\n // TODO: specifics\n height: ValueTracker;\n aspect: ValueTracker;\n colWrap: ValueTracker;\n isCollapsed: boolean;\n legendPosition: string;\n yticks: ValueTracker;\n xticks: ValueTracker;\n}\n\nexport const displotSetup: DisplotSetup = {\n headers: [],\n xAxis: \"\",\n yAxis: \"\",\n kind: new ValueTracker(\"Histogram\"),\n colorBy: \"\",\n row: \"\",\n col: \"\",\n // Items for facetGrid start\n shareX: new ValueTracker(true),\n shareY: new ValueTracker(true),\n dropna: new ValueTracker(true),\n // end\n isCollapsed: true,\n};\n\nexport const displotDesign: DisplotDesign = {\n plotTitle: \"\",\n xAxisLabel: \"\",\n yAxisLabel: \"\",\n height: new ValueTracker(5),\n aspect: new ValueTracker(1),\n color: new ValueTracker(styles.seabornDefault),\n palette: new ValueTracker(\"Tab10\"),\n colWrap: new ValueTracker(0),\n // Items for facetGrid start\n xlim: new ValueTracker(0),\n ylim: new ValueTracker(0),\n facetPalette: new ValueTracker(\"Tab10\"),\n // end\n isCollapsed: true,\n legendPosition: \"\",\n yticks: new ValueTracker(0),\n xticks: new ValueTracker(0),\n majorHorizontal: new ValueTracker(false),\n majorVertical: new ValueTracker(false),\n minorHorizontal: new ValueTracker(false),\n minorVertical: new ValueTracker(false),\n leftSpine: true,\n bottomSpine: true,\n topSpine: false,\n rightSpine: false,\n borderCollapsed: true,\n gridlinesCollapsed: true,\n};\n","import React, { useReducer, useState, ReactNode, useContext, createContext } from \"react\";\nimport {\n BaseDesign,\n BaseSetup,\n BaseCommon,\n BasePlotContext,\n BaseChart,\n BaseChartManagerContext,\n VizTabType,\n} from \"./PlotTypes\";\nimport { PlotType } from \"../../../data/plot-types\";\nimport { CodeBuilder } from \"../../pages/Visualization/MVCShared/CodeBuilder\";\nimport { ValueTracker } from \"../../pages/Visualization/MVCShared/types\";\nimport { barSetup, barDesign } from \"./useBar\";\nimport { boxDesign, boxSetup } from \"./useBox\";\nimport { countDesign, countSetup } from \"./useCount\";\nimport { lineDesign, lineSetup } from \"./useLine\";\nimport { regplotDesign, regplotSetup } from \"./useRegression\";\nimport { scatterDesign, scatterSetup } from \"./useScatter\";\nimport { violinDesign, violinSetup } from \"./useViolin\";\nimport { pairwiseDesign, pairwiseSetup } from \"./usePair\";\nimport { displotDesign, displotSetup } from \"./useDisplot\";\nimport PlotService, { VizDef } from \"../../../data/plot-api\";\n\nconst DEBUG = false;\n\ninterface ChartContextType {\n state: ChartState extends T ? T : never;\n dispatch: React.Dispatch;\n plotType: PlotType;\n tab: VizTabType;\n defModified: boolean;\n setPlotType: (plotType: PlotType) => void;\n setTab: (tab: VizTabType) => void;\n setDefModified: (state: boolean) => void;\n}\n\ninterface Action {\n type: \"updateSetup\" | \"updateDesign\" | \"updateCommon\" | \"updateCommonWithReset\" | \"resetContext\" | \"setCodeFragments\";\n chartType: PlotType;\n updates?: Partial;\n resetValue?: string;\n}\n\ninterface ChartState extends BaseChart {}\n\ntype InitialChartState = {\n [key in PlotType]: ChartState;\n};\n\nconst initialChart: InitialChartState = {\n [PlotType.bar]: {\n setup: barSetup,\n design: barDesign,\n common: { plotType: PlotType.bar, hasHeaders: true },\n },\n [PlotType.box]: {\n setup: boxSetup,\n design: boxDesign,\n common: { plotType: PlotType.box, hasHeaders: true },\n },\n [PlotType.count]: {\n setup: countSetup,\n design: countDesign,\n common: { plotType: PlotType.count, hasHeaders: true },\n },\n [PlotType.line]: {\n setup: lineSetup,\n design: lineDesign,\n common: { plotType: PlotType.line, hasHeaders: true },\n },\n [PlotType.regression]: {\n setup: regplotSetup,\n design: regplotDesign,\n common: { plotType: PlotType.regression, hasHeaders: true },\n },\n [PlotType.scatter]: {\n setup: scatterSetup,\n design: scatterDesign,\n common: { plotType: PlotType.scatter, hasHeaders: true },\n },\n [PlotType.violin]: {\n setup: violinSetup,\n design: violinDesign,\n common: { plotType: PlotType.violin, hasHeaders: true },\n },\n [PlotType.pairwise]: {\n setup: pairwiseSetup,\n design: pairwiseDesign,\n common: { plotType: PlotType.pairwise, hasHeaders: true },\n },\n [PlotType.distribution]: {\n setup: displotSetup,\n design: displotDesign,\n common: { plotType: PlotType.distribution, hasHeaders: true },\n },\n};\n\nfunction handleDeselectionInUpdates(updates: Record, initial: Record, resetValue: string) {\n Object.keys(updates).forEach((key: string) => {\n if (updates[key] === resetValue) {\n if (initial[key] instanceof ValueTracker) {\n updates[key] = initial[key].reset();\n } else {\n updates[key] = initial[key];\n }\n }\n });\n}\n\nfunction rebuildFromUpdates(base: T, updates: Record): T {\n return {\n ...base,\n ...Object.fromEntries(\n Object.keys(updates).map((k) => {\n let v = updates[k];\n // Check for incorrect passing of existing base structure into rebuildFromUpdates.\n // Doing so will include ValueTracker objects as update values, which should never happen.\n // All updates `v` should be normal values.\n if (v instanceof ValueTracker) throw Error(`Attempting to update ${k} with ValueTracker`);\n // If `k` is already a ValueTracker within `base`, update it with the new `v`\n if (base[k] instanceof ValueTracker) {\n v = base[k].update(v);\n }\n return [k, v];\n })\n ),\n };\n}\n\nfunction chartReducer(chartObj: InitialChartState, action: Action) {\n const { resetValue, updates, chartType } = action;\n let state = chartType ? chartObj[chartType] : {};\n switch (action.type) {\n case \"updateSetup\":\n if (resetValue !== null) handleDeselectionInUpdates(updates, initialChart[chartType].setup, resetValue);\n return {\n ...chartObj,\n [chartType]: {\n ...state,\n setup: rebuildFromUpdates(state[\"setup\"], updates),\n },\n };\n case \"updateDesign\":\n if (resetValue !== null) handleDeselectionInUpdates(updates, initialChart[chartType].design, resetValue);\n return {\n ...chartObj,\n [chartType]: {\n ...state,\n design: rebuildFromUpdates(state[\"design\"], updates),\n },\n };\n case \"updateCommon\":\n return {\n ...chartObj,\n [chartType]: {\n ...state,\n common: rebuildFromUpdates(state[\"common\"], updates),\n },\n };\n case \"updateCommonWithReset\":\n return {\n ...chartObj,\n [chartType]: {\n setup: { ...initialChart[chartType].setup },\n design: { ...initialChart[chartType].design },\n common: rebuildFromUpdates(state[\"common\"], updates),\n },\n };\n case \"resetContext\":\n return Object.keys(initialChart).reduce((acc, key) => {\n acc[key as PlotType] = {\n setup: initialChart[key].setup,\n design: initialChart[key].design,\n common: { plotType: key as PlotType, hasHeaders: true },\n };\n return acc;\n }, {} as InitialChartState);\n case \"setCodeFragments\":\n return {\n ...chartObj,\n [chartType]: {\n ...state,\n codeFragments: updates,\n },\n };\n\n default:\n return chartObj;\n }\n}\n\nconst ChartContext = createContext>({} as ChartContextType);\n\nconst useChartContext = () => {\n const context = useContext(ChartContext);\n return context;\n};\n\ninterface ChartProviderProps {\n children: ReactNode;\n}\n\nexport function useChart(chartType: PlotType): BasePlotContext {\n const { state, dispatch, setDefModified } = useChartContext();\n const stateObject = state[chartType] || {};\n\n function updateSetup(updates: BaseSetup, resetValue: string = null) {\n dispatch({ type: \"updateSetup\", chartType, updates, resetValue });\n if (updates && Object.keys(updates).length === 1 && updates.headers !== undefined) {\n // Updating headers doesn't count as a modification\n } else {\n setDefModified(true);\n }\n if (DEBUG) console.log(`updateSetup with updates=${JSON.stringify(updates)}`);\n }\n function updateDesign(updates: BaseDesign, resetValue: string = null) {\n dispatch({ type: \"updateDesign\", chartType, updates, resetValue });\n setDefModified(true);\n if (DEBUG) console.log(`updateDesign with updates=${JSON.stringify(updates)}`);\n }\n function updateCommon(updates: BaseCommon) {\n // Updating the input data forces a full reset of setup and design\n dispatch({ type: updates.inputData ? \"updateCommonWithReset\" : \"updateCommon\", chartType, updates });\n setDefModified(true);\n if (DEBUG) console.log(`updateCommon with updates=${JSON.stringify(updates)}`);\n }\n function setCodeFragments(cb: CodeBuilder) {\n dispatch({ type: \"setCodeFragments\", chartType, updates: cb });\n }\n async function serializeContext() {\n await PlotService.saveVizDef(stateObject);\n }\n\n return {\n setup: stateObject[\"setup\"],\n design: stateObject[\"design\"],\n common: stateObject[\"common\"],\n codeFragments: stateObject[\"codeFragments\"],\n updateSetup,\n updateDesign,\n updateCommon,\n setCodeFragments,\n serializeContext,\n };\n}\n\nexport function useChartManager(): BaseChartManagerContext {\n const { dispatch, plotType, tab, defModified, setPlotType, setTab, setDefModified } = useChartContext();\n\n function hydrateContext(vizDef: VizDef, formula: string) {\n const chartType = vizDef.common.plotType;\n dispatch({ type: \"resetContext\", chartType });\n\n if (formula !== vizDef.writtenFormula) {\n // If grid formula has been modified, treat it like typedCode\n vizDef.common.typedCode = formula;\n }\n\n dispatch({ type: \"updateSetup\", chartType, updates: vizDef.setup, resetValue: null });\n dispatch({ type: \"updateDesign\", chartType, updates: vizDef.design, resetValue: null });\n dispatch({ type: \"updateCommon\", chartType, updates: vizDef.common, resetValue: null });\n setDefModified(false);\n if (DEBUG) console.log(`hydrateContext ${JSON.stringify(vizDef)}`);\n }\n function resetContext() {\n dispatch({ type: \"resetContext\" });\n setDefModified(false);\n if (DEBUG) console.log(`resetContext`);\n }\n return {\n plotType,\n tab,\n defModified,\n setPlotType,\n setTab,\n setDefModified,\n resetContext,\n hydrateContext,\n };\n}\n\nconst ChartProvider = ({ children }: ChartProviderProps) => {\n const [state, dispatch] = useReducer(chartReducer, initialChart);\n const [plotType, setPlotType] = useState();\n const [tab, setTab] = useState();\n const [defModified, setDefModified] = useState(false);\n return (\n \n {children}\n \n );\n};\n\nexport default ChartProvider;\n","import { queryClient } from \"../../taskpane\";\nimport { BASE_URL } from \"../../auth/auth-api\";\nimport { authenticatedFetch } from \"../../auth/fetch\";\nimport {\n AccessLevels,\n Project,\n ProjectFilesResponse,\n ProjectPermissionAction,\n ProjectPermissionResponse,\n ProjectsResponse,\n SupportedTags,\n} from \"./models\";\n\nconst PROJECTS_URL = `${BASE_URL}/api/cloud/projects`;\nconst API_VERSION_HEADER = { \"Api-Version\": \"2023.11.28\" };\n\n// NOTE: Use react-query client in favor of ProjectsService at:\n// apps/xltb/toolbox/src/queryclient/projects/projects.ts\n\n// TODO/NOTE: Query client cache is invalidated here; Migrate functions to react-query\nexport class FileTooLargeError extends Error {}\n\nexport default class ProjectsService {\n /**\n * Create Project\n * @param project Project object OR Project name with default values\n * @returns Promise\n */\n static async createProject(tag: SupportedTags, project: Project | string): Promise {\n let projectWithMetadata;\n if (typeof project === \"string\") {\n projectWithMetadata = {\n title: project, // \"name\" will be auto-generated. Title has fewer naming restrictions.\n metadata: {\n tags: [tag],\n user_client: \"excel\",\n hidden: false,\n },\n };\n } else {\n projectWithMetadata = {\n ...project,\n metadata: {\n tags: [tag],\n user_client: \"excel\",\n hidden: false,\n },\n };\n }\n\n // TODO: what happens if project exists, but lacks specified tag?\n const res = await authenticatedFetch(PROJECTS_URL, {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n body: JSON.stringify(projectWithMetadata),\n });\n\n await queryClient.invalidateQueries({ queryKey: [\"projects\"] });\n return res;\n }\n\n // Get project by ID\n static async getProjectById(projectId: string): Promise {\n return await authenticatedFetch(`${PROJECTS_URL}/${projectId}`, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n }\n\n // Get list of projects and files per project;\n // TODO: Sort alphabetically\n // TODO: Handle pagination\n static async getMyProjects(tag?: SupportedTags): Promise {\n // Use &owner=me to only retrieve projects owned by yourself\n let url = `${PROJECTS_URL}?owner=me`;\n if (tag) {\n url = `${url}&tag=${tag}`;\n }\n const res = await authenticatedFetch(url, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n return res.json();\n }\n\n // Get project files by project ID\n static async getProjectFiles(projectId: string): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/files`, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n return res.json();\n }\n\n // Retrieve all metadata about an individual file in a project\n static async getFileMetadata(projectId: string, fileName: string): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/file-versions/file/${fileName}?latest=True`, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n return res.json();\n }\n\n /**\n * \n * @param projectId \n * @param body \n * Supported metadata changes:\n name\n title\n description\n metadata\n tags\n * @returns Promise\n */\n static async updateProjectMetadata(projectId: string, body: object): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}`, {\n method: \"PATCH\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n body: JSON.stringify(body),\n });\n\n await queryClient.invalidateQueries({ queryKey: [\"projects\"], refetchType: \"all\", exact: true });\n await queryClient.invalidateQueries({ queryKey: [`files-${projectId}`], refetchType: \"all\", exact: true });\n\n return res.json();\n }\n\n // Returns lastModified timestamp\n static async uploadFile(\n projectId: string,\n fileName: string,\n data: string,\n fileOptions: object = null\n ): Promise {\n // Make sure upload isn't too big\n const blob = new Blob([data]);\n const DATA_LIMIT_IN_BYTES = 26214400;\n\n if (blob.size > DATA_LIMIT_IN_BYTES) {\n console.log(\"File is too big\");\n throw new FileTooLargeError();\n }\n try {\n // Step 1: get redirect URL\n const redirectResponse = await authenticatedFetch(\n `${PROJECTS_URL}/${projectId}/file-preload/${encodeURIComponent(fileName)}`,\n {\n method: \"PUT\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n body: fileOptions ? JSON.stringify(fileOptions) : \"{}\",\n }\n );\n const redirectResult = await redirectResponse.json();\n\n // Step 2: upload content\n const uploadResponse = await fetch(redirectResult.signed_url, {\n method: \"PUT\",\n headers: { \"Content-Length\": blob.size.toString() },\n body: blob,\n });\n\n if (uploadResponse.status >= 300) return null;\n\n // Step 3: Commit file upload\n await authenticatedFetch(`${PROJECTS_URL}/${projectId}/file-versions/${redirectResult.file_version_id}`, {\n method: \"PATCH\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n\n await queryClient.invalidateQueries({ queryKey: [`files-${projectId}`], refetchType: \"all\", exact: true });\n\n return redirectResult.last_modified;\n } catch (e) {\n console.error(e);\n }\n }\n\n // Upload CSV file to project by ID\n static async uploadCSV(projectId: string, fileName: string, csvString: string): Promise {\n return await this.uploadFile(projectId, fileName, csvString);\n }\n\n // Upload code snippet\n static async uploadSnippet(projectId: string, fileName: string, code: string, language: string): Promise {\n return await this.uploadFile(projectId, fileName, code, { metadata: { code_snippet: { language } } });\n }\n\n /**\n * Download project file by file name in project ID\n * @param0 projectId\n * @param1 fileName\n * @returns Promise; Use .text() to get the CSV file contents\n */\n static async downloadFileByName(projectId: string, fileName: string): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/files/${fileName}`, {\n method: \"GET\",\n headers: API_VERSION_HEADER,\n });\n await queryClient.invalidateQueries({ queryKey: [`files-${projectId}`], refetchType: \"all\", exact: true });\n return res;\n }\n\n // Delete project by ID\n static async deleteProjectById(projectId: string): Promise {\n return await authenticatedFetch(`${PROJECTS_URL}/${projectId}`, {\n method: \"DELETE\",\n headers: API_VERSION_HEADER,\n });\n }\n\n // Delete file by name\n static async deleteFileByName(projectId: string, fileName: string): Promise {\n // console.log(queryClient.getQueryCache().find({ queryKey: [`files-${projectId}`] }));\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/files/${fileName}`, {\n method: \"DELETE\",\n headers: API_VERSION_HEADER,\n });\n await queryClient.invalidateQueries({ queryKey: [`files-${projectId}`], refetchType: \"all\", exact: true });\n return res;\n }\n\n // Get permissions to read or write data in projects, which can be granted to individual users or organizations\n static async getProjectPermissions(projectId: string): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/permissions`, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n return res.json();\n }\n\n // Get user permissions for a projects\n static async getMyProjectAccessLevels(projectId: string): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/permissions/my`, {\n method: \"GET\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n });\n return res.json();\n }\n\n /**\n * Modify/grant permissions by supplying a list of actions to add or remove entries from the permissions output.\n * Note that only an owner can modify permissions.\n */\n static async modifyProjectPermissions(\n projectId: string,\n permissions: ProjectPermissionAction[]\n ): Promise {\n const res = await authenticatedFetch(`${PROJECTS_URL}/${projectId}/permissions`, {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n body: JSON.stringify({ permissions }),\n });\n return res.json();\n }\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./CatalogCard.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./CatalogCard.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState } from \"react\";\nimport { NavigateOptions, useNavigate } from \"react-router-dom\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogBody,\n DialogContent,\n DialogSurface,\n DialogTitle,\n DialogTrigger,\n Spinner,\n} from \"@fluentui/react-components\";\nimport \"../CatalogCard.scss\";\nimport \"../Notification.scss\";\n\nexport const ConfirmationDialog = ({\n navTo,\n navigationOptions,\n deleteCallback,\n open,\n setOpen,\n}: {\n open: boolean;\n setOpen: (open: boolean) => void;\n navTo?: string;\n navigationOptions?: NavigateOptions;\n deleteCallback: () => void | Promise;\n}) => {\n const navigate = useNavigate();\n const options: NavigateOptions = {\n state: {\n ...navigationOptions,\n },\n };\n\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState(\"\");\n async function confirmCallback() {\n setIsLoading(true);\n try {\n await deleteCallback();\n setIsLoading(false);\n setError(\"\");\n } catch (e) {\n // TODO: Decide how to handle this\n console.log(e);\n setIsLoading(false);\n setError(\"An error occurred when deleting your project. Please try again.\");\n }\n navTo ?? navigate(navTo, options);\n }\n\n return (\n setOpen(data.open)}>\n {/* \n \n \n \n \n \n \n {error &&

{error}

}\n \n
\n );\n};\n","import React, { CSSProperties, useRef, useState } from \"react\";\nimport {\n Popover,\n PopoverSurface,\n PopoverTrigger,\n Button,\n Spinner,\n OpenPopoverEvents,\n OnOpenChangeData,\n Tooltip,\n ButtonProps,\n} from \"@fluentui/react-components\";\nimport { MoreVertical20Filled } from \"@fluentui/react-icons\";\nimport ProjectsService from \"../../data/projects/projects-api\";\nimport { ConfirmationDialog } from \"./Dialogs/ConfirmationDialog\";\nimport styles from \"../styles.module.scss\";\n\ntype MenuAction = {\n actionName: string;\n onClickAction: (actionName: string) => void | Promise;\n icon?: ButtonProps[\"icon\"];\n};\n\nexport const PopoverMenuButton = ({\n id,\n actions,\n buttonStyle,\n kind,\n}: {\n id: string;\n actions: MenuAction[];\n buttonStyle?: CSSProperties;\n kind: \"folder\" | \"file\" | \"definition\";\n}) => {\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n const [openConfirmation, setOpenConfirmation] = useState(false);\n\n const [isLoading, setIsLoading] = useState(false);\n const actionRef = useRef<{ onClickAction: () => void }>({ onClickAction: null });\n\n const [disabled, setDisabled] = useState(false);\n\n async function checkHasAccess() {\n // Workbook definitions operate on local workbook data\n if (kind === \"definition\") return true;\n\n const access = await ProjectsService.getMyProjectAccessLevels(id);\n try {\n if (kind === \"folder\") {\n return access?.share && access?.delete;\n } else if (kind === \"file\") {\n return access?.modify;\n }\n } catch (e) {\n console.log(e);\n setDisabled(true);\n return false;\n }\n }\n\n async function handleActionClick(action: MenuAction) {\n const { actionName, onClickAction } = action;\n setIsLoading(true);\n\n // Show confirmation modal when we have critical actions\n if (actionName.includes(\"Delete\")) {\n setOpenConfirmation(true);\n actionRef.current.onClickAction = async () => {\n await onClickAction(actionName);\n setOpenConfirmation(false);\n };\n } else {\n await onClickAction(actionName);\n }\n setIsLoading(false);\n setIsPopoverOpen(false);\n }\n\n async function onOpenChange(e: OpenPopoverEvents, data: OnOpenChangeData) {\n if (data.open) {\n const hasAccess = await checkHasAccess();\n if (!hasAccess) {\n setDisabled(true);\n }\n }\n setIsPopoverOpen(data.open);\n }\n\n return (\n <>\n onOpenChange(e, data)}\n >\n \n {disabled ? (\n \n }\n data-testid=\"vertical-export-menu\"\n iconPosition=\"before\"\n disabled={disabled}\n />\n \n ) : (\n }\n data-testid=\"vertical-export-menu\"\n iconPosition=\"before\"\n />\n )}\n \n \n {actions.map((action) => (\n handleActionClick(action)}\n iconPosition=\"before\"\n icon={action.icon}\n >\n {isLoading ? : action.actionName}\n \n ))}\n \n \n await actionRef.current?.onClickAction()}\n />\n \n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n Button,\n Field,\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableHeaderCell,\n TableRow,\n Text,\n} from \"@fluentui/react-components\";\nimport { Add16Filled, ArrowMoveRegular, CopyRegular, DeleteRegular } from \"@fluentui/react-icons\";\nimport { Row } from \"../../components/Layout/Space\";\nimport PlotService, { VizDef, VizDefIdentifier } from \"../../../data/plot-api\";\nimport { plotsLookup } from \"../../../data/plot-types\";\nimport { useChartManager } from \"../../hooks/plots/useCentralViz\";\nimport { PopoverMenuButton } from \"../../components/PopoverMenuButton\";\nimport { runExcelSafeContext } from \"xlcommon/src/excel/excel-grid-utils\";\nimport styles from \"../../styles.module.scss\";\n\nconst COLUMNS = [\n { columnKey: \"plotType\", label: \"Chart Type\", width: 105 },\n { columnKey: \"sheetName\", label: \"Sheet\", width: null },\n { columnKey: \"addr\", label: \"Cell\", width: 45 },\n { columnKey: \"actions\", label: \"\", width: 30 },\n // { columnKey: \"lastModified\", label: \"Last Modified\" },\n];\n\nexport type ChartTableRow = VizDefIdentifier;\n\nfunction Visualizations() {\n const navigate = useNavigate();\n\n const { plotType, tab, setPlotType, setTab, hydrateContext } = useChartManager();\n\n useEffect(() => {\n if (plotType && tab) {\n navigate(\"/viz/edit\");\n }\n }, [plotType, tab]);\n\n async function hydrateSetup(item: VizDefIdentifier) {\n const def: VizDef = await PlotService.getVizDef(item.bindId);\n hydrateContext(def, item.formula);\n setPlotType(item.plotType);\n setTab(def.common.typedCode ? \"code\" : \"setup\");\n }\n\n async function hydrateSetupNoOutput(item: VizDefIdentifier) {\n const def: VizDef = await PlotService.getVizDef(item.bindId);\n def.common.outputCell = {};\n hydrateContext(def, item.formula);\n setPlotType(item.plotType);\n setTab(def.common.typedCode ? \"code\" : \"setup\");\n }\n\n const [vizDefinitions, setVizDefinitions] = useState([]);\n async function loadVizDefinitions() {\n const defs: VizDefIdentifier[] = await PlotService.listVizDefs();\n // PlotService.listVizDefs returns a new object reference every time\n setVizDefinitions(defs);\n }\n\n useEffect(() => {\n (async () => {\n await loadVizDefinitions();\n })();\n }, []);\n\n const [error, setError] = useState(\"\");\n\n async function movePromptCallback(result: Office.AsyncResult) {\n if (result.value === undefined) return;\n\n const item: VizDefIdentifier = result.asyncContext;\n\n await runExcelSafeContext(async (context) => {\n const currSheet = context.workbook.worksheets.getItem(item.sheetName);\n const currRange = currSheet.getRange(item.addr);\n const binding = context.workbook.bindings.getItem(result.value.id);\n const newRange = binding.getRange();\n currRange.moveTo(newRange);\n binding.delete(); // no need to keep the binding from the prompt\n await context.sync();\n });\n // Refresh vizdef table\n await loadVizDefinitions();\n }\n\n async function moveItem(item: VizDefIdentifier) {\n const options = { asyncContext: item, promptText: \"Select new location for chart\" };\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, movePromptCallback);\n }\n\n async function deleteItem(item: VizDefIdentifier) {\n try {\n await PlotService.deleteVizDef(item.bindId);\n await loadVizDefinitions();\n } catch (e) {\n console.error(e);\n setError(\"An error occurred when deleting your visualization. Please try again.\");\n }\n }\n\n function getCellContent(item: VizDefIdentifier, key: string) {\n const text = item[key];\n if (key === \"plotType\") {\n return (\n <>\n \n {plotsLookup[text].name}\n \n );\n } else {\n return text;\n }\n }\n\n return (\n <>\n {!plotType && (\n
\n \n }\n iconPosition=\"before\"\n onClick={() => navigate(\"/viz/create\")}\n data-testid=\"new-chart\"\n >\n New Chart\n \n \n
\n \n \n \n \n {COLUMNS.map((column) => {\n return (\n \n {column.label}\n \n );\n })}\n \n \n \n {vizDefinitions?.length === 0 ? (\n \n No results\n {new Array(COLUMNS.length - 1).fill(0).map((value, index) => (\n \n ))}\n \n ) : (\n vizDefinitions.map((item) => (\n \n {COLUMNS.map((column) => {\n if (column.columnKey !== \"actions\" && item[column.columnKey]) {\n return (\n hydrateSetup(item)}\n >\n {getCellContent(item, column.columnKey)}\n \n );\n }\n })}\n \n await hydrateSetupNoOutput(item),\n icon: ,\n },\n {\n actionName: \"Move\",\n onClickAction: async () => await moveItem(item),\n icon: ,\n },\n {\n actionName: \"Delete\",\n onClickAction: async () => await deleteItem(item),\n icon: ,\n },\n ]}\n />\n \n \n ))\n )}\n \n
\n
\n
\n )}\n \n );\n}\n\nexport default Visualizations;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Viz.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Viz.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState } from \"react\";\nimport { IconButton } from \"@fluentui/react/lib/Button\";\nimport {\n TooltipHost,\n TooltipDelay,\n DirectionalHint,\n ITooltipHostStyles,\n FocusTrapZone,\n Layer,\n Overlay,\n Popup,\n} from \"@fluentui/react\";\nimport { Dialog, DialogSurface, DialogTitle, DialogBody, DialogContent } from \"@fluentui/react-components\";\nimport { useId } from \"@fluentui/react-hooks\";\nimport \"./Viz.scss\";\n\nconst hostStyles: Partial = { root: { display: \"inline-block\" } };\n\ninterface ToolTipProps {\n info: string;\n img: string;\n title: string;\n description?: string;\n}\n\nconst TooltipContent: React.FunctionComponent<{ info: string }> = ({ info }) =>

{info}

;\n\nexport const InfoToolTip: React.FC = ({ info, img, title, description }) => {\n const tooltipId = useId(\"tooltip\");\n const [isDialogVisible, setIsDialogVisible] = useState(false);\n\n return (\n <>\n ,\n }}\n >\n setIsDialogVisible(true)}\n />\n \n {isDialogVisible && (\n \n setIsDialogVisible(false)} />\n \n setIsDialogVisible(false)} aria-label=\"closeButton\">\n setIsDialogVisible(false)}>\n \n \n {title}\n {description}\n \n {`Plot\n \n \n \n \n \n )}\n \n );\n};\n","import React from \"react\";\nimport { Card, CardHeader, CardPreview } from \"@fluentui/react-components\";\nimport { Text } from \"@fluentui/react-components\";\nimport { InfoToolTip } from \"./VizTooltip\";\nimport \"./Viz.scss\";\n\nexport const PlotCard = ({\n type,\n imageSrc,\n tooltipInfo,\n img,\n onCardClick,\n description,\n dataTestID,\n}: {\n type: string;\n imageSrc: string;\n tooltipInfo: string;\n img: string;\n description: string;\n onCardClick?: () => void;\n dataTestID?: string;\n}) => {\n const handleToolTipClick = (event) => {\n event.stopPropagation();\n };\n\n return (\n
\n \n \n \n \n {type}}\n />\n
\n \n
\n \n
\n );\n};\n","import React, { useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { PlotCard } from \"./PlotCard\";\nimport { plotsList, PlotType } from \"../../../data/plot-types\";\nimport { snakeEyesRecord } from \"../../../analytics/snake-eyes\";\nimport { useChartManager } from \"../../hooks/plots/useCentralViz\";\nimport \"./Viz.scss\";\n\nfunction CreateVisualization() {\n const navigate = useNavigate();\n\n const { plotType, tab, setPlotType, setTab, resetContext } = useChartManager();\n\n useEffect(() => {\n if (plotType && tab) {\n navigate(\"/viz/edit\");\n }\n }, [plotType, tab]);\n\n function handlePlotClick(plotType: PlotType) {\n resetContext();\n setPlotType(plotType);\n setTab(\"setup\");\n snakeEyesRecord({\n event: \"viz/chart_selected\",\n eventParams: { chart: plotType },\n });\n }\n\n return (\n
\n

Create Chart

\n

Choose one of the following chart types to visualize the data in your sheet

\n {plotsList.map((plot, index) => (\n handlePlotClick(plot.plotType)}\n description={plot.description}\n dataTestID={plot.plotType}\n />\n ))}\n
\n );\n}\n\nexport default CreateVisualization;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./AIAssistant.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./AIAssistant.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { Icons, getPreviousChatName, showBackButton, useStore } from \"@anaconda/assistant-components\";\nimport React from \"react\";\n\nexport function BackButton() {\n const [shouldShowBackButton, previousChatName, gotoPreviousChat] = useStore((state) => [\n showBackButton(state),\n getPreviousChatName(state),\n state.gotoPreviousChat,\n ]);\n\n // Don't show the back button unless necessary (see showBackButton in state-fns.ts)\n if (!shouldShowBackButton) {\n return null;\n }\n\n return (\n <>\n
\n {/* */}\n
\n \n
\n {/*
*/}\n
\n
Resume previous chat: {previousChatName}
\n
\n
\n \n );\n}\n","import {\n ActiveMessage,\n CompletedMessage,\n ErrorMessage,\n OnCodeComplete,\n Sentiment,\n UserMessage,\n attachmentMessagePrefix,\n cleanMessageWithAttachmentPrefix,\n formatContextVariables,\n getActiveChat,\n getActiveNotebook,\n getInProgressResponse,\n useStore,\n} from \"@anaconda/assistant-components\";\nimport { AssistantContexts } from \"@anaconda/assistant-sdk\";\nimport React from \"react\";\nimport { BackButton } from \"./BackButton\";\n\ntype Props = {\n tracker: any;\n addCodeToContainer: OnCodeComplete;\n scrollFn: () => unknown;\n};\n\nexport function ChatMessages({ addCodeToContainer, scrollFn }: Props) {\n const [\n messages,\n chatContext,\n inProgressResponse,\n inProgressType,\n activeChatSession,\n retryError,\n selectedText,\n deleteMessagesAfterId,\n submitFeedback,\n response,\n isProTier,\n resetActiveChat,\n ] = useStore((state) => {\n const activeChat = getActiveChat(state);\n return [\n activeChat?.messages,\n activeChat?.context,\n activeChat?.inProgress,\n activeChat?.inProgress?.type,\n activeChat?.session,\n state.retryError,\n getActiveNotebook(state)?.notebookState.selectedText?.text,\n state.deleteMessagesStartingWith,\n state.submitFeedback,\n getInProgressResponse(state),\n state.account?.metadata?.is_pro_tier,\n state.resetActiveChat,\n ];\n });\n\n if (!messages || !chatContext) return null;\n\n const initialMessage = messages[0];\n\n function handleFeedback(messageId: string, sentiment: Sentiment, text: string) {\n submitFeedback({ messageId, sentiment, text });\n }\n\n return (\n <>\n \n {initialMessage?.role === \"user\" && (\n state.deleteMessagesStartingWith)}\n exportMessage={() => {}}\n message={{\n ...initialMessage,\n content: determineFirstMessageText(chatContext, initialMessage.content),\n }}\n />\n )}\n {messages.slice(1).map((message) => {\n switch (message.role) {\n case \"user\":\n return (\n {}}\n message={{\n ...message,\n content: cleanMessageWithAttachmentPrefix(message.content),\n }}\n />\n );\n case \"assistant\":\n return (\n {}}\n handleDeleteMessageAfterId={deleteMessagesAfterId}\n />\n );\n }\n })}\n {inProgressType === \"active\" && (\n \n )}\n {inProgressType === \"error\" && inProgressResponse && (\n \n )}\n \n );\n}\n\nfunction determineFirstMessageText(context: AssistantContexts.ChatAny, content: string): string {\n const suffix = formatContextVariables(context, content);\n switch (context.type) {\n case \"graph-dataframe\":\n return `Generate graph for ${suffix}`;\n case \"describe-dataframe\":\n return `Explain data in ${suffix}`;\n case \"explain-code\":\n return `Explain ${suffix}`;\n case \"comment-code\":\n return `Comment ${suffix}`;\n case \"improve-code\":\n return `Refactor ${suffix}`;\n case \"debug-error\":\n return `Debug error using ${suffix}`;\n case \"suggestions-chat\":\n case \"default-python\":\n if (content.startsWith(attachmentMessagePrefix)) {\n return cleanMessageWithAttachmentPrefix(content);\n } else {\n return `${content} (using ${suffix})`;\n }\n default:\n // Unknown context type\n return content;\n }\n}\n","export const LD_KEY_ASSISTANT_USE_DEV_API_ENDPOINT = \"assistant-use-dev-api-endpoint\";\n\nexport const ASSISTANT_EXTENSION_NAMESPACE = \"aext_assistant_server\";\n\n// TODO:\n// Make this dynamic by reading it from the backend\nexport const CLIENT_VERSION = \"4.0.3\";\n\n// The maximum amount of input tokens to allow sending up. The current model, gpt-3.5-turbo-0613, supports 4096\n// and so it looks like we will want to adjust this based on the model in the future. We're limiting to 3/4 in the\n// input in order to allow tokens in the response.\nexport const TOKEN_LIMIT = 4096;\n\n// We can use this to show/hide the settings button\n// which will open the settings page when we have configurable settings in the future\nexport const SHOW_SETTINGS = true;\n\nfunction getHostName() {\n if (typeof window === \"undefined\") {\n return \"anaconda.cloud\";\n }\n return window.location.host.replace(/^nb\\./, \"\");\n}\n\nexport const ENV = {\n PROD: {\n LEGACY_CLOUD_API_BASE_URL: \"https://anaconda.cloud/api\",\n CLOUD_API_BASE_URL: `https://${getHostName()}/api`,\n STAGING_CLOUD_API_BASE_URL: \"https://nucleus-latest.anacondaconnect.com/api\",\n },\n};\n","import { AnacondaAssistant, AnacondaAssistantOptions } from \"@anaconda/assistant-sdk\";\n\nlet assistantSdk: AnacondaAssistant | undefined;\n\nexport function getAssistantSdk(): AnacondaAssistant {\n if (!assistantSdk) {\n throw new Error(\"Assistant not initialized\");\n }\n return assistantSdk;\n}\n\nexport async function initAssistantSdk(options: AnacondaAssistantOptions): Promise {\n assistantSdk = new AnacondaAssistant(options);\n try {\n const accessToken = \"dummy\"; // access token is handled with cookies\n if (!accessToken) {\n throw new Error(\"No access token\");\n }\n // TODO: Setting expiresAt to 1000 day from now, as the accessToken is a placeholder\n const expiresAt = new Date();\n expiresAt.setDate(expiresAt.getDate() + 1000);\n\n assistantSdk.accessToken.setAccessToken({ accessToken, expiresAt: expiresAt.getTime() });\n } catch (e) {\n console.log(\"Error fetching access: \", e);\n }\n return assistantSdk;\n}\n","import {\n ChatPanelFooter,\n ChatRequestOptions,\n ChatStarter,\n HomeScreen,\n OnCodeComplete,\n getActiveNotebook,\n useStore,\n} from \"@anaconda/assistant-components\";\nimport { AssistantSuggestionType, Python } from \"@anaconda/assistant-sdk\";\nimport { throttle } from \"lodash\";\nimport React, { useCallback, useRef } from \"react\";\nimport { ChatMessages } from \"./ChatMessages\";\nimport { TOKEN_LIMIT } from \"./config\";\nimport { getAssistantSdk } from \"./utils/assistantSdk\";\n\ntype Props = {\n tracker?: any;\n addCodeToContainer?: OnCodeComplete;\n getActiveCodeCell?: () => string;\n activateTableChooser?: (chatStarter: ChatStarter) => void;\n};\n\nexport function ChatPanel({ tracker, addCodeToContainer, getActiveCodeCell, activateTableChooser }: Props) {\n const activeChatKey = useStore((state) => getActiveNotebook(state)?.activeChatKey);\n const messageEndRef = useRef(null);\n\n const [\n activeContainer,\n selectChatStarter,\n makeChatRequest,\n enableDataCollection,\n suggestionDataFrame,\n dataFrames,\n isProTier,\n updateSuggestions,\n resetActiveChat,\n setSuggestionsDataframe,\n ] = useStore((state) => {\n const activeContainer = getActiveNotebook(state);\n return [\n activeContainer,\n state.selectChatStarter,\n state.makeChatRequest,\n state.settings.enableDataCollection,\n activeContainer?.suggestionState.dataframe,\n activeContainer?.notebookState.dataframes,\n state.account?.metadata?.is_pro_tier,\n state.updateSuggestions,\n state.resetActiveChat,\n state.setSuggestionsDataframe,\n ];\n });\n\n const chatStarters = activeContainer?.homeScreen?.chatStarters ?? null;\n const selectedChatStarter = activeContainer?.homeScreen?.selectedChatStarter ?? null;\n const suggestionState = activeContainer?.suggestionState;\n\n function scrollToBottom() {\n messageEndRef.current?.scrollIntoView({ behavior: \"smooth\" });\n }\n\n const throttledScroll = useCallback(throttle(scrollToBottom, 500), []);\n\n const handleUpdateSuggestions = (\n activeCell: string,\n type: AssistantSuggestionType,\n dataframe: Python.DataFrame | null\n ) => {\n updateSuggestions(activeCell, type, dataframe, getAssistantSdk());\n };\n\n const handleSelectChatStarter = (chatStarter: ChatStarter) => {\n // To handle chat starters that require a table or range selection\n // declare the name of the chat starter with \"excel-\" prefix\n // and set contextSelectionRequired to true\n if (chatStarter.name.includes(\"excel-\") && chatStarter.contextSelectionRequired) {\n activateTableChooser(chatStarter);\n } else {\n selectChatStarter(chatStarter);\n }\n };\n\n const handleMakeChatRequest = (request: ChatRequestOptions) => {\n // Intercepting the chat request to handle the case where context type is set by default\n if (request.context?.type === \"default-python\") {\n makeChatRequest({ context: { type: \"excel-default-python\", variables: {} }, instruction: request.instruction });\n } else {\n makeChatRequest(request);\n }\n };\n\n return (\n <>\n
\n {!activeChatKey ? (\n <>\n {}}\n suggestionDataFrame={suggestionDataFrame}\n />\n \n ) : (\n \n )}\n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { ErrorMessage } from \"@anaconda/assistant-components\";\n\ntype Props = {\n error: Error;\n resetErrorBoundary: () => unknown;\n};\n\nexport function ErrorScreen({ error, resetErrorBoundary }: Props) {\n return (\n
\n \n
\n );\n}\n","import { SettingsPage, getActiveChat, useStore } from \"@anaconda/assistant-components\";\nimport React from \"react\";\n\nexport function SettingsWrapper() {\n const [account, enableDataCollection, setEnableDataCollection] = useStore((state) => [\n state.account,\n state.settings.enableDataCollection,\n state.setEnableDataCollection,\n getActiveChat(state),\n ]);\n\n const isStarterTier = Boolean(account?.metadata?.is_starter_tier);\n const isProTier = Boolean(account?.metadata?.is_pro_tier);\n const addCodeToNotebook = \"below-active-cell\";\n\n return (\n {}}\n isProTier={isProTier}\n isStarterTier={isStarterTier}\n />\n );\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./SearchDropdown.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./SearchDropdown.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { CSSProperties } from \"react\";\nimport SelectSearch, { SelectSearchProps } from \"react-select-search\";\nimport { Row } from \"./Layout/Space\";\nimport \"./SearchDropdown.scss\";\n\n/**\n * Exmaple Usage:\n * The options array should contain objects.\n * Required keys are \"name\" and \"value\" but you can have and use any number of key/value pairs.\n const options = [\n { name: \"Swedish\", value: \"sv\" },\n { name: \"English\", value: \"en\" },\n {\n type: \"group\",\n name: \"Group name\",\n items: [{ name: \"Spanish\", value: \"es\" }],\n },\n ];\n*/\n\ntype SearchDropdownProps = SelectSearchProps & {\n onClick?: () => void;\n Icon?: React.ReactElement;\n style?: CSSProperties;\n transparent?: boolean;\n \"data-testid\": string;\n size?: \"small\" | \"large\";\n};\n\nexport function SearchDropdown({\n onClick,\n placeholder,\n value,\n options,\n onChange,\n Icon,\n style,\n transparent,\n size = \"large\",\n ...props\n}: SearchDropdownProps) {\n return (\n
\n \n {Icon}\n \n \n
\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { TableAdd20Regular } from \"@fluentui/react-icons\";\nimport { WorkbookStructure, readWorkbookStructure, runExcelSafeContext } from \"xlcommon/src/excel/excel-grid-utils\";\nimport {\n RangeType,\n RangeSelection,\n refreshRangeSelection,\n displayRangeSelection,\n isBinding,\n isSpillSelection,\n isTableSelection,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport { SearchDropdown } from \"../../taskpane/components/SearchDropdown\";\n\ninterface TableChooserProperties {\n selection: RangeSelection;\n onSelection: (newSelection: RangeSelection) => void; // called when the selection updates\n // Only Tables and Entire Sheets are safe to write to.\n safeForWriting?: boolean; // Setting this to true will restrict selection to only tables and entire sheets.\n placeholder?: string; // text to display if initialValue is blank\n dataTestId?: string;\n size?: \"small\" | \"large\";\n width?: string;\n}\n\nexport default function TableChooser({\n selection,\n onSelection,\n safeForWriting = false,\n placeholder = \"Click to select\",\n dataTestId,\n size = \"large\",\n width,\n}: TableChooserProperties) {\n const [wbStruct, setWbStruct] = useState({\n names: [],\n tables: [],\n sheets: [],\n sheetsWithoutTables: [],\n });\n async function getWbStruct() {\n const result = await readWorkbookStructure();\n setWbStruct(result);\n }\n useEffect(() => {\n getWbStruct();\n }, []);\n\n async function selectionChanged(newSelection: string) {\n // Ignore already selected entry\n if (newSelection === displayRangeSelection(selection)) {\n return;\n }\n\n if (isBinding(selection)) {\n // Delete old binding\n try {\n await runExcelSafeContext(\n async (context) => {\n let oldBinding = context.workbook.bindings.getItem(selection.identifier);\n oldBinding.delete();\n await context.sync();\n },\n { bindId: selection.identifier }\n );\n } catch (e) {\n console.log(e);\n }\n }\n\n // Open prompt dialog for \"Choose Range\" option\n if (newSelection === \"Choose Range\") {\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, promptCallback);\n return;\n }\n\n // Convert string value into a RangeSelection\n let [kind, name] = newSelection.slice(1).split(\"] \");\n let rs: RangeSelection = {\n rangeType: kind as RangeType,\n identifier: name,\n };\n // Replace table and sheet names with ids\n switch (rs.rangeType) {\n case RangeType.Table:\n await runExcelSafeContext(async (context) => {\n let t = context.workbook.tables.getItem(name);\n t.load(\"id\");\n await context.sync();\n rs = {\n ...rs,\n identifier: t.id,\n displayName: name,\n };\n });\n break;\n case RangeType.Sheet:\n await runExcelSafeContext(async (context) => {\n let s = context.workbook.worksheets.getItem(name);\n s.load(\"id\");\n await context.sync();\n rs = {\n ...rs,\n identifier: s.id,\n displayName: name,\n };\n });\n break;\n }\n onSelection(rs);\n }\n\n async function promptCallback(result: Office.AsyncResult) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n return;\n }\n\n let rs: RangeSelection = {\n rangeType: RangeType.RangeBinding,\n identifier: result.value.id,\n };\n\n // Check for table or spill binding\n await runExcelSafeContext(\n async (context) => {\n let b = context.workbook.bindings.getItem(result.value.id);\n let rng = b.getRange();\n const tblId = await isTableSelection(context, rng);\n if (tblId !== null) {\n rs = {\n identifier: tblId,\n rangeType: RangeType.Table,\n };\n } else if (await isSpillSelection(context, rng)) {\n rs = {\n ...rs,\n rangeType: RangeType.SpillBinding,\n };\n }\n },\n { bindId: result.value.id }\n );\n\n onSelection(await refreshRangeSelection(rs));\n }\n\n if (safeForWriting) {\n return (\n }\n placeholder={placeholder}\n value={displayRangeSelection(selection)}\n options={[\n {\n type: \"group\",\n name: \"Tables\",\n items: wbStruct.tables.map((tableName) => ({\n key: `[Table] ${tableName}`,\n name: tableName,\n value: `[Table] ${tableName}`,\n })),\n },\n {\n type: \"group\",\n name: \"Entire Sheet\",\n items: wbStruct.sheetsWithoutTables.map((sheetName) => ({\n key: `[Sheet] ${sheetName}`,\n name: sheetName,\n value: `[Sheet] ${sheetName}`,\n })),\n },\n ]}\n onChange={(selectedValue: string) => selectionChanged(selectedValue)}\n data-testid={dataTestId}\n />\n );\n } else {\n return (\n }\n placeholder={placeholder}\n value={displayRangeSelection(selection)}\n options={[\n {\n type: \"group\",\n name: \"Manual Selection\",\n items: isBinding(selection)\n ? [\n {\n key: \"Bound Range\",\n name: selection.displayName,\n value: selection.displayName,\n },\n {\n key: \"Choose Range\",\n name: \"Choose Range\",\n value: \"Choose Range\",\n },\n ]\n : [\n {\n key: \"Choose Range\",\n name: \"Choose Range\",\n value: \"Choose Range\",\n },\n ],\n },\n {\n type: \"group\",\n name: \"Tables\",\n items: wbStruct.tables.map((tableName) => ({\n key: `[Table] ${tableName}`,\n name: tableName,\n value: `[Table] ${tableName}`,\n })),\n },\n {\n type: \"group\",\n name: \"Named Ranges\",\n items: wbStruct.names.map((rangeName) => ({\n key: `[Named] ${rangeName}`,\n name: rangeName,\n value: `[Named] ${rangeName}`,\n })),\n },\n {\n type: \"group\",\n name: \"Entire Sheet\",\n items: wbStruct.sheetsWithoutTables.map((sheetName) => ({\n key: `[Sheet] ${sheetName}`,\n name: sheetName,\n value: `[Sheet] ${sheetName}`,\n })),\n },\n ]}\n onChange={(selectedValue: string) => selectionChanged(selectedValue)}\n data-testid={dataTestId}\n />\n );\n }\n}\n","import { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { Project } from \"./projects/models\";\n\nexport const PROJECT_DEFINITIONS = \"projectDefinitions\";\nexport const VERSION = 2;\n\nexport type CloudProjectDefinitions = {\n /*\n * Example: { : { title, name, files: [...] }, ... }\n */\n projects: Record, CloudProjectDefinition>;\n version: number;\n};\n\n/* \n* Map project file name to associated range selection (file names are unique to the project based on case sensitivity and unicode)\n* Example:\n{\n title: \"March Finances\", \n name: \"march-finances\",\n files: {\n \"marfinances.csv\": {\n \n }\n }\n}\n*/\nexport type CloudProjectDefinition = Pick & {\n files: Record; // fileName: \n};\n\nexport enum Direction {\n Upload = \"upload\",\n Download = \"download\",\n}\n\nexport type CloudProjectFileDefinition = {\n fileName: string; // Redundancy for ease of data usage\n sourceSelection: RangeSelection;\n query?: string; // SQL Query for file download query\n direction: Direction;\n lastUploaded?: string; // Date is serialized as ISO Timestamp\n lastDownloaded?: string; // i.e. \"2024-02-23T19:47:25.387Z\"\n};\n","import { getGlobal } from \"xlcommon/src/global\";\nimport {\n runExcelSafeContext,\n readFromRange,\n getValueTypesOfRange,\n convertDataToTyped,\n getFullAddressFromRangeSelection,\n RangeSelection,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport ProjectsService from \"./projects/projects-api\";\nimport { PROJECT_DEFINITIONS } from \"./models\";\n\nconst g = getGlobal();\n\nexport async function csvFromSelection(sourceSelection: RangeSelection, fileName: string) {\n // Read data and convert to CSV\n let data = await getTypedContentFromSelection(sourceSelection);\n let csvString = convertToCsv(data);\n\n // Ensure filename ends in .csv\n let name = fileName;\n if (name.toLowerCase().endsWith(\".csv\")) {\n name = `${name.slice(0, -4)}.csv`;\n } else {\n name = `${name}.csv`;\n }\n return {\n name,\n csvString,\n };\n}\n\nexport async function uploadFileFromSelection(\n sourceSelection: RangeSelection,\n projectId: string,\n fileName: string\n): Promise {\n // Read data and convert to CSV\n let { name, csvString } = await csvFromSelection(sourceSelection, fileName);\n return await ProjectsService.uploadCSV(projectId, name, csvString);\n}\n\nexport async function getTypedContentFromSelection(\n sourceSelection: RangeSelection,\n rowLimit: number = -1,\n colLimit: number = -1\n): Promise {\n // Read data and convert to strings\n const address = await getFullAddressFromRangeSelection(sourceSelection);\n const data = await readFromRange(address, rowLimit, colLimit);\n const valueTypes = await getValueTypesOfRange(address, colLimit);\n return convertDataToTyped(data, valueTypes, true);\n}\n\nfunction convertToCsv(data: any[][]): string {\n let rowStrings: string[] = data.map((row) => {\n let encoded = row.map((val) => {\n // Handle non-strings with a try/catch\n // This is faster than doing a `typeof` on each value checking for \"string\"\n let needsQuoting = false;\n try {\n if (val.includes(\",\") || val.includes('\"')) needsQuoting = true;\n } catch {\n val = String(val);\n if (val.includes(\",\") || val.includes('\"')) needsQuoting = true;\n }\n\n if (needsQuoting) {\n // Values containing a comma or double-quote need to be wrapped in double-quotes\n // Double-quotes are replaced with double-double-quotes\n return `\"${val.replace(/\"/g, '\"\"')}\"`;\n } else {\n return val;\n }\n });\n return encoded.join(\",\");\n });\n return rowStrings.join(\"\\r\\n\");\n}\n\n/**********************************************************\n * Utilities used for Testing\n **********************************************************/\n\nasync function testUtilClearProjectDefinitions() {\n return await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n const savedSources = settings.getItemOrNullObject(PROJECT_DEFINITIONS);\n await context.sync();\n\n if (!savedSources.isNullObject) {\n savedSources.delete();\n await context.sync();\n }\n });\n}\ng.testUtilClearProjectDefinitions = testUtilClearProjectDefinitions;\n\nasync function testUtilDeleteProject(name: string) {\n const projects = await ProjectsService.getMyProjects();\n for (let project of projects.items) {\n if (project.name === name || project.title === name) {\n let resp = await ProjectsService.deleteProjectById(project.id);\n if (resp.status < 300) return \"Success\";\n else return `Error deleting project ${project.id}`;\n }\n }\n return `No project found with name ${name}`;\n}\ng.testUtilDeleteProject = testUtilDeleteProject;\n\n// Expose common functions\ng.testUtilGetListOfProjects = ProjectsService.getMyProjects;\n","import * as React from \"react\";\nimport TableChooser from \"../../../excel/components/TableChooser\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { ChatRequestOptions, ChatStarter } from \"@anaconda/assistant-components\";\nimport { getTypedContentFromSelection } from \"../../../data/data-api-upload\";\n\ntype TableRangeChooserPageProps = {\n rangeState: RangeSelection;\n setRangeState: (newSelection: RangeSelection) => void;\n chatStarter: ChatStarter;\n makeChatRequest: (options: ChatRequestOptions) => void;\n activeChatKey?: string;\n closeTableChooser: () => void;\n};\n\nexport function TableRangeChooserPage(props: TableRangeChooserPageProps) {\n const { rangeState, setRangeState, chatStarter, makeChatRequest, closeTableChooser, activeChatKey } = props;\n /**\n * Callback for when a table is chosen.\n */\n React.useEffect(() => {\n if (activeChatKey) {\n closeTableChooser();\n }\n }, [activeChatKey]);\n\n async function tableChosen(selection: RangeSelection) {\n setRangeState(selection);\n const data = await getTypedContentFromSelection(selection, 5);\n\n // Let's imitate the format of df.head() on Python.\n // One example of how it looks is as follows:\n // \\n Date Max Temp n_rides\\n0 2015-05-31 83.0 469\\n1 2015-06-01 56.0 113\\n2 2015-06-02 63.0 139\\n3 2015-06-03 71.0 131\\n4 2015-06-04 78.0 207\\n\n const head_str = `\\n${data.map((row) => row.join(\"\\t\")).join(\"\\n\")}\\n`;\n\n makeChatRequest({\n context: {\n type: chatStarter.contextType,\n variables: { name: \"_df\", head_str, range_selection: JSON.stringify(selection) },\n } as any,\n instruction: chatStarter.label.replace(\"a table or range\", selection.displayName),\n });\n }\n\n return (\n
\n

{chatStarter.label}

\n

Choose input:

\n \n
\n );\n}\n","import Env from \"xlcommon/src/environ\";\nimport { authenticatedFetch } from \"../auth/fetch\";\n\nconst BASE_URL = Env.BASE_URL;\nconst CLOUD_API_URL = `${BASE_URL}/api/cloud`;\n\nexport async function authenticatedRequest({\n path,\n method = \"GET\",\n body,\n url = CLOUD_API_URL,\n}: {\n path: string;\n method?: string; // GET, POST, PUT, PATCH, DELETE\n body?: BodyInit; // Must convert to FormData, JSON.stringify(), etc.\n url?: string;\n}): Promise {\n let options = {\n method,\n headers: {\n \"Content-type\": \"application/json\",\n },\n };\n if (body) {\n options[\"body\"] = body;\n }\n const response = await authenticatedFetch(`${url}${path}`, options);\n if (!response.ok) {\n throw new Error(`${response.status} ${response.statusText}`);\n }\n return await response.json();\n}\n","import { QueryObserverOptions, useQuery } from \"@tanstack/react-query\";\nimport { authenticatedRequest } from \"../request\";\nimport { Account, Organizations } from \"../../auth/models\";\nimport { addSubscriptionMetadata } from \"../../auth/auth-api\";\n\nconst STALE_TIME_MINUTES = 3;\nconst STALE_TIME_MS = STALE_TIME_MINUTES * 60 * 1000;\n\nexport const useAccount = (options?: { enabled?: QueryObserverOptions[\"enabled\"] }) => {\n const accountQuery = useQuery({\n queryKey: [\"account\"],\n queryFn: () => authenticatedRequest({ path: \"/account\" }),\n staleTime: STALE_TIME_MS,\n enabled: options?.enabled ?? true, // Enable / disable automatic refetching when the query mounts or changes query keys\n select: addSubscriptionMetadata,\n });\n return accountQuery;\n};\n\n// TODO: Replace getOrganizations in auth-api\nexport const useOrganizations = (options?: { enabled?: QueryObserverOptions[\"enabled\"] }) => {\n const organizationsQuery = useQuery({\n queryKey: [\"organizations\"],\n queryFn: () => authenticatedRequest({ path: \"/organizations/my\" }),\n staleTime: STALE_TIME_MS,\n enabled: options?.enabled ?? true, // Enable / disable automatic refetching when the query mounts or changes query keys\n });\n return organizationsQuery;\n};\n","import { ChatStarters } from \"@anaconda/assistant-components\";\n\nexport const getChatStarters = (): ChatStarters => {\n const chatStarters: ChatStarters = {\n categories: [\n {\n id: \"tutorial\",\n label: \"Get started\",\n starters: [\n {\n name: \"excel-default-python\",\n label: \"Help with coding tasks\",\n instruction: \"Help with coding tasks\",\n contextType: \"excel-default-python\",\n },\n {\n name: \"plot-fibonacci\",\n label: \"Plot the first 100 Fibonacci numbers\",\n instruction: \"Plot the first 100 fibonacci numbers\",\n contextType: \"excel-default-python\",\n },\n {\n name: \"mask-emails\",\n label: \"Create a function to mask emails\",\n instruction: `Create a function to mask email addresses, show examples`,\n contextType: \"excel-default-python\",\n },\n ],\n },\n {\n id: \"dataframes\",\n label: \"Work with tables and ranges\",\n starters: [\n {\n name: \"excel-graph-dataframe\",\n label: \"Generate graphs from a table or range\",\n contextSelectionRequired: true,\n contextType: \"excel-graph-dataframe\",\n },\n {\n name: \"excel-aggregate-dataframe\",\n label: \"Aggregate or summarize a table or range\",\n contextSelectionRequired: true,\n contextType: \"excel-aggregate-dataframe\",\n },\n ],\n },\n ],\n };\n return chatStarters;\n};\n","import {\n AssistantChatSummary,\n AssistantStore,\n ChatStarter,\n Header,\n HistoryPage,\n INucleusUser,\n TermsAndConditionsPage,\n getActiveChat,\n getActiveNotebookChats,\n useStore,\n} from \"@anaconda/assistant-components\";\nimport * as React from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport Env from \"xlcommon/src/environ\";\nimport \"./AIAssistant.scss\";\nimport { ChatPanel } from \"./ChatPanel\";\nimport { ErrorScreen } from \"./ErrorScreen\";\nimport { SettingsWrapper } from \"./SettingsWrapper\";\nimport { TableRangeChooserPage } from \"./TableRangeChooserPage\";\n\nimport { Route, Routes, useLocation, useNavigate } from \"react-router-dom\";\nimport {\n getAliasFromRangeSelection,\n RangeSelection,\n RangeType,\n getSplitIdAddrFromBinding,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport { getPythonLocation, writeToExecutionLocation } from \"../../../excel/grid-utils\";\n\nimport { TOKEN_LIMIT } from \"./config\";\n\nimport { initAssistantStore } from \"@anaconda/assistant-components\";\nimport { AssistantEnvironmentType } from \"@anaconda/assistant-sdk\";\nimport { useAccount } from \"../../../queryclient/account/account\";\nimport { getAssistantSdk, initAssistantSdk } from \"./utils/assistantSdk\";\nimport { initializeAssistant } from \"./utils/initializeAssistant\";\nimport { snakeEyesRecord } from \"../../../analytics/snake-eyes\";\nimport { PythonExecutionLocation } from \"../../../excel/types\";\n\nconst DELETED_CHAT_KEYS: string[] = [];\n\nexport function AIAssistant() {\n const [assistantStore, setAssistantStore] = React.useState(null);\n\n const envType = Env.ASSISTANT_CLIENT_SOURCE.replace(\"anaconda-\", \"\") as AssistantEnvironmentType;\n\n const { data: account } = useAccount();\n\n const initAiAssistant = async () => {\n await initAssistantSdk({\n clientVersion: process.env.REACT_APP_TOOLBOX_VERSION,\n apiUrl: `${Env.BASE_URL}`,\n environmentType: `${envType}`,\n enableDataCollection: false,\n routePathPrefix: `${Env.ASSISTANT_ROUTE_PATH_PREFIX}`,\n });\n\n const assistantStoreLoaded = await initAssistantStore({\n getAssistantSdk,\n // No need to fetch the server URL as it is already provided in the manifest\n getServerUrl: () => Promise.resolve(\"\"),\n getNucleusAccount: () => Promise.resolve(account as unknown as INucleusUser), // this is require to transform the account object to INucleusUser\n getAccountMaxTokens: () => Promise.resolve(TOKEN_LIMIT),\n // There is no flag identifying local dev environment\n isLocalDev: () => false,\n // No need to sync with disk\n syncDiskStateChained: () => Promise.resolve(),\n unbindSyncDiskStateChained: () => {},\n deletedChatKeys: DELETED_CHAT_KEYS,\n clientContextType: \"sheet\",\n });\n\n setAssistantStore(assistantStoreLoaded);\n await initializeAssistant();\n };\n\n React.useEffect(() => {\n initAiAssistant();\n }, [account]);\n\n return account && assistantStore ? (\n \n \n \n ) : null;\n}\n\nfunction InnerPanel() {\n const navigate = useNavigate();\n const [olderThan13, setOlderThan13] = React.useState(false);\n const [selection, setSelection] = React.useState(null);\n const [tableChooserContext, setTableChooserContext] = React.useState(null);\n const [\n accepted,\n acceptTerms,\n enableDataCollection,\n setEnableDataCollection,\n toggleHistoryOpen,\n resetToHomeScreen,\n toggleSettings,\n chats,\n activeChat,\n setActiveChat,\n deleteChat,\n makeChatRequest,\n ] = useStore((state) => [\n state.terms.accepted,\n state.acceptTerms,\n state.settings.enableDataCollection,\n state.setEnableDataCollection,\n state.toggleMenuOpen,\n state.resetToHomeScreen,\n state.toggleSettings,\n getActiveNotebookChats(state),\n getActiveChat(state),\n state.setActiveChat,\n state.deleteChat,\n state.makeChatRequest,\n ]);\n\n const stateCode = React.useRef(\"\");\n\n async function addCodeToContainer(code: string) {\n stateCode.current = code;\n const options = { promptText: \"Click to select\" };\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, promptCallback);\n }\n\n async function promptCallback(result) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n return;\n }\n\n let code = stateCode.current;\n\n if (selection) {\n // Define _df at the top of the code\n let alias = await getAliasFromRangeSelection(selection);\n if (alias === undefined && selection.displayName) {\n alias = selection.displayName;\n }\n const executionLocation: PythonExecutionLocation = await getPythonLocation();\n if (executionLocation === PythonExecutionLocation.Local) {\n code = `_data = REF(\"${alias.replaceAll(\n '\"',\n '\\\\\"'\n )}\")\\n_df = pd.DataFrame(_data[1:], columns=_data[0])\\n\\n${code}`;\n } else {\n code = `_df = xl(\"${alias.replaceAll('\"', '\\\\\"')}\", headers=True)\\n\\n${code}`;\n }\n }\n\n // Convert chosen target cell to an address\n const targetAddress = await getAliasFromRangeSelection({\n rangeType: RangeType.CellBinding,\n identifier: result.value.id,\n });\n // Easy way to delete the binding id as a side effect\n await getSplitIdAddrFromBinding(result.value.id, /*deleteId=*/ true);\n\n await writeToExecutionLocation(targetAddress, code);\n snakeEyesRecord({\n event: \"assistant/chat_sent_to_grid\",\n });\n }\n\n const handleActivateTableChooser = (chatStarter: ChatStarter) => {\n setTableChooserContext(chatStarter);\n navigate(\"/ai/data-chooser\");\n };\n\n const handleNavigation = (page: string) => {\n switch (page) {\n case \"settings\":\n navigate(\"/ai/settings\");\n toggleSettings();\n break;\n case \"history\":\n navigate(\"/ai/history\");\n toggleHistoryOpen();\n break;\n case \"home\":\n default:\n navigate(\"/ai\");\n resetToHomeScreen();\n break;\n }\n\n snakeEyesRecord({\n event: \"assistant/page_switched\",\n });\n };\n\n const historyChats = (chats: AssistantChatSummary[]) => {\n const modifiedHistoryChats = chats.map((chat) => {\n // TODO: When new contexts are added which accept tables and ranges, include them here\n const regex = /^(?:Aggregate or summarize |Generate graphs from ).*\\(using no context from Sheet\\)$/;\n const name = regex.test(chat.name) ? chat.name.replace(\"(using no context from Sheet)\", \"\") : chat.name;\n return { ...chat, name };\n });\n return modifiedHistoryChats;\n };\n\n React.useEffect(() => {\n if (activeChat?.context?.variables[\"range_selection\"]) {\n const rangeSelection = JSON.parse(activeChat?.context?.variables[\"range_selection\"]);\n setSelection(rangeSelection);\n } else {\n setSelection(null);\n }\n }, [activeChat]);\n\n return (\n
\n handleNavigation(\"history\")}\n newChatClicked={() => handleNavigation(\"home\")}\n toggleSettings={() => handleNavigation(\"settings\")}\n />\n {!accepted ? (\n {\n let version = useStore.getState().terms.version;\n if (!version) {\n try {\n version = await getAssistantSdk().fetchTermsAndConditionsVersion();\n } catch (e) {\n console.error(\"Failed to fetch terms version\");\n return;\n }\n }\n acceptTerms(version, true);\n }}\n enableDataCollection={enableDataCollection}\n setEnableDataCollection={setEnableDataCollection}\n olderThan13={olderThan13}\n setOlderThan13={setOlderThan13}\n />\n ) : (\n \n } />\n navigate(\"/ai\")}\n />\n }\n />\n navigate(\"/ai\")}\n />\n }\n />\n \n }\n />\n \n )}\n
\n );\n}\n","import { useStore } from \"@anaconda/assistant-components\";\nimport { getChatStarters } from \"./ChatStarters\";\n\n/**\n * Initializes the assistant by hiding it if there's no active notebook.\n * Also, if the current widget is a notebook and has a path,\n * sets the path in the store if it's not set.\n */\nexport function initializeAssistant() {\n const state = useStore.getState();\n useStore.getState().updateAccount();\n useStore.getState().setPath(\"/\", { user: state.user || \"\", dataframes: [] }, getChatStarters);\n}\n","import React, { createContext, ReactNode, useContext, useState } from \"react\";\nimport { RangeSelection, RangeType } from \"xlcommon/src/excel/excel-grid-utils\";\n\n// TODO: Determine type expected by Edublocks\ntype Blocks = unknown;\n\nexport type BlocksContextType = {\n blocks: Blocks;\n writeAddress: RangeSelection;\n setBlocks: (blocks: Blocks) => void;\n setAddress: (writeAddress: RangeSelection) => void;\n};\n\nconst BlocksContext = createContext({\n blocks: {},\n writeAddress: {} as RangeSelection,\n setBlocks: () => Promise,\n setAddress: () => Promise,\n});\n\nconst useBlocks = () => {\n const context = useContext(BlocksContext);\n if (context === undefined) throw new Error(\"useBlocks must be used within BlocksProvider\");\n return context;\n};\n\nconst BlocksProvider = ({ children }: { children: ReactNode }) => {\n // Context values passed to consumer\n const [blocks, setBlocks] = useState({});\n const [writeAddress, setAddress] = useState({\n rangeType: RangeType.CellBinding,\n identifier: \"\",\n bindingAutoDelete: true,\n } as RangeSelection);\n\n // TODO: Consider using deep compare depending on data type for Blocks\n // useDeepCompareEffect(() => {\n // }, [blocks]);\n\n return (\n {children}\n );\n};\n\nconst BlocksConsumer = ({ children }: { children: (context: BlocksContextType) => ReactNode }) => {\n return (\n \n {(context) => {\n if (context === undefined) {\n throw new Error(\"BlocksConsumer must be used within BlocksProvider\");\n }\n return children(context);\n }}\n \n );\n};\n\nexport { BlocksProvider, BlocksConsumer, useBlocks };\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Edublocks.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Edublocks.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./AddressChooser.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./AddressChooser.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { Field } from \"@fluentui/react-components\";\nimport { TableEdit20Regular } from \"@fluentui/react-icons\";\nimport { RangeType, RangeSelection, refreshRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport \"./AddressChooser.scss\";\n\nexport interface AddressChooserProperties {\n selection: RangeSelection;\n onSelection: (newSelection: RangeSelection) => void;\n placeholder?: string; // text to display if the address is blank\n label?: string;\n size?: \"small\" | \"large\";\n width?: number | string;\n}\n\nexport default function AddressChooser({\n selection,\n onSelection,\n placeholder = \"Click to select\",\n label = \"Placement in Workbook\",\n size = \"large\",\n}: AddressChooserProperties) {\n // Ensure Bindings have up-to-date fullAddress\n React.useEffect(() => {\n (async () => {\n if (selection?.rangeType !== RangeType.CellBinding || selection?.identifier) {\n onSelection(\n await refreshRangeSelection({\n ...selection,\n rangeType: RangeType.CellBinding, // force correct range type\n })\n );\n }\n })();\n }, []);\n\n async function openPrompt() {\n let options = { promptText: \"Select an address\" };\n if (selection?.identifier) {\n options[\"id\"] = selection.identifier;\n }\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, promptCallback);\n }\n\n async function promptCallback(result: Office.AsyncResult) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n return;\n }\n onSelection(\n await refreshRangeSelection({\n ...selection,\n rangeType: RangeType.CellBinding,\n identifier: result.value.id,\n })\n );\n }\n\n if (size === \"small\") {\n return (\n
\n
\n
\n \n \n {selection?.displayName ? selection?.displayName : placeholder}\n \n
\n
\n
\n );\n }\n\n return (\n
\n \n
\n
\n \n \n {selection?.displayName ? selection?.displayName : placeholder}\n \n
\n
\n \n
\n );\n}\n","import React, { useEffect, useRef, useState } from \"react\";\nimport { Button, Spinner, Tab, TabList, Tooltip } from \"@fluentui/react-components\";\nimport { ArrowResetFilled, Play16Filled } from \"@fluentui/react-icons\";\nimport { ActionButtonRow, Row } from \"../../components/Layout/Space\";\nimport { useBlocks } from \"../../hooks/useBlocks\";\nimport \"./Edublocks.scss\";\n\nimport {\n WorkbookStructure,\n readWorkbookStructure,\n writeToCell,\n RangeSelection,\n getFullAddressFromRangeSelection,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport AddressChooser from \"../../../excel/components/AddressChooser\";\nimport { getGlobal } from \"xlcommon/src/global\";\nconst g = getGlobal();\n\nfunction Edublocks() {\n // Maintain Edublocks state in application context\n const { blocks, setBlocks, writeAddress, setAddress } = useBlocks();\n\n // Managing window\n const ref = useRef(null);\n const [loading, setLoading] = useState(true);\n const container = ref?.current?.contentWindow; // ref.contentWindow\n\n // Integration reference\n // https://github.com/anaconda/excel-add-in/pull/26/files#diff-eb7d60f4924ab1b4c169c2d0a9cd15c7b91835147f5fee02ec4f45cf84037b0eR2\n useEffect(() => {\n if (container) {\n g.addEventListener(\"message\", syncExcel);\n }\n return () => g.removeEventListener(\"message\", syncExcel);\n }, [container]);\n\n const addressRef = useRef();\n addressRef.current = writeAddress;\n\n async function syncExcel(event: MessageEvent) {\n let writeAddress = addressRef.current;\n if (event.source == container) {\n switch (event.data.kind) {\n case \"request_tables\":\n findExcelTables();\n break;\n case \"request_blocks\":\n container.postMessage(\n {\n kind: \"blocks\",\n data: blocks,\n },\n \"*\"\n );\n break;\n case \"code\": {\n /*\n * Sync to a chosen address which was selected in the UI, not the currently selected Excel cell\n * (This prevents the user from overriding unintended cells, by intentionally chosing the address)\n */\n const code = event.data.data.code;\n\n await writeToCell(await getFullAddressFromRangeSelection(writeAddress), code);\n\n heap.track(\"excel-edublocks-click-run\");\n\n event.data.data.blocks.forEach((block: string) => {\n heap.track(\"excel-edublocks-use-block\", {\n block_type: block,\n });\n });\n\n break;\n }\n case \"update_blocks\":\n setBlocks(event.data.data);\n break;\n }\n }\n }\n\n function findExcelTables() {\n readWorkbookStructure().then((wbstruct: WorkbookStructure) => {\n console.log({ TablesFound: wbstruct.tables });\n if (wbstruct.tables.length > 0) {\n container.postMessage(\n {\n kind: \"tables\",\n data: {\n tables: wbstruct.tables,\n },\n },\n \"*\"\n );\n }\n });\n }\n\n function requestCode() {\n container.postMessage(\n {\n kind: \"request_code\",\n },\n \"*\"\n );\n }\n\n function switchView(view: unknown) {\n container.postMessage(\n {\n kind: \"switch_view\",\n data: {\n view,\n },\n },\n \"*\"\n );\n }\n\n return (\n <>\n
\n {loading && }\n {!loading && (\n <>\n \n switchView(selectedTab.value)}>\n Visual Editor\n \n\n \n \n \n \n\n
\n\n \n\n
\n \n )}\n\n setLoading(false)}\n />\n\n {!loading && (\n <>\n \n \n }\n iconPosition=\"before\"\n >\n Run\n \n \n \n \n )}\n
\n \n );\n}\n\nexport default Edublocks;\n","import React from \"react\";\n\nexport const PrivacyPolicy = () => (\n \n Privacy Policy\n \n);\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Initial.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Initial.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport { Row } from \"./Layout/Space\";\nimport styles from \"../styles.module.scss\";\nimport \"./Initial.scss\";\n\nconst DEFAULT_FONT_SIZE = 24;\nconst DEFAULT_SIZE = 44;\n\nexport const InitialCircle: React.FC<{ initial: string; size?: number; color?: string }> = ({\n initial,\n size = 44,\n color = styles.primary,\n}) => (\n \n {initial}\n
\n);\n\nexport const InitialsList: React.FC<{ initials: string[] }> = ({ initials }) => {\n return (\n
\n \n {initials.map((initial) => (\n \n ))}\n \n
\n );\n};\n","// export type AuthTokenInfo = {\n// access_token: string;\n// expires_in: number;\n// token_type: string; // Bearer\n// scope?: string;\n// id_token?: string;\n// };\n\nexport type AuthSessionInit = {\n session_id: string;\n decoder: string;\n remember_me: boolean;\n};\n\nexport type UserProfile = {\n is_confirmed?: boolean;\n is_disabled?: boolean;\n};\n\nexport type Subscription = {\n expires_at?: string;\n id?: string;\n org_id?: string;\n product_code?: ProductCode;\n};\n\nexport type User = {\n company?: string;\n company_size?: string;\n country?: string;\n created_at: string;\n email: string;\n external_id?: string;\n first_home_visit?: boolean;\n first_name?: string;\n id: string;\n industry?: string;\n last_name?: string;\n partner_customer_id?: string;\n partner_id?: string;\n position?: string;\n promotional_content?: boolean;\n state?: string;\n updated_at?: string;\n username?: string;\n};\n\nexport type Account = {\n profile?: UserProfile;\n subscriptions?: Subscription[];\n user: User;\n metadata: {\n is_starter_tier: boolean;\n is_pro_tier: boolean;\n };\n};\n\nexport enum ProductCode {\n CommercialSubscription = \"commercial_subscription\",\n SecuritySubscription = \"security_subscription\",\n StarterSubscription = \"starter_subscription\",\n ProfessionalSubscription = \"professional_subscription\",\n BusinessSubscription = \"business_subscription\",\n FreeSubscription = \"free_subscription\",\n}\n\nexport const ProductCodeToName: Record = {\n [ProductCode.FreeSubscription]: \"Free Tier\",\n [ProductCode.StarterSubscription]: \"Starter Tier\",\n [ProductCode.ProfessionalSubscription]: \"Professional Tier\",\n [ProductCode.CommercialSubscription]: \"Professional Tier\",\n [ProductCode.BusinessSubscription]: \"Business Tier\",\n [ProductCode.SecuritySubscription]: \"Business Tier\",\n};\n\nexport type Organization = {\n bio: string;\n created_at: string;\n deletion_scheduled: boolean;\n email: string;\n id: string;\n max_members: number;\n members_count: number;\n name: string;\n role: string;\n title: string;\n type: string;\n url: string;\n};\n\nexport type Organizations = Organization[];\n\nexport type OrganizationGroup = {\n id: string;\n name: string;\n org_id: string;\n created_at: string;\n updated_at: string;\n};\n\nexport type OrganizationUser = {\n id: string;\n email: string;\n first_name: string;\n last_name: string;\n groups: OrganizationGroup[];\n role: \"member\" | \"admin\";\n subscriptions: string[];\n};\n\nexport type OrganizationUsers = {\n filtered_count: number;\n items: OrganizationUser[];\n total_count: number;\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Profile.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Profile.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { Suspense, useEffect, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { Button, Divider, Spinner, Text } from \"@fluentui/react-components\";\nimport { Col, Row } from \"../components/Layout/Space\";\nimport { SignOut24Filled } from \"@fluentui/react-icons\";\nimport { PrivacyPolicy } from \"../components/PrivacyPolicy\";\nimport { InitialCircle } from \"../components/Initial\";\nimport { getOrganizations, logout } from \"../../auth/auth-api\";\nimport { Organizations, ProductCode, ProductCodeToName } from \"../../auth/models\";\nimport { snakeEyesRecord } from \"../../analytics/snake-eyes\";\nimport { useAccount } from \"../../queryclient/account/account\";\nimport * as AuthAPI from \"../../auth/auth-api\";\nimport Env from \"xlcommon/src/environ\";\nimport \"./Profile.scss\";\n\n// type ActiveSubscription = {\n// expires_at: string;\n// product_code: string;\n// };\n\ntype OrgTiers = {\n organizationName: string;\n subscription: ProductCode;\n};\n\nconst AppVersion: React.FC = () => (\n
\n

App Info

\n
\n \n

Version

\n {process.env.REACT_APP_TOOLBOX_VERSION}\n
\n
\n
\n);\n\nexport const Profile: React.FC = () => {\n const navigate = useNavigate();\n const [loading, setLoading] = useState(true);\n const [orgTiers, setOrgTiers] = useState();\n const [myTier, setMyTier] = useState(\"Free Tier\");\n\n const [isLoggedIn, setLoggedIn] = useState(AuthAPI.isLoggedIn());\n useEffect(() => {\n (async () => {\n if (!Env.signedIn) await AuthAPI.login();\n setLoggedIn(Env.signedIn);\n })();\n }, []);\n\n const queryClient = useQueryClient();\n const { data: account } = useAccount({ enabled: isLoggedIn });\n\n useEffect(() => {\n (async () => {\n if (account?.user?.email && isLoggedIn) {\n try {\n const orgs: Organizations = await getOrganizations();\n let orgSubs = [];\n\n snakeEyesRecord({ event: \"profile/view\", eventParams: { num_orgs: orgs?.length || 0 } });\n\n // Get individual subscription (which should not have an organization ID)\n if (account && account?.subscriptions?.length > 0) {\n const mySub = account.subscriptions.find((sub) => sub.org_id === undefined);\n if (mySub) {\n const tier = ProductCodeToName[mySub.product_code];\n setMyTier(tier);\n }\n }\n\n // Obtain organization name associated with the subscriptions\n if (orgs?.length > 0) {\n orgs.forEach((org) => {\n // `api/account subscriptions` only show organizations with a paid subscription\n const subs = account?.subscriptions?.filter((sub) => org.id === sub.org_id);\n if (subs?.length > 0) {\n orgSubs.push({\n organizationName: org.title,\n subscription: subs[0].product_code,\n });\n } else {\n // This is an org with a free subscription\n orgSubs.push({\n organizationName: org.title,\n subscription: ProductCode.FreeSubscription,\n });\n }\n });\n\n setOrgTiers([...orgSubs]);\n }\n } catch (e) {\n // TODO: Send to future monitoring service\n console.log(e);\n if (e.message === \"AuthRequiredException\") {\n await handleLogout();\n }\n }\n setLoading(false);\n }\n })();\n }, [account?.user?.email]);\n\n async function handleLogout() {\n // Removing the query is like a cache invalidation without refetch\n await queryClient.removeQueries({ queryKey: [\"account\"], exact: true });\n await logout();\n }\n\n async function handleLogoutWithNav() {\n await handleLogout();\n navigate(\"/\");\n }\n\n if (loading) {\n return (\n
\n

Profile

\n
\n \n
\n \n
\n );\n }\n\n return (\n }>\n
\n

Profile

\n <>\n
\n \n \n
    \n
  • \n {account?.user?.first_name} {account?.user?.last_name}\n
  • \n
  • {account?.user?.email}
  • \n
  • {account?.user?.company}
  • \n
  • {account?.user?.industry}
  • \n
  • {account?.user?.country}
  • \n
\n
\n
\n \n

Subscriptions

\n
\n

Individual Subscripton

\n \n
\n {myTier}\n
\n {/* TODO: Implement web hooks with upgrade button */}\n {/* */}\n
\n {orgTiers?.length > 0 && (\n <>\n

Organizational Subscriptons

\n \n {orgTiers?.map((orgTier) => (\n \n
{orgTier.organizationName}
\n
\n {ProductCodeToName[orgTier.subscription]}\n
\n
\n ))}\n \n \n )}\n
\n \n \n \n
\n To view and update other settings, please visit {/* TODO: Redirect to be signed in */}\n \n Anaconda Cloud\n \n .\n
\n }\n onClick={() => handleLogoutWithNav()}\n >\n Sign out\n \n \n \n \n
\n
\n );\n};\n\nexport default Profile;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./PlaceholderItem.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./PlaceholderItem.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport \"./PlaceholderItem.scss\";\n\nexport function PlaceholderItem() {\n return (\n
\n
\n
\n
\n
\n );\n}\n","import Env from \"xlcommon/src/environ\";\nimport { authenticatedFetch } from \"../../auth/fetch\";\n\nconst BASE_URL = Env.BASE_URL;\nconst PROJECTS_URL = `${BASE_URL}/api/cloud/projects`;\nconst API_VERSION_HEADER = { \"Api-Version\": \"2023.11.28\" };\n\nexport async function authenticatedRequest({\n path,\n method = \"GET\",\n body,\n}: {\n path: string;\n method?: string; // GET, POST, PUT, PATCH, DELETE\n body?: BodyInit; // Must convert to FormData, JSON.stringify(), etc.\n}): Promise {\n let options = {\n method,\n headers: {\n \"Content-type\": \"application/json\",\n ...API_VERSION_HEADER,\n },\n };\n if (body) {\n options[\"body\"] = body;\n }\n const response = await authenticatedFetch(`${PROJECTS_URL}${path}`, options);\n if (!response.ok) {\n throw new Error(`Failed to fetch data from ${path}`);\n }\n return await response.json();\n}\n","import { QueryObserverOptions, UseMutationResult, useMutation, useQuery } from \"@tanstack/react-query\";\nimport {\n Project,\n ProjectFile,\n ProjectFilesResponse,\n ProjectPermission,\n ProjectPermissionResponse,\n ProjectsResponse,\n SupportedTags,\n} from \"../../data/projects/models\";\nimport { authenticatedRequest } from \"./request\";\nimport { queryClient } from \"../../taskpane\";\n\nconst STALE_TIME_MINUTES = 3;\nconst STALE_TIME_MS = STALE_TIME_MINUTES * 60 * 1000;\n\n// TODO: Replacement of ProjectsService\nexport const useProjects = (options: {\n tag: SupportedTags;\n enabled?: QueryObserverOptions[\"enabled\"];\n filter?: (project: Project) => Project;\n}) => {\n const projectsQuery = useQuery({\n queryKey: [\"projects\"],\n queryFn: () => authenticatedRequest({ path: \"\" }),\n staleTime: STALE_TIME_MS,\n enabled: options.enabled ?? true, // Enable / disable automatic refetching when the query mounts or changes query keys\n });\n return {\n ...projectsQuery,\n // Optimistically re-map response \"items\" key to Project type\n data: projectsQuery?.data?.items.filter((project) => {\n // Don't show soft-deleted projects\n if (project.metadata.hidden) return false;\n // Only show projects with the right tag\n if (!project.metadata.tags.includes(options.tag)) return false;\n // Apply extra filter (if provided)\n if (options.filter) return options.filter(project);\n // If passed all checks above, include it\n return true;\n }) as Project[],\n };\n};\n\n// TODO: Invalidated files query in projects-api, but should be migrated to react-query:\n// updateProjectMetadata\n// uploadFile\n// downloadFileByName\n// deleteFileByName\nexport const useProjectFiles = (projectId: string, options?: { enabled?: QueryObserverOptions[\"enabled\"] }) => {\n const filesQuery = useQuery({\n queryKey: [`files-${projectId}`],\n queryFn: () => authenticatedRequest({ path: `/${projectId}/files` }),\n staleTime: STALE_TIME_MS,\n enabled: options?.enabled ?? true, // Enable / disable automatic refetching when the query mounts or changes query keys\n });\n\n return {\n ...filesQuery,\n // Optimistically re-map response \"items\" key to ProjectFile type\n data: filesQuery?.data?.items as ProjectFile[],\n };\n};\n\nexport const useProjectPermissions = (projectId: string, options?: { enabled?: QueryObserverOptions[\"enabled\"] }) => {\n const permissionsQuery = useQuery({\n queryKey: [`permissions-${projectId}`],\n queryFn: () => authenticatedRequest({ path: `/${projectId}/permissions` }),\n staleTime: STALE_TIME_MS,\n enabled: options?.enabled ?? true, // Enable / disable automatic refetching when the query mounts or changes query keys\n retry: false, // Don't retry if error until stale (errors will retry indefinitely if set to true)\n });\n\n return {\n ...permissionsQuery,\n // Optimistically re-map response \"items\" key to ProjectFile type\n data: permissionsQuery?.data?.items as ProjectPermission[],\n };\n};\n\n// Example mutation not currently in use:\ntype FileIdentifier = {\n projectId: string;\n fileName: string;\n csvString: string;\n};\n\nexport const useUploadFile = ({ projectId, fileName, csvString }: FileIdentifier) => {\n const mutation: UseMutationResult = useMutation({\n mutationKey: [\"uploadFile\"],\n mutationFn: () => {\n let formData = new FormData();\n formData.append(\"files\", new Blob([csvString]), fileName);\n return authenticatedRequest({ path: `/${projectId}/files/${encodeURIComponent(fileName)}?redirect=False` });\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [`files-${projectId}`] });\n },\n });\n return mutation;\n};\n","import React, { useState, createContext, useContext, ReactNode } from \"react\";\n\nexport type FilterContextType = {\n dateModifiedFrom: Date;\n dateModifiedTo: Date;\n projectFilter: string;\n fileFilter: string;\n setDateFrom: (date: Date) => void;\n setDateTo: (date: Date) => void;\n setProjectFilter: (project: string) => void;\n setFileFilter: (file: string) => void;\n};\n\nexport const FilterContext = createContext({\n dateModifiedFrom: null,\n dateModifiedTo: null,\n projectFilter: \"\",\n fileFilter: \"\",\n setDateFrom: () => Promise,\n setDateTo: () => Promise,\n setProjectFilter: () => Promise,\n setFileFilter: () => Promise,\n});\n\nexport const useDataFilters = () => {\n const context = useContext(FilterContext);\n return context;\n};\n\nexport const DataFiltersProvider = ({ children }: { children: ReactNode }) => {\n const [dateModifiedFrom, setDateFrom] = useState(null);\n const [dateModifiedTo, setDateTo] = useState(null);\n const [projectFilter, setProjectFilter] = useState(\"\");\n const [fileFilter, setFileFilter] = useState(\"\");\n\n return (\n \n {children}\n \n );\n};\n","export type UserSettingType = {\n category: string;\n settingName: string;\n value: boolean | string | number;\n};\n\nenum DataConnectors {\n LandingSeen = \"DataConnectors.LandingSeen\",\n}\n\nenum CodeSnippets {\n LandingSeen = \"CodeSnippets.LandingSeen\",\n}\n\nenum PyScriptEditor {\n DarkMode = \"PyScriptEditor.DarkMode\",\n}\n\nenum EditCodeWarning {\n Seen = \"EditCodeWarning.Seen\",\n}\n\nexport const UserSettings = {\n DataConnectors,\n CodeSnippets,\n PyScriptEditor,\n EditCodeWarning,\n};\n\nfunction splitName(name: string, defaultValue: boolean | string | number): UserSettingType {\n const [cat, sett] = name.split(\".\");\n return { category: cat, settingName: sett, value: defaultValue };\n}\n\nexport const UserSettingDefaults: Record = {\n [DataConnectors.LandingSeen]: splitName(DataConnectors.LandingSeen, false),\n [CodeSnippets.LandingSeen]: splitName(CodeSnippets.LandingSeen, false),\n [PyScriptEditor.DarkMode]: splitName(PyScriptEditor.DarkMode, false),\n [EditCodeWarning.Seen]: splitName(EditCodeWarning.Seen, false),\n};\n","import { Project, SupportedTags } from \"./models\";\nimport { Account } from \"../../auth/models\";\nimport { UserSettings } from \"../../queryclient/settings/types\";\n\nfunction projCompare(a: Project, b: Project): number {\n if (a.owner?.name !== null && b.owner?.name !== null) {\n // Sort based on owner name, then project name\n return a.owner.name < b.owner.name ? -1 : a.owner.name > b.owner.name ? +1 : a.name < b.name ? -1 : +1;\n }\n // Sort only based on project name\n return a.name < b.name ? -1 : +1;\n}\n\nexport function selectMyProjects(allProjects: Project[], myAccount: Account): Project[] {\n if (!allProjects) return [];\n return allProjects\n .filter((project) => project.owner.id === myAccount?.user?.id && project.metadata.hidden !== true)\n .sort(projCompare);\n}\n\nexport function selectUserProjects(allProjects: Project[], myAccount: Account): Project[] {\n if (!allProjects) return [];\n return allProjects\n .filter(\n (project) =>\n project.owner.type === \"user\" && project.owner.id !== myAccount?.user?.id && project.metadata.hidden !== true\n )\n .sort(projCompare);\n}\n\nexport function selectOrgProjects(allProjects: Project[]): Project[] {\n if (!allProjects) return [];\n return allProjects\n .filter((project) => project.owner.type === \"organization\" && project.metadata.hidden !== true)\n .sort(projCompare);\n}\n\nexport function tagToAppName(tag: SupportedTags): string {\n switch (tag) {\n case \"data\":\n return \"data_connectors\";\n case \"code_snippet\":\n return \"code_snippets\";\n default:\n throw Error(`Unhandled tag: ${tag}`);\n }\n}\n\nexport function tagToTitle(tag: SupportedTags): string {\n switch (tag) {\n case \"data\":\n return \"Dataset\";\n case \"code_snippet\":\n return \"Snippet\";\n default:\n throw Error(`Unhandled tag: ${tag}`);\n }\n}\n\nexport function tagToRoutePrefix(tag: SupportedTags): string {\n switch (tag) {\n case \"data\":\n return \"/data\";\n case \"code_snippet\":\n return \"/snippets\";\n default:\n throw Error(`Unhandled tag: ${tag}`);\n }\n}\n\nexport function tagToUserSettings(tag: SupportedTags) {\n switch (tag) {\n case \"data\":\n return UserSettings.DataConnectors;\n case \"code_snippet\":\n return UserSettings.CodeSnippets;\n default:\n throw Error(`Unhandled tag: ${tag}`);\n }\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./CustomDatePicker.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./CustomDatePicker.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { Label } from \"@fluentui/react-components\";\nimport { DatePicker } from \"@fluentui/react-datepicker-compat\";\nimport { Col } from \"./Layout/Space\";\nimport \"./CustomDatePicker.scss\";\n\nconst CustomDatePicker = ({\n label,\n selectedDate,\n onSelectDate,\n}: {\n label: string;\n selectedDate: Date;\n onSelectDate: (date: Date) => void;\n}) => {\n return (\n \n \n date.toLocaleDateString()}\n onSelectDate={onSelectDate}\n showMonthPickerAsOverlay={true}\n showGoToToday={false}\n style={{ width: 157 }}\n value={selectedDate}\n disableAutoFocus\n />\n \n );\n};\n\ntype DateArgs = {\n selectedFrom: Date;\n selectedTo: Date;\n setSelectedFrom: (date: Date) => void;\n setSelectedTo: (date: Date) => void;\n};\n\nconst DateModified = ({ selectedFrom, selectedTo, setSelectedFrom, setSelectedTo }: DateArgs) => {\n return (\n
\n \n
\n \n \n
\n
\n );\n};\n\nexport default DateModified;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Filter.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Filter.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Button, Label, Input } from \"@fluentui/react-components\";\nimport { Dismiss16Regular, FolderSearch16Regular } from \"@fluentui/react-icons\";\nimport { Project, ProjectFile, SupportedTags } from \"../../../data/projects/models\";\nimport { tagToRoutePrefix } from \"../../../data/projects/utils\";\nimport DateModified from \"../../components/CustomDatePicker\";\nimport { SearchDropdown } from \"../../components/SearchDropdown\";\nimport { Col, Row } from \"../../components/Layout/Space\";\nimport \"./Filter.scss\";\nimport { useDataFilters } from \"../../hooks/useDataFilters\";\nimport { useProjects } from \"../../../queryclient/projects/projects\";\n\nexport function applyProjectFilters(\n fileMap: Record,\n projects: Project[],\n dateModifiedFrom: Date,\n dateModifiedTo: Date,\n projectFilter: string,\n fileFilter: string\n): Project[] {\n if (!projects) return [];\n\n let fltProjects = filterProject(projects, projectFilter);\n\n // If no file-level filters are defined, skip file-level filtering of projects\n if (!fileMap || (!dateModifiedFrom && !dateModifiedTo && !fileFilter)) return fltProjects;\n\n const finalProjects: Project[] = [];\n fltProjects.forEach((project) => {\n const files = fileMap[project.id];\n let fltFiles = filterFileName(files, fileFilter);\n\n fltFiles = filterFilesByDateModified(fltFiles, dateModifiedFrom, dateModifiedTo);\n if (fltFiles.length > 0) {\n finalProjects.push(project);\n }\n });\n\n return finalProjects;\n}\n\nexport function applyFileFilters(\n files: ProjectFile[],\n dateModifiedFrom: Date,\n dateModifiedTo: Date,\n fileFilter: string\n): ProjectFile[] {\n if (!files) return files;\n\n let fltFiles = filterFileName(files, fileFilter);\n\n fltFiles = filterFilesByDateModified(fltFiles, dateModifiedFrom, dateModifiedTo);\n\n return fltFiles;\n}\n\nfunction filterFilesByDateModified(files: ProjectFile[], dateModifiedFrom: Date, dateModifiedTo: Date): ProjectFile[] {\n if (!files) return [];\n return files.filter((file) => {\n const lastModified = new Date(file.last_modified);\n const from = !dateModifiedFrom || lastModified >= dateModifiedFrom;\n const to = !dateModifiedTo || lastModified <= dateModifiedTo;\n return from && to;\n });\n}\n\nfunction filterProject(projects: Project[], projectId: string): Project[] {\n if (!projectId || projectId === \"All\") {\n return [...projects];\n } else {\n return projects.filter((project) => {\n return project.id === projectId;\n });\n }\n}\n\nfunction filterFileName(files: ProjectFile[], file: string): ProjectFile[] {\n if (!files) return [];\n let normalizedFilter = file.trim();\n const pattern = new RegExp(normalizedFilter, \"gi\");\n\n return files.filter((file) => {\n return file.name.search(pattern) >= 0;\n });\n}\n\nconst FilterPage = ({ tag }: { tag: SupportedTags }) => {\n const { data: projects = [] } = useProjects({ tag });\n const navigate = useNavigate();\n const {\n dateModifiedFrom,\n dateModifiedTo,\n projectFilter,\n fileFilter,\n setDateFrom,\n setDateTo,\n setFileFilter,\n setProjectFilter,\n } = useDataFilters();\n\n const clearFilteredItems = () => {\n setDateFrom(null);\n setDateTo(null);\n setProjectFilter(\"\");\n setFileFilter(\"\");\n };\n\n return (\n
\n \n \n \n \n \n \n
\n );\n};\n\nexport default FilterPage;\n","import React, { useEffect, useState, ComponentType, useRef } from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { Accordion, AccordionHeader, AccordionItem, AccordionPanel } from \"@fluentui/react-components\";\nimport { Folder20Regular, EditRegular, DeleteRegular } from \"@fluentui/react-icons\";\nimport { Text } from \"@fluentui/react-components\";\nimport { PopoverMenuButton } from \"../../components/PopoverMenuButton\";\nimport { PlaceholderItem } from \"../../components/PlaceholderItem\";\n// import { InitialsList } from \"../../../components/Initial\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport { useProjectFiles } from \"../../../queryclient/projects/projects\";\nimport { useDataFilters } from \"../../hooks/useDataFilters\";\nimport { ExpandNavigation, Project, ProjectFile, SupportedTags } from \"../../../data/projects/models\";\nimport { tagToRoutePrefix } from \"../../../data/projects/utils\";\nimport { applyFileFilters } from \"./Filter\";\nimport styles from \"../../styles.module.scss\";\n\nexport interface ProjectItemProps {\n project: Project;\n item: ProjectFile;\n refreshItems?: () => Promise;\n}\n\nexport function ProjectFolder({\n tag,\n project,\n Item,\n refreshItems,\n startExpanded,\n}: {\n tag: SupportedTags;\n project: Project;\n Item: ComponentType;\n refreshItems?: () => Promise;\n startExpanded?: boolean;\n}) {\n const navigate = useNavigate();\n const location = useLocation();\n const { projectId: highlightProjectId } = (location?.state as ExpandNavigation) || {};\n const folderRef = useRef(null);\n\n const { data: items, isLoading: itemsLoading } = useProjectFiles(project.id);\n const { dateModifiedFrom, dateModifiedTo, fileFilter } = useDataFilters();\n const [filteredFiles, setFilteredFiles] = useState();\n\n useEffect(() => {\n // Scroll to recently used project\n if (project?.id === highlightProjectId) {\n const topY = folderRef.current?.getBoundingClientRect().top + window.scrollY - window.innerHeight / 2;\n folderRef.current?.scrollIntoView({ top: topY, block: \"center\", inline: \"center\", behavior: \"smooth\" });\n }\n }, []);\n\n useEffect(() => {\n const files = applyFileFilters(items, dateModifiedFrom, dateModifiedTo, fileFilter);\n setFilteredFiles(files);\n }, [dateModifiedFrom, dateModifiedTo, fileFilter, items]);\n\n async function deleteProject(id: string): Promise {\n try {\n // Soft Delete in API and remove definition\n const res = await ProjectsService.getProjectById(id);\n\n if (res.ok) {\n const result = await res.json();\n result.metadata.hidden = true;\n await ProjectsService.updateProjectMetadata(id, result);\n // const newDefinitions = { ...projectDefs };\n // delete newDefinitions[id];\n // saveProjectDefinitions({\n // projects: newDefinitions,\n // version: VERSION,\n // });\n }\n await refreshItems();\n } catch (e) {\n // TODO: Error logging\n console.log(e);\n }\n }\n\n return (\n \n \n }\n style={{\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderLeft: project?.id === highlightProjectId ? `2px solid ${styles.primary}` : \"unset\",\n marginBottom: 4,\n }}\n >\n \n {project.title}\n \n {/* TODO: Use initials list to display permissions */}\n {/* */}\n \n {/* Cannot nest button elements, so must absolutely position menu button */}\n {/* If we are importing / using the cloud, use this menu */}\n \n navigate(`${tagToRoutePrefix(tag)}/new-project`, { state: { projectId: project.id } }),\n icon: ,\n },\n {\n actionName: \"Delete\",\n onClickAction: async () => await deleteProject(project.id),\n icon: ,\n },\n ]}\n />\n \n {filteredFiles &&\n !itemsLoading &&\n filteredFiles.map((item) => (\n \n ))}\n {(itemsLoading || !filteredFiles) && }\n \n \n \n );\n}\n","import React, { ComponentType } from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport {\n Accordion,\n AccordionHeader,\n AccordionItem,\n AccordionPanel,\n CounterBadge,\n Spinner,\n} from \"@fluentui/react-components\";\nimport { Person20Regular, PeopleCommunity20Regular, People20Regular } from \"@fluentui/react-icons\";\nimport { Text } from \"@fluentui/react-components\";\nimport { Project, SupportedTags, ExpandNavigation } from \"../../../data/projects/models\";\nimport { useAccount } from \"../../../queryclient/account/account\";\nimport { ProjectFolder, ProjectItemProps } from \"./ProjectFolder\";\nimport { selectMyProjects, selectUserProjects, selectOrgProjects, tagToTitle } from \"../../../data/projects/utils\";\n\nconst iconMap = {\n mine: ,\n org: ,\n user: ,\n};\n\nfunction ProjectGroup({\n id,\n tag,\n title,\n icon,\n projects,\n projectsLoading,\n Item,\n refreshItems,\n startExpanded,\n dataTestId,\n}: {\n id: string;\n tag: SupportedTags;\n title: string;\n icon: \"mine\" | \"org\" | \"user\";\n projects: Project[];\n projectsLoading?: boolean;\n Item: ComponentType;\n refreshItems?: () => Promise;\n startExpanded?: boolean;\n dataTestId?: string;\n}) {\n const location = useLocation();\n const { projectId: highlightProjectId } = (location?.state as ExpandNavigation) || {};\n\n return (\n \n \n \n \n {title}\n \n {projectsLoading ? (\n \n ) : (\n \n )}\n \n \n {projectsLoading ? (\n \n ) : (\n projects.map((project) => (\n \n ))\n )}\n \n \n \n );\n}\n\nexport function ProjectGroups({\n tag,\n projects,\n projectsLoading,\n Item,\n refreshItems,\n startExpanded,\n}: {\n tag: SupportedTags;\n projects: Project[];\n projectsLoading?: boolean;\n Item: ComponentType;\n refreshItems?: () => Promise;\n startExpanded?: boolean;\n}) {\n const { data: account, isLoading: isLoadingAccount } = useAccount();\n return (\n <>\n \n \n \n \n );\n}\n","import React, { ReactNode } from \"react\";\n\nexport const Conditional = ({ condition, children }: { condition: boolean; children: ReactNode }) => {\n if (!condition) return null;\n return <>{children};\n};\n","import React from \"react\";\nimport { Row } from \"./Layout/Space\";\n\nexport const ValueCircle: React.FC<{ value: number; size?: number; label: string }> = ({ value, size = 15, label }) => (\n \n \n \n {value}\n \n \n);\n","import React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Button, TagGroup, TagGroupProps, Tag } from \"@fluentui/react-components\";\nimport { Filter16Filled } from \"@fluentui/react-icons\";\nimport { ValueCircle } from \"../../components/ValueCircle\";\nimport { Row } from \"../../components/Layout/Space\";\nimport { useDataFilters } from \"../../hooks/useDataFilters\";\nimport { Project, SupportedTags } from \"../../../data/projects/models\";\nimport { tagToRoutePrefix } from \"../../../data/projects/utils\";\nimport styles from \"../../styles.module.scss\";\nimport \"./Filter.scss\";\n\nexport const FilterButton = ({ tag, projects }: { tag: SupportedTags; projects: Project[] }) => {\n const navigate = useNavigate();\n const {\n dateModifiedFrom,\n setDateFrom,\n dateModifiedTo,\n setDateTo,\n projectFilter,\n setProjectFilter,\n fileFilter,\n setFileFilter,\n } = useDataFilters();\n\n const setItemsLookup = {\n dateModifiedFrom: () => setDateFrom(null),\n dateModifiedTo: () => setDateTo(null),\n projectFilter: () => setProjectFilter(\"\"),\n fileFilter: () => setFileFilter(\"\"),\n };\n\n const filterItems = {\n dateModifiedFrom,\n dateModifiedTo,\n projectFilter,\n fileFilter,\n };\n\n function displayDate(date: Date) {\n return date.toISOString().slice(0, 10);\n }\n\n function displayProjectName(id: string) {\n if (!projects) return \"\";\n const matches = projects?.filter((project) => project.id === id);\n if (matches.length === 0) return \"All\";\n return matches[0].title;\n }\n\n const filterDisplay = {\n dateModifiedFrom: displayDate,\n dateModifiedTo: displayDate,\n projectFilter: displayProjectName,\n fileFilter: (x: string) => x,\n };\n\n const totalCount = Object.values(filterItems).filter((i) => i).length;\n\n const removeItem: TagGroupProps[\"onDismiss\"] = (_e, { value }) => {\n setItemsLookup[value]();\n };\n\n return (\n <>\n \n }\n className=\"secondary\"\n style={{\n marginRight: 10,\n marginBottom: 10,\n minWidth: 28,\n height: 28,\n backgroundColor: \"transparent\",\n borderColor: styles.secondary,\n }}\n onClick={() => navigate(`${tagToRoutePrefix(tag)}/filter`)}\n >\n {totalCount > 0 && }\n \n \n {totalCount > 0 && (\n
\n \n {Object.entries(filterItems).map(\n ([id, filt]) =>\n filt && (\n \n {filterDisplay[id](filt)}\n \n )\n )}\n \n \n \n {\n setDateFrom(null);\n setDateTo(null);\n setProjectFilter(\"\");\n setFileFilter(\"\");\n }}\n >\n reset filters\n \n \n
\n )}\n \n );\n};\n","import { UseMutationResult, useMutation, useQuery } from \"@tanstack/react-query\";\nimport { BASE_URL } from \"../../auth/auth-api\";\nimport { authenticatedRequest } from \"../request\";\nimport { UserSettingType, UserSettingDefaults, UserSettings } from \"./types\";\nimport { queryClient } from \"../../taskpane\";\nimport { getGlobal } from \"xlcommon/src/global\";\n\nconst STALE_TIME_MINUTES = 3;\nconst STALE_TIME_MS = STALE_TIME_MINUTES * 60 * 1000;\nconst URL = `${BASE_URL}/api/user_settings`;\n\nconst g = getGlobal();\n\nexport function useAddSettingToDatabase(usersetting: string) {\n const defs: UserSettingType = UserSettingDefaults[usersetting];\n if (defs === undefined) throw Error(`Invalid UserSetting: ${usersetting}`);\n\n const mutation: UseMutationResult = useMutation({\n mutationKey: [`setting-${defs.category}`],\n mutationFn: (settingValue: UserSettingType[\"value\"]) =>\n authenticatedRequest({\n path: `/`,\n url: URL,\n method: \"POST\",\n body: JSON.stringify({ category: defs.category, setting_name: defs.settingName, value: settingValue }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [`usersettings-${defs.category}-${defs.settingName}`],\n refetchType: \"all\",\n exact: true,\n });\n },\n });\n return mutation;\n}\n\nexport function useUserSetting(usersetting: string) {\n const defs: UserSettingType = UserSettingDefaults[usersetting];\n if (defs === undefined) throw Error(`Invalid UserSetting: ${usersetting}`);\n\n const userSettingsQuery = useQuery({\n queryKey: [`usersettings-${defs.category}-${defs.settingName}`],\n queryFn: () => authenticatedRequest({ path: `/${defs.category}/${defs.settingName}`, url: URL, method: \"GET\" }),\n staleTime: STALE_TIME_MS,\n retry: true,\n });\n\n return {\n ...userSettingsQuery,\n // If setting was not in database (userSettingsQuery.data.settingName == null), return the default value\n data:\n userSettingsQuery?.data?.[defs.settingName] !== null ? userSettingsQuery?.data?.[defs.settingName] : defs.value,\n };\n}\n\n/**********************************************************\n * Utilities used for Testing\n **********************************************************/\n\nasync function testUtilGetUserSettings(category: string) {\n // Check for accidental request for a single setting\n if (category.indexOf(\".\") !== -1) return await testUtilGetUserSetting(category);\n\n // Verify category is known\n if (UserSettings[category] === undefined) throw Error(`Invalid category: ${category}`);\n\n return await authenticatedRequest({ path: `/${category}`, url: URL, method: \"GET\" });\n}\n\nasync function testUtilGetUserSetting(usersetting: string) {\n // Check for accidental request for a category of settings\n if (usersetting.indexOf(\".\") === -1) return await testUtilGetUserSettings(usersetting);\n\n // Verify usersetting is known\n const defs: UserSettingType = UserSettingDefaults[usersetting];\n if (defs === undefined) throw Error(`Invalid UserSetting: ${usersetting}`);\n\n const data = await authenticatedRequest({ path: `/${defs.category}/${defs.settingName}`, url: URL, method: \"GET\" });\n if (data?.[defs.settingName] === null) {\n data[\"defaultValue\"] = defs.value;\n }\n return data;\n}\n\nasync function testUtilDelUserSetting(usersetting: string) {\n const defs: UserSettingType = UserSettingDefaults[usersetting];\n if (defs === undefined) throw Error(`Invalid UserSetting: ${usersetting}`);\n\n await authenticatedRequest({ path: `/${defs.category}/${defs.settingName}`, url: URL, method: \"DELETE\" });\n return `Successfully deleted ${defs.category}.${defs.settingName}`;\n}\n\nasync function testUtilSetUserSetting(usersetting: string, value: UserSettingType[\"value\"]) {\n const defs: UserSettingType = UserSettingDefaults[usersetting];\n if (defs === undefined) throw Error(`Invalid UserSetting: ${usersetting}`);\n\n const data = await authenticatedRequest({\n path: `/`,\n url: URL,\n method: \"POST\",\n body: JSON.stringify({ category: defs.category, setting_name: defs.settingName, value }),\n });\n return {\n category: defs.category,\n [defs.settingName]: data[defs.settingName],\n };\n}\n(g as any).testUtilGetUserSettings = testUtilGetUserSettings;\n(g as any).testUtilGetUserSetting = testUtilGetUserSetting;\n(g as any).testUtilDelUserSetting = testUtilDelUserSetting;\n(g as any).testUtilSetUserSetting = testUtilSetUserSetting;\n","import React, { useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n Body1Stronger,\n Button,\n Checkbox,\n CheckboxProps,\n Dialog,\n DialogBody,\n DialogContent,\n DialogSurface,\n Text,\n} from \"@fluentui/react-components\";\nimport { Add16Regular, ChevronRight16Regular } from \"@fluentui/react-icons\";\nimport { Col, Row } from \"../../components/Layout/Space\";\nimport { useAddSettingToDatabase } from \"../../../queryclient/settings/settings\";\nimport { Icon } from \"@fluentui/react/lib/Icon\";\nimport { SupportedTags } from \"../../../data/projects/models\";\nimport { tagToRoutePrefix, tagToUserSettings } from \"../../../data/projects/utils\";\n\n// Note: In react development strict mode, this will automatically navigate to connections\nexport const GettingStartedDialog = ({ tag, open }: { tag: SupportedTags; open: boolean }) => {\n const navigate = useNavigate();\n const [hideLanding, setHideLanding] = useState(false);\n const [openDialog, setOpenDialog] = useState(null);\n const mutation = useAddSettingToDatabase(tagToUserSettings(tag).LandingSeen);\n\n return (\n \n \n \n \n {\n setOpenDialog(false);\n mutation.mutate(hideLanding);\n }}\n />\n
\n \n \n {tag === \"data\" && \"Access your data anywhere\"}\n {tag === \"code_snippet\" && \"Access your code anywhere\"}\n \n \n {tag === \"data\" && \"Share, analyze, and visualize your data using Anaconda Toolbox.\"}\n {tag === \"code_snippet\" && \"Share and reuse code snippets using Anaconda Toolbox.\"}\n \n {\n setHideLanding(data.checked);\n }}\n label={\n \n \n {\"Don't show this message again\"}\n \n \n }\n />\n }\n iconPosition=\"before\"\n data-testid=\"get-started\"\n onClick={() => navigate(`${tagToRoutePrefix(tag)}/new-project`)}\n >\n Create a Project\n \n }\n iconPosition=\"after\"\n data-testid=\"learn-more\"\n onClick={() =>\n window.open(`https://docs.anaconda.com/excel/toolbox${tagToRoutePrefix(tag)}`, \"_blank\")?.focus()\n }\n >\n Learn More\n \n \n
\n
\n
\n
\n
\n );\n};\n\nexport default GettingStartedDialog;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Projects.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Projects.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState, ComponentType } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Add16Filled } from \"@fluentui/react-icons\";\nimport { Button, Tooltip } from \"@fluentui/react-components\";\nimport { ProjectGroups } from \"./ProjectGroups\";\nimport { Col, Row } from \"../../components/Layout/Space\";\nimport { Conditional } from \"../../components/Conditional\";\nimport { useProjects } from \"../../../queryclient/projects/projects\";\nimport { useDataFilters } from \"../../hooks/useDataFilters\";\nimport { FilterButton } from \"./FilterButton\";\nimport { applyProjectFilters } from \"./Filter\";\nimport { Project, ProjectFile, SupportedTags } from \"../../../data/projects/models\";\nimport { tagToTitle, tagToRoutePrefix, tagToUserSettings } from \"../../../data/projects/utils\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport GettingStartedDialog from \"./GettingStartedDialog\";\nimport { useUserSetting } from \"../../../queryclient/settings/settings\";\nimport { ProjectItemProps } from \"./ProjectFolder\";\nimport styles from \"../../styles.module.scss\";\nimport \"./Projects.scss\";\n\nexport interface ProjectsExplorerProps {\n tag: SupportedTags;\n Item: ComponentType;\n startExpanded?: boolean; // This forces all project groups and project folders to be expanded\n allowNewProject?: boolean;\n additionalProjectFilter?: (project: Project) => Project;\n refreshItems?: () => Promise;\n}\n\nfunction ProjectsExplorer({\n tag,\n Item,\n startExpanded = false,\n allowNewProject = true,\n additionalProjectFilter = null,\n refreshItems = null,\n}: ProjectsExplorerProps) {\n const navigate = useNavigate();\n const { data: landingSeen = undefined } = useUserSetting(tagToUserSettings(tag).LandingSeen);\n\n const {\n isLoading: projectsLoading,\n data: projects = [],\n refetch: fetchProjects,\n } = useProjects({\n tag,\n filter: additionalProjectFilter,\n });\n const { dateModifiedFrom, dateModifiedTo, projectFilter, fileFilter } = useDataFilters();\n\n async function refreshProjects() {\n await fetchProjects();\n setNeedsFilesMap(true);\n if (refreshItems) await refreshItems();\n }\n\n useEffect(() => {\n // Reset the filter if projects changed\n // TODO: Project reference should not be used here - filter the existing project or refetch all projects\n setFilteredProjects([...projects]);\n }, [projects.length]);\n\n const [filteredProjects, setFilteredProjects] = useState([...projects]);\n const [filesMap, setFilesMap] = useState>();\n const [filesMapLoading, setFilesMapLoading] = useState(false);\n const [needsFilesMap, setNeedsFilesMap] = useState(false);\n\n async function getFiles(projects: Project[]): Promise> {\n setFilesMapLoading(true);\n try {\n let filesMap = {};\n const promises = projects.map(async (project) => {\n try {\n const filesObject = await ProjectsService.getProjectFiles(project.id);\n filesMap[project.id] = filesObject?.items;\n return filesMap[project.id];\n } catch (e) {\n if (e.message.includes(\"Unable to find latest version\")) {\n filesMap[project.id] = [];\n }\n }\n });\n await Promise.all(Object.values(promises));\n setFilesMapLoading(false);\n return filesMap;\n } catch (err) {\n console.log(err);\n setFilesMapLoading(false);\n return {};\n }\n }\n\n useEffect(() => {\n if (needsFilesMap && projects.length > 0 && (dateModifiedFrom || dateModifiedTo || fileFilter)) {\n try {\n (async () => {\n const filesMap = await getFiles(projects);\n setFilesMap({ ...filesMap });\n })();\n } catch (err) {\n console.log(err);\n }\n }\n }, [needsFilesMap]);\n\n useEffect(() => {\n (async () => {\n // Only trigger fetching of all files if at least one file-level filter is defined\n if ((fileFilter || dateModifiedFrom || dateModifiedTo) && !needsFilesMap) {\n setNeedsFilesMap(true);\n }\n const fltProj = applyProjectFilters(\n filesMap,\n projects,\n dateModifiedFrom,\n dateModifiedTo,\n projectFilter,\n fileFilter\n );\n setFilteredProjects(fltProj);\n })();\n }, [dateModifiedFrom, dateModifiedTo, projectFilter, fileFilter, projectsLoading, filesMap]);\n\n return (\n
\n {/* undefined (initial state) = don't show, true = don't show, false = show */}\n \n \n \n \n }\n iconPosition=\"before\"\n onClick={() => navigate(`${tagToRoutePrefix(tag)}/new-project`)}\n data-testid=\"new-project\"\n >\n New Project\n \n \n }\n iconPosition=\"before\"\n onClick={() => navigate(`${tagToRoutePrefix(tag)}/export`)}\n data-testid=\"upload-dataset\"\n disabled={projects?.length == 0}\n >\n {`New ${tagToTitle(tag)}`}\n \n \n \n \n \n
\n \n \n \n \n
\n 0}\n />\n \n
\n );\n}\n\nexport default ProjectsExplorer;\n","import { refreshRangeSelection, runExcelSafeContext } from \"xlcommon/src/excel/excel-grid-utils\";\nimport ProjectsService from \"./projects/projects-api\";\nimport {\n CloudProjectDefinition,\n CloudProjectDefinitions,\n CloudProjectFileDefinition,\n PROJECT_DEFINITIONS,\n VERSION,\n} from \"./models\";\n\n// Note:\n// The file extension must be saved in the data definition, because when we download files and their names, they have extensions on them.\n// Failure to do this will result in missing connection arrows due to differing file names stored in the definitions (i.e. `test` versus `test.csv`).\n// When uploading, we add on a file extension to the file name, because we only have the data set title and can assume type based on workbook\n\nexport async function loadProjectDefinitions(): Promise {\n return await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n const savedSources = settings.getItemOrNullObject(PROJECT_DEFINITIONS);\n savedSources.load(\"value\");\n await context.sync();\n\n if (savedSources.isNullObject) {\n return {\n projects: {} as CloudProjectDefinitions[\"projects\"],\n version: VERSION,\n };\n } else {\n let projectDefinitions = JSON.parse(savedSources.value);\n if (!projectDefinitions.projects || projectDefinitions.version < VERSION) {\n return {\n projects: {} as CloudProjectDefinitions[\"projects\"],\n version: VERSION,\n };\n }\n\n // Update range selections for Bindings\n for (let i = 0; i < projectDefinitions.projects.length; i++) {\n let project: CloudProjectDefinition = projectDefinitions.projects[i];\n Object.values(project.files).map(\n async (fileDefinition) =>\n (fileDefinition.sourceSelection = await refreshRangeSelection(fileDefinition.sourceSelection))\n );\n }\n return projectDefinitions;\n }\n });\n}\n\nexport async function updateProjectDefinitions(projectId: string, newDefinition: CloudProjectFileDefinition) {\n const cloudProjectDefs = await loadProjectDefinitions();\n if (cloudProjectDefs.projects[projectId] && cloudProjectDefs.projects[projectId].files) {\n // Replace file definition associated with this project\n cloudProjectDefs.projects[projectId].files[newDefinition.fileName] = { ...newDefinition };\n } else {\n // No project definition exists yet - Add new definition for project and file\n const projectRes = await ProjectsService.getProjectById(projectId);\n const project = await projectRes.json();\n\n cloudProjectDefs.projects[projectId] = {\n id: projectId,\n title: project.title, // get project title and name\n name: project.name,\n files: {\n [newDefinition.fileName]: { ...newDefinition },\n },\n } as CloudProjectDefinition;\n }\n\n await saveProjectDefinitions({\n projects: cloudProjectDefs.projects,\n version: VERSION,\n } as CloudProjectDefinitions);\n}\n\nexport async function saveProjectDefinitions(data: CloudProjectDefinitions) {\n await runExcelSafeContext(async (context) => {\n const settings = context.workbook.settings;\n let serialized = JSON.stringify(data);\n settings.add(PROJECT_DEFINITIONS, serialized);\n await context.sync();\n });\n}\n","import React, { ReactElement, ReactNode, useState } from \"react\";\nimport {\n Dialog,\n DialogSurface,\n DialogTitle,\n DialogBody,\n DialogContent,\n DialogActions,\n Button,\n DialogTrigger,\n DialogModalType,\n} from \"@fluentui/react-components\";\nimport { Row } from \"../Layout/Space\";\nimport \"../Notification.scss\";\n\n// With children / button trigger\nexport const CustomDialogWithTrigger: React.FC<{\n title: string;\n content: string | ReactElement;\n icon?: ReactNode;\n children?: ReactElement;\n onContinue?: () => Promise;\n}> = ({ title, content, icon, children, onContinue }) => {\n const [open, setIsOpen] = useState(false);\n async function onContinueClick() {\n await onContinue();\n setIsOpen(!open);\n }\n\n return (\n setIsOpen(data.open)}>\n {children}\n \n \n \n \n {icon}\n {title}\n \n \n {content}\n \n \n \n \n \n \n \n \n \n );\n};\n\n// With programmatic trigger\nexport const CustomDialog: React.FC<{\n title: string;\n content: string | ReactElement;\n icon?: ReactNode;\n buttonText?: string;\n dismissText?: string;\n onContinue?: (() => Promise) | (() => void);\n disableContinue?: boolean;\n openDialog: boolean;\n setOpenDialog?: (open: boolean) => void;\n modalType?: DialogModalType;\n onCancel?: (() => Promise) | (() => void);\n}> = ({\n title,\n content,\n icon,\n buttonText = \"Continue\",\n dismissText = \"Cancel\",\n openDialog = false,\n setOpenDialog,\n onContinue,\n disableContinue = false,\n modalType = \"non-modal\",\n onCancel,\n}) => {\n async function onContinueClick() {\n await onContinue();\n setOpenDialog?.(!open);\n }\n\n async function onCancelClick() {\n await onCancel?.();\n setOpenDialog?.(false);\n }\n\n return (\n setOpenDialog?.(data.open)}>\n \n \n \n \n {icon}\n {title}\n \n \n {content}\n \n \n \n \n \n \n \n );\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./PreviewTable.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./PreviewTable.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport {\n TableBody,\n TableCell,\n TableRow,\n Table,\n TableHeader,\n TableHeaderCell,\n Spinner,\n} from \"@fluentui/react-components\";\nimport \"./PreviewTable.scss\";\nimport styles from \"../styles.module.scss\";\n\nexport type Column = {\n columnKey: string;\n label: string;\n};\n\n/**\n * Usage:\n * \n const columns: Column[] = [\n { columnKey: \"ColumnA\", label: \"ColumnA\" },\n { columnKey: \"ColumnB\", label: \"ColumnB\" },\n { columnKey: \"ColumnC\", label: \"ColumnC\" },\n ];\n\n \n */\n\n/**\n *\n * @param columns : Column[]\n * @param items : Array of object types to be rendered and cast to string;\n * The columnKey must match the items key. i.e.\n * [\n * {\n * \"ColumnA\": 32,\n * \"ColumnB\": 45\n * },\n * ...\n * ]\n * @returns Fluent UI Table preview of Excel cells\n */\nexport function PreviewTable({\n columns,\n items,\n}: {\n columns: Column[];\n items: Array>;\n}): JSX.Element {\n return (\n
\n \n \n \n \n {columns.map((column) => (\n \n {column.label}\n \n ))}\n \n \n \n {items.map((item, index) => (\n \n {item[columns[0].columnKey] as string}\n {item[columns[1].columnKey] as string}\n {item[columns[2].columnKey] as string}\n \n ))}\n \n
\n
\n );\n}\n\n/**\n * Usage:\n * \n * \n */\n\n/**\n * @param param0 columns: string array of column titles\n * @param param1 items: matrix of primitive typed values of each row, which may contain a mix of numbers and strings\n * @returns Table JSX Element\n */\nexport function PrimitivePreviewTable({\n title,\n columns,\n items,\n}: {\n title?: string;\n columns: string[];\n items: T[][]; // Assumes primitive type\n}): JSX.Element {\n if (!items) {\n return ;\n }\n return (\n
\n \n \n \n \n {columns?.map((column) => (\n \n {column as string}\n \n ))}\n \n \n \n {/* The first row of data is the column data, so ignore the first row */}\n {items?.slice(1).map((row, index) => {\n return (\n \n {/* Only use the index for key if this table data is read-only */}\n {row?.map((item, index) => (\n \n {item?.toString()}\n \n ))}\n \n );\n })}\n \n \n
\n );\n}\n","import { AsyncDuckDB, ConsoleLogger, DuckDBBundles, selectBundle } from \"@duckdb/duckdb-wasm\";\nimport { RangeType, displayRangeSelection, overwriteSheet, overwriteTable } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { convertEpochToExcel, convertDateToExcel, EXCEL_BASE } from \"xlcommon/src/excel/excel-date-utils\";\nimport { Type as ArrowType, DateUnit as ArrowDateUnit, TimeUnit as ArrowTimeUnit } from \"apache-arrow\";\nimport ProjectsService from \"./projects/projects-api\";\nimport { CloudProjectFileDefinition } from \"./models\";\n\nconst MAX_FILESIZE = 100_000_000;\nconst MAX_FILES = 20;\n\nasync function cleanupDuckDBFilesystem(db: AsyncDuckDB) {\n const files = await db.globFiles(\"*\");\n // Sort in reverse order by fileId\n files.sort((a, b) => (a.fileId < b.fileId ? 1 : -1));\n while (files.length > MAX_FILES || files.reduce((size, file) => size + file.fileSize, 0) > MAX_FILESIZE) {\n const lastFile = files.pop();\n await db.dropFile(lastFile.fileName);\n }\n}\n\ntype PreviewConfiguration = {\n overwrite?: boolean;\n previewRowCount?: number;\n convert?: boolean;\n};\nexport async function downloadFile(\n projectId: string,\n projectFileDefinition: CloudProjectFileDefinition,\n { overwrite = true, previewRowCount = 0, convert = true }: PreviewConfiguration = {}\n): Promise<{ content: any[]; rowCount?: number; columnCount?: number }> {\n try {\n const db = await prepDatabase();\n\n // TODO: Save file type as metadata when PUT-ing file\n // Fetch file metadata to obtain latest signed URL\n const fileResponse = await ProjectsService.getFileMetadata(projectId, projectFileDefinition.fileName);\n const file = fileResponse?.items?.[0];\n const suffix = file.name.split(\".\").pop().toLowerCase();\n const URL = file.signed_url ?? file.url;\n const uniqueName = `File${file.file_version_id.replaceAll(\"-\", \"\")}.${suffix}`;\n\n // If file is already downloaded, don't download again\n const filesFound = await db.globFiles(uniqueName);\n if (filesFound.length == 0) {\n console.log(`Downloading ${file.name}`);\n const response = await fetch(URL);\n const data = await response.text();\n await db.registerFileText(uniqueName, data);\n await cleanupDuckDBFilesystem(db);\n }\n\n let query = projectFileDefinition.query ?? \"SELECT * FROM data\";\n const fullFileCountQuery: string = `SELECT COUNT(*) FROM data`;\n // Limit the results if we are downloading the file for preview\n if (previewRowCount) {\n const match = query.match(/ LIMIT \\d+/i);\n if (match) {\n const limit = parseInt(match[0].slice(7));\n query = query.replace(/ LIMIT \\d+/i, ` LIMIT ${Math.min(previewRowCount, limit)}`);\n } else {\n query = `${query} LIMIT ${previewRowCount}`;\n }\n }\n // Build replacement based on suffix type\n let replacement = uniqueName;\n if (suffix === \"csv\") {\n replacement = `read_csv_auto(${replacement}, header=True, all_varchar=${convert ? \"False\" : \"True\"})`;\n } else if (suffix === \"parquet\") {\n replacement = `read_parquet(${replacement})`;\n }\n // Rename complex table name \"AS data\" for nicer error messages, unless already renamed\n if (!query.toLocaleLowerCase().includes(\"from data as \")) {\n replacement = `${replacement} AS data`;\n }\n\n // Query the table\n const conn = await db.connect();\n let resp = await conn.query(query.replaceAll(/\\bdata\\b/g, replacement));\n let fullRowColumnCount = await conn.query(fullFileCountQuery.replaceAll(/\\bdata\\b/g, replacement));\n const rowCount = fullRowColumnCount.toArray()[0][\"count_star()\"];\n if (overwrite) console.log(`${projectFileDefinition.fileName} size = ${resp.numRows} x ${resp.numCols}`);\n let content = [];\n // Header\n content.push(resp.schema.names);\n // Types (github.com/apache/arrow/js/src/type.ts)\n const typesFound = []; // used for debug printing\n const typeCast = [];\n const numberFormat = [];\n resp.schema.fields.forEach((f) => {\n switch (f.typeId) {\n case ArrowType.Date:\n if (f.type.unit === ArrowDateUnit.DAY) {\n typesFound.push(`[${f.name}] as Date.DAY`);\n typeCast.push((x: Date) => convertDateToExcel(x));\n numberFormat.push(\"yyyy-mm-dd\");\n } else if (f.type.unit === ArrowDateUnit.MILLISECOND) {\n typesFound.push(`[${f.name}] as Date.MILLISECOND`);\n typeCast.push((x: number) => convertEpochToExcel(x));\n numberFormat.push(\"yyyy-mm-dd\");\n }\n break;\n case ArrowType.Timestamp:\n typesFound.push(`[${f.name}] as Timestamp`);\n typeCast.push((x: number) => convertEpochToExcel(x));\n numberFormat.push(\"yyyy-mm-dd hh:mm:ss\");\n break;\n case ArrowType.Time:\n if (f.type.unit === ArrowTimeUnit.NANOSECOND) {\n typesFound.push(`[${f.name}] as Time.NANOSECOND`);\n typeCast.push((x: bigint) => convertEpochToExcel(Number(x / 1000000n)) - EXCEL_BASE);\n } else if (f.type.unit === ArrowTimeUnit.MICROSECOND) {\n typesFound.push(`[${f.name}] as Time.MICROSECOND`);\n typeCast.push((x: bigint) => convertEpochToExcel(Number(x / 1000n)) - EXCEL_BASE);\n } else if (f.type.unit === ArrowTimeUnit.MILLISECOND) {\n typesFound.push(`[${f.name}] as Time.MILLISECOND`);\n typeCast.push((x: number) => convertEpochToExcel(x) - EXCEL_BASE);\n } else if (f.type.unit === ArrowTimeUnit.SECOND) {\n typesFound.push(`[${f.name}] as Time.SECOND`);\n typeCast.push((x: number) => convertEpochToExcel(x * 1000) - EXCEL_BASE);\n }\n numberFormat.push(\"hh:mm:ss\");\n break;\n case ArrowType.Int:\n typesFound.push(`[${f.name}] as Int`);\n typeCast.push(null);\n numberFormat.push(null);\n break;\n case ArrowType.Float:\n typesFound.push(`[${f.name}] as Float`);\n typeCast.push(null);\n numberFormat.push(null);\n break;\n case ArrowType.Utf8:\n typesFound.push(`[${f.name}] as String.UTF8`);\n typeCast.push(null);\n numberFormat.push(null);\n break;\n case ArrowType.Bool:\n typesFound.push(`[${f.name}] as Bool`);\n typeCast.push(null);\n numberFormat.push(null);\n break;\n default:\n typesFound.push(`[${f.name}] as `);\n typeCast.push(null);\n numberFormat.push(null);\n break;\n }\n });\n // Console log the types found\n if (overwrite) console.log(`${projectFileDefinition.fileName} columns = ${typesFound}`);\n\n // Build list of lists from Data (including date+time conversions for Excel)\n resp.toArray().forEach((row) => {\n content.push(\n // eslint-disable-next-line\n [...row].map(([_, value], i: number) => {\n const caster = typeCast[i];\n if (caster) return caster(value);\n return value;\n })\n );\n });\n\n if (overwrite) {\n await putContentInSpreadsheet(projectFileDefinition, content, numberFormat);\n }\n\n // Clean up\n conn.close();\n\n return { content, rowCount, columnCount: resp.numCols };\n } catch (e) {\n // Explicitly handle wrong table name\n if (e?.message?.startsWith(\"Catalog Error: Table with name\")) {\n throw new Error('Catalog Error: The SQL table must be named \"data\" (i.e. SELECT * FROM data)');\n } else {\n throw new Error(e);\n }\n }\n}\n\nasync function putContentInSpreadsheet(\n definition: CloudProjectFileDefinition,\n content: any[][],\n numberFormat?: string[]\n) {\n switch (definition.sourceSelection.rangeType) {\n case RangeType.Sheet:\n await overwriteSheet(definition.sourceSelection.identifier, content, numberFormat);\n break;\n case RangeType.Table:\n await overwriteTable(definition.sourceSelection.identifier, content, numberFormat);\n break;\n default:\n throw Error(\n `Invalid destination: ${displayRangeSelection(definition.sourceSelection)}\\nOnly Sheet and Table allowed`\n );\n }\n}\n\nconst DUCKDB_MANUAL_BUNDLES: DuckDBBundles = {\n mvp: {\n mainModule: new URL(\"@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm\", import.meta.url).toString(),\n mainWorker: new URL(\"@duckdb/duckdb-wasm/dist/duckdb-browser-mvp.worker.js\", import.meta.url).toString(),\n },\n eh: {\n mainModule: new URL(\"@duckdb/duckdb-wasm/dist/duckdb-eh.wasm\", import.meta.url).toString(),\n mainWorker: new URL(\"@duckdb/duckdb-wasm/dist/duckdb-browser-eh.worker.js\", import.meta.url).toString(),\n },\n};\n\nlet _db: AsyncDuckDB;\nlet _dbLoadingFlag = false;\nasync function prepDatabase(): Promise {\n if (_db === undefined) {\n if (!_dbLoadingFlag) {\n // Grab the flag\n _dbLoadingFlag = true;\n } else {\n // Wait for 0.25 seconds and try again\n await new Promise((resolve) => setTimeout(resolve, 250));\n return await prepDatabase();\n }\n // Select a bundle based on browser checks\n const duckBundle = await selectBundle(DUCKDB_MANUAL_BUNDLES);\n // Instantiate the asynchronous version of DuckDB-wasm\n const duckDbWorker = new Worker(duckBundle.mainWorker!);\n const duckDbLogger = new ConsoleLogger();\n const _dbTemp = new AsyncDuckDB(duckDbLogger, duckDbWorker);\n console.log(\"Initializing DuckDB\");\n await _dbTemp.instantiate(duckBundle.mainModule, duckBundle.pthreadWorker);\n\n // Monkey patch BIGINT so tables can be JSON-serialized\n BigInt.prototype[\"toJSON\"] = function () {\n return this.toString();\n };\n\n _db = _dbTemp;\n _dbLoadingFlag = false;\n }\n return _db;\n}\n","import React, { useEffect, useRef, useState } from \"react\";\nimport { useNavigate, useLocation } from \"react-router-dom\";\nimport { Field, Button, Spinner } from \"@fluentui/react-components\";\nimport { CloudArrowDown20Regular, TableFreezeRow20Regular, Warning20Regular } from \"@fluentui/react-icons\";\nimport IconHeader from \"../../../components/Typography\";\nimport { ActionButtonRow } from \"../../../components/Layout/Space\";\nimport TableChooser from \"../../../../excel/components/TableChooser\";\nimport { CustomDialogWithTrigger } from \"../../../components/Dialogs/CustomDialog\";\nimport { PrimitivePreviewTable } from \"../../../components/PreviewTable\";\nimport {\n EXCEL_ROW_MAX,\n EXCEL_COLUMN_MAX,\n RangeSelection,\n RangeType,\n getFullAddressFromRangeSelection,\n splitFullAddress,\n readFromRange,\n displayRangeSelection,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport { updateProjectDefinitions } from \"../../../../data/data-api\";\nimport { downloadFile } from \"../../../../data/data-api-download\";\nimport { CloudProjectDefinition, CloudProjectFileDefinition, Direction } from \"../../../../data/models\";\nimport WarningMessageBlock from \"./MessageBlock\";\nimport ImportPyObjectCheckbox from \"./ImportPythonObject\";\nimport AddressChooser from \"../../../../excel/components/AddressChooser\";\nimport { writePyScriptCloudDataCard } from \"xlcommon/src/pyscript/local-data\";\nimport { snakeEyesRecord } from \"../../../../analytics/snake-eyes\";\nimport styles from \"../../../styles.module.scss\";\nimport \"./ConnectToWorkbook.scss\";\nimport { getPythonLocation } from \"../../../../excel/grid-utils\";\nimport { PythonExecutionLocation } from \"../../../../excel/types\";\nimport { ExpandNavigation } from \"../../../../data/projects/models\";\n\n// For creating / after import source selection\nexport type DataImportProps = {\n projectId?: CloudProjectDefinition[\"id\"];\n selectedImportFileName: CloudProjectFileDefinition[\"fileName\"];\n} & EditDataImportProps;\n\nexport enum ImportResolution {\n Download = \"download\",\n NewVersion = \"newVersion\",\n ReDownload = \"reDownload\",\n OverwriteWorkbook = \"overwriteWorkbook\",\n}\n\nfunction getButtonText(resolution: ImportResolution): string {\n switch (resolution) {\n case ImportResolution.Download:\n return \"Download to Workbook\";\n case ImportResolution.NewVersion:\n return \"Download New Version\";\n case ImportResolution.ReDownload:\n return \"Re-download Data\";\n case ImportResolution.OverwriteWorkbook:\n return \"Overwrite Data in Excel\";\n }\n}\n\nexport type EditDataImportProps = {\n id?: CloudProjectDefinition[\"id\"];\n query?: CloudProjectFileDefinition[\"query\"];\n destSelection?: CloudProjectFileDefinition[\"sourceSelection\"];\n resolution?: ImportResolution;\n};\n\nconst PREVIEW_ROW_COUNT = 6;\n\nconst ConnectToWorkbook: React.FC = () => {\n const navigate = useNavigate();\n\n // Data source selection (SelectSource) may update the navigation state with the selected import source\n const location = useLocation();\n\n const {\n selectedImportFileName,\n projectId,\n query: editQuery = \"SELECT * FROM data\",\n destSelection: editDestSelection,\n resolution = ImportResolution.Download,\n }: DataImportProps = location?.state || {};\n\n const [sqlQuery, setSQLQuery] = useState(editQuery);\n const [sqlQueryDebounced, setSqlQueryDebounced] = useState(editQuery);\n const debounceTimer = useRef();\n const debounceQueryChange = (value: string) => {\n setSQLQuery(value);\n if (debounceTimer?.current) {\n clearTimeout(debounceTimer?.current);\n }\n debounceTimer.current = setTimeout(() => setSqlQueryDebounced(value), 700);\n };\n\n const [dataPlacement, setDataPlacement] = useState(editDestSelection);\n const [cardViewCell, setCardViewCell] = useState(editDestSelection);\n const [importAsLocalObject, setImportAsLocalObject] = useState(\n editDestSelection?.rangeType == RangeType.CellBinding\n );\n\n const [executionLocation, setExecutionLocation] = useState(PythonExecutionLocation.Azure);\n\n useEffect(() => {\n (async () => {\n const execLoc = await getPythonLocation();\n setExecutionLocation(execLoc);\n // TODO: handle re-download case where local Python connection is made and later execution location is changed to Azure\n })();\n }, []);\n\n const [canSkipOverwriteWarning, setCanSkip] = useState(false);\n useEffect(() => {\n (async () => {\n let skippable = false;\n // If sheet is blank, it's okay to skip\n if (dataPlacement?.rangeType === RangeType.Sheet) {\n const fullAddress = await getFullAddressFromRangeSelection(dataPlacement);\n const [, addr] = splitFullAddress(fullAddress);\n if (addr === \"A1\") {\n const data = await readFromRange(fullAddress);\n if (data[0][0] === \"\") {\n skippable = true;\n }\n }\n }\n setCanSkip(skippable);\n })();\n }, [dataPlacement?.identifier]); // This detects range selection change\n\n /**************************\n * Preview state\n **************************/\n const [preview, setPreview] = useState>();\n const [rowCount, setRowCount] = useState();\n const [columnCount, setColumnCount] = useState();\n const [previewError, setPreviewError] = useState();\n\n useEffect(() => {\n (async () => {\n const newDefinition = buildNewDataDefinition();\n if (newDefinition) {\n try {\n // Download contents to preview, but don't overwrite workbook\n const contentPreview = await downloadFile(\n projectId,\n { ...newDefinition },\n { overwrite: false, previewRowCount: PREVIEW_ROW_COUNT, convert: false }\n );\n\n if (contentPreview) {\n setPreview([...contentPreview.content]);\n setRowCount(contentPreview.rowCount);\n setColumnCount(contentPreview.columnCount);\n setPreviewError(\"\");\n }\n } catch (err) {\n setPreviewError(\"There was an error downloading or parsing the file for preview.\");\n if (err?.message) {\n console.log(\"Error in Data Preview \", err.message);\n if (err?.message.includes(\" Error:\")) {\n // Parser, Binder, Catalog errors\n const hint = err.message.split(\" Error: \")[1];\n const capitalized = hint.charAt(0).toUpperCase() + hint.substring(1, hint.length);\n const errorMessage = capitalized?.replace(` LIMIT ${PREVIEW_ROW_COUNT}`, \"\");\n setPreviewError(errorMessage);\n }\n }\n setPreview([]);\n }\n }\n })();\n }, [sqlQueryDebounced]);\n\n /*********************************\n * Download state\n *********************************/\n const [isImporting, setIsImporting] = useState();\n const [importError, setImportError] = useState(\"\");\n const [placementErrorHint, setPlacementErrorHint] = useState(\"\");\n const [sqlErrorHint, setSqlErrorHint] = useState(\"\");\n useEffect(() => {\n if (isImporting === undefined) {\n return;\n }\n /*\n * We are done saving or importing, and there are no SQL errors,\n * so navigate back to the import data page\n */\n if (!isImporting && !importError && placementErrorHint.length === 0 && sqlErrorHint.length === 0) {\n navigate(\"/data\", { state: { fromPath: \"import\", projectId } as ExpandNavigation });\n }\n }, [isImporting, importError, placementErrorHint, sqlErrorHint]);\n\n /********************************\n * Import Definition Functions\n ********************************/\n function buildNewDataDefinition(): CloudProjectFileDefinition {\n if (!projectId) return undefined;\n return {\n fileName: selectedImportFileName,\n sourceSelection: importAsLocalObject\n ? cardViewCell // From AddressChooser\n : dataPlacement, // From TableChooser\n query: sqlQuery,\n direction: Direction.Download,\n lastDownloaded: new Date().toISOString(),\n };\n }\n\n async function importToGrid() {\n setIsImporting(true);\n try {\n const newDefinition = buildNewDataDefinition();\n if (newDefinition) {\n // This is probably not the right place, but I didn't know where else to log for direction.download\n snakeEyesRecord({\n event: \"data_connectors/download-connection\",\n });\n try {\n if (resolution === ImportResolution.OverwriteWorkbook) {\n // Special handling for conflicted upload\n // Keep the direction as an upload, swap the timestamp, and remove the SQL query\n newDefinition.direction = Direction.Upload;\n newDefinition.lastUploaded = newDefinition.lastDownloaded;\n delete newDefinition.lastDownloaded;\n delete newDefinition.query;\n }\n await updateProjectDefinitions(projectId, newDefinition);\n await downloadFile(projectId, { ...newDefinition });\n setPlacementErrorHint(\"\");\n setSqlErrorHint(\"\");\n } catch (error) {\n if (error?.message) {\n setImportError(\"There was an error importing the file.\");\n console.log(\"Error in Data Import \", error.message);\n if (\n error.message.startsWith(\"Error: OverwriteTableError: \") ||\n error.message.startsWith(\"Error: OverwriteSheetError: \")\n ) {\n // Placement errors\n const hint = error.message.slice(7).split(\"Error: \")[1];\n setPlacementErrorHint(hint);\n } else if (error?.message.includes(\" Error:\")) {\n // Parser, Binder, Catalog errors\n const hint = error.message.split(\" Error: \")[1];\n\n const capitalized = hint.charAt(0).toUpperCase() + hint.substring(1, hint.length);\n const errorMessage = capitalized?.replace(` LIMIT ${PREVIEW_ROW_COUNT}`, \"\");\n setSqlErrorHint(errorMessage);\n }\n }\n }\n }\n } finally {\n setIsImporting(false);\n }\n }\n\n async function importCardPlaceholder() {\n setIsImporting(true);\n try {\n const newDefinition = buildNewDataDefinition();\n if (newDefinition) {\n try {\n const { fileName, sourceSelection, query } = newDefinition;\n await writePyScriptCloudDataCard(projectId, fileName, query, sourceSelection);\n await updateProjectDefinitions(projectId, newDefinition);\n setPlacementErrorHint(\"\");\n setSqlErrorHint(\"\");\n } catch (error) {\n console.error(error);\n }\n }\n } finally {\n setIsImporting(false);\n }\n }\n\n return (\n
\n }\n />\n {(rowCount >= EXCEL_ROW_MAX || columnCount >= EXCEL_COLUMN_MAX) && !importAsLocalObject && (\n \n )}\n \n {importAsLocalObject ? (\n setCardViewCell(newSelection)}\n />\n ) : (\n setDataPlacement({ ...newSelection })}\n safeForWriting={true}\n />\n )}\n {resolution !== ImportResolution.OverwriteWorkbook && (\n setImportAsLocalObject(!importAsLocalObject)}\n />\n )}\n \n \n debounceQueryChange(e.target.value)}\n value={sqlQuery}\n data-testid=\"customSQLField\"\n />\n \n \n \n \n \n {importAsLocalObject || canSkipOverwriteWarning ? (\n }\n onClick={importAsLocalObject ? importCardPlaceholder : importToGrid}\n data-testid=\"dataImportWithoutWarningButton\"\n >\n {isImporting ? : getButtonText(resolution)}\n \n ) : (\n }\n content={`\n This will overwrite any existing content in ${displayRangeSelection(dataPlacement, false)}.\n `}\n onContinue={importToGrid}\n >\n }\n data-testid=\"dataImportWithWarningButton\"\n >\n {isImporting ? : getButtonText(resolution)}\n \n \n )}\n \n
\n );\n};\n\nexport default ConnectToWorkbook;\n","import React from \"react\";\nimport { ChevronRightFilled } from \"@fluentui/react-icons\";\nimport { Body1Stronger, Card, MessageBarBody } from \"@fluentui/react-components\";\n\nconst WarningMessageBlock = ({ settingsLink = false }: { settingsLink: boolean }) => {\n return (\n \n \n {`This dataset exceeds Excel's row limit. To import the full dataset, filter the dataset or import it as an\n Anaconda Code object.`}\n {settingsLink && (\n <>\n
\n
\n {`This requires selecting `}\n Generate Toolbox Code As =ANACONDA.CODE() under Anaconda Toolbox{\" \"}\n Settings.\n \n )}\n
\n
\n );\n};\n\nexport default WarningMessageBlock;\n","import React from \"react\";\nimport { ChevronRightFilled, Info16Filled } from \"@fluentui/react-icons\";\nimport { Checkbox, Text, Tooltip } from \"@fluentui/react-components\";\nimport { Row } from \"../../../components/Layout/Space\";\nimport styles from \"../../../styles.module.scss\";\n\nconst ImportPyObjectCheckbox = ({\n onChecked,\n checked,\n isDisabled,\n}: {\n checked: boolean;\n onChecked: () => void;\n isDisabled: boolean;\n}) => {\n return (\n \n \n Import as Anaconda Code object\n \n Dataset will be imported as an Anaconda Code object and will be accessible from =ANACONDA.CODE(). We\n recommend this for large datasets. To enable, select Generate Toolbox Code As Anaconda Code under{\" \"}\n \n Anaconda Toolbox Settings.\n \n \n }\n relationship=\"description\"\n >\n \n \n \n \n }\n checked={checked}\n onClick={onChecked}\n disabled={isDisabled}\n />\n );\n};\n\nexport default ImportPyObjectCheckbox;\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConnectToWorkbook.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConnectToWorkbook.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import {\n runExcelSafeContext,\n getFullAddressFromRangeSelection,\n splitFullAddress,\n RangeSelection,\n} from \"../excel/excel-grid-utils\";\n\nexport function isPyScriptCloudDataCard(cellValue: Excel.CellValue): boolean {\n if (cellValue.type !== \"Entity\") return false;\n if (cellValue.text !== \"PyScript Data\") return false;\n if (!cellValue.properties?.projectId || !cellValue.properties?.fileName || !cellValue.properties?.sqlQuery)\n return false;\n return true;\n}\n\nexport async function writePyScriptCloudDataCard(\n projectId: string,\n fileName: string,\n query: string,\n sourceSelection: RangeSelection\n) {\n const cardView: Excel.CellValue = {\n type: Excel.CellValueType.entity,\n text: \"PyScript Data\",\n properties: {\n projectId: { type: Excel.CellValueType.string, basicValue: projectId },\n fileName: { type: Excel.CellValueType.string, basicValue: fileName },\n sqlQuery: { type: Excel.CellValueType.string, basicValue: query },\n },\n layouts: {\n compact: { icon: Excel.EntityCompactLayoutIcons.cloud },\n card: {\n title: \"PyScript Data\",\n sections: [{ layout: \"List\", properties: [\"projectId\", \"fileName\", \"sqlQuery\"] }],\n },\n },\n provider: {\n description: \"Powered by PyScript\",\n logoSourceAddress: \"https://xltb.anaconda.cloud/pyscript/static/assets/pyscript-logo-32.png\",\n logoTargetAddress: \"https://pyscript.com\",\n },\n };\n\n const fullAddress = await getFullAddressFromRangeSelection(sourceSelection);\n const [worksheetId, addr] = splitFullAddress(fullAddress);\n\n await runExcelSafeContext(async (context) => {\n const sheet = context.workbook.worksheets.getItemOrNullObject(worksheetId);\n const rng = sheet.getRange(addr);\n rng.valuesAsJson = [[cardView]];\n await context.sync();\n });\n\n // Clear out cloud data cache\n // TODO: communicate with PyScript to delete cloud data\n // try {\n // const pyworker = await getPyWorker();\n // pyworker.delCloudData(fullAddress);\n // } catch (e) {\n // console.error(`Unable to get Pyodide -- ${e}`);\n // }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Folder20Regular } from \"@fluentui/react-icons\";\nimport { Field, Spinner } from \"@fluentui/react-components\";\nimport { SearchDropdown } from \"../../taskpane/components/SearchDropdown\";\nimport { useProjects } from \"../../queryclient/projects/projects\";\nimport { useAccount } from \"../../queryclient/account/account\";\nimport { Project, SupportedTags, AccessLevels } from \"../projects/models\";\nimport { selectMyProjects, selectUserProjects, selectOrgProjects } from \"../projects/utils\";\nimport ProjectsService from \"../projects/projects-api\";\nimport { SelectSearchOption } from \"react-select-search\";\n\nexport interface ProjectChooserProperties {\n tag: SupportedTags;\n selection: Project;\n onSelection: (newSelection: Project, isWriteable: boolean) => void; // called when the selection updates\n label?: string;\n placeholder?: string; // text to display if initialValue is blank\n dataTestId?: string;\n disabled?: boolean;\n disabledPlaceholder?: string;\n}\n\nconst ProjectChooser = (props: ProjectChooserProperties) => {\n const {\n tag,\n selection,\n onSelection,\n label = \"\",\n placeholder = \"Select Project...\",\n dataTestId,\n disabled = false,\n disabledPlaceholder = \"Initializing...\",\n } = props;\n\n const { isLoading: projectsLoading, data: existingProjects = [] } = useProjects({ tag });\n const { data: account, isLoading: accountLoading } = useAccount();\n\n const [validationMsg, setValidationMsg] = useState(\"\");\n const [validationState, setValidationState] = useState<\"success\" | \"error\">();\n\n function searchKeyFromProject(proj: Project): SelectSearchOption {\n return { key: proj.id, name: proj.title, value: proj.id };\n }\n\n const [myProjects, setMyProjects] = useState([]);\n const [userProjects, setUserProjects] = useState([]);\n const [orgProjects, setOrgProjects] = useState([]);\n useEffect(() => {\n setMyProjects(selectMyProjects(existingProjects, account).map(searchKeyFromProject));\n setUserProjects(selectUserProjects(existingProjects, account).map(searchKeyFromProject));\n setOrgProjects(selectOrgProjects(existingProjects).map(searchKeyFromProject));\n }, [projectsLoading, accountLoading]);\n\n useEffect(() => {\n if (projectsLoading || !selection || selection.name === \"\") return;\n checkProjectWriteable(selection);\n }, [projectsLoading]);\n\n async function checkProjectWriteable(project: Project) {\n // Check if project is writeable\n try {\n setValidationState(null);\n setValidationMsg(\"Checking permissions...\");\n const permissions: AccessLevels = await ProjectsService.getMyProjectAccessLevels(project.id);\n if (permissions.own || permissions.modify) {\n setValidationState(\"success\");\n setValidationMsg(\"Permission to write\");\n onSelection(project, true);\n } else {\n setValidationState(\"error\");\n setValidationMsg(\"Missing write permission\");\n }\n } catch (e) {\n console.error(e);\n setValidationState(\"error\");\n setValidationMsg(\"Error reading project permissions\");\n }\n }\n\n async function selectionChanged(newSelection: string) {\n // Ignore already selected entry\n if (newSelection === selection.name) {\n return;\n }\n\n // Find existing project with selected title\n const matchingProjects = existingProjects.filter((proj) => proj.id === newSelection);\n if (matchingProjects.length <= 0) throw Error(`No projects found with id: ${newSelection}`);\n const newProject = matchingProjects[0];\n\n // Update component while checking write permissions\n onSelection(newProject, false);\n\n await checkProjectWriteable(newProject);\n }\n\n if (projectsLoading || accountLoading) {\n return (\n \n );\n }\n\n return (\n \n }\n placeholder={disabled ? disabledPlaceholder : placeholder}\n value={selection.id}\n options={[\n {\n type: \"group\",\n name: \"My Projects\",\n items: myProjects,\n },\n {\n type: \"group\",\n name: \"User Owned Projects\",\n items: userProjects,\n },\n {\n type: \"group\",\n name: \"Org Owned Projects\",\n items: orgProjects,\n },\n ]}\n onChange={(selectedValue: string) => selectionChanged(selectedValue)}\n disabled={disabled}\n data-testid={dataTestId}\n />\n \n );\n};\nProjectChooser.displayName = \"ProjectChooser\";\n\nexport default ProjectChooser;\n","export enum Mode {\n New = \"new\",\n Edit = \"edit\",\n}\n","// Replace any item in list from replacementList based on key\nexport function replaceObjectsMatchKey(list: object[], replacementList: object[], key: string) {\n // Populate replacementMap with items from replacementList\n const replacementMap = new Map();\n replacementList.forEach((item) => replacementMap.set(item[key], item));\n\n const newList = list.map((item) => {\n const replacementItem = replacementMap.get(item[key]);\n // We found a matching item based on the key\n if (replacementItem) {\n // Remove the item from replacementMap\n replacementMap.delete(item[key]);\n // Return the new replacement item\n return { ...replacementItem };\n } else {\n return item; // Return original item if no replacement found\n }\n });\n\n // Add remaining items from replacementMap to newList\n replacementMap.forEach((item) => newList.push({ ...item }));\n return newList;\n}\n\n// Ensure filename ends in suffix\nexport function ensureFileSuffix(filename: string, suffix: string): string {\n if (suffix !== suffix.toLowerCase()) throw Error(`Suffix must be lowercase, received ${suffix}`);\n\n if (!suffix.startsWith(\".\")) suffix = \".\" + suffix;\n\n if (filename.toLowerCase().endsWith(suffix)) {\n // File has the suffix, but it might not be a lowercase suffix, so replace it\n return `${filename.slice(0, -suffix.length)}${suffix}`;\n } else {\n // File does not have the suffix, so add it\n return `${filename}${suffix}`;\n }\n}\n\n/**\n * Capitalize the first letter of a word\n */\nexport function capitalize(word) {\n if (!word) return word;\n if (word.length === 1) return word.toUpperCase();\n return word.charAt(0).toUpperCase() + word.substring(1, word.length);\n}\n\n/**\n * Open a URL in a new window\n * @param toWindow URL to open in a new window\n * @returns void\n */\nexport function navigate(toWindow: string): void {\n return window.open(toWindow, \"_blank\")?.focus();\n}\n","import React, { useEffect, useState } from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { CloudArrowUp20Regular } from \"@fluentui/react-icons\";\nimport { Button, Field, Input, Spinner, Text } from \"@fluentui/react-components\";\nimport { ActionButtonRow, Col } from \"../../../components/Layout/Space\";\nimport TableChooser from \"../../../../excel/components/TableChooser\";\nimport ProjectChooser from \"../../../../data/components/ProjectChooser\";\nimport { PrimitivePreviewTable } from \"../../../components/PreviewTable\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport ProjectsService from \"../../../../data/projects/projects-api\";\nimport { uploadFileFromSelection, getTypedContentFromSelection } from \"../../../../data/data-api-upload\";\nimport { loadProjectDefinitions, saveProjectDefinitions } from \"../../../../data/data-api\";\nimport { useProjects } from \"../../../../queryclient/projects/projects\";\nimport { ExpandNavigation, Project } from \"../../../../data/projects/models\";\nimport { CloudProjectFileDefinition, Direction, VERSION } from \"../../../../data/models\";\nimport { capitalize, ensureFileSuffix } from \"../../../utils\";\nimport { Mode } from \"../../../types\";\nimport { snakeEyesRecord } from \"../../../../analytics/snake-eyes\";\nimport { FileTooLargeError } from \"../../../../data/projects/projects-api\";\nimport \"./ConnectToWorkbook.scss\";\n\nconst PREVIEW_NUM_ROWS = 6;\nconst PREVIEW_NUM_COLS = 50;\n\nconst initialFileDefinition = {\n fileName: \"\",\n sourceSelection: {} as RangeSelection,\n direction: Direction.Upload,\n};\n\nexport enum ExportResolution {\n Upload = \"upload\",\n NewVersion = \"newVersion\",\n ReUpload = \"reUpload\",\n OverwriteCloudVersion = \"overwriteCloudVersion\",\n NewFilename = \"newFilename\",\n RestoreCloudData = \"restoreCloudData\",\n}\n\nfunction getButtonText(resolution: ExportResolution): string {\n switch (resolution) {\n case ExportResolution.Upload:\n return \"Save to Cloud\";\n case ExportResolution.NewVersion:\n return \"Upload New Version\";\n case ExportResolution.ReUpload:\n return \"Re-upload to Cloud\";\n case ExportResolution.OverwriteCloudVersion:\n return \"Overwrite Cloud Version\";\n case ExportResolution.NewFilename:\n return \"Connect New Filename\";\n }\n}\n\nasync function computeNameOfCopy(projectId: string, fileName: string): Promise {\n const projectFiles = await ProjectsService.getProjectFiles(projectId);\n const names = new Set(projectFiles.items.map((x) => x.name));\n let newName = `Copy of ${fileName}`;\n let i = 1;\n while (names.has(newName)) {\n i += 1;\n newName = `Copy${i} of ${fileName}`;\n }\n return newName;\n}\n\nexport type DataExportProps = {\n selectedRange: RangeSelection;\n project?: Project;\n fileName?: string;\n resolution?: ExportResolution;\n};\n\nfunction ConnectToCloud() {\n const navigate = useNavigate();\n const location = useLocation();\n\n const {\n selectedRange: initialSelectedRange,\n project: initialProject = { name: \"\" },\n fileName: initialFileName = \"\",\n resolution = ExportResolution.Upload,\n }: DataExportProps = location?.state || {};\n\n const [project, setProject] = useState(initialProject);\n const [isWriteable, setWriteable] = useState(false);\n const [fileDefinition, setFileDefinition] = useState({ ...initialFileDefinition });\n const [isUploading, setIsUploading] = useState(false);\n const [isFetching, setIsFetching] = useState(false);\n const [fileLimitError, setFileLimitError] = useState(null);\n\n const { refetch: refetchProjects } = useProjects({ tag: \"data\" });\n\n async function upload() {\n setIsUploading(true);\n try {\n const lastModified = await uploadFileFromSelection(\n fileDefinition.sourceSelection,\n project.id,\n fileDefinition.fileName\n );\n\n await saveUploadDefinition(lastModified);\n snakeEyesRecord({\n event: \"data_connectors/project_upload\",\n });\n\n await refetchProjects();\n\n navigate(\"/data\", { state: { fromPath: \"export\", projectId: project.id } as ExpandNavigation });\n } catch (e) {\n setErrorMessage(\"Your selection exceeds Excel limits. Please reduce the size of your selection and try again.\");\n if (e instanceof FileTooLargeError) {\n setFileLimitError(\"Upload cannot exceed 25MB\");\n }\n }\n setIsUploading(false);\n }\n\n async function saveUploadDefinition(lastModified: string): Promise {\n try {\n // Load current project definition\n const projectDefinitions = await loadProjectDefinitions();\n fileDefinition.fileName = ensureFileSuffix(fileDefinition.fileName, \".csv\");\n\n if (projectDefinitions.projects[project.id] && projectDefinitions.projects[project.id].files) {\n // Handle a special resolution mode for uploading a new filename\n // The connection with the old filename is intended to be removed\n if (resolution === ExportResolution.NewFilename) {\n delete projectDefinitions.projects[project.id].files[initialFileName];\n }\n // We have a definition already, so update its file definition\n // The API ensures uniqueness of filenames per project\n projectDefinitions.projects[project.id].files[fileDefinition.fileName] = {\n ...fileDefinition,\n lastUploaded: lastModified,\n };\n } else {\n // We need to make a new definition for this project\n console.log(\"Creating new project definition for \", project.id);\n projectDefinitions.projects[project.id] = {\n id: project.id,\n title: project.title,\n name: project.name,\n files: {\n // The API ensures uniqueness of filenames per project\n [fileDefinition.fileName]: {\n ...fileDefinition,\n lastUploaded: lastModified,\n },\n },\n };\n }\n // Save Excel definition\n console.log({\n projects: projectDefinitions.projects,\n version: VERSION,\n });\n await saveProjectDefinitions({\n ...projectDefinitions,\n version: VERSION,\n });\n } catch (e) {\n console.log(`Error: Unable to save data upload definition.\\n${e}`);\n }\n }\n\n useEffect(() => {\n (async () => {\n setIsFetching(true);\n let fileName = initialFileName;\n if (resolution === ExportResolution.NewFilename) {\n // Generate new filename, while keeping the original as initialFileName\n fileName = await computeNameOfCopy(initialProject.id, initialFileName);\n }\n const savedFileDef = {\n fileName: fileName,\n sourceSelection: { ...initialSelectedRange },\n direction: Direction.Upload,\n };\n setFileDefinition({ ...savedFileDef });\n setPreviewContent({ ...savedFileDef });\n setIsFetching(false);\n })();\n }, []);\n\n const [preview, setPreview] = useState<{\n title: string;\n columns: string[];\n content: string[][];\n }>({\n title: \"\",\n columns: [],\n content: [],\n });\n\n const [errorMessage, setErrorMessage] = useState();\n // Get data from Excel to preview in the preview table\n async function setPreviewContent(fileDefinition: CloudProjectFileDefinition) {\n const { sourceSelection, fileName }: CloudProjectFileDefinition = fileDefinition;\n let content;\n try {\n content = await getTypedContentFromSelection(sourceSelection, PREVIEW_NUM_ROWS, PREVIEW_NUM_COLS);\n if (content?.length > 0) {\n setPreview({ title: fileName, columns: content[0], content: content });\n }\n } catch (e) {\n if (sourceSelection?.identifier) {\n setErrorMessage(\"Your selection exceeds Excel limits. Please reduce the size of your selection and try again.\");\n }\n console.log(e);\n }\n }\n\n async function onProjectSelection(value: Project, isWriteable: boolean) {\n setProject({ ...value });\n setWriteable(isWriteable);\n }\n\n function isReadyForUpload() {\n if (project.title === \"\") return false;\n if (fileLimitError) return false;\n if (!isWriteable) return false;\n if (!fileDefinition.fileName || !fileDefinition.sourceSelection?.identifier) return false;\n return true;\n }\n\n return (\n
\n \n {`${capitalize(\n resolution !== ExportResolution.Upload ? Mode.Edit : Mode.New\n )} Dataset`}\n \n \n \n {\n const newFileDefinition = { ...fileDefinition, sourceSelection: { ...newSelection } };\n setFileDefinition({ ...newFileDefinition });\n setPreviewContent({ ...newFileDefinition });\n setFileLimitError(\"\");\n setErrorMessage(undefined);\n }}\n />\n \n \n \n \n \n
\n \n setFileDefinition({ ...fileDefinition, fileName: data.value })}\n value={fileDefinition.fileName}\n // The \"title\" is the file name\n placeholder=\"Enter title...\"\n disabled={isFetching}\n data-testid=\"dataUploadFileName\"\n />\n \n
\n \n \n \n \n \n : null}\n onClick={() => upload()}\n data-testid=\"dataUploadPerformUpload\"\n >\n {isUploading ? : getButtonText(resolution)}\n \n \n \n
\n );\n}\n\nexport default ConnectToCloud;\n","import React from \"react\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogBody,\n DialogContent,\n DialogSurface,\n DialogTitle,\n DialogTrigger,\n Text,\n} from \"@fluentui/react-components\";\nimport { Warning20Regular } from \"@fluentui/react-icons\";\nimport { Col } from \"../../../components/Layout/Space\";\nimport { ConnectionKind } from \"./ConnectionItem\";\nimport { ProjectFile } from \"../../../../data/projects/models\";\nimport { CloudProjectFileDefinition, Direction } from \"../../../../data/models\";\nimport \"./ConflictDialog.scss\";\n\nexport enum ConflictChoice {\n OverwriteCloud = \"overwriteCloud\",\n UploadNewFilename = \"uploadNewFilename\",\n OverwriteWorkbook = \"overwriteWorkbook\",\n ReuploadToCloud = \"reuploadToCloud\",\n}\n\nexport const ConflictDialog = ({\n open,\n setOpen,\n kind,\n item,\n connection,\n callback,\n}: {\n open: boolean;\n setOpen: (open: boolean) => void;\n kind: ConnectionKind;\n item: ProjectFile;\n connection: CloudProjectFileDefinition;\n callback: (choice: ConflictChoice) => void;\n}) => {\n function getMessage() {\n const top = (\n \n {connection.sourceSelection.displayName}\n {connection.direction === Direction.Upload ? \" -> \" : \" <- \"}\n {connection.fileName}\n \n );\n switch (kind) {\n case ConnectionKind.UploadConflict: {\n const [d1, t1] = connection.lastUploaded.slice(0, 19).split(\"T\");\n const [d2, t2] = item.last_modified.slice(0, 19).split(\"T\");\n return (\n \n {top}\n \n You last uploaded at\n
\n \n {d1} {t1}\n \n
\n \n The cloud version was modified at\n
\n \n {d2} {t2}\n \n
\n How would you like to proceed?\n \n );\n }\n case ConnectionKind.UnknownUpload: {\n const [d, t] = connection.lastUploaded.slice(0, 19).split(\"T\");\n return (\n \n {top}\n \n You last uploaded at\n
\n \n {d} {t}\n \n
\n The cloud version has been deleted or moved\n How would you like to proceed?\n \n );\n }\n case ConnectionKind.UnknownDownload: {\n const [d, t] = connection.lastDownloaded.slice(0, 19).split(\"T\");\n return (\n \n {top}\n \n You last downloaded at\n
\n \n {d} {t}\n \n
\n The cloud version has been deleted or moved\n How would you like to proceed?\n \n );\n }\n default:\n return \"Unknown conflict\";\n }\n }\n\n return (\n setOpen(data.open)}>\n \n \n \n Resolve Conflict\n \n {getMessage()}\n \n \n {kind === ConnectionKind.UploadConflict && (\n \n \n \n )}\n {kind === ConnectionKind.UnknownUpload && (\n \n \n \n )}\n {(kind === ConnectionKind.UploadConflict || kind === ConnectionKind.UnknownUpload) && (\n \n \n \n )}\n {kind === ConnectionKind.UploadConflict && (\n \n \n \n )}\n \n \n \n \n \n \n \n \n );\n};\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConflictDialog.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConflictDialog.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConnectionItem.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./ConnectionItem.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState, useRef } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n TableFreezeRow20Regular,\n CloudArrowUp20Regular,\n CloudArrowDown20Regular,\n CloudArrowDown20Filled,\n CloudCheckmark20Regular,\n CloudDismiss20Regular,\n CloudError20Regular,\n DeleteRegular,\n} from \"@fluentui/react-icons\";\nimport { Button, Text, Tooltip } from \"@fluentui/react-components\";\nimport { PopoverMenuButton } from \"../../../components/PopoverMenuButton\";\nimport { Row } from \"../../../components/Layout/Space\";\nimport { DataImportProps, ImportResolution } from \"./ConnectToWorkbook\";\nimport { DataExportProps, ExportResolution } from \"./ConnectToCloud\";\nimport { ConflictDialog, ConflictChoice } from \"./ConflictDialog\";\nimport ProjectsService from \"../../../../data/projects/projects-api\";\nimport { CloudProjectDefinitions, CloudProjectFileDefinition, Direction } from \"../../../../data/models\";\nimport { refreshRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { ProjectItemProps } from \"../../Projects/ProjectFolder\";\nimport styles from \"../../../styles.module.scss\";\nimport \"./ConnectionItem.scss\";\n\nconst VALID_FILE_SUFFIX = new Set([\"csv\"]);\n\nexport enum ConnectionKind {\n Unlinked = \"unlinked\",\n DownloadUpToDate = \"downloadUpToDate\",\n DownloadNewVersion = \"downloadNewVersion\",\n Upload = \"upload\",\n UploadConflict = \"uploadConflict\",\n UnknownDownload = \"unknownDownload\",\n UnknownUpload = \"unknownUpload\",\n}\n\nfunction Connector({ title, connection }: { title: string; connection: CloudProjectFileDefinition }) {\n return (\n
\n \n \n \n {/* Fallback to title or filename if no source selection activity */}\n {!connection?.sourceSelection?.displayName && {title}}\n {connection?.sourceSelection && (\n \n \n {connection?.sourceSelection?.displayName}\n \n {connection?.direction === Direction.Upload ? `->` : `<-`}\n {connection?.fileName}\n \n )}\n
\n \n \n );\n}\n\nexport interface ConnectorItemProps {\n definitions: CloudProjectDefinitions[\"projects\"];\n onlyConnections?: boolean;\n}\n\nfunction ConnectorItem({\n project,\n item,\n refreshItems,\n definitions,\n onlyConnections = false,\n}: ConnectorItemProps & ProjectItemProps) {\n const navigate = useNavigate();\n\n const [conflictOpen, setConflictOpen] = useState(false);\n\n const connectionKind = useRef(ConnectionKind.Unlinked);\n const [connection, setConnection] = useState();\n useEffect(() => {\n // On Cloud tab, ignore all connections\n if (!onlyConnections) return;\n\n (async () => {\n try {\n let conn = await getConnection(project.id, item.name);\n if (conn) {\n connectionKind.current = getConnectionKind(conn);\n setConnection({ ...conn });\n }\n } catch (e) {\n console.log(\"There was an error fetching file metadata: \", e);\n }\n })();\n }, []);\n\n async function getConnection(id: string, fileName: string): Promise {\n if (!definitions) return null;\n if (definitions[id] && definitions[id].files?.[fileName]) {\n const def: CloudProjectFileDefinition = definitions[id].files[fileName];\n if (def?.sourceSelection) {\n def.sourceSelection = await refreshRangeSelection(def.sourceSelection);\n }\n return def;\n }\n return null;\n }\n\n function getConnectionKind(conn: CloudProjectFileDefinition): ConnectionKind {\n if (conn) {\n if (conn.direction === Direction.Download) {\n if (!item) return ConnectionKind.UnknownDownload;\n if (conn.lastDownloaded < item.last_modified) {\n return ConnectionKind.DownloadNewVersion;\n }\n // We have the latest version\n return ConnectionKind.DownloadUpToDate;\n } else if (conn.direction === Direction.Upload) {\n if (conn.lastUploaded < item.last_modified) {\n // Someone else modified the file\n return ConnectionKind.UploadConflict;\n }\n // TODO: figure out how to tell if local table is modified\n return ConnectionKind.Upload;\n }\n }\n // Default download icon when no connection exists\n return ConnectionKind.Unlinked;\n }\n\n function getStatusIcon() {\n switch (connectionKind.current) {\n case ConnectionKind.DownloadNewVersion:\n return ;\n case ConnectionKind.DownloadUpToDate:\n return ;\n case ConnectionKind.Upload:\n return ;\n case ConnectionKind.UploadConflict:\n return ;\n case ConnectionKind.UnknownDownload:\n case ConnectionKind.UnknownUpload:\n return ;\n case ConnectionKind.Unlinked:\n return ;\n }\n }\n\n function getTooltip(): string {\n switch (connectionKind.current) {\n case ConnectionKind.DownloadNewVersion: {\n const [d, t] = item.last_modified.slice(0, 19).split(\"T\");\n return `Newer version of cloud data available: ${d} ${t}`;\n }\n case ConnectionKind.DownloadUpToDate:\n return \"You have the latest version\";\n case ConnectionKind.Upload:\n return \"Re-upload data to Anaconda Cloud\";\n case ConnectionKind.UploadConflict:\n return \"Data in the Cloud has been modified since your last upload\";\n case ConnectionKind.UnknownDownload:\n return \"Data in the Cloud has been deleted or moved since your last download\";\n case ConnectionKind.UnknownUpload:\n return \"Data uploaded to the Cloud has been deleted or moved\";\n case ConnectionKind.Unlinked:\n return \"Download to Excel\";\n }\n }\n\n async function onIconClick() {\n switch (connectionKind.current) {\n case ConnectionKind.DownloadNewVersion:\n navigate(\"/data/import\", {\n state: {\n selectedImportFileName: connection.fileName,\n projectId: project.id,\n query: connection.query,\n destSelection: await refreshRangeSelection(connection.sourceSelection),\n resolution: ImportResolution.NewVersion,\n } as DataImportProps,\n });\n return;\n case ConnectionKind.DownloadUpToDate:\n navigate(\"/data/import\", {\n state: {\n selectedImportFileName: connection.fileName,\n projectId: project.id,\n query: connection.query,\n destSelection: await refreshRangeSelection(connection.sourceSelection),\n resolution: ImportResolution.ReDownload,\n } as DataImportProps,\n });\n return;\n case ConnectionKind.Upload:\n navigate(\"/data/export\", {\n state: {\n selectedRange: connection.sourceSelection,\n project: { id: project.id, name: project.name },\n fileName: connection.fileName,\n resolution: ExportResolution.NewVersion,\n } as DataExportProps,\n });\n return;\n case ConnectionKind.UploadConflict:\n setConflictOpen(true);\n return;\n case ConnectionKind.UnknownDownload:\n // TODO: show dialog to remove connection or open versions view (when available)\n return;\n case ConnectionKind.UnknownUpload:\n // TODO: show conflict dialog\n return;\n case ConnectionKind.Unlinked:\n navigate(\"/data/import\", {\n state: {\n selectedImportFileName: item.name,\n projectId: project.id,\n } as DataImportProps,\n });\n return;\n }\n }\n\n async function deleteItem(projId: string, fileName: string) {\n try {\n await ProjectsService.deleteFileByName(projId, fileName);\n await refreshItems();\n } catch (e) {\n console.log(e);\n }\n }\n\n async function conflictCallback(choice: ConflictChoice) {\n switch (choice) {\n case ConflictChoice.OverwriteCloud:\n navigate(\"/data/export\", {\n state: {\n selectedRange: connection.sourceSelection,\n project: { id: project.id, name: project.name },\n fileName: connection.fileName,\n resolution: ExportResolution.OverwriteCloudVersion,\n } as DataExportProps,\n });\n break;\n case ConflictChoice.UploadNewFilename:\n navigate(\"/data/export\", {\n state: {\n selectedRange: connection.sourceSelection,\n project: { id: project.id, name: project.name },\n fileName: connection.fileName,\n resolution: ExportResolution.NewFilename,\n } as DataExportProps,\n });\n break;\n case ConflictChoice.OverwriteWorkbook:\n navigate(\"/data/import\", {\n state: {\n selectedImportFileName: connection.fileName,\n projectId: project.id,\n destSelection: await refreshRangeSelection(connection.sourceSelection),\n resolution: ImportResolution.OverwriteWorkbook,\n } as DataImportProps,\n });\n break;\n }\n }\n\n function needsConflictDialog() {\n return (\n connectionKind.current === ConnectionKind.UploadConflict ||\n connectionKind.current === ConnectionKind.UnknownUpload\n );\n }\n\n // Parameter set to only render data connections (versus unlinked workbook data or files)\n if (onlyConnections && !connection?.sourceSelection?.displayName) {\n return null;\n }\n\n // Only show files with known suffix\n const fileSuffix = item.name.split(\".\").slice(-1)[0].toLowerCase();\n if (!VALID_FILE_SUFFIX.has(fileSuffix)) return null;\n\n return (\n
\n {needsConflictDialog() && (\n \n )}\n \n \n \n \n \n \n {/* Connection Actions Menu */}\n {/* TODO: Add an Unlink option for connections */}\n {!onlyConnections && (\n await deleteItem(project.id, item.name),\n icon: ,\n },\n ]}\n />\n )}\n \n \n
\n );\n}\n\nexport function ConnectorItemCurry(props: ConnectorItemProps) {\n return (baseProps: ProjectItemProps) => {\n return ConnectorItem({ ...baseProps, ...props });\n };\n}\n","import React, { useEffect, useState } from \"react\";\nimport { CloudArrowDown16Regular, ChevronRight16Regular } from \"@fluentui/react-icons\";\nimport ProjectsExplorer from \"../../Projects/ProjectsExplorer\";\nimport { Button, Tab, TabList, Text } from \"@fluentui/react-components\";\nimport { Col } from \"../../../components/Layout/Space\";\nimport { runExcelSafeContext } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useProjects } from \"../../../../queryclient/projects/projects\";\nimport { loadProjectDefinitions } from \"../../../../data/data-api\";\nimport { CloudProjectDefinitions } from \"../../../../data/models\";\nimport { ConnectorItemCurry } from \"./ConnectionItem\";\nimport styles from \"../../../styles.module.scss\";\n\ntype TabTitle = \"cloud\" | \"connections\";\n\nfunction DataConnections() {\n const [activeTab, setActiveTab] = useState(\"cloud\");\n\n const { isLoading: projectsLoading, data: projects = [] } = useProjects({ tag: \"data\" });\n\n const [projectDefs, setDefs] = useState(\n {} as CloudProjectDefinitions[\"projects\"]\n );\n async function refreshProjectDefinitions() {\n const projectDefinitions = await loadProjectDefinitions();\n setDefs({ ...projectDefinitions?.projects });\n }\n useEffect(() => {\n refreshProjectDefinitions();\n }, []);\n\n useEffect(() => {\n (async () => {\n await registerExcelWorkbookListeners();\n })();\n return () => {\n (async () => await unRegisterExcelWorkbookListeners())();\n };\n }, []);\n\n async function registerExcelWorkbookListeners() {\n // Reference: https://learn.microsoft.com/en-us/javascript/api/excel/excel.worksheetcollection?view=excel-js-preview#excel-excel-worksheet[…]tion-onNameChanged-member\n await runExcelSafeContext(async (context) => {\n context.workbook.worksheets.onDeleted.add(refreshProjectDefinitions);\n context.workbook.worksheets.onNameChanged.add(refreshProjectDefinitions);\n await context.sync();\n });\n }\n\n async function unRegisterExcelWorkbookListeners() {\n await runExcelSafeContext(async (context) => {\n context.workbook.worksheets.onDeleted.remove(refreshProjectDefinitions);\n context.workbook.worksheets.onNameChanged.remove(refreshProjectDefinitions);\n await context.sync();\n });\n }\n\n async function refreshItems() {\n await refreshProjectDefinitions();\n }\n\n function shouldDisplayNoConnectionsMessage() {\n if (activeTab !== \"connections\" || projectsLoading) return false;\n const filteredProjects = projects.filter((project) => projectDefs[project.id]);\n return filteredProjects.length === 0;\n }\n\n return (\n
\n setActiveTab(data.value as TabTitle)}\n >\n Cloud\n \n Connections\n \n \n
\n {shouldDisplayNoConnectionsMessage() ? (\n \n ) : activeTab === \"cloud\" ? (\n \n ) : (\n projectDefs[project.id]}\n />\n )}\n
\n
\n );\n}\n\nfunction CreateYourFirstConnection() {\n return (\n
\n \n \n Create Your First Connection\n \n

\n To connect a dataset from this workbook to Anaconda Cloud, click "New Dataset" on the Cloud tab.\n

\n

\n To connect a dataset from Anaconda Cloud to this Excel workbook, click the{\" \"}\n icon next to a Project file on the Cloud tab.\n

\n }\n iconPosition=\"after\"\n data-testid=\"learn-more\"\n onClick={() => window.open(\"https://docs.anaconda.com/excel/data\", \"_blank\")?.focus()}\n >\n Learn More\n \n \n
\n );\n}\n\nexport default DataConnections;\n","import React from \"react\";\nimport { Dropdown, Option } from \"@fluentui/react-components\";\nimport { InitialCircle } from \"../../components/Initial\";\nimport { Col, Row } from \"../../components/Layout/Space\";\nimport { ProjectPermission } from \"../../../data/projects/models\";\nimport styles from \"../../styles.module.scss\";\n\nexport const RoleSelector = ({\n id,\n name,\n email,\n onRoleSelection,\n onRemove,\n role,\n}: {\n id: string;\n name: string;\n email: string;\n onRoleSelection: (userId: string, role: ProjectPermission[\"relation\"]) => void;\n onRemove: (userId: string) => void;\n role?: ProjectPermission[\"relation\"];\n}) => {\n return (\n
\n \n \n \n \n {name ? name : email}\n \n {email}\n \n \n onRoleSelection(id, data.optionValue as ProjectPermission[\"relation\"])}\n >\n \n \n \n onRemove(id)}\n >\n remove\n \n \n \n
\n );\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./NewProject.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./NewProject.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState } from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { SelectedOption } from \"react-select-search\";\nimport {\n Body1Stronger,\n Text,\n Button,\n Field,\n Input,\n Textarea,\n Spinner,\n Tooltip,\n Divider,\n InfoLabel,\n} from \"@fluentui/react-components\";\nimport { Info16Regular, Organization20Regular, PersonAdd20Regular } from \"@fluentui/react-icons\";\nimport { Col, Row } from \"../../components/Layout/Space\";\nimport { SearchDropdown } from \"../../components/SearchDropdown\";\nimport { RoleSelector } from \"./RoleSelector\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport { getAllOrgUsers, getOrganizationUsers } from \"../../../auth/auth-api\";\nimport {\n Project,\n ProjectPermission,\n ProjectPermissionAction,\n SupportedTags,\n ExpandNavigation,\n} from \"../../../data/projects/models\";\nimport { tagToAppName, tagToRoutePrefix, tagToUserSettings, tagToTitle } from \"../../../data/projects/utils\";\nimport { Organization, OrganizationUser, OrganizationUsers } from \"../../../auth/models\";\nimport { useProjects } from \"../../../queryclient/projects/projects\";\nimport { useOrganizations } from \"../../../queryclient/account/account\";\nimport { useAddSettingToDatabase } from \"../../../queryclient/settings/settings\";\nimport { snakeEyesRecord } from \"../../../analytics/snake-eyes\";\nimport \"./NewProject.scss\";\nimport Env from \"xlcommon/src/environ\";\n\ntype UserInvitation = Pick & { name: string };\n\ntype ProjectNavProps = { projectId: Project[\"id\"] };\n\nexport const NewProject = ({ tag }: { tag: SupportedTags }) => {\n const navigate = useNavigate();\n const mutation = useAddSettingToDatabase(tagToUserSettings(tag).LandingSeen);\n\n const [title, setTitle] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [error, setError] = useState();\n\n const { data: existingProjects = [] } = useProjects({ tag });\n\n const [isDuplicate, setIsDuplicate] = useState(false);\n function checkDuplicates(title: string) {\n const duplicates = existingProjects.filter((proj) => proj.title === title);\n const hasDuplicates = duplicates.length > 0;\n setIsDuplicate(hasDuplicates);\n return hasDuplicates;\n }\n\n const {\n data: organizations = [],\n isLoading: loadingOrganizations,\n isFetched: orgsFetched,\n isSuccess: fetchOrgsSuccess,\n } = useOrganizations();\n const [usersError, setUsersError] = useState(\"\");\n\n // Note: We only need this hook because the permissions endpoint does not return user name and email.\n // We may remove this in the future when it does.\n const [usersInfo, setUserInfoForRoles] = useState>();\n useEffect(() => {\n if (organizations?.length > 0 && !loadingOrganizations && orgsFetched && fetchOrgsSuccess) {\n // Get organization users\n (async () => {\n try {\n const users = await getAllOrgUsers(organizations?.map((org) => org.name));\n\n // Initialize users state\n let usersMap = {};\n users.forEach((user) => {\n usersMap[user.id] = {\n id: user.id,\n name: user.first_name && user.last_name ? `${user.first_name} ${user.last_name}` : \"\",\n email: user.email,\n relation: user.role,\n };\n });\n setUserInfoForRoles({ ...usersMap });\n } catch (e) {\n console.log(e);\n setUsersError(\"An error occurred obtaining user information.\");\n }\n })();\n }\n }, [organizations, loadingOrganizations, orgsFetched, fetchOrgsSuccess]);\n\n const location = useLocation();\n const { projectId }: ProjectNavProps = location?.state || {};\n const [loadingAccess, setLoadingAccess] = useState();\n useEffect(() => {\n // We are in edit mode, so fetch the data we need\n if (projectId && usersInfo) {\n try {\n setLoadingAccess(true);\n (async () => {\n // Populate current project data\n const res = await ProjectsService.getProjectById(projectId);\n const project = await res.json();\n setTitle(project.title);\n setDescription(project.description ?? \"\");\n\n // Populate current user roles\n const permsRes = await ProjectsService.getProjectPermissions(projectId);\n let permsMap: Record = {};\n let invites: UserInvitation[] = [];\n permsRes.items?.forEach((permission) => {\n if (permission.type === \"user_id\") {\n if (permsMap[permission.id] && permsMap[permission.id].relation !== \"writer\") {\n // We already have this user mapped but need to ensure highest privlege\n permsMap[permission.id].relation = permission.relation;\n } else {\n // TODO: Replace this with user data from permissions when available\n // Only render reader, writer, or finder in list since ownership transfer is not yet supported\n if (permission.relation !== \"owner\") {\n // Map new found role\n permsMap[permission.id] = { ...permission };\n const user = usersInfo[permission.id];\n invites.push({\n id: user.id,\n name: user.name,\n email: user.email,\n });\n }\n }\n\n // Populate general access / organization roles\n } else if (permission.type === \"org_id\") {\n const orgs = organizations?.filter((org) => org.id === permission.id);\n if (orgs?.length === 1) {\n setGeneralAccess(orgs[0].name);\n }\n } else if (permission.type === \"org_name\") {\n // TODO: Confirm if API will pass back the org name as the ID if type is org_name\n setGeneralAccess(permission.id);\n }\n });\n setUserRoles({ ...permsMap });\n setInvites([...invites]);\n setLoadingAccess(false);\n })();\n } catch (e) {\n setError(\"An error occurred when obtaining project data.\");\n setLoadingAccess(false);\n }\n }\n }, [projectId, usersInfo]);\n\n const [userRoles, setUserRoles] = useState<\n Record\n >({});\n function onRoleSelection(userId: string, role: ProjectPermission[\"relation\"]) {\n setDuplicateMessage(\"\");\n setUserRoles({\n ...userRoles,\n [userId]: {\n id: userId,\n type: \"user_id\",\n relation: role,\n },\n });\n }\n\n const [isLoading, setIsLoading] = useState();\n const [savedId, setSavedId] = useState();\n async function onSave() {\n try {\n // Manage General Access - If only I, set user type, otherwise set org type.\n // owner: {\n // name: ,\n // type: organization\n // }\n setIsLoading(true);\n\n if (!projectId) {\n // Check duplicate titles against existing project titles if creating a new project\n const hasDuplicates = checkDuplicates(title);\n if (hasDuplicates) return;\n }\n\n let newProject = {\n title,\n description,\n };\n // Set organization as owner, if specified\n if (generalAccess !== \"Only I\") {\n newProject[\"owner\"] = {\n name: generalAccess,\n type: \"organization\",\n };\n }\n\n let res: Response;\n if (projectId) {\n // Edit Project\n await ProjectsService.updateProjectMetadata(projectId, newProject);\n await sendModifyPermissionsRequest(projectId);\n newProject[\"id\"] = projectId;\n } else {\n // Create Project\n res = await ProjectsService.createProject(tag, newProject);\n\n if (res.status === 201) {\n const project: Project = await res.json();\n console.log(\"Created \", project.title);\n newProject[\"id\"] = project.id;\n } else if (res.status === 409) {\n const err_response = await res.json();\n if (err_response?.error?.code?.toLowerCase() === \"conflict\") {\n // Project already exists -- this could be for several reasons\n const allProjects = await ProjectsService.getMyProjects();\n for (let project of allProjects.items) {\n if (project.title === title) {\n // Check if hidden setting needs to be removed\n if (project.metadata?.hidden) {\n project.metadata.hidden = false;\n await ProjectsService.updateProjectMetadata(project.id, { metadata: project.metadata });\n }\n // Check if missing tag needs to be added\n if (project.metadata?.tags && !project.metadata.tags.includes(tag)) {\n project.metadata.tags.push(tag);\n await ProjectsService.updateProjectMetadata(project.id, { metadata: project.metadata });\n }\n newProject[\"id\"] = project.id;\n break;\n }\n }\n }\n\n if (newProject[\"id\"] === null) {\n // no resolution found\n setError(\"Please verify your project name is unique.\");\n setSavedId(undefined);\n return;\n }\n }\n\n // Invite from organization - Get user role and modify permissions after project creation\n if (newProject[\"id\"]) {\n await sendModifyPermissionsRequest(newProject[\"id\"]);\n }\n }\n // Set success state\n setError(\"\");\n setSavedId(newProject[\"id\"]);\n } catch (e) {\n console.log(e);\n if (e?.error?.code?.toLowerCase() === \"conflict\") {\n setError(\"Please verify your project name is unique.\");\n } else {\n setError(\"An error occurred when creating your project. Please try again.\");\n }\n setSavedId(undefined);\n } finally {\n setIsLoading(false);\n }\n }\n\n async function sendModifyPermissionsRequest(projectId: string) {\n const permissions: ProjectPermissionAction[] = Object.values(userRoles).map((userRole) => ({\n ...userRole,\n action: userRole.action ?? \"add\",\n }));\n\n let modifiedPermissions = [];\n // TODO: migrate logic to the API -- this is getting complex client-side\n permissions.forEach((permission) => {\n // When removing user permissions, remove both reader and writer permissions\n if (permission.action === \"remove\") {\n modifiedPermissions.push({\n ...permission,\n relation: permission.relation === \"writer\" ? \"reader\" : \"writer\",\n action: \"remove\",\n });\n } else {\n // Role has potentially been downgraded, so also request to remove any write permissions\n if (permission.relation === \"reader\") {\n modifiedPermissions.push({\n ...permission,\n relation: \"writer\",\n action: \"remove\",\n });\n }\n\n // Writer role implies reader role\n if (permission.relation === \"writer\") {\n modifiedPermissions.push({\n ...permission,\n relation: \"reader\",\n action: \"add\",\n });\n }\n }\n\n // Maintain set permissions\n modifiedPermissions.push({ ...permission });\n });\n\n await ProjectsService.modifyProjectPermissions(projectId, modifiedPermissions);\n console.log(\"Modified permissions\");\n }\n\n useEffect(() => {\n if (!error && savedId) {\n navigate(tagToRoutePrefix(tag), { state: { fromPath: \"new-project\", projectId: savedId } as ExpandNavigation });\n }\n }, [error, savedId]);\n\n const [generalAccess, setGeneralAccess] = useState(\"Only I\");\n const [orgUsers, setOrgUsers] = useState({\n filtered_count: 0,\n items: [],\n total_count: 0,\n });\n\n const [userInvitation, setUserInvitation] = useState({\n id: \"\",\n email: \"\",\n name: \"\",\n });\n const [invites, setInvites] = useState([]);\n const [duplicateInviteMessage, setDuplicateMessage] = useState(\"\");\n function addToInviteList() {\n if (userRoles?.[userInvitation.id] && userRoles?.[userInvitation.id][\"action\"] !== \"remove\") {\n setDuplicateMessage(\"This user already has a specified access level.\");\n return;\n }\n setInvites([...invites, { ...userInvitation }]);\n onRoleSelection(userInvitation.id, \"reader\"); // Default invited user role to reader\n }\n\n function removeRole(userId: string) {\n const newUserRoles = { ...userRoles };\n newUserRoles[userId][\"action\"] = \"remove\";\n setUserRoles(newUserRoles);\n setInvites(invites.filter((user) => user.id !== userId));\n }\n\n const [selectedOrg, setSelectedOrganization] = useState();\n async function onSetSelectedOrganization(orgName: string) {\n try {\n setSelectedOrganization(orgName);\n const orgUsers: OrganizationUsers = await getOrganizationUsers(orgName);\n setOrgUsers({ ...orgUsers });\n } catch (e) {\n // TODO: Send to future monitoring service\n console.log(e);\n }\n }\n\n function captureSharing() {\n if (invites.length > 0) {\n snakeEyesRecord({\n event: `${tagToAppName(tag)}/shared-project`,\n });\n }\n }\n\n return (\n
\n \n {`${projectId ? \"Edit\" : \"New\"} ${tagToTitle(tag)} Project`}\n \n setTitle(data.value)}\n />\n \n \n setDescription(e.target.value)}\n />\n \n \n {\" \"}\n {/* General Access */}\n \n {loadingOrganizations ? (\n \n ) : (\n <>\n }\n data-testid=\"organizations-dropdown\"\n onChange={(_, option: SelectedOption) => setGeneralAccess(option.name)}\n defaultValue={generalAccess}\n value={generalAccess}\n disabled={!!projectId} // Disabled if editing due to ownership transfer not yet implemented\n options={[\n {\n key: \"user\",\n name: \"Only I\",\n value: \"Only I\",\n },\n ...organizations.map((org) => ({\n key: org.id,\n name: org.name,\n value: org.name,\n })),\n ]}\n />\n {generalAccess === \"Only I\" ? \"as an admin\" : \"admins only\"}\n \n )}\n \n

\n Creating a project owned by an organization grants administrator access to admins of that organization.\n Additionally, you as the creator will have edit access.\n

\n

\n Sharing a project will share all the contents of the project with the selected audience.\n

\n
\n \n \n \n \n Your Organizations\n \n

\n Visit Anaconda Cloud to{\" \"}\n \n create organizations\n \n .\n

\n \n }\n />\n \n }\n >\n }\n data-testid=\"invite-organizations-dropdown\"\n onChange={(_, option: SelectedOption) => onSetSelectedOrganization(option.name)}\n defaultValue={selectedOrg}\n value={selectedOrg}\n options={[\n ...organizations.map((org) => ({\n key: org.id,\n name: org.name,\n value: org.name,\n })),\n ]}\n />\n
\n \n \n }\n data-testid=\"invite-org-emails\"\n placeholder=\"Click to select\"\n onChange={(_, option: SelectedOption) =>\n setUserInvitation({\n id: option.key,\n email: option.name,\n name: option.firstAndLastName,\n })\n }\n value={userInvitation.email}\n options={orgUsers?.items?.map((user) => ({\n key: user.id,\n name: user.email,\n value: user.email,\n firstAndLastName: user.first_name && user.last_name ? `${user.first_name} ${user.last_name}` : \"\",\n }))}\n />\n addToInviteList()}\n >\n Invite\n \n \n \n \n \n \n People with Access\n \n \n \n \n }\n validationMessage={duplicateInviteMessage || usersError}\n >\n \n {invites?.map((userInvite) => (\n \n ))}\n {loadingAccess ? (\n \n ) : (\n invites?.length === 0 && No invites have been sent.\n )}\n \n \n
\n \n {\n mutation.mutate(true);\n await onSave();\n await captureSharing();\n }}\n appearance=\"primary\"\n data-testid=\"save-new-project\"\n // Disable if no title, or if a user was selected to be invited without a specified role\n // If in edit mode, ignore checking number of invitations\n disabled={title === \"\" || (!projectId && invites.length != Object.keys(userRoles).length)}\n >\n {isLoading ? : \"Save\"}\n \n \n
\n \n
\n );\n};\n","export const editorSetup = {\n //...basicSetup,\n allowMultipleSelections: true,\n lineNumbers: true,\n indentOnInput: true,\n dropCursor: true,\n drawSelection: true,\n autocompletion: true,\n history: true,\n highlightActiveLine: true,\n defaultKeymap: true,\n completionKeymap: true,\n lintKeymap: true,\n bracketMatching: true,\n closeBrackets: true,\n foldGutter: true,\n tabSize: 4,\n};\n","import React, { useEffect, useRef, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Button, Tooltip } from \"@fluentui/react-components\";\nimport { DocumentCopyRegular, Play16Filled, EditRegular, DeleteRegular } from \"@fluentui/react-icons\";\nimport { CopyToClipboard } from \"react-copy-to-clipboard\";\nimport { ConfirmationDialog } from \"../../components/Dialogs/ConfirmationDialog\";\nimport { Row } from \"../../components/Layout/Space\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport { python } from \"@codemirror/lang-python\";\nimport { editorSetup } from \"xlcommon/src/pyscript/editor\";\nimport { ExportSnippetProps } from \"./ExportSnippet\";\nimport { writeToExecutionLocation } from \"../../../excel/grid-utils\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport { Project } from \"../../../data/projects/models\";\nimport { codeDarkTheme } from \"../../theme\";\nimport {\n RangeType,\n getAliasFromRangeSelection,\n writeToCell,\n getSplitIdAddrFromBinding,\n} from \"xlcommon/src/excel/excel-grid-utils\";\n\nexport const SnippetViewer = ({\n project,\n code,\n name,\n onDelete,\n}: {\n project: Project;\n code: string;\n name: string;\n onDelete: () => Promise;\n}) => {\n const stateCode = useRef(\"\");\n const [openConfirmation, setOpenConfirmation] = useState(false);\n\n async function addCodeToContainer(code: string) {\n stateCode.current = code;\n const options = { promptText: \"Click to select\" };\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, promptCallback);\n }\n\n async function promptCallback(result) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n return;\n }\n\n let code = stateCode.current;\n\n const targetAddress = await getAliasFromRangeSelection({\n rangeType: RangeType.CellBinding,\n identifier: result.value.id,\n });\n // Easy way to delete the binding id as a side effect\n await getSplitIdAddrFromBinding(result.value.id, /*deleteId=*/ true);\n\n if (name.endsWith(\".py\")) {\n await writeToExecutionLocation(targetAddress, code);\n } else {\n await writeToCell(targetAddress, code, false);\n }\n }\n\n const [disabled, setDisabled] = useState(true);\n async function checkHasModifyAccess() {\n const access = await ProjectsService.getMyProjectAccessLevels(project.id);\n setDisabled(access?.modify === false);\n return access;\n }\n useEffect(() => {\n (async () => {\n await checkHasModifyAccess();\n })();\n }, []);\n\n const navigate = useNavigate();\n async function openEditor() {\n const access = await checkHasModifyAccess();\n if (access?.modify === false) return;\n navigate(`/snippets/export/edit`, {\n state: {\n code,\n project,\n fileName: name,\n } as ExportSnippetProps,\n });\n }\n\n async function openConfirmationIfAccess() {\n const access = await checkHasModifyAccess();\n if (access?.modify === false) return;\n setOpenConfirmation(true);\n }\n\n return (\n <>\n \n
\n \n \n }\n disabled={disabled}\n onClick={async () => await openConfirmationIfAccess()}\n />\n \n \n }\n disabled={disabled}\n onClick={async () => await openEditor()}\n />\n \n \n
\n {\" \"}\n {/* This div is necessary to prevent the Tooltip from conflicting with CopyToClipboard component listeners simply */}\n \n
\n
\n \n await addCodeToContainer(code)}\n appearance=\"primary\"\n icon={}\n iconPosition=\"before\"\n />\n \n
\n await onDelete()}\n />\n
\n \n );\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./SnippetItem.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./SnippetItem.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useRef, useState, useEffect } from \"react\";\nimport { Button, Card, CardHeader, Field, Text } from \"@fluentui/react-components\";\nimport { ChevronDown20Filled, CodePy16Regular, MathFormula16Regular } from \"@fluentui/react-icons\";\nimport { Row } from \"../../components/Layout/Space\";\nimport { ProjectItemProps } from \"../Projects/ProjectFolder\";\nimport IconHeader from \"../../components/Typography\";\nimport { PlaceholderItem } from \"../../components/PlaceholderItem\";\nimport { SnippetViewer } from \"./SnippetViewer\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport \"./SnippetItem.scss\";\n\nexport const LANGUAGE_SUFFIXES = [\n { suffix: \".py\", language: \"Python\" },\n { suffix: \".xl\", language: \"Excel Formula\" },\n //{ suffix: \".r\", language: \"R\" },\n];\nconst VALID_FILE_SUFFIX = new Set(LANGUAGE_SUFFIXES.map(({ suffix }) => suffix.slice(1)));\n\nexport function SnippetItem({ project, item }: ProjectItemProps) {\n const [expanded, setExpanded] = useState(false);\n const [code, setCode] = useState();\n const [isDownloadingFile, setIsDownloadingFile] = useState(false);\n const cardRef = useRef();\n\n useEffect(() => {\n (async () => {\n if (expanded && !code) {\n setIsDownloadingFile(true);\n try {\n const res = await ProjectsService.downloadFileByName(project.id, item.name);\n // Must avoid rendering errors in code editor\n if (res.ok) {\n const fileContent = await res.text();\n setCode(fileContent);\n setIsDownloadingFile(false);\n }\n } catch (e) {\n console.log(\"There was an error downloading code snippet files.\");\n console.log(e);\n setIsDownloadingFile(false);\n }\n }\n })();\n }, [expanded]);\n\n const [deleteError, setDeleteError] = useState();\n async function deleteItem(projectId: string, fileName: string) {\n try {\n await ProjectsService.deleteFileByName(projectId, fileName);\n } catch (e) {\n console.log(e);\n setDeleteError(\"There was an error deleting the code snippet.\");\n }\n }\n\n // Only show files with known suffix\n const fileSuffix = item.name.split(\".\").slice(-1)[0].toLowerCase();\n if (!VALID_FILE_SUFFIX.has(fileSuffix) || item.metadata[\"code_snippet\"] === undefined) return null;\n\n return (\n
\n \n \n : }\n text={\n \n {item.name}\n
\n }\n />\n \n }\n action={\n \n }\n onClick={() => setExpanded(!expanded)}\n />\n \n }\n />\n {expanded && (\n
\n {isDownloadingFile ? (\n \n ) : (\n await deleteItem(project.id, item.name)}\n />\n )}\n
\n )}\n \n \n );\n}\n","import React from \"react\";\nimport ProjectsExplorer from \"../Projects/ProjectsExplorer\";\nimport { SnippetItem } from \"./SnippetItem\";\n\nfunction Snippets() {\n return (\n
\n
\n \n
\n
\n );\n}\n\nexport default Snippets;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./ExportSnippet.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./ExportSnippet.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState } from \"react\";\nimport { useLocation, useNavigate, useParams } from \"react-router-dom\";\nimport { CloudArrowUp20Regular, Add16Filled } from \"@fluentui/react-icons\";\nimport { Button, Text, Dropdown, Field, Input, Label, Option, Spinner, Tooltip } from \"@fluentui/react-components\";\nimport { ActionButtonRow, Col, Row } from \"../../components/Layout/Space\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport { python } from \"@codemirror/lang-python\";\nimport { StreamLanguage } from \"@codemirror/language\";\nimport { mathematica } from \"@codemirror/legacy-modes/mode/mathematica\";\nimport { editorSetup } from \"xlcommon/src/pyscript/editor\";\nimport { codeDarkTheme } from \"../../theme\";\nimport ProjectChooser from \"../../../data/components/ProjectChooser\";\nimport { ExpandNavigation, Project } from \"../../../data/projects/models\";\nimport ProjectsService from \"../../../data/projects/projects-api\";\nimport { LANGUAGE_SUFFIXES } from \"./SnippetItem\";\nimport { capitalize, ensureFileSuffix } from \"../../utils\";\nimport {\n getAliasFromRangeSelection,\n getFormulaFromGrid,\n RangeSelection,\n RangeType,\n} from \"xlcommon/src/excel/excel-grid-utils\";\nimport { parseFormula, FormulaLanguage } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { Mode } from \"../../types\";\nimport styles from \"../../styles.module.scss\";\nimport \"./ExportSnippet.scss\";\n\nexport type ExportSnippetProps = {\n code?: string;\n project?: Project;\n fileName?: string;\n};\n\nconst ExportSnippet = () => {\n const navigate = useNavigate();\n const params = useParams();\n const location = useLocation();\n\n const {\n code: initialCode = \"\",\n project: initialProject = { name: \"\" },\n fileName: initialFileName = \"\",\n }: ExportSnippetProps = location?.state || {};\n\n const [project, setProject] = useState(initialProject);\n const [isWriteable, setWriteable] = useState(false);\n const [suffix, setSuffix] = useState(LANGUAGE_SUFFIXES[0].suffix);\n const [language, setLanguage] = useState(LANGUAGE_SUFFIXES[0].language);\n const [fileName, setFileName] = useState(initialFileName);\n const [snippet, setCodeSnippet] = useState(initialCode);\n const [isUploading, setIsUploading] = useState(false);\n\n useEffect(() => {\n if (initialFileName !== \"\") {\n // Determine language type based on file suffix\n const pieces = initialFileName.split(\".\");\n const initialSuffix = \".\" + pieces[pieces.length - 1];\n // find suffix in LANGUAGE_SUFFIXES\n LANGUAGE_SUFFIXES.forEach(({ suffix, language }) => {\n if (suffix === initialSuffix) {\n updateLanguage(suffix, language);\n }\n });\n }\n }, []);\n\n async function handleUpload() {\n setIsUploading(true);\n const uploadName = ensureFileSuffix(fileName, suffix);\n try {\n await ProjectsService.uploadSnippet(project.id, uploadName, snippet, language);\n navigate(\"/snippets\", { state: { fromPath: \"export\", projectId: project.id } as ExpandNavigation });\n } catch (err) {\n console.error(err);\n }\n setIsUploading(false);\n }\n\n async function onProjectSelection(value: Project, isWriteable: boolean) {\n setProject({ ...value });\n setWriteable(isWriteable);\n }\n\n function updateLanguage(suffix: string, language: string) {\n setSuffix(suffix);\n setLanguage(language);\n }\n\n function isReadyForUpload() {\n if (project.title === \"\" || snippet === \"\" || fileName === \"\") return false;\n if (!isWriteable) return false;\n return true;\n }\n\n const [selection] = useState(null);\n\n async function getFormulasFromGrid() {\n const options = { promptText: \"Click to select\" };\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, promptCallback);\n }\n\n async function promptCallback(result) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n return;\n }\n\n if (selection) {\n let alias = await getAliasFromRangeSelection(selection);\n if (alias === undefined && selection.displayName) {\n alias = selection.displayName;\n }\n }\n\n const targetAddress = await getAliasFromRangeSelection({\n rangeType: RangeType.CellBinding,\n identifier: result.value.id,\n });\n\n const rawFormula = await getFormulaFromGrid(targetAddress);\n const { language, formula } = parseFormula(rawFormula);\n setCodeSnippet(formula);\n switch (language) {\n case FormulaLanguage.python:\n updateLanguage(\".py\", \"Python\");\n break;\n case FormulaLanguage.r:\n updateLanguage(\".r\", \"R\");\n break;\n case FormulaLanguage.excel:\n default:\n updateLanguage(\".xl\", \"Excel Formula\");\n break;\n }\n }\n\n return (\n
\n \n {`${\n capitalize(params.mode as Mode) ?? capitalize(Mode.New)\n } Code Snippet`}\n \n \n \n setFileName(data.value)}\n value={fileName}\n placeholder=\"Enter title...\"\n />\n \n \n \n \n \n updateLanguage(data.optionValue, data.optionText)}\n >\n {LANGUAGE_SUFFIXES.map(({ suffix, language }) => (\n \n ))}\n \n \n await getFormulasFromGrid()}\n icon={}\n >\n Add From Grid\n \n \n \n \n setCodeSnippet(code)}\n data-testid=\"code-snippet-editor\"\n />\n \n : null}\n >\n {isUploading ? : \"Save to Cloud\"}\n \n \n \n
\n );\n};\n\nexport default ExportSnippet;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Settings.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Settings.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState } from \"react\";\nimport { Divider, Field, Radio, RadioGroup } from \"@fluentui/react-components\";\nimport { PythonExecutionLocation } from \"../../excel/types\";\nimport { getPythonLocation, savePythonSettings } from \"../../excel/grid-utils\";\nimport { usePython } from \"../hooks/usePython\";\nimport \"./Settings.scss\";\n\nexport default function Settings() {\n const { hasPython } = usePython();\n const [executionLocation, setExecutionLocation] = useState(PythonExecutionLocation.Azure);\n\n useEffect(() => {\n (async () => {\n const location: PythonExecutionLocation = await getPythonLocation();\n setExecutionLocation(location);\n })();\n }, []);\n\n async function updateExecutionLocation(newLocation: PythonExecutionLocation) {\n setExecutionLocation(newLocation);\n await savePythonSettings({\n executionLocation: newLocation,\n });\n }\n\n return (\n
\n
\n

Excel

\n \n updateExecutionLocation(data.value as PythonExecutionLocation)}\n >\n \n \n \n \n
\n \n {/**\n * This is only available in Anaconda Code right now as \n
\n

Toolbox

\n Switch here\n
\n */}\n
\n );\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Logo.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./Logo.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { ReactNode, useEffect } from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { ChevronLeft20Filled } from \"@fluentui/react-icons\";\nimport { Breadcrumb } from \"../components/Typography\";\nimport { useChartManager } from \"../hooks/plots/useCentralViz\";\nimport styles from \"../styles.module.scss\";\nimport \"./Logo.scss\";\n\nexport const Logo: React.FC<{ children?: ReactNode; title?: string; size?: number }> = ({\n children,\n title = \"Anaconda Toolbox\",\n size = 14,\n}) => {\n const navigate = useNavigate();\n const location = useLocation();\n const { plotType, setPlotType, setTab } = useChartManager();\n\n const paths = location.pathname.split(\"/\").filter(Boolean);\n\n useEffect(() => {\n if (location.pathname == \"/viz/edit\" && !plotType) {\n navigate(\"/viz\");\n }\n }, [plotType]);\n\n // TODO: make a context that pages can set instead of adding custom logic here\n // Special handling for viz\n if (location.pathname === \"/viz/edit\") {\n return (\n {\n setTab(null);\n setPlotType(null);\n }}\n />\n );\n }\n\n if (paths.length >= 2) {\n return navigate(-1)} />;\n }\n\n return (\n
navigate(`/back/?current=${location.pathname}`)}>\n {title === \"Anaconda Toolbox\" ? (\n \"anaconda\n ) : (\n \n )}\n {/* TODO: Replace with brand variant color */}\n

{title ?? \"Anaconda\"}

\n {children}\n
\n );\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./TooltipTab.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./TooltipTab.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { TabProps, Tooltip, Tab } from \"@fluentui/react-components\";\nimport \"./TooltipTab.scss\";\n\nexport interface TooltipTabProps extends TabProps {\n tooltipContent: string;\n}\n\nexport const TooltipTab: React.FC = ({ tooltipContent, ...props }) => {\n return (\n \n \n {props.children}\n \n \n );\n};\n","import React, { FC, ReactElement, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n Button,\n Menu,\n MenuList,\n MenuItem,\n MenuPopover,\n MenuDivider,\n Tooltip,\n MenuTrigger,\n} from \"@fluentui/react-components\";\nimport { LineHorizontal320Filled } from \"@fluentui/react-icons\";\nimport { usePython } from \"../../hooks/usePython\";\n// import { logout } from \"../../../auth/auth-api\";\nimport { NavMenuItems } from \"./nav-models\";\nimport Env from \"xlcommon/src/environ\";\nimport \"./NavMenu.scss\";\n\n/**\n * Component Reference:\n * https://react.fluentui.dev/?path=/docs/components-menu-menu--default#anchor-to-custom-target\n * @returns FC\n */\nexport const CollapsedNavMenu: FC = () => {\n const [activeClass, setActiveClass] = useState<{ className: string; title: string }>({ className: \"\", title: \"\" });\n\n const navigate = useNavigate();\n const { hasPython } = usePython();\n\n return (\n
\n \n \n \n
\n );\n};\n\nconst WithTooltip = ({ title, disabled, children }: { title: string; disabled: boolean; children: ReactElement }) =>\n disabled ? (\n \n {children}\n \n ) : (\n children\n );\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./TopBar.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./TopBar.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState } from \"react\";\nimport { useLocation, useNavigate } from \"react-router-dom\";\nimport { TabList, Toolbar, ToolbarGroup } from \"@fluentui/react-components\";\nimport { NavBarItems } from \"./nav-models\";\nimport { Logo } from \"../Logo\";\nimport { TooltipTab } from \"../TooltipTab\";\nimport { CollapsedNavMenu } from \"./NavMenu\";\nimport { usePython } from \"../../hooks/usePython\";\nimport \"./TopBar.scss\";\nimport Env from \"xlcommon/src/environ\";\n\nexport const TopBar = () => {\n const navigate = useNavigate();\n const location = useLocation();\n const { hasPython } = usePython();\n\n const selectedValue: string = \"/\" + location.pathname.split(\"/\")[1];\n\n const [title, setTitle] = useState(\"Anaconda Toolbox\");\n useEffect(() => {\n if (location.pathname.length > 0) {\n if (selectedValue === \"/\") {\n setTitle(\"Anaconda Toolbox\");\n } else {\n // Find matching NavMenuItem\n for (let item of NavBarItems) {\n if (item.path === selectedValue) {\n setTitle(item.title);\n break;\n }\n }\n }\n }\n }, [location.pathname]);\n\n return (\n \n \n \n \n \n navigate(data.value)}\n >\n {NavBarItems.map((item) => {\n const disabled = item.disabled || (item.requiresPython && !hasPython && !Env.UNLOCKED);\n const tabClasses = [\"tab\"];\n if (selectedValue === item.path) tabClasses.push(\"active\");\n if (disabled) tabClasses.push(\"disabled\");\n if (item.priority) tabClasses.push(\"priority\");\n return (\n }\n value={item.path}\n disabled={disabled}\n className={tabClasses.join(\" \")}\n >\n {item.title}\n \n );\n })}\n \n \n \n \n );\n};\n\nexport default TopBar;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./App.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./App.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { Outlet } from \"react-router-dom\";\nimport TopBar from \"./Layout/TopBar\";\nimport \"./App.scss\";\n\nfunction App() {\n return (\n
\n \n
\n {/* https://reactrouter.com/en/main/components/outlet */}\n \n
\n
\n );\n}\n\nexport default App;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./FeedbackMenu.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./FeedbackMenu.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { CSSProperties, useEffect, useRef, useState } from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport {\n ChevronDown20Filled,\n ChevronUp20Filled,\n Chat20Regular,\n PeopleCommunity20Filled,\n Book20Regular,\n Document20Regular,\n} from \"@fluentui/react-icons\";\nimport {\n Button,\n Popover,\n PopoverProps,\n PopoverSurface,\n PopoverTrigger,\n PositioningImperativeRef,\n} from \"@fluentui/react-components\";\nimport { Col } from \"./Layout/Space\";\nimport { navigate } from \"../utils\";\nimport \"./FeedbackMenu.scss\";\n\nconst ALLOWED_PATHS = [\"/\", \"/data\", \"/snippets\", \"/viz\", \"/settings\"]; // , \"/edublocks\"\nexport const FEEDBACK_URL =\n \"https://docs.google.com/forms/d/1-7joCjzG2-MJrM9_9Sj0ffprnj5hfeE4BJXSRRleyhI/viewform?edit_requested=true\";\nconst COM_URL = \"https://community.anaconda.cloud/c/python-in-excel\";\nconst DOCS_URL = \"https://docs.anaconda.com/excel/toolbox/\";\n\nexport const FeedbackMenu: React.FC<{ triggerButtonStyles?: CSSProperties }> = ({ triggerButtonStyles }) => {\n const location = useLocation();\n\n const buttonRef = useRef(null);\n const positioningRef = useRef(null);\n useEffect(() => {\n if (buttonRef.current) {\n positioningRef.current?.setTarget(buttonRef.current);\n }\n }, [buttonRef, positioningRef]);\n\n const [open, setOpen] = useState(false);\n const handleOpenChange: PopoverProps[\"onOpenChange\"] = (_, data) => setOpen(data.open || false);\n\n if (!ALLOWED_PATHS.includes(location.pathname)) {\n return <>;\n }\n return (\n
\n \n \n : }\n />\n \n \n \n {/* \n Comment out until we get the link to the documentation\n \n */}\n \n \n \n \n \n \n \n
\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { Button } from \"@fluentui/react-components\";\nimport { useNavigate } from \"react-router-dom\";\nimport { snakeEyesRecord } from \"../../../analytics/snake-eyes\";\nimport { RangeType } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { Row } from \"../../components/Layout/Space\";\nimport { useChart, useChartManager } from \"../../hooks/plots/useCentralViz\";\nimport { BaseDesign as IBaseDesign, BaseSetup as IBaseSetup } from \"../../hooks/plots/PlotTypes\";\nimport styles from \"../../styles.module.scss\";\nimport \"./Viz.scss\";\n\ninterface ActionButtonsProps {\n onPrimaryClick: () => Promise;\n}\n\nconst ActionButtons: React.FC = ({ onPrimaryClick }) => {\n const navigate = useNavigate();\n const { plotType, defModified, setPlotType, setTab, setDefModified, resetContext } = useChartManager();\n const { common, updateCommon } = useChart(plotType);\n const [pendingWrite, setPendingWrite] = useState(false);\n\n useEffect(() => {\n if (!plotType) {\n navigate(\"/viz\");\n }\n }, [plotType]);\n\n useEffect(() => {\n if (!pendingWrite) return;\n\n if (common.outputCell?.identifier) {\n onPrimaryClick();\n setPendingWrite(false);\n setDefModified(false);\n snakeEyesRecord({\n event: \"viz/chart_applied\",\n });\n }\n }, [pendingWrite, common.outputCell]);\n\n function promptCallback(result: Office.AsyncResult) {\n if (result.value === undefined) {\n console.log(\"User cancelled the dialog\");\n setPendingWrite(false);\n return;\n }\n\n updateCommon({ outputCell: { rangeType: RangeType.CellBinding, identifier: result.value.id } });\n snakeEyesRecord({\n event: \"viz/chart_created\",\n });\n }\n\n async function handleCreateOrApply() {\n // If outputCell is not defined, force the user to choose it now\n // Unfortunately, this is not a synchronous or awaitable action,\n // so promptCallback and useEffect are needed to handle the response\n if (!common.outputCell || !common.outputCell.identifier) {\n let options = { promptText: \"Select a cell to run the chart code\" };\n Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix, options, promptCallback);\n }\n\n setPendingWrite(true);\n }\n\n async function handleCancel() {\n // Reset chart\n resetContext();\n setTab(null);\n setPlotType(null);\n }\n\n return (\n
\n \n \n Cancel\n \n 0\n }\n iconPosition=\"after\"\n onClick={handleCreateOrApply}\n style={{ padding: 8, width: 140 }}\n >\n {common.outputCell?.identifier ? \"Apply\" : \"Create\"}\n \n \n
\n );\n};\n\nexport default ActionButtons;\n","import { EditorView } from \"@uiw/react-codemirror\";\n\nexport const editorStyles = EditorView.theme(\n {\n \"&.cm-editor.cm-focused\": {\n outline: \"none\",\n },\n },\n {}\n);\n","import React from \"react\";\nimport { Col } from \"../../../taskpane/components/Layout/Space\";\nimport { Checkbox, Text } from \"@fluentui/react-components\";\nimport { UserSettings } from \"../../../queryclient/settings/types\";\nimport { useAddSettingToDatabase } from \"../../../queryclient/settings/settings\";\n\nexport const LockedLabel = () => {\n return (\n \n \n {\"You've made changes to the code for this chart. Click \"}\n Edit Code\n {\" to continue making changes on the Code tab.\"}\n \n \n Clicking Discard Code Edits to use the Setup or Design tabs will remove any changes you made to the code,\n as we cannot reflect all code changes on those tabs.\n
\n \n Learn More\n \n
\n \n );\n};\n\nexport const WarningLabel = () => {\n const mutation = useAddSettingToDatabase(UserSettings.EditCodeWarning.Seen);\n\n return (\n \n \n Editing code will lock the Setup and Design tab. All changes will need to be in Code. You may return to using\n Setup and Design at any time, but all custom code will be reverted.\n \n \n Learn More\n \n mutation.mutate(e.checked)} />\n \n );\n};\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Code.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./Code.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, Suspense, useRef, useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Button, Tooltip } from \"@fluentui/react-components\";\nimport { Copy20Regular, CodeBlockRegular, EditRegular } from \"@fluentui/react-icons\";\nimport { CopyToClipboard } from \"react-copy-to-clipboard\";\nimport CodeMirror, { KeyBinding, Prec, ReactCodeMirrorRef, keymap } from \"@uiw/react-codemirror\";\nimport { acceptCompletion } from \"@codemirror/autocomplete\";\nimport { python } from \"@codemirror/lang-python\";\nimport { Row } from \"../../components/Layout/Space\";\nimport { getFullAddressFromRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { writeToExecutionLocation } from \"../../../excel/grid-utils\";\nimport { buildPythonInExcelCode } from \"./MVCShared/CodeBuilder\";\nimport ActionButtons from \"./ActionButtons\";\nimport { editorStyles } from \"./VizSharedComponents/Themes\";\nimport { codeDarkTheme } from \"../../theme\";\nimport { editorSetup } from \"xlcommon/src/pyscript/editor\";\nimport { useChart, useChartManager } from \"../../../taskpane/hooks/plots/useCentralViz\";\nimport { BaseDesign, BaseSetup } from \"../../../taskpane/hooks/plots/PlotTypes\";\nimport { CustomDialog } from \"../../../taskpane/components/Dialogs/CustomDialog\";\nimport { WarningLabel } from \"./DialogLabels\";\nimport { useUserSetting } from \"../../../queryclient/settings/settings\";\nimport { UserSettings } from \"../../../queryclient/settings/types\";\nimport \"./Code.scss\";\n\nconst Code = () => {\n const { plotType } = useChartManager();\n const { common, codeFragments, updateCommon, serializeContext } = useChart(plotType);\n const { data: warningSeen = undefined } = useUserSetting(UserSettings.EditCodeWarning.Seen);\n const [warningDialogOpen, setWarningDialogOpen] = useState(false);\n const cm = useRef();\n const navigate = useNavigate();\n\n if (!common.inputData) {\n return

Select input data in the setup tab to view code.

;\n }\n\n const handleCreateClick = async () => {\n const addr = await getFullAddressFromRangeSelection(common.outputCell);\n if (common.typedCode) {\n await writeToExecutionLocation(addr, common.typedCode);\n } else {\n await writeToExecutionLocation(addr, uneditedCode);\n }\n await serializeContext();\n };\n\n const [uneditedCode, setUneditedCode] = useState();\n useEffect(() => {\n if (!common.typedCode) {\n (async () => {\n setUneditedCode(await buildPythonInExcelCode(codeFragments));\n })();\n }\n }, []);\n\n const customKeyBindings: KeyBinding[] = [{ key: \"Tab\", run: acceptCompletion, preventDefault: false }];\n\n function editorRefCallback(editor: ReactCodeMirrorRef) {\n if (editor?.editor && editor?.state && editor?.view) {\n cm.current = editor; // Save reference\n }\n }\n\n return (\n
\n \n \n {common.typedCode ? \"Edit Code\" : \"Preview Code (read-only)\"}\n
\n {!common.typedCode && (\n <>\n \n }\n onClick={() => {\n if (warningSeen) {\n updateCommon({ typedCode: uneditedCode });\n } else {\n setWarningDialogOpen(true);\n }\n }}\n />\n \n \n )}\n setWarningDialogOpen(open)}\n title=\"Warning\"\n content={}\n onContinue={() => {\n updateCommon({ typedCode: uneditedCode });\n }}\n />\n \n
\n {\" \"}\n {/* This div is necessary to prevent the Tooltip from conflicting with CopyToClipboard component listeners simply */}\n \n
\n
\n \n }\n onClick={() => navigate(\"/snippets/export\", { state: { code: common.typedCode ?? uneditedCode } })}\n />\n \n
\n
\n {\n updateCommon({ typedCode: value });\n }}\n />\n \n
\n
\n );\n};\n\nexport default Code;\n","import { RangeSelection, getFullAddressFromRangeSelection, readFromRange } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { ChartAttr, Dependency } from \"./types\";\nimport { ValueTracker } from \"./types\";\n\n/****************\n * Dependency Constructors\n ****************/\nexport function dependencyEqualsValue(object: ChartAttr, value: any): Dependency {\n return {\n object: object,\n isSatisfied: () => {\n const componentValue = object.component instanceof ValueTracker ? object.component.value : object.component;\n return valuesAreEqual(componentValue, value);\n },\n };\n}\n\nfunction valuesAreEqual(a: any, b: any): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((element, index) => element === b[index]);\n } else {\n return a === b;\n }\n}\n\nexport function dependencyNotEqualsValue(object: ChartAttr, excludedValue: any): Dependency {\n return {\n object: object,\n isSatisfied: () => {\n const componentValue = object.component instanceof ValueTracker ? object.component.value : object.component;\n return !valuesAreEqual(componentValue, excludedValue);\n },\n };\n}\n\nexport function dependencyNotOrEqualsValue(objectA: ChartAttr, objectB: ChartAttr, expectedValue: any): Dependency {\n const valueA = objectA.component instanceof ValueTracker ? objectA.component.value : objectA.component;\n const valueB = objectB.component instanceof ValueTracker ? objectB.component.value : objectB.component;\n return {\n object: valueA === expectedValue ? objectA : objectB,\n isSatisfied: () => {\n return valueA !== expectedValue || valueB !== expectedValue;\n },\n };\n}\n\nexport function dependencyInValues(object: ChartAttr, allowedValues: any[]): Dependency {\n return {\n object: object,\n isSatisfied: () => {\n const val = object.component instanceof ValueTracker ? object.component.value : object.component;\n return allowedValues.includes(val);\n },\n };\n}\n\n/****************\n * Other Utilities\n ****************/\n\nexport const fetchHeaders = async (\n dataRange: RangeSelection,\n hasHeaders: boolean,\n updateSetup: (updates: Record) => void\n) => {\n const fullAddress = await getFullAddressFromRangeSelection(dataRange);\n if (fullAddress === undefined) return;\n // Read one row of data\n const data = await readFromRange(fullAddress, 1);\n let updatedHeaders: string[] = [];\n if (hasHeaders) {\n updatedHeaders = data[0].filter((item) => typeof item === \"string\" && item != \"\");\n } else {\n for (let i = 0; i < data[0].length; i++) {\n updatedHeaders.push(`Column ${(i + 1).toString()}`);\n }\n }\n\n updateSetup({ headers: updatedHeaders });\n return updatedHeaders;\n};\n","import React, { ReactElement } from \"react\";\nimport { Button, Dropdown, Option, OptionGroup, Input, Tooltip, Label } from \"@fluentui/react-components\";\nimport { ChevronDown20Filled, ChevronUp20Filled } from \"@fluentui/react-icons\";\nimport { Row } from \"../../../components/Layout/Space\";\nimport { IDropdownOption } from \"@fluentui/react\";\nimport \"../Viz.scss\";\n\ninterface DropdownProps {\n label: string;\n labelWidth: number;\n options: T[];\n groupedOptions?: Record;\n value: string;\n isDisabled?: boolean;\n onChange: (event, data) => void;\n dataTestID?: string;\n placeholder?: string;\n multiselect?: boolean;\n selectedOptions?: string[];\n}\n\nexport const CustomDropdown: React.FC> = ({\n label,\n labelWidth,\n placeholder,\n options,\n groupedOptions,\n value,\n isDisabled,\n onChange,\n dataTestID,\n multiselect,\n selectedOptions,\n}) => {\n const formatSelectedValues = (selectedValues: string | string[]): string => {\n if (Array.isArray(selectedValues)) {\n return selectedValues.join(\", \");\n }\n };\n\n function listOptions(options: (string | IDropdownOption)[], keyPrefix = \"\") {\n return options.map((option, i) => (\n \n {getText(option)}\n \n ));\n }\n\n function getText(option: string | IDropdownOption): string {\n if (typeof option === \"string\") return option;\n if (option.data?.component) return option.data.component;\n return option[\"text\"];\n }\n\n return (\n
\n \n \n \n {listOptions(options)}\n {options && groupedOptions && (\n // This adds a horizontal line to match the visual style separating groups\n \n )}\n {groupedOptions &&\n Object.keys(groupedOptions).map((optGroup) => (\n \n {listOptions(groupedOptions[optGroup], `${optGroup}-`)}\n \n ))}\n \n \n
\n );\n};\n\ninterface DesignInputProps {\n placeholder: string;\n label: string;\n labelWidth: number;\n value: string;\n isDisabled?: boolean;\n onInput: (event: React.FormEvent) => void;\n dataTestID;\n}\n\nexport const DesignInputs: React.FC = ({\n placeholder,\n label,\n labelWidth,\n value,\n isDisabled,\n onInput,\n dataTestID,\n}) => {\n return (\n
\n \n \n \n \n
\n );\n};\n\nexport const CollapsibleSection = ({\n children,\n isCollapsed,\n toggleCollapse,\n label = \"Advanced\",\n tooltip,\n}: {\n children: React.ReactNode;\n isCollapsed?: boolean;\n toggleCollapse?: () => void;\n label?: string;\n tooltip?: string;\n}) => {\n return (\n <>\n \n {tooltip ? (\n \n \n \n ) : (\n \n )}\n : }\n onClick={toggleCollapse}\n appearance=\"transparent\"\n style={{ border: \"None\" }}\n >\n \n
{!isCollapsed && children}
\n \n );\n};\n\nexport const WithTooltip = ({\n info,\n disabled,\n children,\n}: {\n info: string;\n disabled: boolean;\n children: ReactElement;\n}) =>\n disabled ? (\n \n {children}\n \n ) : (\n children\n );\n","import React from \"react\";\nimport { IDropdownOption } from \"@fluentui/react/lib/Dropdown\";\nimport { CustomDropdown } from \"./VizUIShared\";\nimport \"../Viz.scss\";\n\ninterface ColorBlockProps {\n color: string;\n}\n\nconst ColorBlock: React.FC = ({ color }) => (\n \n);\n\nconst PaletteOptions: React.FC<{ colors: string[]; label: string }> = ({ colors, label }) => {\n return (\n \n \n \n {colors.map((color, index) => (\n \n ))}\n \n \n );\n};\n\nconst paletteOptions: IDropdownOption[] = [\n { key: \"Tab10\", text: \"Tab10\", colors: [\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\", \"#8c564b\"] },\n {\n key: \"Accent\",\n text: \"Accent\",\n colors: [\"#90C686\", \"#BBAFD2\", \"#F4C28D\", \"#FEFFA6\", \"#456BAA\", \"#DC307E\", \"#B3612B\", \"#656666\"],\n },\n { key: \"Blues\", text: \"Blues\", colors: [\"#DEE9F5\", \"#BFD6E9\", \"#94BEDA\", \"#669CC9\", \"#4179B5\", \"#25549A\"] },\n { key: \"Blues_d\", text: \"Blues_d\", colors: [\"#394A5A\", \"#3F6382\", \"#4979A8\", \"#5C90C1\", \"#77A3CB\", \"#94BAD9\"] },\n { key: \"BrBG\", text: \"BrBG\", colors: [\"#99682B\", \"#D5BA7C\", \"#F4ECD4\", \"#D9ECE9\", \"#89C4BA\", \"#397872\"] },\n].map(({ key, text, colors }) => ({\n key,\n text,\n data: {\n component: ,\n },\n}));\n\ntype PaletteProps = {\n value: string;\n onChange?: (e, data) => void;\n options?: IDropdownOption[];\n dataTestID?: string;\n disabled?: boolean;\n label: string;\n labelWidth: number;\n};\n\nexport const PaletteDropdown: React.FC = ({\n onChange,\n value,\n dataTestID,\n disabled,\n label,\n labelWidth,\n}) => {\n return (\n \n );\n};\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./SpinButton.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./SpinButton.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, ChangeEvent, KeyboardEvent } from \"react\";\nimport { ChevronUp16Filled, ChevronDown16Filled } from \"@fluentui/react-icons\";\nimport { Row } from \"../../../../taskpane/components/Layout/Space\";\nimport \"../Viz.scss\";\nimport \"./SpinButton.scss\";\n\ninterface NumericSpinnerProps {\n min?: number;\n max?: number;\n step: number;\n value: number;\n units?: string;\n isDisabled?: boolean;\n dataTestID?: string;\n precision?: number;\n onChange: (newValue: number) => void;\n}\n\n/**\n * Example usage:\n * \n {\n console.log(newValue);\n }}\n />\n */\nexport const EditableSpinner: React.FC = ({\n min,\n max,\n step,\n value,\n units = \"\",\n precision = 2,\n onChange,\n dataTestID,\n}) => {\n const formatValue = (value: number) => `${value}${units}`;\n const [internalValue, setInternalValue] = useState(formatValue(value));\n const handleInputChange = (e: ChangeEvent) => {\n const newValue = e.target.value;\n setInternalValue(newValue);\n\n const parsedValue = parseFloat(newValue);\n if (!isNaN(parsedValue) && parsedValue >= min && parsedValue <= max) {\n const precise = +parsedValue.toFixed(precision);\n onChange(precise);\n }\n };\n\n const handleKeyDown = (e: KeyboardEvent) => {\n let newValue = parseFloat(internalValue);\n if (isNaN(newValue)) newValue = 0;\n\n if (e.key === \"ArrowUp\") {\n increment();\n } else if (e.key === \"ArrowDown\") {\n decrement();\n }\n };\n\n const increment = () => {\n let newValue = parseFloat(internalValue);\n if (isNaN(newValue)) newValue = 0;\n const incrementedValue = Math.min(newValue + step, max);\n const precise = +incrementedValue.toFixed(precision);\n setInternalValue(formatValue(precise));\n onChange(precise);\n };\n\n const decrement = () => {\n let newValue = parseFloat(internalValue);\n if (isNaN(newValue)) newValue = 0;\n const decrementedValue = Math.max(newValue - step, min);\n const precise = +decrementedValue.toFixed(precision);\n setInternalValue(formatValue(precise));\n onChange(precise);\n };\n\n const roundToNearestStep = (value: number) => {\n const roundedValue = Math.round((value - min) / step) * step + min;\n const nearestStep = Math.max(min, Math.min(roundedValue, max));\n const precise = +nearestStep.toFixed(precision);\n return precise;\n };\n\n const handleBlur = () => {\n const parsedValue = parseFloat(internalValue);\n if (isNaN(parsedValue)) {\n const precise = +value.toFixed(precision);\n setInternalValue(formatValue(precise));\n } else {\n const roundedValue = roundToNearestStep(parsedValue);\n const precise = +roundedValue.toFixed(precision);\n setInternalValue(formatValue(precise));\n onChange(precise);\n }\n };\n\n return (\n
\n {/* Using a text type allows for more control of formatting and styling */}\n \n \n \n \n
\n \n );\n};\n\ninterface FormattedSpinner extends NumericSpinnerProps {\n label: string;\n labelWidth: number;\n}\n\nexport const Spinner = (spinnerArgs: FormattedSpinner) => {\n const { label, labelWidth } = spinnerArgs;\n return (\n
\n \n \n \n \n
\n );\n};\n","import React, { useCallback, useState } from \"react\";\nimport { ColorPicker, getColorFromString, IColor, IColorPickerStyles, mergeStyleSets } from \"@fluentui/react\";\nimport { Row } from \"../../../components/Layout/Space\";\nimport \"../Viz.scss\";\nimport styles from \"../../../styles.module.scss\";\n\ninterface ColorPickerProps {\n onChange: (hexColor, rgbaColor) => void;\n label?: string;\n labelWidth: number;\n defaultColor?: string;\n}\n\nexport const VizColorPicker: React.FC = ({ label, labelWidth, onChange, defaultColor }) => {\n const initialColor = defaultColor ? getColorFromString(defaultColor)! : getColorFromString(styles.seabornDefault);\n const [color, setColor] = useState(initialColor);\n const [collapsed, setCollapsed] = useState(true);\n\n const updateColor = useCallback((_: any, colorObj: IColor) => setColor(colorObj), []);\n\n const toggleCollapse = () => {\n setCollapsed(!collapsed);\n };\n\n return (\n
\n \n \n
\n
\n {!collapsed && (\n <>\n {\n updateColor(ev, updatedColor);\n onChange(updatedColor.hex, updatedColor);\n }}\n alphaType=\"alpha\"\n showPreview={true}\n styles={colorPickerStyles}\n strings={{\n hueAriaLabel: \"Hue\",\n }}\n />\n \n )}\n
\n \n \n );\n};\n\nconst classNames = mergeStyleSets({\n wrapper: { display: \"flex\", alignItems: \"center\" },\n colorBox: {\n width: \"20px\",\n height: \"20px\",\n cursor: \"pointer\",\n border: \"none\",\n transition: \"all 0.3s ease-in-out\",\n },\n});\n\nconst colorPickerStyles: Partial = {\n panel: { padding: 12 },\n root: {\n maxWidth: 250,\n minWidth: 250,\n },\n colorRectangle: { height: 200 },\n};\n\nexport default VizColorPicker;\n","import React from \"react\";\nimport { Divider, Tooltip, Checkbox } from \"@fluentui/react-components\";\nimport { Info12Regular } from \"@fluentui/react-icons\";\nimport { CustomDropdown, DesignInputs, CollapsibleSection } from \"../VizSharedComponents/VizUIShared\";\nimport { ChartAttr, UIAttr, Dependency, areDependenciesSatisfied, ValueTracker } from \"./types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport TableChooser from \"../../../../excel/components/TableChooser\";\nimport { Row } from \"../../../components/Layout/Space\";\nimport { BaseCommon } from \"../../../hooks/plots/PlotTypes\";\nimport { PaletteDropdown } from \"../VizSharedComponents/Palette\";\nimport { Spinner } from \"../VizSharedComponents/SpinButton\";\nimport { LegendPosition } from \"./types\";\nimport VizColorPicker from \"../VizSharedComponents/ColorPicker\";\nimport { buildReactFromAttrs, buildCodeFromAttrs, CodeBuilder } from \"./CodeBuilder\";\nimport { snakeEyesRecord } from \"../../../../analytics/snake-eyes\";\n\n/****************\n * UIAttr Constructors\n ****************/\nexport function DividerAttr(): UIAttr {\n return {\n getReact: () => {\n return ;\n },\n };\n}\n\ntype HeadingArgs = {\n title: string;\n tooltip?: string;\n visibleDependencies?: Dependency[];\n};\n\nexport function HeadingAttr(args: HeadingArgs): UIAttr {\n const { title, tooltip, visibleDependencies } = args;\n\n const headingLabel = tooltip ? (\n
\n \n \n \n \n
\n ) : (\n
\n \n
\n );\n\n return {\n visibleDependencies: visibleDependencies,\n getReact: () => {\n return <>{headingLabel};\n },\n };\n}\n\nexport type DropdownArgs = {\n value?: string | ValueTracker | string[];\n onChange: (event, data) => void;\n label?: string;\n options?: string[];\n placeholder?: string;\n codeKey?: string;\n callKey?: string;\n codeValueMap?: Record;\n multiselect?: boolean;\n selectedOptons?: string[];\n visibleDependencies?: Dependency[];\n enabledDependencies?: Dependency[];\n codeRequiresInteraction?: boolean;\n dataTestID?: string;\n};\n\nexport function DropdownAttr(args: DropdownArgs): ChartAttr {\n const { value, placeholder = \"--Select-- \", codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : (value as string);\n return {\n component: val,\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"DropdownAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n let selections = \"\";\n\n if (Array.isArray(val)) {\n val.forEach((selection) => {\n selections += `\"${selection}\", `;\n });\n\n if (selections.length > 1) {\n code.plotAttrs.push(`${args.codeKey}=[${selections}]`);\n }\n } else {\n let codeValue = args.codeValueMap ? args.codeValueMap[val] : val;\n codeValue = (codeValue as string) ?? codeValue?.replaceAll(\"'\", \"\\\\'\"); // escape single quotes\n\n if (codeValue && args.codeKey) {\n code.plotAttrs.push(`${args.codeKey}=${codeValue === \"None\" ? codeValue : `'${codeValue}'`}`);\n }\n\n if (codeValue && args.callKey) {\n code.plotCalls.push(`plt.${args.callKey}(${codeValue === \"None\" ? codeValue : `'${codeValue}'`})`);\n }\n }\n },\n };\n}\n\nexport type AxisDropdown = DropdownArgs & {\n hasHeaders: boolean;\n};\n\nexport function MultiSelectDropdownAttr(args: AxisDropdown): ChartAttr {\n const { value } = args;\n let val = value instanceof ValueTracker ? value.value : (value as any);\n return {\n component: val,\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n );\n },\n getCode: (code: CodeBuilder) => {\n let selections = \"\";\n if (Array.isArray(val)) {\n if (!args.hasHeaders) {\n val.forEach((selection) => {\n let column = `${parseInt(selection.split(\" \")[1]) - 1}, `;\n selections += `${column}`;\n });\n } else {\n val.forEach((selection) => {\n selections += `\"${selection}\", `;\n });\n }\n if (selections.length > 1) {\n code.plotAttrs.push(`${args.codeKey}=[${selections}]`);\n }\n }\n },\n };\n}\n\nexport function AxisDropdownAttr(args: AxisDropdown): ChartAttr {\n const { value, onChange, placeholder = \"--Select--\", codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : (value as string);\n return {\n component: val,\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"AxisDropdownAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n let codeValue = args.codeValueMap ? args.codeValueMap[val] : val;\n if (!args.hasHeaders && codeValue) {\n const column = parseInt(codeValue.split(\" \")[1]);\n code.plotAttrs.push(`${args.codeKey}=${column - 1}`);\n } else {\n codeValue && args.codeKey ? code.plotAttrs.push(`${args.codeKey}='${codeValue}'`) : \"\";\n }\n },\n };\n}\n\nexport type LabelArgs = DropdownArgs & {\n posKey?: string;\n onChange: (event: React.FormEvent) => void;\n};\n\nexport function LabelAttr(args: LabelArgs): ChartAttr {\n const { value, onChange: onInput, codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : (value as string);\n return {\n component: val,\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker)) throw Error(\"LabelAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n // TODO: change this to callKey and add new line to handle codeKey\n // TODO: review all the other ChartAttrs and unify the usage of codeKey, callKey, codeValueMap\n val = val.replaceAll(\"'\", \"\\\\'\"); // Escape single quotes\n args.posKey && val ? code.plotAttrs.push(`${args.posKey}='${val}'`) : \"\";\n args.codeKey && val ? code.plotCalls.push(`plt.${args.codeKey}('${val}')`) : \"\";\n },\n };\n}\n\ntype DataRangeArgs = {\n inputData: BaseCommon[\"inputData\"];\n onChangeSelection: (newSelection: RangeSelection) => void;\n visibleDependencies?: Dependency[];\n};\n\nexport function DataRangeAttr(args: DataRangeArgs): UIAttr {\n const { inputData, onChangeSelection, visibleDependencies } = args;\n return {\n visibleDependencies: visibleDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n \n {\n onChangeSelection(newSelection);\n snakeEyesRecord({\n event: \"viz/range_selected\",\n });\n }}\n />\n \n );\n },\n };\n}\n\ntype CollapsibleArgs = {\n visibleDependencies?: Dependency[];\n children?: UIAttr[];\n codeKey?: string;\n val?: string;\n codeValueMap?: Record;\n collapsed?: boolean;\n toggle?: () => void;\n label?: string;\n tooltip?: string;\n};\n\nexport function CollapsibleAttr(args: CollapsibleArgs): UIAttr {\n const { visibleDependencies, children, collapsed, toggle, label, tooltip } = args;\n return {\n visibleDependencies: visibleDependencies,\n getReact: (labelWidth: number) => {\n return (\n <>\n \n {buildReactFromAttrs(children, labelWidth)}\n \n \n );\n },\n getCode: (cb: CodeBuilder) => {\n buildCodeFromAttrs(children, cb);\n },\n };\n}\n\nexport const paletteValueMap = {\n Accent: \"Accent\",\n Blues: \"Blues\",\n BrBG: \"BrBG\",\n Blues_d: \"Blues_d\",\n Tab10: \"tab10\",\n};\n\nexport function PaletteAttr(args: DropdownArgs): ChartAttr {\n const {\n value,\n onChange,\n codeKey,\n visibleDependencies,\n codeRequiresInteraction,\n enabledDependencies,\n label = \"Palette\",\n } = args;\n let val = value instanceof ValueTracker ? value.value : (value as string);\n\n return {\n component: val,\n visibleDependencies: visibleDependencies,\n enabledDependencies: enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n );\n },\n getCode: (code: CodeBuilder) => {\n const paletteValue = paletteValueMap[val];\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"PalleteAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n codeKey ? code.plotAttrs.push(`${codeKey}='${paletteValue}'`) : null;\n },\n };\n}\n\ntype CheckboxArgs = {\n value?: boolean | ValueTracker;\n onChange: (_, event) => void;\n label: string;\n codeKey?: string;\n callKey?: string;\n visibleDependencies?: Dependency[];\n enabledDependencies?: Dependency[];\n codeRequiresInteraction?: boolean;\n dataTestID?: string;\n};\n\nexport function CheckBoxAttr(args: CheckboxArgs): ChartAttr {\n const { value, onChange, label, codeKey, callKey, codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : value;\n return {\n component: val,\n visibleDependencies: args.visibleDependencies || [],\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n \n \n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"CheckBoxAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n let sval: string = val ? \"True\" : \"False\";\n codeKey ? code.plotAttrs.push(`${codeKey}=${sval}`) : null;\n callKey ? code.plotCalls.push(`ax.spines['${callKey}'].set_visible(${sval})`) : null;\n },\n };\n}\n\ntype SpinnerArgs = {\n value?: number | ValueTracker;\n suffix?: string;\n onChange: (value: number) => void;\n label: string;\n step: number;\n max?: number;\n min?: number;\n codeKey?: string;\n callKey?: string;\n visibleDependencies?: Dependency[];\n enabledDependencies?: Dependency[];\n codeRequiresInteraction?: boolean;\n dataTestID?: string;\n};\n\nexport function SpinnerAttr(args: SpinnerArgs): ChartAttr {\n const {\n value,\n onChange,\n label,\n visibleDependencies,\n enabledDependencies,\n codeKey,\n callKey,\n step,\n max = 2 ** 32 - 1,\n min = 0,\n codeRequiresInteraction,\n } = args;\n let val = value instanceof ValueTracker ? value.value : value;\n return {\n component: val,\n visibleDependencies: visibleDependencies,\n enabledDependencies: enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n onChange(newValue)}\n step={step}\n max={max}\n min={min}\n units={args.suffix}\n dataTestID={args.dataTestID}\n isDisabled={!areDependenciesSatisfied(enabledDependencies)}\n />\n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"SpinnerAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n codeKey ? code.plotAttrs.push(`${codeKey}=${val}`) : null;\n callKey ? code.plotCalls.push(`plt.${callKey}(rotation=${val})`) : null;\n },\n };\n}\n\ntype ColorPickerArgs = {\n value: string | ValueTracker;\n onChange: (_, event) => void;\n codeKey?: string;\n visibleDependencies?: Dependency[];\n label: string;\n codeRequiresInteraction?: boolean;\n};\n\nexport function ColorPickerAttr(args: ColorPickerArgs): ChartAttr {\n const { value, onChange, visibleDependencies, codeKey, label, codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : value;\n return {\n component: val,\n visibleDependencies: visibleDependencies,\n getReact: (labelWidth: number) => {\n return ;\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"ColorPickerAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n codeKey ? code.plotAttrs.push(`${codeKey}='${val}'`) : \"\";\n },\n };\n}\n\ntype LineKwargsArgs = {\n dropdownValue: string | ValueTracker;\n onChangeStyle: (_, event) => void;\n styleLabel: string;\n options?: string[];\n codeValueMap?: Record;\n};\n\nexport function LineKwargs(args: SpinnerArgs & LineKwargsArgs): ChartAttr {\n let val = args.value instanceof ValueTracker ? args.value.value : args.value;\n let dropdownVal = args.dropdownValue instanceof ValueTracker ? args.dropdownValue.value : args.dropdownValue;\n return {\n component: val,\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n <>\n \n args.onChange(newValue)}\n step={args.step}\n units={args.suffix}\n dataTestID={args.dataTestID}\n isDisabled={!areDependenciesSatisfied(args.enabledDependencies)}\n />\n \n );\n },\n getCode: (code: CodeBuilder) => {\n function checkValueAndUpdate(args, propName) {\n if (!(args[propName] instanceof ValueTracker)) {\n throw new Error(`${propName} must use ValueTracker if codeRequiresInteraction`);\n }\n if (!args[propName].isUpdated) {\n return false;\n }\n return true;\n }\n if (args.codeRequiresInteraction) {\n if (!checkValueAndUpdate(args, \"value\") && !checkValueAndUpdate(args, \"dropdownValue\")) return;\n }\n const lineKws = {};\n dropdownVal ? (lineKws[\"ls\"] = args.codeValueMap[dropdownVal]) : \"\";\n val ? (lineKws[\"lw\"] = val) : \"\";\n Object.keys(lineKws).length > 0\n ? code.plotAttrs.push(\n `line_kws={${Object.entries(lineKws)\n .map(([key, value]) => `'${key}': ${JSON.stringify(value)}`)\n .join(\", \")}}`\n )\n : null;\n },\n };\n}\n\ntype errorBarSpinner = {\n spinnerValue: number | ValueTracker;\n decimalValue: number | ValueTracker;\n suffixLabel: string;\n decimalLabel: string;\n suffixStep: number;\n decimalStep: number;\n max?: number;\n suffix?: string;\n xAxis: string;\n yAxis: string;\n visibleDependencies?: Dependency[];\n enabledDependencies?: Dependency[];\n codeRequiresInteraction?: boolean;\n onValueChange: (value: number) => void;\n onDecimalChange: (value: number) => void;\n};\n\nexport function regressionErrorBar(args: ColorPickerArgs & errorBarSpinner): ChartAttr {\n const val = args.value instanceof ValueTracker ? args.value.value : args.value;\n const suffixVal = args.spinnerValue instanceof ValueTracker ? args.spinnerValue.value : args.spinnerValue;\n const decimalVal = args.decimalValue instanceof ValueTracker ? args.decimalValue.value : args.decimalValue;\n return {\n component: \"Error Bar\",\n visibleDependencies: args.visibleDependencies,\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n <>\n \n args.onValueChange(newValue)}\n step={args.suffixStep}\n units={args.suffix}\n isDisabled={!areDependenciesSatisfied(args.enabledDependencies)}\n dataTestID=\"errwidth\"\n />\n args.onDecimalChange(newValue)}\n step={args.decimalStep}\n isDisabled={!areDependenciesSatisfied(args.enabledDependencies)}\n dataTestID=\"capsize\"\n />\n \n );\n },\n getCode: (code: CodeBuilder) => {\n let start = `ax.errorbar(x=\"${args.xAxis}\", y=\"${args.yAxis}\"`;\n let anyUpdated = false;\n\n if (args.codeRequiresInteraction) {\n if (args.value instanceof ValueTracker && args.value.isUpdated) {\n start += `, ecolor='${val}'`;\n anyUpdated = true;\n }\n\n if (args.spinnerValue instanceof ValueTracker && args.spinnerValue.isUpdated) {\n start += `, capthick=${suffixVal}`;\n anyUpdated = true;\n }\n\n if (args.decimalValue instanceof ValueTracker && args.decimalValue.isUpdated) {\n start += `, capsize=${decimalVal}`;\n anyUpdated = true;\n }\n }\n if (anyUpdated && args.xAxis && args.yAxis) {\n start += \")\";\n code.plotCalls.push(start);\n }\n },\n };\n}\n\nexport function LegendAttr(args: DropdownArgs): ChartAttr {\n const { value, onChange, visibleDependencies, enabledDependencies, label = \"Legend Position\" } = args;\n let val = value instanceof ValueTracker ? value.value : (value as string);\n return {\n component: val,\n visibleDependencies: visibleDependencies,\n enabledDependencies: enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n <>\n \n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (val === \"No Legend\") {\n code.plotAttrs.push(\"legend=False\");\n } else if (val in LegendPosition) {\n const { location, extra } = LegendPosition[val];\n code.plotCalls.push(`if ax.get_legend():\\n sns.move_legend(ax, '${location}'${extra ?? \"\"})`);\n } else {\n console.log(`Unexpected legend placement: ${val}`);\n }\n },\n };\n}\n\ntype ErrorKwsArgs = {\n value: ValueTracker;\n spinnerValue: ValueTracker;\n onValueChange: (value: number) => void;\n colorValue: string | ValueTracker;\n enabledDependencies?: Dependency[];\n onChange: (value) => void;\n spinnerReqiuiresInteraction: boolean;\n colorRequiresInteraction: boolean;\n};\n\nexport function ErrorKws(args: ErrorKwsArgs): ChartAttr {\n const { onChange, enabledDependencies, onValueChange } = args;\n\n let val = args.value instanceof ValueTracker ? args.value.value : (args.value as string);\n let spinnerValue = args.spinnerValue instanceof ValueTracker ? args.spinnerValue.value : args.spinnerValue;\n\n return {\n component: val,\n enabledDependencies: enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n <>\n \n onValueChange(value)}\n min={0}\n max={10}\n step={1}\n units=\" px\"\n isDisabled={!areDependenciesSatisfied(enabledDependencies)}\n dataTestID=\"errwidth\"\n />\n \n );\n },\n getCode: (code: CodeBuilder) => {\n let error_kws: Record = {};\n if (\n args.spinnerReqiuiresInteraction &&\n args.spinnerValue instanceof ValueTracker &&\n args.spinnerValue.isUpdated\n ) {\n error_kws[\"linewidth\"] = spinnerValue;\n }\n\n if (args.colorRequiresInteraction && args.value instanceof ValueTracker && args.value.isUpdated) {\n error_kws[\"color\"] = val;\n }\n if (Object.keys(error_kws).length > 0) {\n code.plotAttrs.push(\n `err_kws={${Object.entries(error_kws)\n .map(([key, value]) => `'${key}': ${JSON.stringify(value)}`)\n .join(\", \")}}`\n );\n }\n },\n };\n}\n\ntype GridlineArgs = {\n majorHorizontal: ValueTracker;\n majorVertical: ValueTracker;\n minorHorizontal: ValueTracker;\n minorVertical: ValueTracker;\n onChange: (_, event) => void;\n dataTestID?: string;\n multiChart?: boolean;\n};\n\nexport function GridlinesAttr(args: GridlineArgs): ChartAttr {\n const { majorHorizontal, majorVertical, minorHorizontal, minorVertical, onChange, multiChart = false } = args;\n\n const gridlines = [\n { label: \"Major Horizontal\", value: majorHorizontal, key: \"majorHorizontal\", kind: \"major\", axis: \"y\" },\n { label: \"Major Vertical\", value: majorVertical, key: \"majorVertical\", kind: \"major\", axis: \"x\" },\n { label: \"Minor Horizontal\", value: minorHorizontal, key: \"minorHorizontal\", kind: \"minor\", axis: \"y\" },\n { label: \"Minor Vertical\", value: minorVertical, key: \"minorVertical\", kind: \"minor\", axis: \"x\" },\n ];\n\n const gridlinesValue = gridlines.map((g) => (g.value instanceof ValueTracker ? g.value.value : g.value));\n\n return {\n component: gridlinesValue[0],\n getReact: (labelWidth: number) => (\n <>\n {gridlines.map(({ label, value, key }) => (\n \n \n onChange(key, e)}\n data-testid={args.dataTestID}\n />\n \n ))}\n \n ),\n getCode: (code: CodeBuilder) => {\n const lines = { majorHorizontal, majorVertical, minorHorizontal, minorVertical };\n const generateGridlineUpdate = (gridline, value: string) => {\n const gridCode = `grid(${value}, which='${gridline.kind}', axis='${gridline.axis}')`;\n return multiChart ? `g.${gridCode}` : `ax.${gridCode}`;\n };\n\n let gridlineUpdates = Object.entries(lines).reduce((updates, [key, value]) => {\n const gridline = gridlines.find((g) => g.key === key);\n if (gridline && value.isUpdated) {\n const isVisible = gridline.value.value ? \"True\" : \"False\";\n updates.push(generateGridlineUpdate(gridline, isVisible));\n }\n return updates;\n }, []);\n\n const minorGridlinesSelected = minorHorizontal.value || minorVertical.value;\n\n code.plotCalls.push(`default_grid_color = sns.axes_style()[\"grid.color\"]`);\n code.plotCalls.push(`default_label_color = sns.axes_style()[\"xtick.color\"]`);\n\n if (multiChart) {\n code.plotCalls.push(`for g in ax.axes.flat:\n # Set spines color\n for spine in g.spines.values():\n spine.set_color(default_grid_color)\\n\n # Set tick color\n g.tick_params(colors=default_grid_color, labelcolor=default_label_color)\\n`);\n if (gridlineUpdates.length > 0) {\n code.plotCalls.push(`for g in ax.axes.flat:\n ${minorGridlinesSelected ? \"g.minorticks_on()\\n \" : \"\"}${gridlineUpdates.join(\"\\n \")}\n g.set_axisbelow(True)\n `);\n }\n } else {\n if (gridlineUpdates.length > 0) {\n gridlineUpdates.push(\"ax.set_axisbelow(True)\");\n }\n code.plotCalls.push(`\n# Set spines color\nfor spine in ax.spines.values():\n spine.set_color(default_grid_color)\\n\n# Set tick color\nax.tick_params(colors=default_grid_color, labelcolor=default_label_color)\\n`);\n code.plotCalls.push(`${minorGridlinesSelected ? \"ax.minorticks_on()\\n\" : \"\"}${gridlineUpdates.join(\"\\n\")}`);\n }\n },\n };\n}\n\ntype MultiChartBordersArgs = {\n left: boolean;\n right: boolean;\n bottom: boolean;\n top: boolean;\n onChange: (_, event) => void;\n visibleDependencies?: Dependency[];\n enabledDependencies?: Dependency[];\n dataTestID?: string;\n chartType?: string;\n};\n\nexport function MultiChartBorders(args: MultiChartBordersArgs): ChartAttr {\n const { left, right, bottom, top, onChange } = args;\n\n const spines = [\n { label: \"Top\", value: top, key: \"topSpine\" },\n { label: \"Right\", value: right, key: \"rightSpine\" },\n { label: \"Bottom\", value: bottom, key: \"bottomSpine\" },\n { label: \"Left\", value: left, key: \"leftSpine\" },\n ];\n\n return {\n component: spines[0].value,\n visibleDependencies: args.visibleDependencies || [],\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => (\n <>\n {spines.map(({ label, value, key }) => (\n \n \n onChange(key, e)}\n data-testid={args.dataTestID}\n />\n \n ))}\n \n ),\n getCode: (code: CodeBuilder) => {\n const spines = { left, bottom, right, top };\n const spineUpdates = Object.entries(spines).reduce((acc, [key, spine]) => {\n const isVisible = spine ? \"True\" : \"False\";\n acc.push(`g.spines['${key}'].set_visible(${isVisible})`);\n return acc;\n }, []);\n\n if (spineUpdates.length > 0) {\n code.plotCalls.push(`\nfor g in ax.axes.flatten():\n ${spineUpdates.join(\"\\n \")}\n`);\n }\n },\n };\n}\n\nexport function SingleChartBorders(args: CheckboxArgs): ChartAttr {\n const { value, onChange, label, callKey, codeRequiresInteraction } = args;\n let val = value instanceof ValueTracker ? value.value : value;\n return {\n component: val,\n visibleDependencies: args.visibleDependencies || [],\n enabledDependencies: args.enabledDependencies,\n getReact: (labelWidth: number) => {\n return (\n \n \n \n \n );\n },\n getCode: (code: CodeBuilder) => {\n if (codeRequiresInteraction) {\n if (!(value instanceof ValueTracker))\n throw Error(\"CheckBoxAttr must use ValueTracker if codeRequiresInteraction\");\n if (!value.isUpdated) return;\n }\n let sval: string = val ? \"True\" : \"False\";\n callKey ? code.plotCalls.push(`ax.spines['${callKey}'].set_visible(${sval})`) : null;\n },\n };\n}\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport {\n dependencyEqualsValue,\n dependencyNotEqualsValue,\n dependencyNotOrEqualsValue,\n fetchHeaders,\n} from \"../MVCShared/PlotGeneratorUtils\";\nimport { Chart, Orientation } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n PaletteAttr,\n CheckBoxAttr,\n SpinnerAttr,\n ColorPickerAttr,\n AxisDropdownAttr,\n LegendAttr,\n CollapsibleAttr,\n GridlinesAttr,\n SingleChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildReactFromAttrs, buildCode, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { CountSetup, CountDesign as ICountDesign } from \"../../../../taskpane/hooks/plots/useCount\";\n\nconst CountContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n CountSetup,\n ICountDesign\n >(PlotType.count);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...countChart.baseAttrs, ...countChart.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const orientationDropdown = DropdownAttr({\n value: setup.orientation,\n onChange: (_, data) => {\n const prevX: string = setup.xAxis;\n const prevY: string = setup.yAxis;\n updateSetup({\n orientation: data.optionValue,\n xAxis: prevY,\n yAxis: prevX,\n });\n const prevXAxisLabel: string = design.xAxisLabel;\n const prevYAxisLabel: string = design.yAxisLabel;\n updateDesign({\n xAxisLabel: prevYAxisLabel,\n yAxisLabel: prevXAxisLabel,\n });\n },\n label: \"Orientation\",\n options: [\"Horizontal\", \"Vertical\"],\n codeKey: \"orient\",\n codeValueMap: Orientation,\n codeRequiresInteraction: true,\n dataTestID: \"orientation\",\n });\n\n const xAxis = AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n visibleDependencies: [dependencyEqualsValue(orientationDropdown, \"Vertical\")],\n dataTestID: \"x-axis\",\n hasHeaders: common.hasHeaders,\n });\n\n const yAxis = AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n visibleDependencies: [dependencyEqualsValue(orientationDropdown, \"Horizontal\")],\n dataTestID: \"y-axis\",\n hasHeaders: common.hasHeaders,\n });\n\n const SaturationAttr = SpinnerAttr({\n label: \"Saturation\",\n value: design.saturation,\n step: 0.01,\n max: 1,\n min: 0,\n onChange: (data: number) => updateDesign({ saturation: data }),\n codeKey: \"saturation\",\n codeRequiresInteraction: true,\n });\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const colorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n visibleDependencies: [dependencyNotOrEqualsValue(xAxis, yAxis, \"\")],\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n let dodge = CheckBoxAttr({\n value: design.dodge,\n onChange: (_, e) => updateDesign({ dodge: e.checked }),\n label: \"Overlapping groups\",\n codeKey: \"dodge\",\n codeRequiresInteraction: true,\n dataTestID: \"dodge\",\n });\n dodge.getCode = (code: CodeBuilder) => {\n if (design.dodge.isUpdated) {\n // Invert the value since the checkbox is for overlapping groups\n const dodge = design.dodge.value === true ? \"False\" : \"True\";\n code.plotAttrs.push(`dodge=${dodge}`);\n }\n };\n\n const alpha = SpinnerAttr({\n label: \"Opacity\",\n value: design.alpha,\n step: 0.1,\n min: 0,\n max: 1,\n onChange: (data: number) => updateDesign({ alpha: data }),\n codeKey: \"alpha\",\n dataTestID: \"alpha\",\n codeRequiresInteraction: true,\n });\n\n const countChart: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n orientationDropdown,\n DividerAttr(),\n HeadingAttr({\n title: \"Data\",\n tooltip: \"Select data cells and parameters\",\n }),\n xAxis,\n yAxis,\n colorBy,\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n visibleDependencies: [dependencyEqualsValue(orientationDropdown, \"Vertical\")],\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n visibleDependencies: [dependencyEqualsValue(orientationDropdown, \"Horizontal\")],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n visibleDependencies: [dependencyEqualsValue(colorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n CheckBoxAttr({\n value: design.fill,\n onChange: (_, e) => updateDesign({ fill: e.checked }),\n label: \"Fill\",\n codeKey: \"fill\",\n codeRequiresInteraction: true,\n }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => updateDesign({ palette: data.optionText }),\n codeKey: \"palette\",\n placeholder: \"Accent\",\n visibleDependencies: [dependencyNotEqualsValue(colorBy, \"\")],\n codeRequiresInteraction: true,\n dataTestID: \"palette\",\n }),\n SaturationAttr,\n DividerAttr(),\n HeadingAttr({\n title: \"Bar Formatting\",\n tooltip: null,\n }),\n SpinnerAttr({\n label: \"Width\",\n value: design.width,\n step: 0.1,\n max: 2 ** 32 - 1,\n min: 0,\n onChange: (data: number) => updateDesign({ width: data }),\n codeKey: \"width\",\n dataTestID: \"width\",\n codeRequiresInteraction: true,\n }),\n dodge,\n alpha,\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n ],\n };\n return countChart;\n};\n\nconst CountForm = () => {\n const countChart = CountContext();\n return buildReactFromAttrs(countChart.baseAttrs, 100);\n};\n\nexport const CountDesign = () => {\n const countDesign = CountContext();\n return buildReactFromAttrs(countDesign.designAttrs, 120);\n};\n\nexport default CountForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../hooks/plots/useCentralViz\";\nimport { Axes, Chart, Estimators, IntervalOptions, Orientation, IntervalValueMap } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n CollapsibleAttr,\n SpinnerAttr,\n ColorPickerAttr,\n PaletteAttr,\n CheckBoxAttr,\n AxisDropdownAttr,\n LegendAttr,\n ErrorKws,\n GridlinesAttr,\n SingleChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildCode, buildReactFromAttrs, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport {\n dependencyEqualsValue,\n dependencyNotEqualsValue,\n dependencyInValues,\n fetchHeaders,\n} from \"../MVCShared/PlotGeneratorUtils\";\nimport { BarDesign as IBarDesign, BarSetup } from \"../../../../taskpane/hooks/plots/useBar\";\n\nconst BarContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n BarSetup,\n IBarDesign\n >(PlotType.bar);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...barChart.baseAttrs, ...barChart.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const orientation = DropdownAttr({\n value: setup.orientation,\n onChange: (_, data) => {\n const prevX: string = setup.xAxis;\n const prevY: string = setup.yAxis;\n updateSetup({\n orientation: data.optionValue,\n xAxis: prevY,\n yAxis: prevX,\n });\n const prevXAxisLabel: string = design.xAxisLabel;\n const prevYAxisLabel: string = design.yAxisLabel;\n updateDesign({\n xAxisLabel: prevYAxisLabel,\n yAxisLabel: prevXAxisLabel,\n });\n },\n label: \"Orientation\",\n options: [\"Horizontal\", \"Vertical\"],\n codeKey: \"orient\",\n codeValueMap: Orientation,\n dataTestID: \"orientation\",\n codeRequiresInteraction: true,\n });\n\n const errorBar = DropdownAttr({\n value: setup.errorBar,\n label: \"Error Bar\",\n dataTestID: \"error-bar\",\n placeholder: \"No error bars\",\n onChange: (_, data) => updateSetup({ errorBar: data.optionValue }),\n codeRequiresInteraction: false,\n options: IntervalOptions,\n });\n errorBar.getCode = (code: CodeBuilder) => {\n // The intervals will override the errorbar attribute if set\n if (setup.errorBar === \"No error bars\") {\n code.plotAttrs.push(\"errorbar=None\");\n }\n };\n\n const estimator = DropdownAttr({\n value: setup.estimator,\n onChange: (_, data) => updateSetup({ estimator: data.optionValue }),\n label: \"Estimator\",\n options: [\"Mean\", \"Median\", \"Max\", \"Min\", \"Sum\"],\n placeholder: \"Mean\",\n codeKey: \"estimator\",\n codeValueMap: Estimators,\n });\n\n // Two intervals are used because they have different max values and initial setpoints\n // based on the error bar chosen. Only one will be shown at a time because the\n // visibleDependencies are mutually exclusive.\n const primaryInterval = SpinnerAttr({\n label: \"Interval\",\n value: setup.primaryInterval,\n step: 1,\n max: 100,\n min: 0,\n suffix: \"%\",\n onChange: (data: number) => updateSetup({ primaryInterval: data }),\n visibleDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\", \"Percentage Interval\"])],\n enabledDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\", \"Percentage Interval\"])],\n dataTestID: \"interval\",\n });\n primaryInterval.getCode = (code: CodeBuilder) => {\n code.plotAttrs.push(`errorbar=('${IntervalValueMap[setup.errorBar]}', ${setup.primaryInterval})`);\n };\n\n const secondaryInterval = SpinnerAttr({\n label: \"Interval\",\n value: setup.secondInterval,\n step: 1,\n max: Infinity,\n suffix: \"%\",\n onChange: (data: number) => updateSetup({ secondInterval: data }),\n visibleDependencies: [dependencyInValues(errorBar, [\"Standard Error\", \"Standard Deviation\"])],\n enabledDependencies: [dependencyInValues(errorBar, [\"Standard Error\", \"Standard Deviation\"])],\n });\n secondaryInterval.getCode = (code: CodeBuilder) => {\n code.plotAttrs.push(`errorbar=('${IntervalValueMap[setup.errorBar]}', ${setup.secondInterval})`);\n };\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const colorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n const palette = PaletteAttr({\n value: design.palette,\n onChange: (_, data) => {\n updateDesign({ palette: data.optionText });\n },\n codeKey: \"palette\",\n placeholder: \"Accent\",\n visibleDependencies: [dependencyNotEqualsValue(colorBy, \"\")],\n codeRequiresInteraction: true,\n dataTestID: \"palette\",\n });\n\n let dodge = CheckBoxAttr({\n label: \"Overlapping groups\",\n value: design.dodge,\n onChange: (_, e) => updateDesign({ dodge: e.checked }),\n codeKey: \"dodge\",\n codeRequiresInteraction: true,\n dataTestID: \"dodge\",\n });\n dodge.getCode = (code: CodeBuilder) => {\n if (design.dodge.isUpdated) {\n // Invert the value since the checkbox is for overlapping groups\n const dodge = design.dodge.value === true ? \"False\" : \"True\";\n code.plotAttrs.push(`dodge=${dodge}`);\n }\n };\n\n const alpha = SpinnerAttr({\n label: \"Opacity\",\n value: design.alpha,\n step: 0.1,\n min: 0,\n max: 1,\n onChange: (data: number) => updateDesign({ alpha: data }),\n codeKey: \"alpha\",\n dataTestID: \"alpha\",\n codeRequiresInteraction: true,\n });\n\n const barChart: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n orientation,\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"x-axis\",\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"y-axis\",\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n }),\n estimator,\n colorBy,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: setup.isCollapsed,\n label: \"Error\",\n tooltip: \"Measure error in data\",\n toggle: () => {\n updateSetup({ isCollapsed: !setup.isCollapsed });\n },\n children: [\n errorBar,\n primaryInterval,\n secondaryInterval,\n SpinnerAttr({\n label: \"Bootstrap Samples\",\n value: setup.bootstrapSamples,\n step: 100,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateSetup({ bootstrapSamples: data }),\n codeKey: \"n_boot\",\n dataTestID: \"bootstrap\",\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n SpinnerAttr({\n label: \"Seed\",\n value: setup.seed,\n step: 1,\n max: 2 ** 32 - 1,\n min: 0,\n onChange: (data: number) => updateSetup({ seed: data }),\n codeKey: \"seed\",\n codeRequiresInteraction: true,\n dataTestID: \"seed\",\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({\n title: \"Axes\",\n tooltip: \"Set scale for axes\",\n }),\n DropdownAttr({\n value: setup.xAxisScale,\n onChange: (_, data) => updateSetup({ xAxisScale: data.optionValue }),\n label: \"X-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n placeholder: \"Linear\",\n callKey: \"xscale\",\n codeValueMap: Axes,\n visibleDependencies: [dependencyEqualsValue(orientation, \"Vertical\")],\n }),\n DropdownAttr({\n value: setup.yAxisScale,\n onChange: (_, data) => updateSetup({ yAxisScale: data.optionValue }),\n label: \"Y-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n placeholder: \"Linear\",\n callKey: \"yscale\",\n codeValueMap: Axes,\n visibleDependencies: [dependencyEqualsValue(orientation, \"Horizontal\")],\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n dataTestID: \"x-axis-label\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n dataTestID: \"y-axis-label\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n codeRequiresInteraction: true,\n }),\n CheckBoxAttr({\n value: design.fill,\n onChange: (_, e) => updateDesign({ fill: e.checked }),\n label: \"Fill\",\n codeKey: \"fill\",\n codeRequiresInteraction: true,\n }),\n palette,\n DividerAttr(),\n HeadingAttr({ title: \"Bar Formatting\" }),\n SpinnerAttr({\n label: \"Width\",\n value: design.width,\n step: 0.1,\n max: 2 ** 32 - 1,\n min: 0,\n onChange: (data: number) => updateDesign({ width: data }),\n codeKey: \"width\",\n codeRequiresInteraction: true,\n }),\n dodge,\n alpha,\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.isCollapsed,\n label: \"Error\",\n toggle: () => {\n updateDesign({ isCollapsed: !design.isCollapsed });\n },\n children: [\n ErrorKws({\n value: design.errorColor,\n spinnerValue: design.errorBarWidth,\n onValueChange: (data) => {\n updateDesign({ errorBarWidth: data });\n },\n onChange: (color) => updateDesign({ errorColor: `#${color}` }),\n colorValue: design.errorColor,\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n spinnerReqiuiresInteraction: true,\n colorRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Error Bar Cap Width\",\n value: design.errorBarCapWidth,\n step: 0.1,\n max: 1,\n min: 0,\n onChange: (data: number) => updateDesign({ errorBarCapWidth: data }),\n codeKey: \"capsize\",\n dataTestID: \"capsize\",\n codeRequiresInteraction: true,\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n ],\n }),\n ],\n };\n return barChart;\n};\n\nconst BarForm = () => {\n const barChart = BarContext();\n return buildReactFromAttrs(barChart.baseAttrs, 130);\n};\n\nexport const BarDesign = () => {\n const barDesign = BarContext();\n return buildReactFromAttrs(barDesign.designAttrs, 140);\n};\n\nexport default BarForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { dependencyNotEqualsValue, fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { Chart, Orientation } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n PaletteAttr,\n CheckBoxAttr,\n SpinnerAttr,\n ColorPickerAttr,\n AxisDropdownAttr,\n LegendAttr,\n CollapsibleAttr,\n GridlinesAttr,\n SingleChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildReactFromAttrs, buildCode, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { BoxSetup, BoxDesign as IBoxDesign } from \"../../../../taskpane/hooks/plots/useBox\";\n\nconst BoxContext = (): Chart => {\n const { setup, design, common, updateSetup, updateDesign, updateCommon, setCodeFragments } = useChart<\n BoxSetup,\n IBoxDesign\n >(PlotType.box);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...boxPlot.baseAttrs, ...boxPlot.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const orientationDropdown = DropdownAttr({\n value: setup.orientation,\n onChange: (_, data) => {\n const prevX: string = setup.xAxis;\n const prevY: string = setup.yAxis;\n updateSetup({\n orientation: data.optionValue,\n xAxis: prevY,\n yAxis: prevX,\n });\n const prevXAxisLabel: string = design.xAxisLabel;\n const prevYAxisLabel: string = design.yAxisLabel;\n updateDesign({\n xAxisLabel: prevYAxisLabel,\n yAxisLabel: prevXAxisLabel,\n });\n },\n label: \"Orientation\",\n options: [\"Horizontal\", \"Vertical\"],\n codeKey: \"orient\",\n codeValueMap: Orientation,\n codeRequiresInteraction: true,\n dataTestID: \"orientation\",\n });\n\n const ColorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n const SaturationAttr = SpinnerAttr({\n label: \"Saturation\",\n value: design.saturation,\n step: 0.01,\n max: 1,\n min: 0,\n onChange: (data: number) => updateDesign({ saturation: data }),\n codeKey: \"saturation\",\n codeRequiresInteraction: true,\n dataTestID: \"saturation\",\n });\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n let dodge = CheckBoxAttr({\n value: design.dodge,\n onChange: (_, e) => updateDesign({ dodge: e.checked }),\n label: \"Overlapping groups\",\n codeKey: \"dodge\",\n codeRequiresInteraction: true,\n dataTestID: \"dodge\",\n });\n dodge.getCode = (code: CodeBuilder) => {\n if (design.dodge.isUpdated) {\n // Invert the value since the checkbox is for overlapping groups\n const dodge = design.dodge.value === true ? \"False\" : \"True\";\n code.plotAttrs.push(`dodge=${dodge}`);\n }\n };\n\n let alpha = SpinnerAttr({\n label: \"Opacity\",\n value: design.alpha,\n step: 0.1,\n min: 0,\n max: 1,\n onChange: (data: number) => updateDesign({ alpha: data }),\n dataTestID: \"alpha\",\n codeRequiresInteraction: true,\n });\n alpha.getCode = (code: CodeBuilder) => {\n if (design.alpha.isUpdated) {\n code.plotAttrs.push(`boxprops=dict(alpha=${design.alpha.value})`);\n }\n };\n\n const boxPlot: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n orientationDropdown,\n DividerAttr(),\n HeadingAttr({\n title: \"Data\",\n tooltip: \"Select data cells and parameters\",\n }),\n AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"x-axis\",\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"y-axis\",\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n }),\n ColorBy,\n DividerAttr(),\n HeadingAttr({\n title: \"Whiskers\",\n tooltip: \"Compute length of the plot whiskers as proportion of the interquartile range\",\n }),\n SpinnerAttr({\n step: 0.1,\n min: 0,\n max: 2 ** 32 - 1,\n label: \"Multiple of IQR\",\n value: setup.whiskersRange,\n onChange: (data: number) => updateSetup({ whiskersRange: data }),\n codeKey: \"whis\",\n codeRequiresInteraction: true,\n dataTestID: \"whiskers\",\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n codeRequiresInteraction: true,\n }),\n CheckBoxAttr({\n value: design.fill,\n onChange: (_, e) => updateDesign({ fill: e.checked }),\n label: \"Fill\",\n codeKey: \"fill\",\n codeRequiresInteraction: true,\n dataTestID: \"fill\",\n }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => updateDesign({ palette: data.optionText }),\n codeKey: \"palette\",\n placeholder: \"Accent\",\n visibleDependencies: [dependencyNotEqualsValue(ColorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n SaturationAttr,\n DividerAttr(),\n HeadingAttr({\n title: \"Box Formatting\",\n tooltip: null,\n }),\n SpinnerAttr({\n label: \"Width\",\n value: design.width,\n step: 0.1,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateDesign({ width: data }),\n codeKey: \"width\",\n codeRequiresInteraction: true,\n dataTestID: \"width\",\n }),\n SpinnerAttr({\n label: \"Line Width\",\n value: design.lineWidth,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n suffix: \"px\",\n onChange: (data: number) => updateDesign({ lineWidth: data }),\n codeKey: \"linewidth\",\n codeRequiresInteraction: true,\n dataTestID: \"line-width\",\n }),\n dodge,\n alpha,\n DividerAttr(),\n HeadingAttr({\n title: \"Outlier Formatting\",\n tooltip: null,\n }),\n SpinnerAttr({\n label: \"Marker Size\",\n value: design.markerSize,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n suffix: \" px\",\n onChange: (data: number) => updateDesign({ markerSize: data }),\n codeKey: \"fliersize\",\n codeRequiresInteraction: true,\n dataTestID: \"marker-size\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n ],\n };\n return boxPlot;\n};\n\nconst BoxForm = () => {\n const boxPlot = BoxContext();\n return buildReactFromAttrs(boxPlot.baseAttrs, 115);\n};\n\nexport const BoxDesign = () => {\n const boxDesign = BoxContext();\n return buildReactFromAttrs(boxDesign.designAttrs, 120);\n};\n\nexport default BoxForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { Axes, Chart, Markers } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n CollapsibleAttr,\n AxisDropdownAttr,\n CheckBoxAttr,\n SpinnerAttr,\n LegendAttr,\n PaletteAttr,\n GridlinesAttr,\n SingleChartBorders,\n paletteValueMap,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildCode, buildReactFromAttrs, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { ScatterSetup, ScatterDesign as IScatterDesign } from \"../../../../taskpane/hooks/plots/useScatter\";\n\nconst ScatterContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n ScatterSetup,\n IScatterDesign\n >(PlotType.scatter);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...scatterPlot.baseAttrs, ...scatterPlot.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const MarkerAttr = DropdownAttr({\n label: \"Marker\",\n value: design.marker,\n options: [\"Point\", \"Circle\", \"Plus\", \"Star\", \"Diamond\", \"X\"],\n onChange: (_, e) => updateDesign({ marker: e.optionValue }),\n codeKey: \"marker\",\n codeRequiresInteraction: true,\n dataTestID: \"marker\",\n });\n\n MarkerAttr.getCode = (code: CodeBuilder) => {\n if (design.marker.isUpdated) {\n code.plotAttrs.push(\n `marker=\"${Markers[design.marker.value]}\", color=sns.color_palette('${\n paletteValueMap[design.palette.value]\n }')[0]`\n );\n }\n };\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const scatterPlot: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Grouping\", tooltip: \"Select parameters to determine point color, size, and style\" }),\n AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.sizeBy,\n onChange: (_, data) => updateSetup({ sizeBy: data.optionValue }, \"--None--\"),\n label: \"Size By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"size\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.styleBy,\n onChange: (_, data) => updateSetup({ styleBy: data.optionValue }, \"--None--\"),\n label: \"Style By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"style\",\n hasHeaders: common.hasHeaders,\n }),\n DividerAttr(),\n HeadingAttr({\n title: \"Axes\",\n tooltip: \"Set scale for axes\",\n }),\n DropdownAttr({\n value: setup.newXAxisScale,\n onChange: (_, data) => updateSetup({ newXAxisScale: data.optionValue }),\n label: \"X-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n callKey: \"xscale\",\n codeValueMap: Axes,\n codeRequiresInteraction: true,\n dataTestID: \"x-axis-scale\",\n }),\n DropdownAttr({\n value: setup.newYAxisScale,\n onChange: (_, data) => updateSetup({ newYAxisScale: data.optionValue }),\n label: \"Y-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n callKey: \"yscale\",\n codeValueMap: Axes,\n codeRequiresInteraction: true,\n dataTestID: \"y-axis-scale\",\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Color\" }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => {\n updateDesign({ palette: data.optionText });\n },\n codeKey: \"palette\",\n placeholder: \"Accent\",\n // visibleDependencies: [dependencyEqualsValue(fillStyle, \"Palette\")],\n codeRequiresInteraction: true,\n dataTestID: \"palette\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Markers\" }),\n MarkerAttr,\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n ],\n };\n return scatterPlot;\n};\n\nconst ScatterForm = () => {\n const scatterPlot = ScatterContext();\n return buildReactFromAttrs(scatterPlot.baseAttrs, 100);\n};\n\nexport const ScatterDesign = () => {\n const scatterDesign = ScatterContext();\n return buildReactFromAttrs(scatterDesign.designAttrs, 120);\n};\n\nexport default ScatterForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { Axes, Chart, Estimators, IntervalOptions, Markers, LineStyle, IntervalValueMap } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n CollapsibleAttr,\n ColorPickerAttr,\n CheckBoxAttr,\n SpinnerAttr,\n PaletteAttr,\n AxisDropdownAttr,\n LegendAttr,\n GridlinesAttr,\n SingleChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildCode, buildReactFromAttrs, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { dependencyInValues, dependencyNotEqualsValue, fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { LineSetup, LineDesign as ILineDesign } from \"../../../../taskpane/hooks/plots/useLine\";\n\nconst LineContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n LineSetup,\n ILineDesign\n >(PlotType.line);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...linePlot.baseAttrs, ...linePlot.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const MarkerAttr = DropdownAttr({\n label: \"Marker\",\n value: design.marker,\n placeholder: \"None\",\n options: [\"None\", \"Point\", \"Circle\", \"Plus\", \"Star\", \"Diamond\", \"X\"],\n onChange: (_, e) => updateDesign({ marker: e.optionValue }, \"None\"),\n codeKey: \"marker\",\n codeValueMap: Markers,\n codeRequiresInteraction: true,\n });\n MarkerAttr.getCode = (code: CodeBuilder) => {\n if (design.marker !== \"None\") {\n code.plotAttrs.push(`marker='${Markers[design.marker]}', markeredgecolor='auto'`);\n }\n };\n\n const errorBar = DropdownAttr({\n value: setup.errorBar,\n label: \"Error Bar\",\n placeholder: \"No error bars\",\n onChange: (_, data) => updateSetup({ errorBar: data.optionValue }),\n codeRequiresInteraction: false,\n options: IntervalOptions,\n });\n errorBar.getCode = (code: CodeBuilder) => {\n // The intervals will override the errorbar attribute if set\n if (setup.errorBar === \"No error bars\") {\n code.plotAttrs.push(\"errorbar=None\");\n }\n };\n\n const xAxis = AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n });\n\n const yAxis = AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n });\n\n const ColorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n visibleDependencies: [dependencyNotEqualsValue(xAxis, \"\"), dependencyNotEqualsValue(yAxis, \"\")],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n // Two intervals are used because they have different max values and initial setpoints\n // based on the error bar chosen. Only one will be shown at a time because the\n // visibleDependencies are mutually exclusive.\n const primaryInterval = SpinnerAttr({\n label: \"Interval\",\n value: setup.primaryInterval,\n step: 1,\n min: 0,\n max: 100,\n suffix: \"%\",\n onChange: (data: number) => updateSetup({ primaryInterval: data }),\n visibleDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\", \"Percentage Interval\"])],\n enabledDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\", \"Percentage Interval\"])],\n dataTestID: \"interval\",\n });\n primaryInterval.getCode = (code: CodeBuilder) => {\n code.plotAttrs.push(`errorbar=('${IntervalValueMap[setup.errorBar]}', ${setup.primaryInterval})`);\n };\n\n const secondaryInterval = SpinnerAttr({\n label: \"Interval\",\n value: setup.secondInterval,\n step: 1,\n min: 0,\n max: Infinity,\n suffix: \"%\",\n onChange: (data: number) => updateSetup({ secondInterval: data }),\n visibleDependencies: [dependencyInValues(errorBar, [\"Standard Error\", \"Standard Deviation\"])],\n enabledDependencies: [dependencyInValues(errorBar, [\"Standard Error\", \"Standard Deviation\"])],\n });\n secondaryInterval.getCode = (code: CodeBuilder) => {\n code.plotAttrs.push(`errorbar=('${IntervalValueMap[setup.errorBar]}', ${setup.secondInterval})`);\n };\n\n const error_kws = {};\n\n const errorBarColor = ColorPickerAttr({\n value: design.errorBarColor,\n label: \"Error Bar Color\",\n onChange: (hexColor) => updateDesign({ errorBarColor: `#${hexColor}` }),\n });\n\n error_kws[\"ecolor\"] = design.errorBarColor.value;\n\n const errorBarThickness = SpinnerAttr({\n label: \"Error Bar Thickness\",\n value: design.errorBarWidth,\n onChange: (data: number) => updateDesign({ errorBarWidth: data }),\n suffix: \"px\",\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n dataTestID: \"capthick\",\n });\n\n error_kws[\"capthick\"] = design.errorBarWidth.value;\n\n const errorBarCapWidth = SpinnerAttr({\n label: \"Error Bar Cap Width\",\n value: design.errorBarCapWidth,\n step: 0.1,\n min: 0,\n max: 1,\n onChange: (data: number) => updateDesign({ errorBarCapWidth: data }),\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n dataTestID: \"capsize\",\n });\n\n error_kws[\"capsize\"] = design.errorBarCapWidth.value;\n\n const errorStyle = DropdownAttr({\n label: \"Error Style\",\n value: design.errorStyle,\n onChange: (_, data) => updateDesign({ errorStyle: data.optionValue }, \"--Select--\"),\n options: [\"--Select--\", \"Bars\"],\n codeKey: \"err_style\",\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"None\")],\n dataTestID: \"error-style\",\n });\n\n errorStyle.getCode = (code: CodeBuilder) => {\n if (design.errorStyle === \"Bars\") {\n code.plotAttrs.push(\n `err_style=\"bars\", err_kws={${Object.entries(error_kws)\n .map(([key, value]) => `'${key}': ${JSON.stringify(value)}`)\n .join(\", \")}}`\n );\n }\n };\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const linePlot: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n CheckBoxAttr({\n label: \"Sort\",\n value: setup.sort,\n onChange: (_, data) => updateSetup({ sort: data.checked }),\n codeKey: \"sort\",\n codeRequiresInteraction: true,\n dataTestID: \"sort\",\n }),\n xAxis,\n yAxis,\n DropdownAttr({\n value: setup.estimator,\n onChange: (_, data) => updateSetup({ estimator: data.optionValue }),\n label: \"Estimator\",\n options: [\"Mean\", \"Median\", \"Max\", \"Min\"],\n placeholder: \"Mean\",\n codeKey: \"estimator\",\n codeValueMap: Estimators,\n }),\n DividerAttr(),\n HeadingAttr({\n title: \"Grouping\",\n tooltip: \"Select parameters to determine line and marker color, size, and style\",\n }),\n ColorBy,\n AxisDropdownAttr({\n value: setup.styleMarkersBy,\n onChange: (_, data) => updateSetup({ styleMarkersBy: data.optionValue }, \"--None--\"),\n label: \"Style Markers By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"markers\",\n dataTestID: \"styleByMarkers\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.styleLinesBy,\n onChange: (_, data) => updateSetup({ styleLinesBy: data.optionValue }, \"--None--\"),\n label: \"Style Lines By\",\n options: [\"--None--\", ...setup.headers],\n codeKey: \"style\",\n dataTestID: \"styleByLines\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.sizeByLines,\n onChange: (_, data) => updateSetup({ sizeByLines: data.optionValue }, \"--None--\"),\n label: \"Size Lines By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"size\",\n dataTestID: \"styleBySize\",\n hasHeaders: common.hasHeaders,\n }),\n DividerAttr(),\n CollapsibleAttr({\n label: \"Error\",\n tooltip: \"Measure error in data\",\n collapsed: setup.isCollapsed,\n toggle: () => updateSetup({ isCollapsed: !setup.isCollapsed }),\n children: [\n errorBar,\n primaryInterval,\n secondaryInterval,\n SpinnerAttr({\n label: \"Bootstrap Samples\",\n value: setup.bootstrapSamples,\n step: 100,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateSetup({ bootstrapSamples: data }),\n codeKey: \"n_boot\",\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n SpinnerAttr({\n label: \"Seed\",\n value: setup.seed,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateSetup({ seed: data }),\n codeKey: \"seed\",\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({\n title: \"Axes\",\n tooltip: \"Set scale for axes\",\n }),\n DropdownAttr({\n value: setup.xAxisScale,\n onChange: (_, data) => updateSetup({ xAxisScale: data.optionValue }),\n label: \"X-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n placeholder: \"Linear\",\n callKey: \"xscale\",\n codeValueMap: Axes,\n }),\n DropdownAttr({\n value: setup.yAxisScale,\n onChange: (_, data) => updateSetup({ yAxisScale: data.optionValue }),\n label: \"Y-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n placeholder: \"Linear\",\n callKey: \"yscale\",\n codeValueMap: Axes,\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Color\" }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => updateDesign({ palette: data.optionText }),\n codeKey: \"palette\",\n placeholder: \"Accent\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Markers\" }),\n MarkerAttr,\n DividerAttr(),\n DropdownAttr({\n label: \"Line Style\",\n value: design.lineStyle,\n onChange: (_, data) => updateDesign({ lineStyle: data.optionValue }),\n options: [\"Solid\", \"Dashed\"],\n codeKey: \"linestyle\",\n codeValueMap: LineStyle,\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Line Width\",\n value: design.lineWidth,\n onChange: (data: number) => updateDesign({ lineWidth: data }),\n suffix: \"px\",\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n codeKey: \"linewidth\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.isDesignCollapsed,\n toggle: () => updateDesign({ isDesignCollapsed: !design.isDesignCollapsed }),\n children: [\n DividerAttr(),\n HeadingAttr({ title: \"Error\" }),\n errorBarColor,\n errorStyle,\n errorBarThickness,\n errorBarCapWidth,\n ],\n }),\n ],\n };\n return linePlot;\n};\n\nconst LineForm = () => {\n const LinePlot = LineContext();\n return buildReactFromAttrs(LinePlot.baseAttrs, 120);\n};\n\nexport const LineDesign = () => {\n const LineDesign = LineContext();\n return buildReactFromAttrs(LineDesign.designAttrs, 140);\n};\n\nexport default LineForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport {\n Axes,\n Chart,\n IntervalValueMap,\n LineStyle,\n Markers,\n RegEstimators,\n RegFunction,\n ValueTracker,\n} from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n CollapsibleAttr,\n ColorPickerAttr,\n CheckBoxAttr,\n SpinnerAttr,\n LineKwargs,\n regressionErrorBar,\n AxisDropdownAttr,\n GridlinesAttr,\n SingleChartBorders,\n LegendAttr,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildCode, buildReactFromAttrs, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport {\n dependencyEqualsValue,\n dependencyInValues,\n dependencyNotEqualsValue,\n fetchHeaders,\n} from \"../MVCShared/PlotGeneratorUtils\";\nimport { RegressionSetup, RegressionDesign as IRegressionDesign } from \"../../../../taskpane/hooks/plots/useRegression\";\n\nconst RegressionContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n RegressionSetup,\n IRegressionDesign\n >(PlotType.regression);\n useEffect(() => {\n // If input data exists, and x, y, or both axes are selected, enable the Create/Apply button\n if (setup && common?.inputData) {\n const hasAxesSelected: boolean = setup.xAxis !== \"\" && setup.yAxis !== \"\";\n if (!hasAxesSelected) {\n const errors: Set = new Set([\n ...(common.validationErrors || []),\n \"Select X and Y axis in the setup tab to preview chart.\",\n ]);\n updateCommon({ validationErrors: errors });\n } else {\n updateCommon({ validationErrors: new Set() });\n }\n }\n }, [setup?.xAxis, setup?.yAxis, common?.inputData]);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...regressionPlot.baseAttrs, ...regressionPlot.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const MarkerAttr = DropdownAttr({\n label: \"Marker\",\n value: design.marker,\n options: [\"Point\", \"Circle\", \"Plus\", \"Star\", \"Diamond\", \"X\"],\n onChange: (_, e) => updateDesign({ marker: e.optionValue }),\n codeKey: \"marker\",\n codeValueMap: Markers,\n codeRequiresInteraction: true,\n });\n MarkerAttr.getCode = (code: CodeBuilder) => {\n // Explicitly set marker color to allow for modification\n if (design.marker.isUpdated) {\n code.plotAttrs.push(`marker=\"${Markers[design.marker.value]}\", scatter_kws={ 'color': '${design.color.value}' }`);\n }\n };\n\n const errorBar = DropdownAttr({\n value: setup.errorBar,\n label: \"Error Bar\",\n onChange: (_, data) => updateSetup({ errorBar: data.optionValue }),\n options: [\"No error bars\", \"Confidence Interval\", \"Standard Deviation\"],\n codeKey: \"x_ci\",\n codeRequiresInteraction: false,\n codeValueMap: IntervalValueMap,\n dataTestID: \"error-bar\",\n });\n\n const interval = SpinnerAttr({\n label: \"Interval\",\n value: setup.interval,\n step: 1,\n min: 0,\n max: 100,\n suffix: \"%\",\n onChange: (data: number) => updateSetup({ interval: data }),\n visibleDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\"])],\n enabledDependencies: [dependencyInValues(errorBar, [\"Confidence Interval\", \"Standard Deviation\"])],\n codeRequiresInteraction: true,\n codeKey: \"ci\",\n dataTestID: \"ci\",\n });\n\n const regFunction = DropdownAttr({\n label: \"Function\",\n value: setup.function,\n onChange: (_, data) => updateSetup({ function: data.optionValue }),\n options: [\"Linear\", \"Polynomial\", \"Logx\", \"Lowess\", \"Robust\", \"Logistic\"],\n codeRequiresInteraction: true,\n dataTestID: \"function\",\n });\n\n regFunction.getCode = (code: CodeBuilder) => {\n if (setup.function instanceof ValueTracker && setup.function.isUpdated) {\n RegFunction[setup.function.value] ? code.plotAttrs.push(`${RegFunction[setup.function.value]}=True`) : \"\";\n }\n };\n\n const estimator = DropdownAttr({\n value: setup.estimator,\n onChange: (_, data) => updateSetup({ estimator: data.optionValue }),\n label: \"Estimator\",\n options: [\"Mean\", \"Median\", \"Max\", \"Min\"],\n placeholder: \"Mean\",\n });\n\n estimator.getCode = (code: CodeBuilder) => {\n const estimator = RegEstimators[setup.estimator];\n estimator ? code.plotAttrs.push(`x_estimator=${estimator}`) : \"\";\n };\n\n const xPartial = AxisDropdownAttr({\n value: setup.xPartial,\n onChange: (_, data) => updateSetup({ xPartial: data.optionValue }, \"--Select--\"),\n label: \"X-Partial\",\n options: [\"--Select--\", ...setup.headers.filter((header) => header !== setup.xAxis && header !== setup.yAxis)],\n codeKey: \"x_partial\",\n hasHeaders: common.hasHeaders,\n });\n\n xPartial.getCode = (code: CodeBuilder) => {\n setup.xPartial ? code.plotAttrs.push(`x_partial=df[\"${setup.xPartial}\"]`) : \"\";\n };\n const yPartial = AxisDropdownAttr({\n value: setup.yPartial,\n onChange: (_, data) => updateSetup({ yPartial: data.optionValue }, \"--Select--\"),\n label: \"Y-Partial\",\n options: [\"--Select--\", ...setup.headers.filter((header) => header !== setup.xAxis && header !== setup.yAxis)],\n codeKey: \"y_partial\",\n hasHeaders: common.hasHeaders,\n });\n\n yPartial.getCode = (code: CodeBuilder) => {\n setup.yPartial ? code.plotAttrs.push(`y_partial=df[\"${setup.yPartial}\"]`) : \"\";\n };\n\n const lineWidthAndStyle = LineKwargs({\n styleLabel: \"Line Style\",\n options: [\"Solid\", \"Dashed\"],\n dropdownValue: design.lineStyle,\n onChangeStyle: (_, data) => updateDesign({ lineStyle: data.optionValue }),\n label: \"Line Width\",\n value: design.lineWidth,\n step: 1,\n suffix: \"px\",\n onChange: (data: number) => updateDesign({ lineWidth: data }),\n codeValueMap: LineStyle,\n codeRequiresInteraction: true,\n });\n\n let lineLabel = LabelAttr({\n label: \"Line Label\",\n value: design.lineLabel,\n placeholder: \"Label\",\n posKey: \"label\",\n onChange: (event) => updateDesign({ lineLabel: event.currentTarget.value }),\n });\n lineLabel.getCode = (code: CodeBuilder) => {\n if (design.lineLabel) {\n code.plotAttrs.push(`label=\"${design.lineLabel}\"`);\n code.plotCalls.push(`\\nplt.legend()`);\n }\n };\n\n const legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n visibleDependencies: [dependencyNotEqualsValue(lineLabel, \"\")],\n });\n\n const RegressionErrorBar = regressionErrorBar({\n value: design.errorBarColor,\n spinnerValue: design.errorBarWidth,\n decimalValue: design.errorBarCapWidth,\n label: \"Error Bar Color\",\n suffixLabel: \"Error Bar Thickness\",\n decimalLabel: \"Error Bar Cap Width\",\n onChange: (hexColor) => updateDesign({ errorBarColor: `#${hexColor}` }),\n onValueChange: (data) => updateDesign({ errorBarWidth: data }),\n onDecimalChange: (data) => updateDesign({ errorBarCapWidth: data }),\n suffix: \"px\",\n suffixStep: 1,\n decimalStep: 0.1,\n yAxis: setup.yAxis,\n xAxis: setup.xAxis,\n enabledDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n codeRequiresInteraction: true,\n });\n\n const regressionPlot: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n }),\n AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n }),\n estimator,\n DividerAttr(),\n HeadingAttr({ title: \"Regression\", tooltip: \"Select regression function type and bounding\" }),\n regFunction,\n SpinnerAttr({\n label: \"Order\",\n value: setup.order,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateSetup({ order: data }),\n codeKey: \"order\",\n visibleDependencies: [dependencyEqualsValue(regFunction, \"Polynomial\")],\n dataTestID: \"order\",\n }),\n CheckBoxAttr({\n label: \"Truncate\",\n onChange: (_, data) => updateSetup({ truncate: data.checked }),\n value: setup.truncate,\n codeRequiresInteraction: true,\n codeKey: \"truncate\",\n dataTestID: \"truncate\",\n }),\n DividerAttr(),\n CollapsibleAttr({\n label: \"Error\",\n tooltip: \"Measure error in data\",\n collapsed: setup.isCollapsed,\n toggle: () => updateSetup({ isCollapsed: !setup.isCollapsed }),\n children: [\n errorBar,\n interval,\n SpinnerAttr({\n label: \"Bootstrap Samples\",\n value: setup.bootstrapSamples,\n step: 100,\n onChange: (data: number) => updateSetup({ bootstrapSamples: data }),\n codeKey: \"n_boot\",\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n SpinnerAttr({\n label: \"Seed\",\n value: setup.seed,\n step: 1,\n onChange: (data: number) => updateSetup({ seed: data }),\n codeKey: \"seed\",\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(errorBar, \"No error bars\")],\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({\n title: \"Axes\",\n tooltip: \"Set scale for axes\",\n }),\n DropdownAttr({\n value: setup.newXAxisScale,\n onChange: (_, data) => updateSetup({ newXAxisScale: data.optionValue }),\n label: \"X-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n callKey: \"xscale\",\n codeValueMap: Axes,\n codeRequiresInteraction: true,\n }),\n DropdownAttr({\n value: setup.newYAxisScale,\n onChange: (_, data) => updateSetup({ newYAxisScale: data.optionValue }),\n label: \"Y-Axis Scale\",\n options: [\"Linear\", \"Log\"],\n callKey: \"yscale\",\n codeValueMap: Axes,\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Partials\", tooltip: \"Select confounding variables to regress out of x and y variables\" }),\n xPartial,\n yPartial,\n DividerAttr(),\n HeadingAttr({ title: \"Jitter\", tooltip: \"Add uniform random noise to either the x or y variables\" }),\n SpinnerAttr({\n label: \"X-Jitter\",\n value: setup.xJitter,\n step: 0.1,\n onChange: (data: number) => updateSetup({ xJitter: data }),\n codeKey: \"x_jitter\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Jitter\",\n value: setup.yJitter,\n step: 0.1,\n onChange: (data: number) => updateSetup({ yJitter: data }),\n codeKey: \"y_jitter\",\n codeRequiresInteraction: true,\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Markers\" }),\n MarkerAttr,\n DividerAttr(),\n lineWidthAndStyle,\n lineLabel,\n legend,\n DividerAttr(),\n CollapsibleAttr({\n label: \"Error\",\n collapsed: design.isDesignCollapsed,\n toggle: () => updateDesign({ isDesignCollapsed: !design.isDesignCollapsed }),\n children: [RegressionErrorBar],\n }),\n ],\n };\n return regressionPlot;\n};\n\nconst RegressionForm = () => {\n const regressionPlot = RegressionContext();\n return buildReactFromAttrs(regressionPlot.baseAttrs, 140);\n};\n\nexport const RegressionDesign = () => {\n const regressionDesign = RegressionContext();\n return buildReactFromAttrs(regressionDesign.designAttrs, 140);\n};\n\nexport default RegressionForm;\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { dependencyEqualsValue, dependencyNotEqualsValue, fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { Chart, Orientation } from \"../MVCShared/types\";\nimport {\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n PaletteAttr,\n CheckBoxAttr,\n SpinnerAttr,\n ColorPickerAttr,\n CollapsibleAttr,\n AxisDropdownAttr,\n LegendAttr,\n GridlinesAttr,\n SingleChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildReactFromAttrs, buildCode, CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { ViolinSetup, ViolinDesign as IViolinDesign } from \"../../../../taskpane/hooks/plots/useViolin\";\n\nconst ViolinContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n ViolinSetup,\n IViolinDesign\n >(PlotType.violin);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...ViolinChart.baseAttrs, ...ViolinChart.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const orientationDropdown = DropdownAttr({\n value: setup.orientation,\n onChange: (_, data) => {\n const prevX: string = setup.xAxis;\n const prevY: string = setup.yAxis;\n updateSetup({\n orientation: data.optionValue,\n xAxis: prevY,\n yAxis: prevX,\n });\n const prevXAxisLabel: string = design.xAxisLabel;\n const prevYAxisLabel: string = design.yAxisLabel;\n updateDesign({\n xAxisLabel: prevYAxisLabel,\n yAxisLabel: prevXAxisLabel,\n });\n },\n label: \"Orientation\",\n options: [\"Horizontal\", \"Vertical\"],\n codeKey: \"orient\",\n codeValueMap: Orientation,\n codeRequiresInteraction: true,\n });\n\n const xAxis = AxisDropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n updateDesign({ xAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n hasHeaders: common.hasHeaders,\n });\n\n const BandwidthAttr = DropdownAttr({\n value: setup.bandwidth,\n onChange: (_, data) => updateSetup({ bandwidth: data.optionValue }),\n label: \"Bandwidth\",\n options: [\"Scott\", \"Silverman\", \"Custom\"],\n codeKey: \"bw_method\",\n codeRequiresInteraction: true,\n dataTestID: \"bandwidth\",\n });\n\n BandwidthAttr.getCode = (code: CodeBuilder) => {\n if (setup.bandwidth.isUpdated === true) {\n setup.bandwidth.value === \"Custom\"\n ? null\n : code.plotAttrs.push(`bw_method=\"${setup.bandwidth.value.toLowerCase()}\"`);\n }\n };\n\n // Specific rendering for custom\n const ColorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n const SaturationAttr = SpinnerAttr({\n label: \"Saturation\",\n value: design.saturation,\n step: 0.01,\n max: 1,\n onChange: (data: number) => updateDesign({ saturation: data }),\n codeKey: \"saturation\",\n codeRequiresInteraction: true,\n });\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n let dodge = CheckBoxAttr({\n value: design.dodge,\n onChange: (_, e) => updateDesign({ dodge: e.checked }),\n label: \"Overlapping groups\",\n codeKey: \"dodge\",\n codeRequiresInteraction: true,\n enabledDependencies: [dependencyNotEqualsValue(ColorBy, \"\")],\n dataTestID: \"dodge\",\n });\n dodge.getCode = (code: CodeBuilder) => {\n if (design.dodge.isUpdated) {\n // Invert the value since the checkbox is for overlapping groups\n const dodge = design.dodge.value === true ? \"False\" : \"True\";\n code.plotAttrs.push(`dodge=${dodge}`);\n }\n };\n\n const alpha = SpinnerAttr({\n label: \"Opacity\",\n value: design.alpha,\n step: 0.1,\n min: 0,\n max: 1,\n onChange: (data: number) => updateDesign({ alpha: data }),\n codeKey: \"alpha\",\n dataTestID: \"alpha\",\n codeRequiresInteraction: true,\n });\n\n const ViolinChart: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n orientationDropdown,\n DividerAttr(),\n HeadingAttr({\n title: \"Data\",\n tooltip: \"Select data cells and parameters\",\n }),\n xAxis,\n AxisDropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n updateDesign({ yAxisLabel: data.optionValue }, \"--Select--\");\n },\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n hasHeaders: common.hasHeaders,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Grouping\", tooltip: \"Determine violin color\" }),\n ColorBy,\n DividerAttr(),\n CollapsibleAttr({\n label: \"Kernel\",\n tooltip: \"Compute kernel density estimate\",\n collapsed: setup.isCollapsed,\n toggle: () => updateSetup({ isCollapsed: !setup.isCollapsed }),\n children: [\n BandwidthAttr,\n SpinnerAttr({\n label: \"Custom Adjust\",\n value: setup.custom,\n step: 0.1,\n min: 0.1,\n max: 10,\n onChange: (data: number) => updateSetup({ custom: data }),\n visibleDependencies: [dependencyEqualsValue(BandwidthAttr, \"Custom\")],\n codeKey: \"bw_adjust\",\n dataTestID: \"bw-adjust\",\n }),\n SpinnerAttr({\n label: \"Cut\",\n value: setup.cut,\n step: 1,\n onChange: (data: number) => updateSetup({ cut: data }),\n codeKey: \"cut\",\n codeRequiresInteraction: true,\n dataTestID: \"cut\",\n }),\n SpinnerAttr({\n label: \"Grid Size\",\n value: setup.gridSize,\n step: 10,\n onChange: (data: number) => updateSetup({ gridSize: data }),\n codeKey: \"gridsize\",\n codeRequiresInteraction: true,\n dataTestID: \"grid\",\n }),\n ],\n }),\n DividerAttr(),\n DropdownAttr({\n label: \"Scale\",\n options: [\"Area\", \"Count\", \"Width\"],\n value: setup.densityNorm,\n codeKey: \"density_norm\",\n codeValueMap: { Area: \"area\", Count: \"count\", Width: \"width\" },\n codeRequiresInteraction: true,\n onChange: (_, data) => updateSetup({ densityNorm: data.optionValue }),\n }),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.xAxisLabel,\n placeholder: \"Defaults header\",\n label: \"X-Axis Label\",\n codeKey: \"xlabel\",\n onChange: (event) => updateDesign({ xAxisLabel: event.currentTarget.value }),\n }),\n LabelAttr({\n value: design.yAxisLabel,\n placeholder: \"Defaults header\",\n label: \"Y-Axis Label\",\n codeKey: \"ylabel\",\n onChange: (event) => updateDesign({ yAxisLabel: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n SingleChartBorders({\n label: \"Top\",\n value: design.topSpine,\n onChange: (_, e) => updateDesign({ topSpine: e.checked }),\n callKey: \"top\",\n }),\n SingleChartBorders({\n label: \"Right\",\n value: design.rightSpine,\n onChange: (_, e) => updateDesign({ rightSpine: e.checked }),\n callKey: \"right\",\n }),\n SingleChartBorders({\n label: \"Bottom\",\n value: design.bottomSpine,\n onChange: (_, e) => updateDesign({ bottomSpine: e.checked }),\n callKey: \"bottom\",\n }),\n SingleChartBorders({\n label: \"Left\",\n value: design.leftSpine,\n onChange: (_, e) => updateDesign({ leftSpine: e.checked }),\n callKey: \"left\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n visibleDependencies: [dependencyEqualsValue(ColorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n CheckBoxAttr({\n value: design.fill,\n onChange: (_, e) => updateDesign({ fill: e.checked }),\n label: \"Fill\",\n codeKey: \"fill\",\n codeRequiresInteraction: true,\n }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => updateDesign({ palette: data.optionText }),\n codeKey: \"palette\",\n placeholder: \"Accent\",\n visibleDependencies: [dependencyNotEqualsValue(ColorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n SaturationAttr,\n DividerAttr(),\n HeadingAttr({ title: \"Violin Formatting\" }),\n SpinnerAttr({\n label: \"Width\",\n value: design.width,\n step: 0.1,\n onChange: (data: number) => updateDesign({ width: data }),\n codeKey: \"width\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Line Width\",\n value: design.lineWidth,\n step: 0.1,\n suffix: \"px\",\n onChange: (data: number) => updateDesign({ lineWidth: data }),\n codeKey: \"linewidth\",\n codeRequiresInteraction: true,\n }),\n CheckBoxAttr({\n value: design.split,\n onChange: (_, e) => updateDesign({ split: e.checked }),\n label: \"Split\",\n codeKey: \"split\",\n codeRequiresInteraction: true,\n dataTestID: \"split\",\n }),\n dodge,\n alpha,\n DropdownAttr({\n value: design.violinInner,\n onChange: (_, data) => updateDesign({ violinInner: data.optionValue }),\n label: \"Violin Inner\",\n options: [\"Box\", \"Quartile\", \"Point\", \"Stick\"],\n codeKey: \"inner\",\n codeValueMap: { Box: \"box\", Quartile: \"quartile\", Point: \"point\", Stick: \"stick\" },\n codeRequiresInteraction: true,\n dataTestID: \"violin-inner\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n ],\n };\n return ViolinChart;\n};\n\nconst ViolinForm = () => {\n const ViolinChart = ViolinContext();\n return buildReactFromAttrs(ViolinChart.baseAttrs, 100);\n};\n\nexport const ViolinDesign = () => {\n const violinDesign = ViolinContext();\n return buildReactFromAttrs(violinDesign.designAttrs, 120);\n};\n\nexport default ViolinForm;\n","import React from \"react\";\nimport { CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { BinStats, ChartAttr, Elements, ValueTracker, LineStyle } from \"../MVCShared/types\";\n\ntype DiagonolStyles = {\n bins: number | ValueTracker;\n element: string | ValueTracker;\n stat: string;\n codeRequiresInteraction?: boolean;\n};\nexport function DiagonolKws(args: DiagonolStyles): ChartAttr {\n const { bins, element, stat, codeRequiresInteraction } = args;\n\n return {\n component: \"Pair Plot Advanced Section\",\n getReact: () => {\n return <>;\n },\n getCode: (code: CodeBuilder) => {\n if (!codeRequiresInteraction) return;\n\n const attributes = [\n element instanceof ValueTracker && element.isUpdated && element.value !== \"None\"\n ? `element='${Elements[element.value]}'`\n : null,\n bins instanceof ValueTracker && bins.isUpdated ? `bins=${bins.value}` : null,\n stat && stat !== \"None\" ? `stat='${BinStats[stat]}'` : null,\n ].filter(Boolean);\n\n if (attributes.length === 0) return;\n\n const diag_kws = `diag_kws=dict(${attributes.join(\", \")})`;\n code.plotAttrs.push(diag_kws);\n },\n };\n}\n\ntype PlotArgs = {\n lineWidth: number | ValueTracker;\n lineStyle: string | ValueTracker;\n markerSize: number | ValueTracker;\n codeRequiresInteraction?: boolean;\n};\n\nexport function PlotStyle(args: PlotArgs): ChartAttr {\n const { lineWidth, lineStyle, markerSize, codeRequiresInteraction } = args;\n\n return {\n component: \"Pair Plot Advanced Section\",\n getReact: () => {\n return <>;\n },\n getCode: (code: CodeBuilder) => {\n if (!codeRequiresInteraction) return;\n const attributes = [\n markerSize instanceof ValueTracker && markerSize.isUpdated ? `s=${markerSize.value}` : null,\n lineStyle instanceof ValueTracker && lineStyle.isUpdated ? `ls='${LineStyle[lineStyle.value]}'` : null,\n lineWidth instanceof ValueTracker && lineWidth.isUpdated ? `lw=${lineWidth.value}` : null,\n ].filter(Boolean);\n\n if (attributes.length === 0) return;\n\n let start = `plot_kws=dict(${attributes.join(\", \")})`;\n code.plotAttrs.push(start);\n },\n };\n}\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { Chart, Markers } from \"../MVCShared/types\";\nimport {\n AxisDropdownAttr,\n CheckBoxAttr,\n CollapsibleAttr,\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n LegendAttr,\n MultiSelectDropdownAttr,\n PaletteAttr,\n SpinnerAttr,\n GridlinesAttr,\n MultiChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { CodeBuilder, buildCode, buildReactFromAttrs } from \"../MVCShared/CodeBuilder\";\nimport { dependencyEqualsValue, dependencyNotEqualsValue, fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { DiagonolKws, PlotStyle } from \"./PairPlotKws\";\nimport { PairSetup, PairDesign as IPairDesign } from \"../../../../taskpane/hooks/plots/usePair\";\n\nconst PairPlotContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n PairSetup,\n IPairDesign\n >(PlotType.pairwise);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...PairPlotChart.baseAttrs, ...PairPlotChart.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const MarkerAttr = DropdownAttr({\n label: \"Marker\",\n value: design.markers,\n options: [\"Point\", \"Circle\", \"Plus\", \"Star\", \"Diamond\", \"X\"],\n onChange: (_, e) => updateDesign({ markers: e.selectedOptions }),\n codeKey: \"marker\",\n codeRequiresInteraction: true,\n multiselect: true,\n selectedOptons: design.markers,\n dataTestID: \"marker\",\n });\n\n MarkerAttr.getCode = (code: CodeBuilder) => {\n if (design.markers.length > 0) {\n const markerCodes = design.markers.map((marker) => `'${Markers[marker]}' `);\n code.plotAttrs.push(`markers=[${markerCodes}]`);\n }\n };\n\n const ColorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n const paletteAttr = PaletteAttr({\n value: design.palette,\n onChange: (_, data) => {\n updateDesign({ palette: data.optionText });\n },\n codeKey: \"palette\",\n placeholder: \"Accent\",\n codeRequiresInteraction: true,\n dataTestID: \"palette\",\n });\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const variablesAttr = MultiSelectDropdownAttr({\n value: setup.vars,\n onChange: (_, data) => {\n updateSetup({ vars: data.selectedOptions });\n },\n dataTestID: \"vars\",\n label: \"Variables\",\n options: setup.headers,\n codeKey: \"vars\",\n multiselect: true,\n selectedOptons: setup.vars,\n hasHeaders: common.hasHeaders,\n });\n\n const colAttr = MultiSelectDropdownAttr({\n label: \"Column\",\n value: setup.xVars,\n onChange: (_, data) => {\n updateSetup({ xVars: data.selectedOptions });\n },\n enabledDependencies: [dependencyEqualsValue(variablesAttr, [])],\n dataTestID: \"x-var\",\n options: setup.headers,\n codeKey: \"x_vars\",\n multiselect: true,\n selectedOptons: setup.xVars,\n hasHeaders: common.hasHeaders,\n });\n\n const rowAttr = MultiSelectDropdownAttr({\n label: \"Row\",\n value: setup.yVars,\n onChange: (_, data) => {\n updateSetup({ yVars: data.selectedOptions });\n },\n enabledDependencies: [dependencyEqualsValue(variablesAttr, [])],\n dataTestID: \"y-var\",\n options: setup.headers,\n codeKey: \"y_vars\",\n multiselect: true,\n selectedOptons: setup.yVars,\n hasHeaders: common.hasHeaders,\n });\n\n const PairPlotChart: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n // Note: Users can plot x & y variables or just pass in all the variables they want plotted, I'm not sure what we want but both are cool to me\n variablesAttr,\n rowAttr,\n colAttr,\n ColorBy,\n CheckBoxAttr({\n label: \"Drop NA Values\",\n value: setup.dropna,\n onChange: (_, e) => updateSetup({ dropna: e.checked }),\n codeKey: \"dropna\",\n codeRequiresInteraction: true,\n dataTestID: \"dropna\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Chart Configuration\", tooltip: \"Configure subplots and layout\" }),\n DropdownAttr({\n value: setup.kind,\n onChange: (_, data) => {\n updateSetup({ kind: data.optionValue });\n },\n dataTestID: \"kind\",\n label: \"Subplot Type\",\n options: [\"Scatter\", \"Histogram\", \"KDE\", \"Regression\"],\n codeValueMap: { Scatter: \"scatter\", Histogram: \"hist\", KDE: \"kde\", Regression: \"reg\" },\n codeRequiresInteraction: true,\n codeKey: \"kind\",\n }),\n DropdownAttr({\n value: setup.diagKind,\n onChange: (_, data) => {\n updateSetup({ diagKind: data.optionValue });\n },\n dataTestID: \"diagKind\",\n label: \"Diagonal Type\",\n options: [\"Auto\", \"Hist\", \"Kde\"],\n codeValueMap: { Auto: \"auto\", Hist: \"hist\", Kde: \"kde\" },\n codeKey: \"diag_kind\",\n codeRequiresInteraction: true,\n }),\n ],\n designAttrs: [\n PlotStyle({\n lineStyle: design.lineStyle,\n lineWidth: design.lineWidth,\n markerSize: design.markerSize,\n codeRequiresInteraction: true,\n }),\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n MultiChartBorders({\n left: design.leftSpine,\n right: design.rightSpine,\n bottom: design.bottomSpine,\n top: design.topSpine,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n chartType: PlotType.pairwise,\n dataTestID: \"spine-checkbox\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n multiChart: true,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Color\" }),\n paletteAttr,\n DividerAttr(),\n MarkerAttr,\n SpinnerAttr({\n label: \"Marker Size\",\n value: design.markerSize,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateDesign({ markerSize: data }),\n codeRequiresInteraction: true,\n visibleDependencies: [dependencyNotEqualsValue(MarkerAttr, [])],\n }),\n DividerAttr(),\n DropdownAttr({\n label: \"Line Style\",\n value: design.lineStyle,\n onChange: (_, data) => updateDesign({ lineStyle: data.optionValue }),\n options: [\"Solid\", \"Dashed\"],\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Line Width\",\n value: design.lineWidth,\n onChange: (data: number) => updateDesign({ lineWidth: data }),\n suffix: \"px\",\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Scale\", tooltip: \"Set chart size\" }),\n SpinnerAttr({\n label: \"Height\",\n value: design.height,\n step: 0.1,\n min: 0,\n max: 2 ** 32 - 1,\n suffix: \"in\",\n onChange: (data: number) => updateDesign({ height: data }),\n codeKey: \"height\",\n codeRequiresInteraction: true,\n dataTestID: \"height\",\n }),\n SpinnerAttr({\n label: \"Aspect Ratio\",\n value: design.aspect,\n step: 0.1,\n min: 0,\n max: 2 ** 32 - 1,\n suffix: \"in\",\n onChange: (data: number) => updateDesign({ aspect: data }),\n codeKey: \"aspect\",\n codeRequiresInteraction: true,\n dataTestID: \"aspect\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.isCollapsed,\n toggle: () => {\n updateDesign({ isCollapsed: !design.isCollapsed });\n },\n children: [\n DiagonolKws({\n stat: design.stat,\n element: design.element,\n bins: design.bin,\n codeRequiresInteraction: true,\n }),\n DropdownAttr({\n label: \"Element\",\n options: [\"Bars\", \"Step\", \"Poly\", \"None\"],\n placeholder: \"Bar\",\n value: design.element,\n onChange: (_, data) => updateDesign({ element: data.optionValue }),\n codeRequiresInteraction: true,\n }),\n DropdownAttr({\n value: design.stat,\n onChange: (_, data) => updateDesign({ stat: data.optionValue }, \"--Select--\"),\n label: \"Bin Statistic\",\n options: [\"--Select--\", \"Count\", \"Frequency\", \"Probability\", \"Percent\", \"Density\"],\n }),\n SpinnerAttr({\n onChange: (data: number) => updateDesign({ bin: data }),\n label: \"Bin Size\",\n min: 0,\n max: 2 ** 32 - 1,\n step: 1,\n value: design.bin,\n dataTestID: \"bin\",\n }),\n ],\n }),\n\n DividerAttr(),\n ],\n };\n return PairPlotChart;\n};\n\nconst PairForm = () => {\n const pairChart = PairPlotContext();\n return buildReactFromAttrs(pairChart.baseAttrs, 140);\n};\n\nexport const PairDesign = () => {\n const pairDesign = PairPlotContext();\n return buildReactFromAttrs(pairDesign.designAttrs, 120);\n};\n\nexport default PairForm;\n","import React from \"react\";\nimport { Checkbox } from \"@fluentui/react-components\";\nimport { CodeBuilder } from \"../MVCShared/CodeBuilder\";\nimport { ChartAttr, ValueTracker } from \"../MVCShared/types\";\nimport { Row } from \"../../../components/Layout/Space\";\n\ntype FacetSetup = {\n sharexVal: boolean | ValueTracker;\n shareyVal: boolean | ValueTracker;\n facetPalette: string | ValueTracker;\n xlim: number | ValueTracker;\n ylim: number | ValueTracker;\n codeKey: string;\n onChangeSharex: (_, value) => void;\n onChangeSharey: (_, value) => void;\n codeRequiresInteraction?: boolean;\n};\nexport function Facet(args: FacetSetup): ChartAttr {\n const {\n codeKey,\n sharexVal,\n shareyVal,\n facetPalette,\n xlim,\n ylim,\n onChangeSharex,\n onChangeSharey,\n codeRequiresInteraction,\n } = args;\n let shareXVal = sharexVal instanceof ValueTracker ? sharexVal.value : sharexVal;\n let shareYVal = shareyVal instanceof ValueTracker ? shareyVal.value : shareyVal;\n\n return {\n component: \"Facet Grid\",\n getReact: (labelWidth: number) => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n );\n },\n getCode: (code: CodeBuilder) => {\n let start = `${codeKey}=dict(`;\n let anyUpdated = false;\n\n if (codeRequiresInteraction) {\n let sxval: string = shareXVal ? \"True\" : \"False\";\n let syval: string = shareYVal ? \"True\" : \"False\";\n\n if (sharexVal instanceof ValueTracker && sharexVal.isUpdated) {\n start += `sharex=${sxval}, `;\n anyUpdated = true;\n }\n if (shareyVal instanceof ValueTracker && shareyVal.isUpdated) {\n start += `sharey=${syval}, `;\n anyUpdated = true;\n }\n if (facetPalette instanceof ValueTracker && facetPalette.isUpdated) {\n start += `palette='${facetPalette.value}', `;\n anyUpdated = true;\n }\n\n if (xlim instanceof ValueTracker && xlim.isUpdated) {\n start += `xlim=(0, ${xlim.value}), `;\n anyUpdated = true;\n }\n\n if (ylim instanceof ValueTracker && ylim.isUpdated) {\n start += `ylim=(0, ${ylim.value}), `;\n anyUpdated = true;\n }\n }\n if (anyUpdated) {\n start = start.slice(0, -2);\n start += `)`;\n code.plotAttrs.push(start);\n }\n },\n };\n}\n","import { useEffect } from \"react\";\nimport { PlotType } from \"../../../../data/plot-types\";\nimport { RangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { useChart } from \"../../../../taskpane/hooks/plots/useCentralViz\";\nimport { Chart } from \"../MVCShared/types\";\nimport {\n AxisDropdownAttr,\n CheckBoxAttr,\n CollapsibleAttr,\n ColorPickerAttr,\n DataRangeAttr,\n DividerAttr,\n DropdownAttr,\n HeadingAttr,\n LabelAttr,\n LegendAttr,\n PaletteAttr,\n SpinnerAttr,\n GridlinesAttr,\n MultiChartBorders,\n} from \"../MVCShared/PlotAttributes\";\nimport { buildCode, buildReactFromAttrs } from \"../MVCShared/CodeBuilder\";\nimport { dependencyEqualsValue, dependencyNotEqualsValue, fetchHeaders } from \"../MVCShared/PlotGeneratorUtils\";\nimport { Facet } from \"./FacetGridAttr\";\nimport { DisplotSetup, DisplotDesign as IDisplotDesign } from \"../../../../taskpane/hooks/plots/useDisplot\";\n\nconst DisplotContext = (): Chart => {\n const { setup, design, common, updateDesign, updateSetup, updateCommon, setCodeFragments } = useChart<\n DisplotSetup,\n IDisplotDesign\n >(PlotType.distribution);\n\n useEffect(() => {\n (async () => {\n const cb = await buildCode(common, [...DisplotChart.baseAttrs, ...DisplotChart.designAttrs]);\n setCodeFragments(cb);\n })();\n }, [setup, design, common]);\n\n useEffect(() => {\n (async () => {\n await fetchHeaders(common.inputData, common.hasHeaders, updateSetup);\n })();\n }, [common.hasHeaders, common.inputData]);\n\n const ColorBy = AxisDropdownAttr({\n value: setup.colorBy,\n onChange: (_, data) => updateSetup({ colorBy: data.optionValue }, \"--None--\"),\n label: \"Color By\",\n options: [\"--None--\", ...setup.headers],\n placeholder: \"--None--\",\n codeKey: \"hue\",\n hasHeaders: common.hasHeaders,\n });\n\n const Legend = LegendAttr({\n value: design.legendPosition,\n onChange: (_, data) => updateDesign({ legendPosition: data.optionValue }, \"Best\"),\n });\n\n const DisplotChart: Chart = {\n baseAttrs: [\n DataRangeAttr({\n inputData: common.inputData,\n onChangeSelection: (newSelection: RangeSelection) => updateCommon({ inputData: newSelection }),\n }),\n CheckBoxAttr({\n label: \"Has headers\",\n value: common.hasHeaders,\n onChange: (_, e) => updateCommon({ hasHeaders: e.checked }),\n dataTestID: \"headers\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Data\", tooltip: \"Select data cells and parameters\" }),\n DropdownAttr({\n value: setup.xAxis,\n onChange: (_, data) => {\n updateSetup({ xAxis: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"x-axis\",\n label: \"X-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"x\",\n }),\n DropdownAttr({\n value: setup.yAxis,\n onChange: (_, data) => {\n updateSetup({ yAxis: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"yAxis\",\n label: \"Y-Axis\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"y\",\n }),\n ColorBy,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: setup.isCollapsed,\n toggle: () => {\n updateSetup({ isCollapsed: !setup.isCollapsed });\n },\n children: [\n DropdownAttr({\n value: setup.col,\n onChange: (_, data) => {\n updateSetup({ col: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"col\",\n label: \"Facet Grid Column\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"col\",\n }),\n DropdownAttr({\n value: setup.row,\n onChange: (_, data) => {\n updateSetup({ row: data.optionValue }, \"--Select--\");\n },\n dataTestID: \"row\",\n label: \"Facet Grid Row\",\n options: [\"--Select--\", ...setup.headers],\n codeKey: \"row\",\n }),\n Facet({\n sharexVal: setup.shareX,\n shareyVal: setup.shareY,\n facetPalette: design.facetPalette,\n xlim: design.xlim,\n ylim: design.ylim,\n codeKey: \"facet_kws\",\n onChangeSharex: (_, e) => updateSetup({ shareX: e.checked }),\n onChangeSharey: (_, e) => updateSetup({ shareY: e.checked }),\n codeRequiresInteraction: true,\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Subplots\", tooltip: \"\" }),\n DropdownAttr({\n value: setup.kind,\n onChange: (_, data) => {\n updateSetup({ kind: data.optionValue });\n },\n dataTestID: \"kind\",\n label: \"Kind\",\n options: [\"ECDF\", \"Histogram\", \"KDE\"],\n codeValueMap: { ECDF: \"ecdf\", Histogram: \"hist\", KDE: \"kde\" },\n codeRequiresInteraction: true,\n codeKey: \"kind\",\n }),\n DividerAttr(),\n ],\n designAttrs: [\n LabelAttr({\n value: design.plotTitle,\n placeholder: \"Title\",\n label: \"Title\",\n codeKey: \"title\",\n onChange: (event) => updateDesign({ plotTitle: event.currentTarget.value }),\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.borderCollapsed,\n label: \"Border\",\n toggle: () => {\n updateDesign({ borderCollapsed: !design.borderCollapsed });\n },\n children: [\n MultiChartBorders({\n left: design.leftSpine,\n right: design.rightSpine,\n bottom: design.bottomSpine,\n top: design.topSpine,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n chartType: PlotType.distribution,\n dataTestID: \"spine-checkbox\",\n }),\n ],\n }),\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.gridlinesCollapsed,\n label: \"Gridlines\",\n toggle: () => {\n updateDesign({ gridlinesCollapsed: !design.gridlinesCollapsed });\n },\n children: [\n GridlinesAttr({\n majorHorizontal: design.majorHorizontal,\n majorVertical: design.majorVertical,\n minorHorizontal: design.minorHorizontal,\n minorVertical: design.minorVertical,\n multiChart: true,\n onChange: (key, event) => {\n updateDesign({ [key]: event.checked });\n },\n }),\n ],\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axes Label Rotation\" }),\n SpinnerAttr({\n label: \"X-Ticks\",\n value: design.xticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xticks: data }),\n callKey: \"xticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n SpinnerAttr({\n label: \"Y-Ticks\",\n value: design.yticks,\n step: 5,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ yticks: data }),\n callKey: \"yticks\",\n suffix: \"°\",\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n ColorPickerAttr({\n value: design.color,\n label: \"Color\",\n onChange: (hexColor) => updateDesign({ color: `#${hexColor}` }),\n codeKey: \"color\",\n visibleDependencies: [dependencyEqualsValue(ColorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n PaletteAttr({\n value: design.palette,\n onChange: (_, data) => updateDesign({ palette: data.optionText }),\n codeKey: \"palette\",\n placeholder: \"Accent\",\n label: \"Facet Grid Palette\",\n visibleDependencies: [dependencyNotEqualsValue(ColorBy, \"\")],\n codeRequiresInteraction: true,\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Scale\", tooltip: \"Set chart size\" }),\n SpinnerAttr({\n label: \"Height\",\n value: design.height,\n step: 0.1,\n max: 2 ** 32 - 1,\n min: 0,\n suffix: \"in\",\n onChange: (data: number) => updateDesign({ height: data }),\n codeKey: \"height\",\n codeRequiresInteraction: true,\n dataTestID: \"height\",\n }),\n SpinnerAttr({\n label: \"Aspect\",\n value: design.aspect,\n step: 0.1,\n suffix: \"in\",\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateDesign({ aspect: data }),\n codeKey: \"aspect\",\n codeRequiresInteraction: true,\n dataTestID: \"aspect\",\n }),\n SpinnerAttr({\n label: \"Column Wrap Width\",\n value: design.colWrap,\n step: 1,\n min: 0,\n max: 2 ** 32 - 1,\n onChange: (data: number) => updateDesign({ colWrap: data }),\n codeKey: \"col_wrap\",\n codeRequiresInteraction: true,\n dataTestID: \"col-wrap\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Legend\", tooltip: \"Legend only visible for some combinations of inputs\" }),\n Legend,\n DividerAttr(),\n CollapsibleAttr({\n collapsed: design.isCollapsed,\n toggle: () => {\n updateDesign({ isCollapsed: !design.isCollapsed });\n },\n children: [\n HeadingAttr({ title: \"Facet Color\" }),\n PaletteAttr({\n value: design.facetPalette,\n onChange: (_, data) => {\n updateDesign({ facetPalette: data.optionText });\n },\n placeholder: \"Accent\",\n dataTestID: \"facetPalette\",\n }),\n DividerAttr(),\n HeadingAttr({ title: \"Axis Limits\" }),\n SpinnerAttr({\n label: \"X-Limit\",\n value: design.xlim,\n step: 1,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ xlim: data }),\n codeRequiresInteraction: true,\n dataTestID: \"xlim\",\n }),\n SpinnerAttr({\n label: \"Y-Limit\",\n value: design.ylim,\n step: 1,\n max: 180,\n min: -180,\n onChange: (data: number) => updateDesign({ ylim: data }),\n codeRequiresInteraction: true,\n dataTestID: \"ylim\",\n }),\n ],\n }),\n DividerAttr(),\n ],\n };\n return DisplotChart;\n};\n\nconst DisplotForm = () => {\n const DisplotChart = DisplotContext();\n return buildReactFromAttrs(DisplotChart.baseAttrs, 130);\n};\n\nexport const DisplotDesign = () => {\n const DisplotDesign = DisplotContext();\n return buildReactFromAttrs(DisplotDesign.designAttrs, 140);\n};\n\nexport default DisplotForm;\n","import React from \"react\";\nimport { LockClosed24Regular } from \"@fluentui/react-icons\";\nimport { CountDesign } from \"./Plots/CountPlotMVC\";\nimport { BarDesign } from \"./Plots/BarPlotMVC\";\nimport { BoxDesign } from \"./Plots/BoxPlotMVC\";\nimport { ScatterDesign } from \"./Plots/ScatterPlotMVC\";\nimport { LineDesign } from \"./Plots/LinePlotMVC\";\nimport { RegressionDesign } from \"./Plots/RegressionPlotMVC\";\nimport { ViolinDesign } from \"./Plots/ViolinPlotMVC\";\nimport { buildPythonInExcelCode } from \"./MVCShared/CodeBuilder\";\nimport { getFullAddressFromRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { writeToExecutionLocation } from \"../../../excel/grid-utils\";\nimport ActionButtons from \"./ActionButtons\";\nimport { PairDesign } from \"./Plots/PairPlot\";\nimport { DisplotDesign } from \"./Plots/Displot\";\nimport { useChart, useChartManager } from \"../../../taskpane/hooks/plots/useCentralViz\";\nimport { BaseDesign as IBaseDesign, BaseSetup as IBaseSetup } from \"../../../taskpane/hooks/plots/PlotTypes\";\nimport { PlotType } from \"../../../data/plot-types\";\nimport { CustomDialog } from \"../../../taskpane/components/Dialogs/CustomDialog\";\nimport { LockedLabel } from \"./DialogLabels\";\n\nconst FormComponentMap: Record React.JSX.Element> = {\n [PlotType.bar]: BarDesign,\n [PlotType.box]: BoxDesign,\n [PlotType.count]: CountDesign,\n [PlotType.line]: LineDesign,\n [PlotType.regression]: RegressionDesign,\n [PlotType.scatter]: ScatterDesign,\n [PlotType.violin]: ViolinDesign,\n [PlotType.pairwise]: PairDesign,\n [PlotType.distribution]: DisplotDesign,\n};\n\nconst BaseDesign = () => {\n const { plotType, setTab } = useChartManager();\n const { common, codeFragments, updateCommon, serializeContext } = useChart(plotType);\n\n const handleCreateClick = async () => {\n const addr = await getFullAddressFromRangeSelection(common.outputCell);\n await writeToExecutionLocation(addr, await buildPythonInExcelCode(codeFragments));\n await serializeContext();\n };\n\n const SelectedFormComponent = FormComponentMap[plotType];\n\n return (\n
\n \n \n }\n content={}\n onContinue={() => setTab(\"code\")}\n onCancel={() => updateCommon({ typedCode: undefined })}\n />\n
\n );\n};\n\nexport default BaseDesign;\n","import React from \"react\";\nimport BarForm from \"./Plots/BarPlotMVC\";\nimport CountForm from \"./Plots/CountPlotMVC\";\nimport BoxForm from \"./Plots/BoxPlotMVC\";\nimport ScatterForm from \"./Plots/ScatterPlotMVC\";\nimport LineForm from \"./Plots/LinePlotMVC\";\nimport RegressionForm from \"./Plots/RegressionPlotMVC\";\nimport ViolinForm from \"./Plots/ViolinPlotMVC\";\nimport ActionButtons from \"./ActionButtons\";\nimport { getFullAddressFromRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { buildPythonInExcelCode } from \"./MVCShared/CodeBuilder\";\nimport { LockClosed24Regular } from \"@fluentui/react-icons\";\nimport PairForm from \"./Plots/PairPlot\";\nimport DisplotForm from \"./Plots/Displot\";\nimport { writeToExecutionLocation } from \"../../../excel/grid-utils\";\nimport { useChart, useChartManager } from \"../../../taskpane/hooks/plots/useCentralViz\";\nimport { BaseDesign as IBaseDesign, BaseSetup as IBaseSetup } from \"../../../taskpane/hooks/plots/PlotTypes\";\nimport { PlotType } from \"../../../data/plot-types\";\nimport { CustomDialog } from \"../../../taskpane/components/Dialogs/CustomDialog\";\nimport { LockedLabel } from \"./DialogLabels\";\n\nconst FormComponentMap: Record React.JSX.Element> = {\n [PlotType.bar]: BarForm,\n [PlotType.box]: BoxForm,\n [PlotType.count]: CountForm,\n [PlotType.line]: LineForm,\n [PlotType.regression]: RegressionForm,\n [PlotType.scatter]: ScatterForm,\n [PlotType.violin]: ViolinForm,\n [PlotType.pairwise]: PairForm,\n [PlotType.distribution]: DisplotForm,\n};\n\nconst BaseSetup = () => {\n const { plotType, setTab } = useChartManager();\n const { common, codeFragments, updateCommon, serializeContext } = useChart(plotType);\n\n const handleCreateClick = async () => {\n const addr = await getFullAddressFromRangeSelection(common.outputCell);\n await writeToExecutionLocation(addr, await buildPythonInExcelCode(codeFragments));\n await serializeContext();\n };\n\n const SelectedFormComponent = FormComponentMap[plotType];\n\n return (\n
\n \n \n }\n content={}\n onContinue={() => setTab(\"code\")}\n onCancel={() => updateCommon({ typedCode: undefined })}\n />\n
\n );\n};\n\nexport default BaseSetup;\n","import { getGlobal } from \"../global\";\nimport { PyScriptInterpreter, PyScriptLinkage } from \"./types\";\n\nconst g = getGlobal();\n\nexport const RuntimeStatus = {\n NOT_STARTED: \"Not Started\",\n INITIALIZING: \"Initializing...\",\n LOADING_PYODIDE_PACKAGES: \"Loading pyodide packages...\",\n LOADING_MICROPIP_PACKAGES: \"Loading micropip packages...\",\n LOADING_PYSCRIPT_APPS: \"Loading pyscript apps...\",\n RUNNING_INIT_CODE: \"Running imports and definitions...\",\n RUNNING: \"Running\",\n ERROR: \"Error\",\n};\n\nexport interface PyWorkerConfig {\n pyodideVersion: string;\n pyodidePackages: string[];\n pyscriptApps: string[];\n micropipPackages: string[];\n initCode: string;\n}\n\nexport interface PyScriptSettings extends PyWorkerConfig {\n defaultInterpreter: PyScriptInterpreter;\n defaultMode: number;\n}\n\nexport interface RegistryRequest {\n address: string;\n code: string;\n mode: number;\n data: Record;\n}\n\nexport interface RegistryResponse {\n mode: number;\n Python_typeName: string;\n preview?: any[][];\n size?: number[];\n result?: any;\n errorKind?: string;\n error?: string;\n}\n\nexport interface PyWorker {\n readStdout: () => Promise;\n readStderr: () => Promise;\n setRequest: (rndId: string, value: RegistryRequest) => Promise;\n getResponse: (rndId: string, clear?: boolean) => Promise;\n setCloudData: (address: string, data: any) => Promise;\n delCloudData: (address: string) => Promise;\n loadPackages: (pkgs: string[]) => Promise;\n loadPyScriptApps: (pkgs: string[]) => Promise;\n micropipInstall: (pkgs: string[]) => Promise;\n _runInit: (initCode: string) => Promise;\n resetKernel: (clearIsolated?: boolean) => Promise;\n missingFromXLResults: (names: string[]) => Promise;\n initialize: () => Promise;\n runPythonCode: (rndId: string) => Promise;\n runUDF: (\n rndId: string,\n xlName: string,\n isNested: boolean,\n funcName: string,\n address: string,\n args: any[]\n ) => Promise;\n evalPythonCode: (rndId: string, code: string, linkage: PyScriptLinkage) => Promise;\n}\n\nexport interface runInitError {\n Python_typeName: string;\n error: string;\n errorKind: string;\n mode: number;\n}\n\nexport interface WorkerInfo {\n worker: PyWorker;\n terminate: () => void;\n loadingFlag: boolean;\n config: PyWorkerConfig | (() => Promise);\n}\n\nexport async function getPyWorker(\n info: WorkerInfo,\n setRuntimeStatusFn?: (status: string) => void,\n customInit?: (py: PyWorker) => Promise\n): Promise {\n if (info.worker === undefined) {\n if (!info.loadingFlag) {\n // Grab the flag\n info.loadingFlag = true;\n // Wait for PyWorker to be available\n while (!g.PyWorker) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n }\n } else {\n // Wait for 0.5 seconds and try again\n await new Promise((resolve) => setTimeout(resolve, 500));\n return await getPyWorker(info);\n }\n // Resolve any delayed settings\n if (typeof info.config === \"function\") {\n info.config = await info.config();\n }\n const rawWorker = await g.PyWorker(\"/pyscript/static/pyworker/worker.py\", {\n version: info.config.pyodideVersion,\n config: {\n sync_main_only: true,\n files: {\n \"/pyscript/static/pyworker/utils.py\": \"\",\n \"/pyscript/static/pyworker/udf.py\": \"\",\n },\n },\n });\n info.terminate = () => rawWorker.terminate();\n const py: PyWorker = rawWorker.sync;\n\n // Pre-load packages\n await py.loadPackages([\"setuptools\"]);\n if (info.config.pyodidePackages?.length) {\n if (setRuntimeStatusFn) setRuntimeStatusFn(RuntimeStatus.LOADING_PYODIDE_PACKAGES);\n const error = await py.loadPackages(info.config.pyodidePackages);\n if (error) throw new Error(error);\n }\n\n if (info.config.pyscriptApps?.length) {\n if (setRuntimeStatusFn) setRuntimeStatusFn(RuntimeStatus.LOADING_PYSCRIPT_APPS);\n const error = await py.loadPyScriptApps(info.config.pyscriptApps);\n if (error) throw new Error(error);\n }\n\n if (info.config.micropipPackages?.length) {\n await py.loadPackages([\"micropip\"]);\n if (setRuntimeStatusFn) setRuntimeStatusFn(RuntimeStatus.LOADING_MICROPIP_PACKAGES);\n await py.micropipInstall(info.config.micropipPackages);\n const error = await py.micropipInstall(info.config.micropipPackages);\n if (error) throw new Error(error);\n }\n // Initialize\n if (setRuntimeStatusFn) setRuntimeStatusFn(RuntimeStatus.RUNNING_INIT_CODE);\n await py.initialize();\n if (customInit) {\n await customInit(py);\n } else {\n const error = await py._runInit(info.config.initCode);\n if (error) {\n const errorMessage = `Error Kind: ${error.errorKind}\\nError Details: ${error.error}`;\n throw new Error(errorMessage);\n }\n }\n\n info.worker = py;\n }\n return info.worker;\n}\n","import {\n RegistryRequest,\n RegistryResponse,\n WorkerInfo,\n PyWorker,\n getPyWorker as verboseGetPyWorker,\n} from \"xlcommon/src/pyscript/worker\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport { getValueTypesOfRange, convertDataToTyped, readFromRange } from \"xlcommon/src/excel/excel-grid-utils\";\n\nexport const INIT_CODE = `import numpy as np\nimport pandas as pd\nfrom pandas import DataFrame\nimport matplotlib.pyplot as plt\nimport seaborn as sns`;\n\nconst workerInfo: WorkerInfo = {\n worker: undefined,\n terminate: null,\n loadingFlag: false,\n config: {\n pyodideVersion: \"0.26.2\",\n pyodidePackages: [\"pandas\", \"matplotlib\", \"statsmodels\"],\n pyscriptApps: [],\n micropipPackages: [\"seaborn==0.13.2\"],\n initCode: INIT_CODE,\n },\n};\n\nexport async function preloadPyWorker() {\n await getPyWorker();\n}\n\nexport async function getPyWorker() {\n return await verboseGetPyWorker(workerInfo);\n}\n\nexport async function buildChartPreview(code: string, fullAddress: string): Promise {\n try {\n const py: PyWorker = await getPyWorker();\n const randomId = uuidv4();\n\n let excel_data: any = await readFromRange(fullAddress);\n\n const valueType = await getValueTypesOfRange(fullAddress);\n const converted = convertDataToTyped(excel_data, valueType);\n\n await py.setRequest(randomId, {\n address: \"CHART\",\n // Chart preview always uses PyScript, so always uses REF -- no need to check executionLocation or handle xl()\n code: `_data = REF(\"TABLE\", lookup_source=\"${randomId}\")\\n\\n${code}`,\n mode: 2,\n data: { TABLE: converted },\n } as RegistryRequest);\n await py.runPythonCode(randomId);\n const resp: RegistryResponse = await py.getResponse(randomId);\n const typeName = resp.Python_typeName;\n if (typeName === \"error\") return resp.error;\n if (typeName === \"Base64Image\") return ``;\n return `Error: Returned value is not an image -- ${resp.result}`;\n } catch (err) {\n console.log(err);\n return String(err);\n }\n}\n","import React from \"react\";\nimport { Col } from \"../../components/Layout/Space\";\n\nconst Trace = ({ content }: { content: string }) => {\n /**\n * \n * @param codeResult - Full Message Example: \n * `Traceback (most recent call last):\n File \"/lib/python311.zip/_pyodide/_base.py\", line 571, in eval_code_async\n await CodeRunner(\n File \"/lib/python311.zip/_pyodide/_base.py\", line 394, in run_async\n coroutine = eval(self.code, globals, locals)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"\", line 30, in\n TypeError: 'NoneType' object is not subscriptable` \n * @param errorTypeStr - Example substring to find the trace: \"Error:\"\n * @returns trace string or false is no error\n */\n function extractErrorType(codeResult: string, errorTypeStr = \"Error:\"): string | false {\n console.log(\"Extracting error from code result\");\n if (codeResult.indexOf(\"/gi, \"\");\n if (trace.includes(\"'NoneType' object is not subscriptable\")) {\n trace = `${trace}. Does your data contain empty cells or extra data?`;\n }\n return trace;\n } else {\n return false;\n }\n } catch (e) {\n console.error(e);\n }\n }\n\n return (\n \n

An error occurred in the python script.

\n {extractErrorType(content)}\n \n );\n};\n\nexport default Trace;\n","import React, { useState, useEffect, Suspense } from \"react\";\nimport DOMPurify from \"dompurify\";\nimport { Spinner } from \"@fluentui/react-components\";\nimport { getFullAddressFromRangeSelection, getAliasFromRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport { writeToExecutionLocation, getPythonLocation } from \"../../../excel/grid-utils\";\nimport { PythonExecutionLocation } from \"../../../excel/types\";\nimport ActionButtons from \"./ActionButtons\";\nimport { buildChartPreview } from \"./viz-preview\";\nimport Trace from \"./Trace\";\nimport { useChart, useChartManager } from \"../../../taskpane/hooks/plots/useCentralViz\";\nimport { BaseDesign, BaseSetup } from \"../../../taskpane/hooks/plots/PlotTypes\";\nimport { buildPythonInExcelCode } from \"./MVCShared/CodeBuilder\";\n\nconst Preview = () => {\n const [previewLoading, setPreviewLoading] = useState();\n const [chartPreview, setChartPreview] = useState();\n const { plotType } = useChartManager();\n const { common, codeFragments, serializeContext } = useChart(plotType);\n\n if (!common.inputData) {\n return

Select input data in the setup tab to preview chart.

;\n }\n if (common.validationErrors?.size > 0) {\n return (\n <>\n {Array.from(common.validationErrors).map((error) => (\n

{error}

\n ))}\n \n );\n }\n\n const handleCreateClick = async () => {\n const addr = await getFullAddressFromRangeSelection(common.outputCell);\n if (common.typedCode) {\n await writeToExecutionLocation(addr, common.typedCode);\n } else {\n await writeToExecutionLocation(addr, await buildPythonInExcelCode(codeFragments));\n }\n await serializeContext();\n };\n\n const [trace, setTrace] = useState();\n useEffect(() => {\n (async () => {\n try {\n setPreviewLoading(true);\n\n const sourceAddr = await getFullAddressFromRangeSelection(common.inputData);\n if (!sourceAddr) return;\n const aliasAddr = await getAliasFromRangeSelection(common.inputData);\n\n let code: string = common.typedCode ?? (await buildPythonInExcelCode(codeFragments));\n\n const executionLocation = await getPythonLocation();\n if (executionLocation === PythonExecutionLocation.Azure) {\n const xlPatt = /xl\\(\"(.+?)\",\\s*headers=(True|False)\\)/;\n const matches = xlPatt.exec(code);\n if (matches) {\n if (matches[1] !== aliasAddr) {\n setTrace(\"Error: Unable to generate preview if input data source is manually changed in code editor\");\n return;\n }\n // Replace xl() with pd.DataFrame()\n const dataFrame = matches[2] === \"True\" ? \"DataFrame(_data[1:], columns=_data[0])\" : \"DataFrame(_data)\";\n code = code.replace(matches[0], dataFrame);\n }\n } else {\n const psPatt = /REF\\(\"(.+?)\"\\)/;\n const matches = psPatt.exec(code);\n if (matches) {\n if (matches[1] !== aliasAddr) {\n setTrace(\"Error: Unable to generate preview if input data source is manually changed in code editor\");\n return;\n }\n // Replace REF() with _data\n code = code.replace(matches[0], \"_data\");\n }\n }\n\n const previewCode = `plt.clf()\\n${code}`;\n const result = await buildChartPreview(previewCode, sourceAddr);\n if (result.indexOf(\"\n {previewLoading && (\n
\n Loading plot preview for selected data range...}\n labelPosition=\"after\"\n />\n
\n )}\n {trace && }\n {chartPreview && (\n
\n )}\n \n \n );\n};\n\nexport default Preview;\n","import React, { useEffect, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Tab, TabList } from \"@fluentui/react-components\";\nimport Code from \"./Code\";\nimport BaseDesign from \"./BaseDesign\";\nimport BaseSetup from \"./BaseSetup\";\nimport { preloadPyWorker } from \"./viz-preview\";\nimport Preview from \"./Preview\";\nimport { plotsLookup } from \"../../../data/plot-types\";\nimport { useChart, useChartManager } from \"../../hooks/plots/useCentralViz\";\nimport { VizTabType, BaseDesign as IBaseDesign, BaseSetup as IBaseSetup } from \"../../hooks/plots/PlotTypes\";\nimport { refreshRangeSelection } from \"xlcommon/src/excel/excel-grid-utils\";\nimport \"./Viz.scss\";\n\nfunction CoreViz() {\n const navigate = useNavigate();\n const { plotType, tab, setTab } = useChartManager();\n // `common` might be undefined here on auto-refresh\n const { common } = useChart(plotType);\n const [outputCellStr, setOutputCellStr] = useState(\"\");\n\n useEffect(() => {\n preloadPyWorker();\n\n // This should only happen on auto-refresh during development\n if (!plotType) navigate(\"/viz\");\n }, []);\n\n useEffect(() => {\n if (!common || !common.outputCell || !common.outputCell.identifier) return;\n\n (async () => {\n const outputCell = await refreshRangeSelection(common.outputCell);\n setOutputCellStr(outputCell.displayName);\n })();\n }, [common?.outputCell]);\n\n function buildTitle() {\n const chartType = plotsLookup[plotType]?.name || \"Unknown\";\n if (common?.outputCell?.identifier) {\n return `Edit ${chartType} Chart at ${outputCellStr}`;\n } else {\n return `Create New ${chartType} Chart`;\n }\n }\n\n return (\n
\n

{buildTitle()}

\n setTab(selectedTab.value as VizTabType)}>\n Setup\n Design\n Code\n Preview\n \n
\n {tab === \"setup\" && }\n {tab === \"design\" && }\n {tab === \"code\" && }\n {tab === \"preview\" && }\n
\n
\n );\n}\n\nexport default CoreViz;\n","import React from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { Button } from \"@fluentui/react-components\";\nimport { Col } from \"../components/Layout/Space\";\nimport { FEEDBACK_URL } from \"../components/FeedbackMenu\";\nimport styles from \"../styles.module.scss\";\n\nconst ErrorPage: React.FC = () => {\n const navigate = useNavigate();\n return (\n \n \n

Something Went Wrong

\n

Please restart the add-in and try again.

\n {\n navigate(\"/\");\n // Attempt reload from home\n window.location.reload();\n }}\n >\n Restart\n \n window.open(FEEDBACK_URL, \"_blank\")?.focus()}\n >\n Send Feedback\n \n \n
\n );\n};\n\nexport default ErrorPage;\n","// @ts-nocheck\nimport Env from \"xlcommon/src/environ\";\n\n(window.heap = window.heap || []),\n (heap.load = function (e, t) {\n (window.heap.appid = e), (window.heap.config = t = t || {});\n var r = document.createElement(\"script\");\n (r.type = \"text/javascript\"), (r.async = !0), (r.src = \"https://cdn.heapanalytics.com/js/heap-\" + e + \".js\");\n var a = document.getElementsByTagName(\"script\")[0];\n a.parentNode.insertBefore(r, a);\n for (\n var n = function (e) {\n return function () {\n heap.push([e].concat(Array.prototype.slice.call(arguments, 0)));\n };\n },\n p = [\n \"addEventProperties\",\n \"addUserProperties\",\n \"clearEventProperties\",\n \"identify\",\n \"resetIdentity\",\n \"removeEventProperty\",\n \"setEventProperties\",\n \"track\",\n \"unsetEventProperty\",\n ],\n o = 0;\n o < p.length;\n o++\n )\n heap[p[o]] = n(p[o]);\n });\n\nheap.load(Env.HEAP_ID);\n","import * as Sentry from \"@sentry/react\";\nimport Env from \"xlcommon/src/environ\";\n\n// Only use in production due to cost limitations\nif (process.env.NODE_ENV === \"production\") {\n Sentry.init({\n environment: Env.BASE_URL,\n /*\n * https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#dsn-utilization\n \"DSNs are safe to keep public because they only allow submission of new events. While there is a risk of abusing a DSN, \n where any user can send events to your organization with any information they want, this is a rare occurrence. \n Sentry provides controls to block IPs and similar concerns. \n You can also rotate (and revoke) DSNs by navigating to [Project] > Settings > Client Keys (DSN).\"\"\n */\n dsn: \"https://82adc2a6c035edda262cfa5d2b2d02ac@o4506633492365312.ingest.us.sentry.io/4506871910236160\",\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration({\n maskAllText: false,\n blockAllMedia: false,\n }),\n ],\n // Performance Monitoring\n // This is set low due to cost limitations\n tracesSampleRate: 0.02,\n // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled\n tracePropagationTargets: [\"localhost\", Env.BASE_URL],\n // Session Replay\n replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%.\n replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.\n });\n}\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./index.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./index.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/* eslint-disable prettier/prettier */\nimport React from \"react\";\nimport { ErrorBoundary } from \"@sentry/react\";\nimport ReactDOM from \"react-dom/client\";\nimport { BrowserRouter, Routes, Route, Navigate } from \"react-router-dom\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\n// import { ReactQueryDevtools } from \"@tanstack/react-query-devtools\";\nimport { FluentProvider } from \"@fluentui/react-components\";\nimport { lightTheme } from \"./theme\";\nimport {\n AIAssistant,\n ConnectToCloud,\n ConnectToWorkbook,\n DataConnections,\n Edublocks,\n NewProject,\n Profile,\n Start,\n Visualizations,\n CreateVisualization,\n Snippets,\n ExportSnippet,\n Settings,\n} from \"./pages\";\nimport App from \"./components/App\";\nimport { FeedbackMenu } from \"./components/FeedbackMenu\";\nimport CoreViz from \"./pages/Visualization/CoreViz\";\nimport FilterPage from \"./pages/Projects/Filter\";\nimport ErrorPage from \"./pages/Error\";\nimport \"../analytics/heap\";\nimport \"../analytics/sentry\";\nimport { DataFiltersProvider } from \"./hooks/useDataFilters\";\nimport { PythonContextProvider } from \"./hooks/usePython\";\nimport \"./index.scss\";\nimport { BlocksProvider } from \"./hooks/useBlocks\";\nimport ChartProvider from \"./hooks/plots/useCentralViz\";\n\nconst STALE_TIME_MINUTES = 1;\nconst STALE_TIME_MS = STALE_TIME_MINUTES * 60 * 1000;\n\n// useQueryClient to reference instance\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: true, // Refetch on window focus if the data is stale\n staleTime: STALE_TIME_MS,\n retry: 1,\n // refetchOnMount: false,\n },\n },\n});\n\n/* Render application after Office initializes */\nOffice.onReady(() => {\n // Create react DOM root\n const root = ReactDOM.createRoot(document.getElementById(\"root\") as HTMLElement);\n\n // Abort everything if Excel is not defined\n try {\n Excel;\n } catch (err) {\n root.render(\"This application is designed to run as an Excel add-in, not a standalone webpage\");\n return;\n }\n\n root.render(\n \n \n \n \n \n \n \n {/* This basename allows app to render with filename in url to work with Excel add-in template */}\n \n \n \n \n \n \n \n \n {/* Note: Uncomment for react-query dev tools -- Only in NODE_ENV == development */}\n {/* */}\n \n \n );\n});\n\n/**\n * This Router will store sub-routes to automatically navigate to when a tab is revisited\n * Note: This only applies to visualizations\n * @returns Routes\n */\nfunction CustomRouter() {\n return (\n }>\n \n }>\n } />\n {/* \n /data/ (browse connections)\n /data/import (download to workbook)\n /data/export (save to cloud)\n /data/new-project\n */}\n } />\n } />\n } />\n } />\n } />\n } />\n {/* Code Snippets */}\n {/* } /> */}\n } />\n } />\n } />\n } />\n {/* Visualizations */}\n } />\n } />\n } />\n {/* Example: \n /ai/chat\n /ai/history\n */}\n } />\n } />\n } />\n } />\n \n \n \n \n );\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 926;","__webpack_require__.p = \"/static/\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t926: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkxltb\"] = self[\"webpackChunkxltb\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [96], function() { return __webpack_require__(8015); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","___CSS_LOADER_EXPORT___","push","module","id","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_URL_IMPORT_2___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","locals","anaconda","lightTheme","createLightTheme","fontFamilyBase","colorBrandBackground","colorBrandForeground1","colorBrandForeground2","colorNeutralBackground1Hover","colorNeutralForeground2BrandSelected","colorNeutralForeground1","colorNeutralForeground2","colorNeutralForegroundOnBrand","colorNeutralStroke1","colorCompoundBrandForeground1","colorCompoundBrandForeground1Hover","colorCompoundBrandStroke","colorCompoundBrandStrokeHover","createDarkTheme","codeDarkTheme","theme","settings","background","foreground","caret","selection","selectionMatch","lineHighlight","gutterBackground","gutterForeground","gutterActiveForeground","fontFamily","styles","tag","keyword","bool","fontWeight","color","controlKeyword","moduleKeyword","name","variableName","className","function","definition","number","operator","punctuation","separator","escape","special","string","squareBracket","paren","brace","comment","fontStyle","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","Breadcrumb","Icon","text","style","onClick","dataTestId","Text","fontSize","Body1Stronger","Col","children","gap","alignItems","justifyContent","height","flexWrap","ActionButtonRow","backgroundColor","padding","PREFIX","has","sessionStorage","read","getItem","write","value","setItem","removeItem","ASSISTANT_CLIENT_SOURCE","this","ASSISTANT_ROUTE_PATH_PREFIX","BASE_URL","CLOUD_URL","HEAP_ID","parseInt","CODE_NAMESPACE_SUFFIX","UNLOCKED","signedIn","state","pyscriptEnabled","SignInDialog","title","content","onContinue","defaultOpen","initializing","open","setIsOpen","useState","Dialog","modalType","onOpenChange","_","data","DialogTrigger","disableButtonEnhancement","DialogSurface","DialogBody","DialogTitle","DialogContent","DialogActions","Button","size","appearance","async","document","getElementsByClassName","parentElement","zIndex","onContinueClick","disabled","Spinner","Divider","marginTop","textAlign","href","target","rel","ListItem","selected","disabledText","iconColor","relationship","withArrow","showDelay","marginBottom","NavigationList","items","testID","navigate","map","item","key","to","path","startsWith","window","undefined","Sparkles","fill","primary","width","viewBox","xmlns","d","NavMenuItems","props","priority","gray500","newSection","NavBarItems","StartMenuItems","DEBUG","callbacks","isLoggedIn","pyscriptSettings","channel","BroadcastChannel","onmessage","ev","console","log","action","broadcastLogin","length","pop","cb","location","JSON","stringify","onmessageerror","err","error","postMessage","getGlobal","self","g","EXCEL_BASE","MILLISECONDS_PER_DAY","convertEpochToExcel","epochMilliseconds","convertExcelToDate","excelTimestamp","Error","Date","convertExcelToEpoch","convertExcelToISO","isoString","toISOString","getMilliseconds","slice","isoNormalize","determineValueType","fmt","fallback","indexOf","isTime","includes","isDate","VALID_INTERPRETERS","endOfSheetRef","pattXLRef","convertUserCodeToGridCode","interpreter","code","mode","extra","newCode","refs","match","matchAll","m","address","replaceAll","start","indices","addressStart","addressEnd","end","parseCodeForXLRefs","refAddrs","idx","forEach","ref","refIdx","mergedCode","join","replace","chunks","allChunks","i","r","refAddr","x","pattCat255","pattGridCode","NONE_NUMBER_FORMAT","RangeType","WorkbookStructureElements","isBinding","rs","rangeType","CellBinding","RangeBinding","SpillBinding","runExcelSafeContext","batch","bindId","retryCount","Excel","run","delayForCellEdit","context","workbook","bindings","load","sync","getItemOrNullObject","removeBindingById","b","Promise","resolve","setTimeout","reject","Office","releaseByIdAsync","result","status","AsyncResultStatus","Succeeded","displayRangeSelection","includeBrackets","brackets","Sheet","Table","displayName","identifier","getBindingAddress","e","rng","getRange","split","findByIdOrDisplayName","func","worksheets","tables","obj","refreshRangeSelection","t","s","splitFullAddress","fullAddress","sheetName","addr","readFromRange","numRows","numColumns","sheet","rowCount","Math","min","colCount","columnCount","getRangeByIndexes","rowIndex","columnIndex","values","getValueTypesOfRange","colLimit","rng2","valuesAsJson","formats","numberFormat","categories","numberFormatCategories","valueTypes","updateValueType","valueAsJson","valueType","category","format","type","preview","convertDataToTyped","convertAllToString","row","rowIdx","colIdx","val","basicValue","String","toString","writeToCell","python","asPyObject","formulas","wrapText","overwriteSheet","getUsedRange","clear","newRange","col","numfmt","autoFilter","apply","message","getAliasFromRangeSelection","getFullAddressFromRangeSelection","Named","getBoundingRect","range","names","readWorkbookStructure","wbStruct","sheets","sheetsWithoutTables","n","count","letters","Array","from","letterMap","Map","addrPatt","addrToIndexes","colStr","rowStr","j","numChars","pow","get","colToIndex","getSplitIdAddrFromBinding","bindingId","deleteId","binding","worksheet","delete","sheetId","_pythonEnabled","isPythonEnabled","platform","PlatformType","PC","FormulaLanguage","parseFormula","formula","language","interpEnd","interp","extractEmbeddedCodeHeaders","pyCode","addresses","trimStart","splice","extras","trim","convertGridCodeToUserCode","excel","testUtilResetWorkbook","sheet1Rng","testUtilGetFullAddressFromRangeSelection","testUtilShapeOfRange","testUtilSplitFullAddress","testUtilOverwriteSheet","testUtilReadFromRange","testUtilCreateNewSheet","add","PythonContext","createContext","hasPython","usePython","useContext","PythonContextProvider","setHasPython","useEffect","pythonEnabled","Provider","RECORD_URL","NOTE_URL","snakeEyesRecord","event","eventParams","snakeEyesRequest","url","needsAuth","body","service_id","response","method","headers","authenticatedFetch","fetch","ok","statusText","json","isRefreshing","resource","retry","opts","resp","sessionCheckResponse","refreshResponse","dialogRef","isAttemptingSilentLogin","login","sessionInit","promptUserLogin","vResp","snakeEyesLogin","snakeEyesNote","automatic","app","refreshed","account","userUrl","res","addSubscriptionMetadata","getAccount","anaorg","user","email","tier","metadata","is_pro_tier","is_starter_tier","cloud_user_domain","callback","loginUrl","dialog","ui","displayDialogAsync","promptBeforeOpen","asyncResult","addEventHandler","EventType","DialogMessageReceived","arg","close","parse","Failed","HAS_ACTIVE_DIALOG_ERROR","PRO_TIER_SUBSCRIPTIONS","isStarterTier","isProTier","subscription","subscriptions","productCodes","sub","product_code","some","getOrganizationUsers","orgName","orgUrl","setLoggedIn","isAutoLogIn","setIsAutoLogIn","triggerSignIn","localStorage","accepted","version","paddingTop","heading","requiresPython","Mac","marginLeft","ValueTracker","initialValue","isUpdated","constructor","update","newVal","reset","areDependenciesSatisfied","dependencies","dep","isSatisfied","reduce","accum","curVal","Orientation","Horizontal","Vertical","IntervalOptions","IntervalValueMap","Estimators","Mean","Median","Max","Min","Sum","RegEstimators","Axes","Linear","Log","Markers","Point","Circle","Square","Plus","Diamond","TriangleUp","TriangleDown","Star","X","LineStyle","Solid","Dashed","RegFunction","Logistic","Lowess","Robust","Logx","BinStats","Count","Frequency","Probability","Percent","Density","Elements","Bars","Step","Poly","LegendPosition","Best","Right","Top","PlotLibrary","PlotType","plotsList","plotType","bar","library","seaborn","imgIcon","tooltipInfo","img","description","box","distribution","line","pairwise","regression","scatter","violin","plotsLookup","Object","fromEntries","p","PyScriptOutput","PyScriptLinkage","PyScriptInterpreter","SupportedDataTableActions","PackageConflictType","ReturnFormat","PackageSource","PYTHON_SETTINGS_DEFINITION","PythonExecutionLocation","writeToExecutionLocation","executionLocation","getPythonLocation","Azure","Local","output","linkage","combineMode","Isolated","worksheetIdFromSheetName","worksheetId","userCode","writePyScriptCode","savedSettings","isNullObject","SeabornChartTypeMap","PlotLibraryMap","buildReactFromAttrs","attrs","labelWidth","attr","index","visibleDependencies","getReact","buildCodeFromAttrs","getCode","enabledDependencies","buildCode","common","chartType","extraImports","source","inputData","plotAttrs","plotCalls","hasHeaders","buildPythonInExcelCode","imp","dfAlias","charAt","toUpperCase","handleHeaders","pa","pc","buildSeabornPythonInExcelCode","VIZDEF_PREFIX","writeVizDefSetting","vizdef","serialized","deleteVizDefSetting","savedVizDef","PlotService","listVizDefs","vizinfo","temp","setting","vizdefs","rawFormula","isoTimestamp","vdi","sheetLookup","sort","a","aRow","aCol","bRow","bCol","sortVizDefIds","getVizDef","saveVizDef","chart","outputCell","setup","design","writtenFormula","typedCode","codeFragments","kind","entries","areBindingAddressesSame","binding1Id","binding2Id","range1","range2","cloneVizDef","newBindId","currentBindId","deleteVizDef","ClearApplyTo","contents","clearBindingDataFromExcel","barSetup","orientation","xAxis","yAxis","colorBy","xAxisScale","yAxisScale","primaryInterval","secondInterval","bootstrapSamples","seed","estimator","errorBar","isCollapsed","barDesign","plotTitle","xAxisLabel","yAxisLabel","seabornDefault","fillStyle","palette","colorOrder","errorBarWidth","errorBarCapWidth","errorColor","dodge","legendPosition","yticks","xticks","majorHorizontal","majorVertical","minorHorizontal","minorVertical","leftSpine","bottomSpine","topSpine","rightSpine","borderCollapsed","gridlinesCollapsed","alpha","boxSetup","whiskersRange","boxDesign","marker","saturation","lineWidth","markerSize","countSetup","countDesign","lineSetup","styleMarkersBy","styleLinesBy","sizeByLines","lineDesign","errorStyle","lineStyle","errorBarColor","isDesignCollapsed","regplotSetup","newXAxisScale","newYAxisScale","interval","xPartial","yPartial","xJitter","yJitter","order","truncate","regplotDesign","stroke","lineLabel","scatterSetup","sizeBy","styleBy","scatterDesign","violinSetup","bandwidth","custom","cut","gridSize","densityNorm","violinDesign","violinInner","pairwiseSetup","xVars","yVars","vars","dropna","diagKind","pairwiseDesign","markers","aspect","bin","element","stat","displotSetup","shareX","shareY","displotDesign","colWrap","xlim","ylim","facetPalette","initialChart","handleDeselectionInUpdates","updates","initial","resetValue","keys","rebuildFromUpdates","base","k","v","chartReducer","chartObj","acc","ChartContext","useChartContext","useChart","dispatch","setDefModified","stateObject","updateSetup","updateDesign","updateCommon","setCodeFragments","serializeContext","useChartManager","tab","defModified","setPlotType","setTab","resetContext","hydrateContext","vizDef","useReducer","PROJECTS_URL","API_VERSION_HEADER","FileTooLargeError","ProjectsService","createProject","project","projectWithMetadata","tags","user_client","hidden","invalidateQueries","queryKey","getProjectById","projectId","getMyProjects","getProjectFiles","getFileMetadata","fileName","updateProjectMetadata","refetchType","exact","uploadFile","fileOptions","blob","Blob","redirectResponse","encodeURIComponent","redirectResult","signed_url","file_version_id","last_modified","uploadCSV","csvString","uploadSnippet","code_snippet","downloadFileByName","deleteProjectById","deleteFileByName","getProjectPermissions","getMyProjectAccessLevels","modifyProjectPermissions","permissions","ConfirmationDialog","navTo","navigationOptions","deleteCallback","setOpen","isLoading","setIsLoading","setError","confirmCallback","PopoverMenuButton","actions","buttonStyle","isPopoverOpen","setIsPopoverOpen","openConfirmation","setOpenConfirmation","actionRef","useRef","onClickAction","setDisabled","Popover","positioning","closeOnScroll","hasAccess","access","share","modify","checkHasAccess","PopoverTrigger","marginRight","icon","gray400","iconPosition","PopoverSurface","actionName","current","handleActionClick","COLUMNS","columnKey","label","vizDefinitions","setVizDefinitions","loadVizDefinitions","defs","movePromptCallback","asyncContext","currRange","moveTo","baseText","Field","validationMessage","borderBottom","gray200","column","gray800","border","overflow","textOverflow","whiteSpace","cursor","def","hydrateSetup","verticalAlign","src","getCellContent","hydrateSetupNoOutput","promptText","addFromPromptAsync","BindingType","Matrix","moveItem","deleteItem","hostStyles","root","display","TooltipContent","info","InfoToolTip","tooltipId","useId","isDialogVisible","setIsDialogVisible","TooltipHost","delay","zero","directionalHint","DirectionalHint","bottomCenter","tooltipProps","calloutProps","beak","beakCurtain","calloutMain","onRenderContent","IconButton","iconProps","iconName","Layer","Overlay","FocusTrapZone","Popup","onDismiss","maxWidth","alt","PlotCard","imageSrc","onCardClick","dataTestID","margin","Card","focusMode","boxShadow","borderRadius","CardPreview","objectFit","position","CardHeader","flexShrink","flex","header","weight","stopPropagation","flexGrow","plot","handlePlotClick","BackButton","shouldShowBackButton","previousChatName","gotoPreviousChat","ChevronLeft","ChatMessages","addCodeToContainer","scrollFn","messages","chatContext","inProgressResponse","inProgressType","activeChatSession","retryError","selectedText","deleteMessagesAfterId","submitFeedback","resetActiveChat","activeChat","inProgress","session","notebookState","deleteMessagesStartingWith","initialMessage","handleFeedback","messageId","sentiment","role","isInitialMessage","exportMessage","determineFirstMessageText","runCode","assistantMessage","handleExportMessage","handleDeleteMessageAfterId","errorMessage","showLogoutButton","resetChat","suffix","TOKEN_LIMIT","host","assistantSdk","getAssistantSdk","ChatPanel","tracker","getActiveCodeCell","activateTableChooser","activeChatKey","messageEndRef","activeContainer","selectChatStarter","makeChatRequest","enableDataCollection","suggestionDataFrame","dataFrames","updateSuggestions","setSuggestionsDataframe","suggestionState","dataframe","dataframes","chatStarters","homeScreen","selectedChatStarter","throttledScroll","useCallback","throttle","scrollIntoView","behavior","chatStarter","contextSelectionRequired","request","variables","instruction","activeNotebook","activeCell","logout","float","tokenLimit","ErrorScreen","resetErrorBoundary","SettingsWrapper","setEnableDataCollection","Boolean","addCodeToNotebook","setAddCodeToNotebook","placeholder","onChange","transparent","autoComplete","fuzzySearch","search","emptyMessage","TableChooser","onSelection","safeForWriting","setWbStruct","getWbStruct","selectionChanged","newSelection","promptCallback","tblId","fullyContained","getTables","tbl","tblRange","topLeft","getCell","isTableSelection","cell","anchor","getSpillParentOrNullObject","spill","getSpillingToRangeOrNullObject","isSpillSelection","tableName","selectedValue","rangeName","PROJECT_DEFINITIONS","VERSION","Direction","getTypedContentFromSelection","sourceSelection","rowLimit","TableRangeChooserPage","rangeState","setRangeState","closeTableChooser","head_str","contextType","range_selection","testUtilClearProjectDefinitions","savedSources","testUtilDeleteProject","projects","testUtilGetListOfProjects","CLOUD_API_URL","STALE_TIME_MS","STALE_TIME_MINUTES","useAccount","queryFn","staleTime","enabled","select","getChatStarters","starters","DELETED_CHAT_KEYS","assistantStore","setAssistantStore","envType","accessToken","expiresAt","setDate","getDate","setAccessToken","getTime","initAssistantSdk","clientVersion","apiUrl","environmentType","routePathPrefix","assistantStoreLoaded","getServerUrl","getNucleusAccount","getAccountMaxTokens","isLocalDev","syncDiskStateChained","unbindSyncDiskStateChained","deletedChatKeys","clientContextType","getState","updateAccount","setPath","initializeAssistant","initAiAssistant","FallbackComponent","InnerPanel","olderThan13","setOlderThan13","setSelection","tableChooserContext","setTableChooserContext","acceptTerms","toggleHistoryOpen","resetToHomeScreen","toggleSettings","chats","setActiveChat","deleteChat","terms","toggleMenuOpen","stateCode","alias","targetAddress","handleNavigation","page","rangeSelection","disableMenu","chatsHistoryOpen","pathname","showSettings","settingsOpen","toggleChatsHistory","newChatClicked","chat","test","historyChats","closeHistory","accept","fetchTermsAndConditionsVersion","BlocksContext","blocks","writeAddress","setBlocks","setAddress","BlocksProvider","bindingAutoDelete","openPrompt","opacity","useBlocks","loading","setLoading","container","contentWindow","addEventListener","syncExcel","removeEventListener","addressRef","findExcelTables","heap","track","block","block_type","then","wbstruct","TablesFound","TabList","defaultSelectedValue","onTabSelect","selectedTab","switchView","view","Tab","hideDelay","frameBorder","onLoad","PrivacyPolicy","bottom","InitialCircle","ProductCode","ProductCodeToName","FreeSubscription","StarterSubscription","ProfessionalSubscription","CommercialSubscription","BusinessSubscription","SecuritySubscription","AppVersion","orgTiers","setOrgTiers","myTier","setMyTier","queryClient","handleLogout","removeQueries","orgs","getOrganizations","orgSubs","num_orgs","mySub","find","org_id","org","subs","filter","organizationName","Suspense","first_name","last_name","company","industry","country","orgTier","handleLogoutWithNav","useProjects","projectsQuery","useProjectFiles","filesQuery","FilterContext","dateModifiedFrom","dateModifiedTo","projectFilter","fileFilter","setDateFrom","setDateTo","setProjectFilter","setFileFilter","useDataFilters","DataFiltersProvider","DataConnectors","CodeSnippets","PyScriptEditor","EditCodeWarning","UserSettings","splitName","defaultValue","cat","sett","settingName","UserSettingDefaults","LandingSeen","DarkMode","Seen","projCompare","owner","selectMyProjects","allProjects","myAccount","selectUserProjects","selectOrgProjects","tagToAppName","tagToTitle","tagToRoutePrefix","tagToUserSettings","selectedDate","onSelectDate","Label","paddingBottom","DatePicker","formatDate","date","toLocaleDateString","showMonthPickerAsOverlay","showGoToToday","disableAutoFocus","selectedFrom","selectedTo","setSelectedFrom","setSelectedTo","filterFilesByDateModified","files","file","lastModified","filterFileName","normalizedFilter","pattern","RegExp","Input","minWidth","maxHeight","ProjectFolder","Item","refreshItems","startExpanded","highlightProjectId","folderRef","itemsLoading","filteredFiles","setFilteredFiles","topY","getBoundingClientRect","top","scrollY","innerHeight","inline","fltFiles","applyFileFilters","Accordion","collapsible","defaultOpenItems","AccordionItem","A","AccordionHeader","expandIconPosition","borderTopLeftRadius","borderBottomLeftRadius","borderLeft","right","deleteProject","AccordionPanel","iconMap","mine","ProjectGroup","projectsLoading","CounterBadge","dot","showZero","ProjectGroups","isLoadingAccount","Conditional","condition","ValueCircle","FilterButton","setItemsLookup","filterItems","displayDate","filterDisplay","matches","totalCount","secondary","borderColor","TagGroup","_e","filt","Tag","dismissible","useAddSettingToDatabase","usersetting","mutationKey","mutationFn","settingValue","setting_name","onSuccess","useUserSetting","userSettingsQuery","testUtilGetUserSettings","testUtilGetUserSetting","testUtilDelUserSetting","testUtilSetUserSetting","hideLanding","setHideLanding","openDialog","setOpenDialog","mutation","I","mutate","Checkbox","checked","focus","allowNewProject","additionalProjectFilter","landingSeen","refetch","fetchProjects","setFilteredProjects","filteredProjects","filesMap","setFilesMap","filesMapLoading","setFilesMapLoading","needsFilesMap","setNeedsFilesMap","promises","filesObject","all","getFiles","fltProj","fileMap","fltProjects","filterProject","finalProjects","applyProjectFilters","visible","loadProjectDefinitions","projectDefinitions","fileDefinition","updateProjectDefinitions","newDefinition","cloudProjectDefs","projectRes","saveProjectDefinitions","CustomDialogWithTrigger","CustomDialog","buttonText","dismissText","disableContinue","onCancel","onCancelClick","PrimitivePreviewTable","columns","htmlFor","borderTop","wordWrap","downloadFile","projectFileDefinition","overwrite","previewRowCount","convert","db","prepDatabase","fileResponse","toLowerCase","uniqueName","globFiles","registerFileText","fileId","fileSize","lastFile","dropFile","cleanupDuckDBFilesystem","query","fullFileCountQuery","limit","replacement","toLocaleLowerCase","conn","connect","toArray","numCols","schema","typesFound","typeCast","fields","f","typeId","unit","DAY","MILLISECOND","Timestamp","Time","NANOSECOND","Number","MICROSECOND","SECOND","Int","Float","Utf8","Bool","caster","table","headRange","getHeaderRowRange","bodyRange","getDataBodyRange","usedRng","getUsedRangeOrNullObject","resize","overwriteTable","putContentInSpreadsheet","DUCKDB_MANUAL_BUNDLES","mvp","mainModule","mainWorker","eh","_db","_dbLoadingFlag","duckBundle","duckDbWorker","Worker","duckDbLogger","_dbTemp","instantiate","pthreadWorker","BigInt","prototype","ImportResolution","settingsLink","MessageBarBody","onChecked","isDisabled","left","gray600","getButtonText","resolution","Download","NewVersion","ReDownload","OverwriteWorkbook","selectedImportFileName","editQuery","destSelection","editDestSelection","sqlQuery","setSQLQuery","sqlQueryDebounced","setSqlQueryDebounced","debounceTimer","dataPlacement","setDataPlacement","cardViewCell","setCardViewCell","importAsLocalObject","setImportAsLocalObject","setExecutionLocation","execLoc","canSkipOverwriteWarning","setCanSkip","skippable","setPreview","setRowCount","setColumnCount","previewError","setPreviewError","buildNewDataDefinition","contentPreview","hint","capitalized","substring","isImporting","setIsImporting","importError","setImportError","placementErrorHint","setPlacementErrorHint","sqlErrorHint","setSqlErrorHint","direction","lastDownloaded","importToGrid","Upload","lastUploaded","fromPath","debounceQueryChange","clearTimeout","cardView","CellValueType","entity","properties","layouts","compact","EntityCompactLayoutIcons","cloud","card","sections","layout","provider","logoSourceAddress","logoTargetAddress","writePyScriptCloudDataCard","ProjectChooser","disabledPlaceholder","existingProjects","accountLoading","validationMsg","setValidationMsg","validationState","setValidationState","searchKeyFromProject","proj","myProjects","setMyProjects","userProjects","setUserProjects","orgProjects","setOrgProjects","checkProjectWriteable","own","justifySelf","matchingProjects","newProject","Mode","ensureFileSuffix","filename","endsWith","capitalize","word","toWindow","initialFileDefinition","ExportResolution","ConflictChoice","selectedRange","initialSelectedRange","initialProject","initialFileName","setProject","isWriteable","setWriteable","setFileDefinition","isUploading","setIsUploading","isFetching","setIsFetching","fileLimitError","setFileLimitError","refetchProjects","upload","needsQuoting","csvFromSelection","uploadFileFromSelection","NewFilename","saveUploadDefinition","setErrorMessage","projectFiles","Set","newName","computeNameOfCopy","savedFileDef","setPreviewContent","Edit","New","newFileDefinition","ReUpload","OverwriteCloudVersion","connection","ConnectionKind","UploadConflict","d1","t1","d2","t2","italic","UnknownUpload","UnknownDownload","getMessage","OverwriteCloud","ReuploadToCloud","UploadNewFilename","VALID_FILE_SUFFIX","Connector","ConnectorItemCurry","baseProps","definitions","onlyConnections","conflictOpen","setConflictOpen","connectionKind","Unlinked","setConnection","getConnection","DownloadNewVersion","DownloadUpToDate","getConnectionKind","fileSuffix","choice","getTooltip","notificationErrorBg","getStatusIcon","projId","ConnectorItem","CreateYourFirstConnection","as","align","activeTab","setActiveTab","projectDefs","setDefs","refreshProjectDefinitions","onDeleted","onNameChanged","registerExcelWorkbookListeners","remove","unRegisterExcelWorkbookListeners","RoleSelector","onRoleSelection","onRemove","Dropdown","onOptionSelect","optionValue","Option","textDecoration","setTitle","setDescription","isDuplicate","setIsDuplicate","organizations","loadingOrganizations","isFetched","orgsFetched","isSuccess","fetchOrgsSuccess","usersError","setUsersError","usersInfo","setUserInfoForRoles","users","organizationNameList","userIdToMaxRole","userObjects","organization","userObj","getAllOrgUsers","usersMap","relation","loadingAccess","setLoadingAccess","permsRes","permsMap","invites","permission","setGeneralAccess","setUserRoles","setInvites","userRoles","userId","setDuplicateMessage","savedId","setSavedId","sendModifyPermissionsRequest","userRole","modifiedPermissions","generalAccess","orgUsers","setOrgUsers","filtered_count","total_count","userInvitation","setUserInvitation","duplicateInviteMessage","removeRole","newUserRoles","selectedOrg","setSelectedOrganization","maxLength","Textarea","T","option","InfoLabel","onSetSelectedOrganization","firstAndLastName","userInvite","hasDuplicates","checkDuplicates","err_response","onSave","editorSetup","allowMultipleSelections","lineNumbers","indentOnInput","dropCursor","drawSelection","autocompletion","history","highlightActiveLine","defaultKeymap","completionKeymap","lintKeymap","bracketMatching","closeBrackets","foldGutter","tabSize","SnippetViewer","onDelete","checkHasModifyAccess","editable","basicSetup","extensions","openConfirmationIfAccess","openEditor","CopyToClipboard","LANGUAGE_SUFFIXES","expanded","setExpanded","setCode","isDownloadingFile","setIsDownloadingFile","cardRef","fileContent","deleteError","setDeleteError","params","initialCode","setSuffix","setLanguage","setFileName","snippet","setCodeSnippet","updateLanguage","pieces","initialSuffix","getFormulaFromGrid","overflowY","optionText","getFormulasFromGrid","define","mathematica","uploadName","RadioGroup","newLocation","savePythonSettings","updateExecutionLocation","Radio","paths","tooltipContent","CollapsedNavMenu","activeClass","setActiveClass","Menu","MenuTrigger","MenuPopover","MenuList","itemClasses","MenuDivider","WithTooltip","MenuItem","onMouseEnter","onMouseLeave","Toolbar","ToolbarGroup","tabClasses","ALLOWED_PATHS","FEEDBACK_URL","triggerButtonStyles","buttonRef","positioningRef","setTarget","paddingRight","onPrimaryClick","pendingWrite","setPendingWrite","validationErrors","editorStyles","outline","LockedLabel","WarningLabel","warningSeen","warningDialogOpen","setWarningDialogOpen","cm","uneditedCode","setUneditedCode","customKeyBindings","preventDefault","readOnly","editor","highest","of","dependencyEqualsValue","object","valuesAreEqual","component","isArray","every","dependencyNotEqualsValue","excludedValue","dependencyNotOrEqualsValue","objectA","objectB","expectedValue","valueA","valueB","dependencyInValues","allowedValues","fetchHeaders","dataRange","updatedHeaders","CustomDropdown","groupedOptions","multiselect","selectedOptions","listOptions","keyPrefix","getText","selectedValues","formatSelectedValues","minHeight","autoSize","strategy","fallbackPositions","listbox","OptionGroup","optGroup","DesignInputs","onInput","CollapsibleSection","toggleCollapse","tooltip","ColorBlock","PaletteOptions","colors","paletteOptions","PaletteDropdown","EditableSpinner","max","step","units","precision","formatValue","internalValue","setInternalValue","increment","newValue","parseFloat","isNaN","precise","toFixed","decrement","parsedValue","onKeyDown","onBlur","roundedValue","round","roundToNearestStep","spinnerArgs","classNames","wrapper","colorBox","transition","colorPickerStyles","panel","colorRectangle","defaultColor","initialColor","getColorFromString","setColor","collapsed","setCollapsed","updateColor","colorObj","str","ColorPicker","updatedColor","hex","alphaType","showPreview","strings","hueAriaLabel","DividerAttr","HeadingAttr","args","headingLabel","DropdownAttr","codeRequiresInteraction","selectedOptons","selections","codeKey","codeValue","codeValueMap","callKey","MultiSelectDropdownAttr","AxisDropdownAttr","LabelAttr","posKey","DataRangeAttr","onChangeSelection","CollapsibleAttr","toggle","paletteValueMap","Accent","Blues","BrBG","Blues_d","Tab10","PaletteAttr","paletteValue","CheckBoxAttr","sval","SpinnerAttr","ColorPickerAttr","LegendAttr","Outside","Inside","ErrorKws","onValueChange","spinnerValue","error_kws","spinnerReqiuiresInteraction","colorRequiresInteraction","GridlinesAttr","multiChart","gridlines","axis","gridlinesValue","lines","gridlineUpdates","gridline","isVisible","gridCode","generateGridlineUpdate","minorGridlinesSelected","MultiChartBorders","spines","spineUpdates","spine","SingleChartBorders","CountContext","countChart","baseAttrs","designAttrs","orientationDropdown","prevX","prevY","prevXAxisLabel","prevYAxisLabel","SaturationAttr","Legend","currentTarget","hexColor","BarContext","barChart","secondaryInterval","Infinity","colorValue","BoxContext","boxPlot","ColorBy","ScatterContext","scatterPlot","MarkerAttr","LineContext","linePlot","errorBarThickness","RegressionContext","errors","regressionPlot","regFunction","lineWidthAndStyle","dropdownVal","dropdownValue","styleLabel","onChangeStyle","checkValueAndUpdate","propName","lineKws","LineKwargs","legend","RegressionErrorBar","suffixVal","decimalVal","decimalValue","suffixLabel","suffixStep","decimalLabel","onDecimalChange","decimalStep","anyUpdated","regressionErrorBar","ViolinContext","ViolinChart","BandwidthAttr","Area","Width","Box","Quartile","Stick","DiagonolKws","bins","attributes","diag_kws","PlotStyle","PairPlotContext","PairPlotChart","markerCodes","paletteAttr","variablesAttr","colAttr","rowAttr","Scatter","Histogram","KDE","Regression","Auto","Hist","Kde","Facet","sharexVal","shareyVal","onChangeSharex","onChangeSharey","shareXVal","shareYVal","sxval","syval","DisplotContext","DisplotChart","ECDF","FormComponentMap","SelectedFormComponent","RuntimeStatus","NOT_STARTED","INITIALIZING","LOADING_PYODIDE_PACKAGES","LOADING_MICROPIP_PACKAGES","LOADING_PYSCRIPT_APPS","RUNNING_INIT_CODE","RUNNING","ERROR","getPyWorker","setRuntimeStatusFn","customInit","worker","loadingFlag","PyWorker","config","rawWorker","pyodideVersion","sync_main_only","terminate","py","loadPackages","pyodidePackages","pyscriptApps","loadPyScriptApps","micropipPackages","micropipInstall","initialize","_runInit","initCode","errorKind","workerInfo","codeResult","errorTypeStr","errorIndex","trace","extractErrorType","previewLoading","setPreviewLoading","chartPreview","setChartPreview","setTrace","sourceAddr","aliasAddr","exec","dataFrame","previewCode","randomId","converted","setRequest","TABLE","runPythonCode","getResponse","typeName","Python_typeName","buildChartPreview","labelPosition","dangerouslySetInnerHTML","__html","outputCellStr","setOutputCellStr","preloadPyWorker","buildTitle","lineHeight","reload","appid","createElement","getElementsByTagName","parentNode","insertBefore","concat","call","arguments","o","environment","dsn","integrations","maskAllText","blockAllMedia","tracesSampleRate","tracePropagationTargets","replaysSessionSampleRate","replaysOnErrorSampleRate","defaultOptions","queries","refetchOnWindowFocus","CustomRouter","onReady","getElementById","render","QueryClientProvider","client","FluentProvider","basename","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","O","chunkIds","fn","notFulfilled","fulfilled","getter","__esModule","getPrototypeOf","__proto__","ns","create","getOwnPropertyNames","defineProperty","enumerable","globalThis","Function","hmd","set","prop","hasOwnProperty","Symbol","toStringTag","nmd","baseURI","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","nc","__webpack_exports__"],"sourceRoot":""}